From c5e1939153d54e72c50f09b5f7c29d7fdde08f0c Mon Sep 17 00:00:00 2001 From: Jordan Checkman Date: Sat, 6 Sep 2014 02:49:48 -0400 Subject: [PATCH] JSHinted and fixed ~50 little things. --- bower.json | 2 +- dist/Please.js | 2 +- .../node_modules/ansi-regex/package.json | 2 +- .../node_modules/ansi-regex/package.json | 2 +- .../node_modules/dateformat/package.json | 3 +- .../lodash._reinterpolate/package.json | 3 +- .../lodash._escapestringchar/package.json | 3 +- .../node_modules/lodash.defaults/package.json | 3 +- .../lodash._htmlescapes/package.json | 3 +- .../lodash._escapehtmlchar/package.json | 3 +- .../lodash._htmlescapes/package.json | 3 +- .../lodash._reunescapedhtml/package.json | 3 +- .../node_modules/lodash.escape/package.json | 3 +- .../lodash.templatesettings/package.json | 3 +- .../node_modules/lodash.values/package.json | 3 +- .../node_modules/lodash.template/package.json | 3 +- .../node_modules/readable-stream/README.md | 4 +- .../readable-stream/lib/_stream_readable.js | 7 + .../readable-stream/lib/_stream_writable.js | 5 + .../node_modules/string_decoder/index.js | 75 +- .../node_modules/string_decoder/package.json | 32 +- .../node_modules/readable-stream/package.json | 36 +- .../node_modules/clone-stats/package.json | 2 +- .../node_modules/jshint/dist/jshint-rhino.js | 805 +- .../node_modules/jshint/dist/jshint.js | 805 +- .../jshint/node_modules/cli/cli.js | 23 +- .../jshint/node_modules/cli/package.json | 17 +- .../node_modules/date-now/package.json | 3 +- .../console-browserify/package.json | 3 +- .../node_modules/domelementtype/package.json | 6 +- .../node_modules/domutils/package.json | 3 +- .../node_modules/entities/package.json | 3 +- .../node_modules/readable-stream/README.md | 4 +- .../readable-stream/lib/_stream_readable.js | 7 + .../readable-stream/lib/_stream_writable.js | 5 + .../node_modules/string_decoder/index.js | 75 +- .../node_modules/string_decoder/package.json | 32 +- .../node_modules/readable-stream/package.json | 36 +- .../node_modules/htmlparser2/package.json | 3 +- .../jshint/node_modules/shelljs/package.json | 3 +- .../strip-json-comments/package.json | 3 +- .../node_modules/underscore/package.json | 3 +- .../node_modules/jshint/package.json | 28 +- .../node_modules/jshint/src/cli.js | 53 +- .../node_modules/jshint/src/jshint.js | 161 +- .../node_modules/jshint/src/lex.js | 119 +- .../node_modules/jshint/src/reg.js | 2 +- .../node_modules/jshint/src/style.js | 6 + .../node_modules/jshint/src/vars.js | 17 + .../node_modules/lodash/package.json | 3 +- .../node_modules/rcfinder/package.json | 3 +- .../node_modules/rcloader/package.json | 3 +- .../readable-stream/lib/_stream_readable.js | 35 +- .../readable-stream/lib/_stream_writable.js | 1 - .../node_modules/string_decoder/index.js | 75 +- .../node_modules/string_decoder/package.json | 32 +- .../node_modules/readable-stream/package.json | 18 +- node_modules/gulp-jshint/package.json | 5 +- node_modules/gulp-uglify/CHANGELOG.md | 7 + node_modules/gulp-uglify/index.js | 9 +- node_modules/gulp-uglify/lib/error.js | 7 - .../node_modules/deepmerge/package.json | 8 +- .../node_modules/gulp-util/README.md | 5 +- .../node_modules/gulp-util/lib/PluginError.js | 96 +- .../node_modules/ansi-regex/package.json | 2 +- .../node_modules/ansi-regex/package.json | 2 +- .../node_modules/dateformat/package.json | 3 +- .../lodash._reinterpolate/package.json | 3 +- .../lodash._escapestringchar/package.json | 3 +- .../node_modules/lodash.defaults/package.json | 3 +- .../lodash._htmlescapes/package.json | 3 +- .../lodash._escapehtmlchar/package.json | 3 +- .../lodash._htmlescapes/package.json | 3 +- .../lodash._reunescapedhtml/package.json | 3 +- .../node_modules/lodash.escape/package.json | 3 +- .../lodash.templatesettings/package.json | 3 +- .../node_modules/lodash.values/package.json | 3 +- .../node_modules/lodash.template/package.json | 3 +- .../node_modules/lodash}/LICENSE.txt | 0 .../gulp-util/node_modules/lodash/README.md | 163 + .../node_modules/lodash/dist/lodash.compat.js | 7157 ++++++++++++++++ .../lodash/dist/lodash.compat.min.js | 61 + .../node_modules/lodash/dist/lodash.js | 6785 ++++++++++++++++ .../node_modules/lodash/dist/lodash.min.js | 56 + .../lodash/dist/lodash.underscore.js | 4979 ++++++++++++ .../lodash/dist/lodash.underscore.min.js | 39 + .../gulp-util/node_modules/lodash/lodash.js | 7179 +++++++++++++++++ .../node_modules/lodash/package.json | 103 + .../gulp-util/node_modules/minimist/index.js | 53 +- .../node_modules/minimist/package.json | 24 +- .../node_modules/minimist/readme.markdown | 5 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/readable-stream/README.md | 4 +- .../readable-stream/lib/_stream_readable.js | 7 + .../readable-stream/lib/_stream_writable.js | 5 + .../node_modules/string_decoder/index.js | 75 +- .../node_modules/string_decoder/package.json | 32 +- .../node_modules/readable-stream/package.json | 36 +- .../node_modules/through2/.npmignore | 3 - .../gulp-util/node_modules/through2/README.md | 140 - .../node_modules/readable-stream/.npmignore | 5 - .../node_modules/readable-stream/README.md | 15 - .../node_modules/readable-stream/duplex.js | 1 - .../readable-stream/lib/_stream_duplex.js | 89 - .../lib/_stream_passthrough.js | 46 - .../readable-stream/lib/_stream_readable.js | 959 --- .../readable-stream/lib/_stream_transform.js | 210 - .../readable-stream/lib/_stream_writable.js | 387 - .../node_modules/core-util-is/README.md | 3 - .../node_modules/core-util-is/float.patch | 604 -- .../node_modules/core-util-is/lib/util.js | 107 - .../node_modules/core-util-is/package.json | 36 - .../node_modules/core-util-is/util.js | 106 - .../node_modules/inherits/LICENSE | 16 - .../node_modules/inherits/README.md | 42 - .../node_modules/inherits/inherits.js | 1 - .../node_modules/inherits/inherits_browser.js | 23 - .../node_modules/inherits/package.json | 33 - .../node_modules/inherits/test.js | 25 - .../node_modules/isarray/README.md | 54 - .../node_modules/isarray/build/build.js | 209 - .../node_modules/isarray/component.json | 19 - .../node_modules/isarray/index.js | 3 - .../node_modules/isarray/package.json | 54 - .../node_modules/string_decoder/.npmignore | 2 - .../node_modules/string_decoder/LICENSE | 20 - .../node_modules/string_decoder/README.md | 7 - .../node_modules/string_decoder/index.js | 200 - .../node_modules/string_decoder/package.json | 32 - .../node_modules/readable-stream/package.json | 69 - .../readable-stream/passthrough.js | 1 - .../node_modules/readable-stream/readable.js | 6 - .../node_modules/readable-stream/transform.js | 1 - .../node_modules/readable-stream/writable.js | 1 - .../through2/node_modules/xtend/Makefile | 4 - .../through2/node_modules/xtend/README.md | 28 - .../through2/node_modules/xtend/mutable.js | 15 - .../through2/node_modules/xtend/package.json | 87 - .../through2/node_modules/xtend/test.js | 63 - .../node_modules/through2/package.json | 65 - .../node_modules/through2/through2.js | 78 - .../node_modules/vinyl/.jshintignore | 2 + .../gulp-util/node_modules/vinyl/.jshintrc | 36 + .../gulp-util/node_modules/vinyl/.travis.yml | 3 +- .../gulp-util/node_modules/vinyl/LICENSE | 0 .../gulp-util/node_modules/vinyl/README.md | 12 +- .../node_modules/vinyl/coverage/coverage.json | 1 + .../vinyl/coverage/lcov-report/index.html | 363 + .../vinyl/coverage/lcov-report/prettify.css | 1 + .../vinyl/coverage/lcov-report/prettify.js | 1 + .../coverage/lcov-report/vinyl/index.html | 350 + .../coverage/lcov-report/vinyl/index.js.html | 847 ++ .../lcov-report/vinyl/lib/cloneBuffer.js.html | 343 + .../coverage/lcov-report/vinyl/lib/index.html | 402 + .../vinyl/lib/inspectStream.js.html | 355 + .../lcov-report/vinyl/lib/isBuffer.js.html | 340 + .../lcov-report/vinyl/lib/isNull.js.html | 331 + .../lcov-report/vinyl/lib/isStream.js.html | 334 + .../node_modules/vinyl/coverage/lcov.info | 280 + .../gulp-util/node_modules/vinyl/index.js | 81 +- .../node_modules/vinyl/lib/cloneBuffer.js | 2 +- .../node_modules/vinyl/lib/inspectStream.js | 5 +- .../node_modules/vinyl/lib/isNull.js | 2 +- .../node_modules/clone-stats/package.json | 2 +- .../gulp-util/node_modules/vinyl/package.json | 46 +- .../node_modules/vinyl/perf/clone.js | 59 + .../gulp-util/node_modules/vinyl/test/File.js | 395 +- .../node_modules/vinyl/test/cloneBuffer.js | 3 +- .../node_modules/vinyl/test/isBuffer.js | 4 +- .../node_modules/vinyl/test/isNull.js | 7 +- .../node_modules/vinyl/test/isStream.js | 4 +- .../node_modules/gulp-util/package.json | 27 +- .../node_modules/through2/README.md | 4 +- .../readable-stream/lib/_stream_readable.js | 35 +- .../readable-stream/lib/_stream_writable.js | 1 - .../node_modules/string_decoder/index.js | 75 +- .../node_modules/string_decoder/package.json | 32 +- .../node_modules/readable-stream/package.json | 20 +- .../through2/node_modules/xtend/.jshintrc | 0 .../through2/node_modules/xtend/LICENCE | 4 +- .../through2/node_modules/xtend/README.md | 9 +- .../through2/node_modules/xtend/has-keys.js | 7 - .../node_modules/xtend/immutable.js} | 0 .../through2/node_modules/xtend/index.js | 25 - .../through2/node_modules/xtend/mutable.js | 22 +- .../xtend/node_modules/object-keys/README.md | 39 - .../xtend/node_modules/object-keys/foreach.js | 40 - .../xtend/node_modules/object-keys/index.js | 2 - .../node_modules/object-keys/isArguments.js | 16 - .../node_modules/object-keys/package.json | 72 - .../xtend/node_modules/object-keys/shim.js | 62 - .../node_modules/object-keys/test/foreach.js | 156 - .../node_modules/object-keys/test/index.js | 6 - .../object-keys/test/isArguments.js | 10 - .../node_modules/object-keys/test/shim.js | 134 - .../through2/node_modules/xtend/package.json | 28 +- .../node_modules/through2/package.json | 33 +- .../node_modules/through2/through2.js | 26 +- .../node_modules/uglify-js/.travis.yml | 2 + .../node_modules/uglify-js/README.md | 11 +- .../node_modules/uglify-js/bin/uglifyjs | 14 +- .../node_modules/uglify-js/lib/ast.js | 8 +- .../node_modules/uglify-js/lib/compress.js | 160 +- .../node_modules/uglify-js/lib/mozilla-ast.js | 2 +- .../node_modules/uglify-js/lib/output.js | 103 +- .../node_modules/uglify-js/lib/parse.js | 13 +- .../node_modules/uglify-js/lib/scope.js | 23 +- .../node_modules/uglify-js/lib/sourcemap.js | 10 +- .../node_modules/uglify-js/lib/utils.js | 3 - .../node_modules/source-map/.tern-port | 2 +- .../node_modules/source-map/CHANGELOG.md | 27 + .../node_modules/source-map/README.md | 7 +- .../lib/source-map/source-map-consumer.js | 12 +- .../lib/source-map/source-map-generator.js | 63 +- .../source-map/lib/source-map/source-node.js | 24 +- .../source-map/lib/source-map/util.js | 45 +- .../node_modules/amdefine/package.json | 3 +- .../node_modules/source-map/package.json | 26 +- .../source-map/test-source-map-consumer.js | 70 +- .../source-map/test-source-map-generator.js | 64 +- .../test/source-map/test-source-node.js | 125 + .../source-map/test/source-map/test-util.js | 89 + .../source-map/test/source-map/util.js | 15 + .../node_modules/uglify-js/package.json | 24 +- .../uglify-js/test/compress/conditionals.js | 91 - .../uglify-js/test/compress/drop-unused.js | 44 - .../uglify-js/test/compress/negate-iife.js | 6 +- .../uglify-js/test/compress/properties.js | 24 +- .../node_modules/uglify-js/tools/node.js | 44 +- node_modules/gulp-uglify/package.json | 37 +- node_modules/gulp-uglify/test/err.js | 1 + node_modules/gulp-uglify/test/minify.js | 1 + node_modules/gulp-uglify/test/null.js | 1 + node_modules/gulp-uglify/test/sourcemap.js | 1 + node_modules/gulp-uglify/test/streams.js | 4 +- node_modules/gulp-watch/README.md | 24 +- node_modules/gulp-watch/index.js | 4 +- .../glob/node_modules/inherits/package.json | 3 +- .../globule/node_modules/lodash/package.json | 3 +- .../gulp-watch/node_modules/glob/LICENSE | 36 +- .../glob/node_modules/minimatch}/.npmignore | 0 .../glob/node_modules/minimatch/.travis.yml | 4 + .../glob/node_modules/minimatch}/LICENSE | 18 +- .../glob/node_modules/minimatch/README.md | 218 + .../glob/node_modules/minimatch/minimatch.js | 1073 +++ .../node_modules/lru-cache/.npmignore | 1 + .../node_modules/lru-cache/CONTRIBUTORS | 14 + .../minimatch/node_modules/lru-cache/LICENSE | 23 + .../node_modules/lru-cache/README.md | 97 + .../node_modules/lru-cache/lib/lru-cache.js | 252 + .../node_modules/lru-cache/package.json | 33 + .../node_modules/lru-cache/test/basic.js | 369 + .../node_modules/lru-cache/test/foreach.js | 52 + .../lru-cache/test/memory-leak.js | 50 + .../minimatch/node_modules/sigmund}/LICENSE | 0 .../minimatch/node_modules/sigmund/README.md | 53 + .../minimatch/node_modules/sigmund/bench.js | 283 + .../node_modules/sigmund/package.json | 42 + .../minimatch/node_modules/sigmund/sigmund.js | 39 + .../node_modules/sigmund/test/basic.js | 24 + .../glob/node_modules/minimatch/package.json | 58 + .../glob/node_modules/minimatch/test/basic.js | 399 + .../minimatch/test/brace-expand.js | 40 + .../node_modules/minimatch/test/caching.js | 14 + .../node_modules/minimatch/test/defaults.js | 274 + .../test/extglob-ending-with-state-char.js | 8 + .../gulp-watch/node_modules/glob/package.json | 20 +- .../node_modules/glob2base/.editorconfig | 10 + .../node_modules/glob2base/.jshintrc | 19 + .../node_modules/glob2base/.npmignore | 5 +- .../node_modules/glob2base/.travis.yml | 9 +- .../gulp-watch/node_modules/glob2base/LICENSE | 2 +- .../node_modules/glob2base/README.md | 51 +- .../node_modules/glob2base/index.js | 21 +- .../node_modules/lodash.findindex/README.md | 15 - .../node_modules/lodash.findindex/index.js | 65 - .../lodash.createcallback/README.md | 15 - .../lodash.createcallback/index.js | 81 - .../lodash._basecreatecallback/README.md | 15 - .../lodash._basecreatecallback/index.js | 80 - .../lodash._setbinddata/README.md | 15 - .../node_modules/lodash._setbinddata/index.js | 43 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash.noop/README.md | 15 - .../node_modules/lodash.noop/index.js | 26 - .../node_modules/lodash.noop/package.json | 83 - .../lodash._setbinddata/package.json | 79 - .../node_modules/lodash.bind/README.md | 15 - .../node_modules/lodash.bind/index.js | 40 - .../lodash._createwrapper/README.md | 15 - .../lodash._createwrapper/index.js | 106 - .../node_modules/lodash._basebind/README.md | 15 - .../node_modules/lodash._basebind/index.js | 62 - .../lodash._basecreate/LICENSE.txt | 22 - .../node_modules/lodash._basecreate/README.md | 15 - .../node_modules/lodash._basecreate/index.js | 42 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash.noop/LICENSE.txt | 22 - .../node_modules/lodash.noop/README.md | 15 - .../node_modules/lodash.noop/index.js | 26 - .../node_modules/lodash.noop/package.json | 83 - .../lodash._basecreate/package.json | 80 - .../lodash._basebind/package.json | 81 - .../lodash._basecreatewrapper/LICENSE.txt | 22 - .../lodash._basecreatewrapper/README.md | 15 - .../lodash._basecreatewrapper/index.js | 78 - .../lodash._basecreate/LICENSE.txt | 22 - .../node_modules/lodash._basecreate/README.md | 15 - .../node_modules/lodash._basecreate/index.js | 42 - .../node_modules/lodash._isnative/LICENSE.txt | 22 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash.noop/LICENSE.txt | 22 - .../node_modules/lodash.noop/README.md | 15 - .../node_modules/lodash.noop/index.js | 26 - .../node_modules/lodash.noop/package.json | 83 - .../lodash._basecreate/package.json | 80 - .../lodash._basecreatewrapper/package.json | 81 - .../lodash.isfunction/LICENSE.txt | 22 - .../node_modules/lodash.isfunction/README.md | 15 - .../node_modules/lodash.isfunction/index.js | 27 - .../lodash.isfunction/package.json | 53 - .../lodash._createwrapper/package.json | 81 - .../node_modules/lodash._slice/LICENSE.txt | 22 - .../node_modules/lodash._slice/README.md | 15 - .../node_modules/lodash._slice/index.js | 38 - .../node_modules/lodash._slice/package.json | 75 - .../node_modules/lodash.bind/package.json | 86 - .../node_modules/lodash.identity/LICENSE.txt | 22 - .../node_modules/lodash.identity/README.md | 15 - .../node_modules/lodash.identity/index.js | 28 - .../node_modules/lodash.identity/package.json | 82 - .../node_modules/lodash.support/LICENSE.txt | 22 - .../node_modules/lodash.support/README.md | 15 - .../node_modules/lodash.support/index.js | 40 - .../node_modules/lodash._isnative/LICENSE.txt | 22 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash.support/package.json | 85 - .../lodash._basecreatecallback/package.json | 81 - .../lodash._baseisequal/LICENSE.txt | 22 - .../lodash._baseisequal/README.md | 15 - .../node_modules/lodash._baseisequal/index.js | 209 - .../node_modules/lodash._getarray/LICENSE.txt | 22 - .../node_modules/lodash._getarray/README.md | 15 - .../node_modules/lodash._getarray/index.js | 21 - .../lodash._arraypool/LICENSE.txt | 22 - .../node_modules/lodash._arraypool/README.md | 15 - .../node_modules/lodash._arraypool/index.js | 13 - .../lodash._arraypool/package.json | 75 - .../lodash._getarray/package.json | 78 - .../lodash._objecttypes/LICENSE.txt | 22 - .../lodash._objecttypes/README.md | 15 - .../node_modules/lodash._objecttypes/index.js | 20 - .../lodash._objecttypes/package.json | 46 - .../lodash._releasearray/LICENSE.txt | 22 - .../lodash._releasearray/README.md | 15 - .../lodash._releasearray/index.js | 25 - .../lodash._arraypool/LICENSE.txt | 22 - .../node_modules/lodash._arraypool/README.md | 15 - .../node_modules/lodash._arraypool/index.js | 13 - .../lodash._arraypool/package.json | 75 - .../lodash._maxpoolsize/LICENSE.txt | 22 - .../lodash._maxpoolsize/README.md | 15 - .../node_modules/lodash._maxpoolsize/index.js | 13 - .../lodash._maxpoolsize/package.json | 75 - .../lodash._releasearray/package.json | 79 - .../node_modules/lodash.forin/LICENSE.txt | 22 - .../node_modules/lodash.forin/README.md | 15 - .../node_modules/lodash.forin/index.js | 54 - .../node_modules/lodash.forin/package.json | 86 - .../lodash.isfunction/LICENSE.txt | 22 - .../node_modules/lodash.isfunction/README.md | 15 - .../node_modules/lodash.isfunction/index.js | 27 - .../lodash.isfunction/package.json | 53 - .../lodash._baseisequal/package.json | 82 - .../node_modules/lodash.isobject/LICENSE.txt | 22 - .../node_modules/lodash.isobject/README.md | 15 - .../node_modules/lodash.isobject/index.js | 39 - .../lodash._objecttypes/LICENSE.txt | 22 - .../lodash._objecttypes/README.md | 15 - .../node_modules/lodash._objecttypes/index.js | 20 - .../lodash._objecttypes/package.json | 46 - .../node_modules/lodash.isobject/package.json | 56 - .../node_modules/lodash.keys/LICENSE.txt | 22 - .../node_modules/lodash.keys/README.md | 15 - .../node_modules/lodash.keys/index.js | 36 - .../node_modules/lodash._isnative/LICENSE.txt | 22 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash._shimkeys/LICENSE.txt | 22 - .../node_modules/lodash._shimkeys/README.md | 15 - .../node_modules/lodash._shimkeys/index.js | 38 - .../lodash._objecttypes/LICENSE.txt | 22 - .../lodash._objecttypes/README.md | 15 - .../node_modules/lodash._objecttypes/index.js | 20 - .../lodash._objecttypes/package.json | 46 - .../lodash._shimkeys/package.json | 79 - .../node_modules/lodash.keys/package.json | 88 - .../node_modules/lodash.property/LICENSE.txt | 22 - .../node_modules/lodash.property/README.md | 15 - .../node_modules/lodash.property/index.js | 40 - .../node_modules/lodash.property/package.json | 82 - .../lodash.createcallback/package.json | 89 - .../lodash.findindex/package.json | 85 - .../LICENSE.txt | 0 .../glob2base/node_modules/lodash/README.md | 163 + .../node_modules/lodash/dist/lodash.compat.js | 7157 ++++++++++++++++ .../lodash/dist/lodash.compat.min.js | 61 + .../node_modules/lodash/dist/lodash.js | 6785 ++++++++++++++++ .../node_modules/lodash/dist/lodash.min.js | 56 + .../lodash/dist/lodash.underscore.js | 4979 ++++++++++++ .../lodash/dist/lodash.underscore.min.js | 39 + .../glob2base/node_modules/lodash/lodash.js | 7179 +++++++++++++++++ .../node_modules/lodash/package.json | 103 + .../node_modules/glob2base/package.json | 35 +- .../node_modules/from/package.json | 6 +- .../node_modules/pause-stream/package.json | 3 +- .../node_modules/split/package.json | 3 +- .../node_modules/stream-combiner/package.json | 3 +- .../node_modules/event-stream/package.json | 3 +- .../node_modules/gulp-util/README.md | 5 +- .../node_modules/gulp-util/lib/PluginError.js | 96 +- .../node_modules/dateformat/package.json | 3 +- .../lodash._reinterpolate/package.json | 3 +- .../lodash._escapestringchar/package.json | 3 +- .../lodash._htmlescapes/package.json | 3 +- .../lodash._escapehtmlchar/package.json | 3 +- .../lodash._htmlescapes/package.json | 3 +- .../lodash._reunescapedhtml/package.json | 3 +- .../node_modules/lodash.escape/package.json | 3 +- .../lodash._isnative/package.json | 2 +- .../lodash.templatesettings/package.json | 3 +- .../node_modules/lodash.values/package.json | 3 +- .../node_modules/lodash.template/package.json | 3 +- .../node_modules/lodash}/LICENSE.txt | 0 .../gulp-util/node_modules/lodash/README.md | 163 + .../node_modules/lodash/dist/lodash.compat.js | 7157 ++++++++++++++++ .../lodash/dist/lodash.compat.min.js | 61 + .../node_modules/lodash/dist/lodash.js | 6785 ++++++++++++++++ .../node_modules/lodash/dist/lodash.min.js | 56 + .../lodash/dist/lodash.underscore.js | 4979 ++++++++++++ .../lodash/dist/lodash.underscore.min.js | 39 + .../gulp-util/node_modules/lodash/lodash.js | 7179 +++++++++++++++++ .../node_modules/lodash/package.json | 103 + .../gulp-util/node_modules/minimist/index.js | 53 +- .../node_modules/minimist/package.json | 24 +- .../node_modules/minimist/readme.markdown | 5 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/readable-stream/README.md | 4 +- .../readable-stream/lib/_stream_readable.js | 7 + .../readable-stream/lib/_stream_writable.js | 5 + .../node_modules/string_decoder/index.js | 75 +- .../node_modules/string_decoder/package.json | 32 +- .../node_modules/readable-stream/package.json | 36 +- .../gulp-util/node_modules/through2/README.md | 4 +- .../readable-stream/lib/_stream_readable.js | 35 +- .../readable-stream/lib/_stream_writable.js | 1 - .../node_modules/string_decoder/index.js | 75 +- .../node_modules/string_decoder/package.json | 32 +- .../node_modules/readable-stream/package.json | 20 +- .../through2/node_modules/xtend/README.md | 8 +- .../xtend/{index.js => immutable.js} | 0 .../through2/node_modules/xtend/package.json | 23 +- .../node_modules/through2/package.json | 32 +- .../node_modules/through2/through2.js | 26 +- .../node_modules/vinyl/.jshintignore | 2 + .../gulp-util/node_modules/vinyl/.jshintrc | 36 + .../gulp-util/node_modules/vinyl/.npmignore | 6 + .../gulp-util/node_modules/vinyl/.travis.yml | 5 + .../node_modules/vinyl/LICENSE} | 6 +- .../gulp-util/node_modules/vinyl/README.md | 127 + .../node_modules/vinyl/coverage/coverage.json | 1 + .../vinyl/coverage/lcov-report/index.html | 363 + .../vinyl/coverage/lcov-report/prettify.css | 1 + .../vinyl/coverage/lcov-report/prettify.js | 1 + .../coverage/lcov-report/vinyl/index.html | 350 + .../coverage/lcov-report/vinyl/index.js.html | 847 ++ .../lcov-report/vinyl/lib/cloneBuffer.js.html | 343 + .../coverage/lcov-report/vinyl/lib/index.html | 402 + .../vinyl/lib/inspectStream.js.html | 355 + .../lcov-report/vinyl/lib/isBuffer.js.html | 340 + .../lcov-report/vinyl/lib/isNull.js.html | 331 + .../lcov-report/vinyl/lib/isStream.js.html | 334 + .../node_modules/vinyl/coverage/lcov.info | 280 + .../gulp-util/node_modules/vinyl/index.js | 175 + .../node_modules/vinyl/lib/cloneBuffer.js | 7 + .../node_modules/vinyl/lib/inspectStream.js | 11 + .../node_modules/vinyl/lib/isBuffer.js | 7 + .../node_modules/vinyl/lib/isNull.js | 3 + .../node_modules/vinyl/lib/isStream.js | 5 + .../node_modules/clone-stats/LICENSE.md} | 4 +- .../vinyl/node_modules/clone-stats/README.md | 17 + .../vinyl/node_modules/clone-stats/index.js | 13 + .../node_modules/clone-stats/package.json | 57 + .../vinyl/node_modules/clone-stats/test.js | 36 + .../gulp-util/node_modules/vinyl/package.json | 70 + .../node_modules/vinyl/perf/clone.js | 59 + .../gulp-util/node_modules/vinyl/test/File.js | 753 ++ .../node_modules/vinyl/test/cloneBuffer.js | 27 + .../node_modules/vinyl/test/inspectStream.js | 53 + .../node_modules/vinyl/test/isBuffer.js | 29 + .../node_modules/vinyl/test/isNull.js | 22 + .../node_modules/vinyl/test/isStream.js | 29 + .../node_modules/gulp-util/package.json | 27 +- .../node_modules/minimatch/minimatch.js | 14 +- .../node_modules/minimatch/package.json | 30 +- .../minimatch/test/brace-expand.js | 7 + .../node_modules/vinyl-fs/lib/dest/index.js | 4 +- .../vinyl-fs/lib/dest/writeContents/index.js | 34 +- .../node_modules/vinyl-fs/lib/src/index.js | 6 +- .../node_modules/minimatch}/.npmignore | 0 .../node_modules/minimatch/.travis.yml | 4 + .../node_modules/minimatch/LICENSE | 23 + .../node_modules/minimatch/README.md | 218 + .../node_modules/minimatch/minimatch.js | 1073 +++ .../node_modules/lru-cache/.npmignore | 1 + .../node_modules/lru-cache/CONTRIBUTORS | 14 + .../minimatch/node_modules/lru-cache/LICENSE | 23 + .../node_modules/lru-cache/README.md | 97 + .../node_modules/lru-cache/lib/lru-cache.js | 252 + .../node_modules/lru-cache/package.json | 33 + .../node_modules/lru-cache/test/basic.js | 369 + .../node_modules/lru-cache/test/foreach.js | 52 + .../lru-cache/test/memory-leak.js | 50 + .../minimatch/node_modules/sigmund/LICENSE | 27 + .../minimatch/node_modules/sigmund/README.md | 53 + .../minimatch/node_modules/sigmund/bench.js | 283 + .../node_modules/sigmund/package.json | 42 + .../minimatch/node_modules/sigmund/sigmund.js | 39 + .../node_modules/sigmund/test/basic.js | 24 + .../node_modules/minimatch/package.json | 58 + .../node_modules/minimatch/test/basic.js | 399 + .../minimatch/test/brace-expand.js | 40 + .../node_modules/minimatch/test/caching.js | 14 + .../node_modules/minimatch/test/defaults.js | 274 + .../test/extglob-ending-with-state-char.js | 8 + .../node_modules/glob-stream/package.json | 24 +- .../node_modules/lodash.defaults/LICENSE.txt | 22 - .../node_modules/lodash.defaults/README.md | 15 - .../node_modules/lodash.defaults/index.js | 54 - .../lodash._objecttypes/LICENSE.txt | 22 - .../lodash._objecttypes/README.md | 15 - .../node_modules/lodash._objecttypes/index.js | 20 - .../lodash._objecttypes/package.json | 46 - .../node_modules/lodash.keys/LICENSE.txt | 22 - .../node_modules/lodash.keys/README.md | 15 - .../node_modules/lodash.keys/index.js | 36 - .../node_modules/lodash._isnative/LICENSE.txt | 22 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash._shimkeys/LICENSE.txt | 22 - .../node_modules/lodash._shimkeys/README.md | 15 - .../node_modules/lodash._shimkeys/index.js | 38 - .../lodash._shimkeys/package.json | 79 - .../node_modules/lodash.isobject/LICENSE.txt | 22 - .../node_modules/lodash.isobject/README.md | 15 - .../node_modules/lodash.isobject/index.js | 39 - .../node_modules/lodash.isobject/package.json | 56 - .../node_modules/lodash.keys/package.json | 88 - .../node_modules/lodash.defaults/package.json | 86 - .../node_modules/lodash}/LICENSE.txt | 0 .../vinyl-fs/node_modules/lodash/README.md | 163 + .../node_modules/lodash/dist/lodash.compat.js | 7157 ++++++++++++++++ .../lodash/dist/lodash.compat.min.js | 61 + .../node_modules/lodash/dist/lodash.js | 6785 ++++++++++++++++ .../node_modules/lodash/dist/lodash.min.js | 56 + .../lodash/dist/lodash.underscore.js | 4979 ++++++++++++ .../lodash/dist/lodash.underscore.min.js | 39 + .../vinyl-fs/node_modules/lodash/lodash.js | 7179 +++++++++++++++++ .../vinyl-fs/node_modules/lodash/package.json | 103 + .../vinyl-fs/node_modules/strip-bom/cli.js | 28 +- .../vinyl-fs/node_modules/strip-bom/index.js | 4 +- .../first-chunk-stream/package.json | 20 +- .../node_modules/strip-bom/package.json | 25 +- .../vinyl-fs/node_modules/strip-bom/readme.md | 18 +- .../vinyl-fs/node_modules/through2/README.md | 4 +- .../readable-stream/lib/_stream_readable.js | 35 +- .../readable-stream/lib/_stream_writable.js | 1 - .../node_modules/string_decoder/index.js | 75 +- .../node_modules/string_decoder/package.json | 32 +- .../node_modules/readable-stream/package.json | 20 +- .../through2/node_modules/xtend/README.md | 8 +- .../xtend/{index.js => immutable.js} | 0 .../through2/node_modules/xtend/package.json | 23 +- .../node_modules/through2/package.json | 32 +- .../node_modules/through2/through2.js | 26 +- .../vinyl-fs/node_modules/vinyl/.jshintignore | 2 + .../vinyl-fs/node_modules/vinyl/.jshintrc | 36 + .../vinyl-fs/node_modules/vinyl/.npmignore | 6 + .../vinyl-fs/node_modules/vinyl/.travis.yml | 5 + .../node_modules/vinyl/LICENSE} | 6 +- .../vinyl-fs/node_modules/vinyl/README.md | 127 + .../node_modules/vinyl/coverage/coverage.json | 1 + .../vinyl/coverage/lcov-report/index.html | 363 + .../vinyl/coverage/lcov-report/prettify.css | 1 + .../vinyl/coverage/lcov-report/prettify.js | 1 + .../coverage/lcov-report/vinyl/index.html | 350 + .../coverage/lcov-report/vinyl/index.js.html | 847 ++ .../lcov-report/vinyl/lib/cloneBuffer.js.html | 343 + .../coverage/lcov-report/vinyl/lib/index.html | 402 + .../vinyl/lib/inspectStream.js.html | 355 + .../lcov-report/vinyl/lib/isBuffer.js.html | 340 + .../lcov-report/vinyl/lib/isNull.js.html | 331 + .../lcov-report/vinyl/lib/isStream.js.html | 334 + .../node_modules/vinyl/coverage/lcov.info | 280 + .../vinyl-fs/node_modules/vinyl/index.js | 175 + .../node_modules/vinyl/lib/cloneBuffer.js | 7 + .../node_modules/vinyl/lib/inspectStream.js | 11 + .../node_modules/vinyl/lib/isBuffer.js | 7 + .../vinyl-fs/node_modules/vinyl/lib/isNull.js | 3 + .../node_modules/vinyl/lib/isStream.js | 5 + .../vinyl/node_modules/clone-stats/LICENSE.md | 21 + .../vinyl/node_modules/clone-stats/README.md | 17 + .../vinyl/node_modules/clone-stats/index.js | 13 + .../node_modules/clone-stats/package.json | 57 + .../vinyl/node_modules/clone-stats/test.js | 36 + .../vinyl-fs/node_modules/vinyl/package.json | 70 + .../vinyl-fs/node_modules/vinyl/perf/clone.js | 59 + .../vinyl-fs/node_modules/vinyl/test/File.js | 753 ++ .../node_modules/vinyl/test/cloneBuffer.js | 27 + .../node_modules/vinyl/test/inspectStream.js | 53 + .../node_modules/vinyl/test/isBuffer.js | 29 + .../node_modules/vinyl/test/isNull.js | 22 + .../node_modules/vinyl/test/isStream.js | 29 + .../node_modules/vinyl-fs/package.json | 29 +- .../node_modules/vinyl-fs/test/dest.js | 246 + .../node_modules/vinyl-fs/test/spy.js | 27 + .../node_modules/vinyl-fs/test/src.js | 4 + .../gulp-watch/node_modules/vinyl/.travis.yml | 3 +- .../gulp-watch/node_modules/vinyl/LICENSE | 0 .../gulp-watch/node_modules/vinyl/README.md | 12 +- .../gulp-watch/node_modules/vinyl/index.js | 45 +- .../node_modules/clone-stats/package.json | 2 +- .../node_modules/lodash}/LICENSE.txt | 0 .../vinyl/node_modules/lodash/README.md | 163 + .../node_modules/lodash/dist/lodash.compat.js | 7157 ++++++++++++++++ .../lodash/dist/lodash.compat.min.js | 61 + .../vinyl/node_modules/lodash/dist/lodash.js | 6785 ++++++++++++++++ .../node_modules/lodash/dist/lodash.min.js | 56 + .../lodash/dist/lodash.underscore.js | 4979 ++++++++++++ .../lodash/dist/lodash.underscore.min.js | 39 + .../vinyl/node_modules/lodash/lodash.js | 7179 +++++++++++++++++ .../vinyl/node_modules/lodash/package.json | 103 + .../node_modules/vinyl/package.json | 46 +- .../node_modules/vinyl/test/File.js | 99 +- node_modules/gulp-watch/package.json | 34 +- node_modules/gulp/README.md | 11 +- node_modules/gulp/bin/gulp.js | 14 +- .../gulp/node_modules/archy/package.json | 32 +- .../node_modules/ansi-styles/package.json | 2 +- .../escape-string-regexp/package.json | 2 +- .../chalk/node_modules/has-ansi/package.json | 2 +- .../node_modules/ansi-regex/package.json | 2 +- .../node_modules/strip-ansi/package.json | 2 +- .../node_modules/supports-color/package.json | 2 +- .../gulp/node_modules/chalk/package.json | 2 +- .../gulp/node_modules/deprecated/package.json | 5 +- .../gulp/node_modules/gulp-util/README.md | 5 +- .../node_modules/gulp-util/lib/PluginError.js | 96 +- .../node_modules/dateformat/package.json | 5 +- .../lodash._reinterpolate/package.json | 5 +- .../lodash._escapestringchar/package.json | 5 +- .../lodash._objecttypes/package.json | 2 +- .../node_modules/lodash.defaults/package.json | 2 +- .../lodash._htmlescapes/package.json | 5 +- .../lodash._escapehtmlchar/package.json | 5 +- .../lodash._htmlescapes/package.json | 5 +- .../lodash._reunescapedhtml/package.json | 5 +- .../node_modules/lodash.escape/package.json | 5 +- .../lodash._isnative/package.json | 2 +- .../lodash._objecttypes/package.json | 2 +- .../lodash._shimkeys/package.json | 5 +- .../lodash._objecttypes/package.json | 2 +- .../node_modules/lodash.isobject/package.json | 2 +- .../node_modules/lodash.keys/package.json | 5 +- .../lodash.templatesettings/package.json | 5 +- .../node_modules/lodash.values/package.json | 5 +- .../node_modules/lodash.template/package.json | 5 +- .../node_modules/lodash}/LICENSE.txt | 0 .../gulp-util/node_modules/lodash/README.md | 163 + .../node_modules/lodash/dist/lodash.compat.js | 7157 ++++++++++++++++ .../lodash/dist/lodash.compat.min.js | 61 + .../node_modules/lodash/dist/lodash.js | 6785 ++++++++++++++++ .../node_modules/lodash/dist/lodash.min.js | 56 + .../lodash/dist/lodash.underscore.js | 4979 ++++++++++++ .../lodash/dist/lodash.underscore.min.js | 39 + .../gulp-util/node_modules/lodash/lodash.js | 7179 +++++++++++++++++ .../node_modules/lodash/package.json | 103 + .../node_modules/minimist}/.travis.yml | 3 +- .../gulp-util/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../gulp-util/node_modules/minimist/index.js | 219 + .../node_modules/minimist/package.json | 70 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../node_modules/minimist/test/bool.js | 119 + .../node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 20 + .../node_modules/minimist/test/dotted.js | 22 + .../node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/num.js | 36 + .../node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + .../node_modules/readable-stream/README.md | 4 +- .../readable-stream/lib/_stream_readable.js | 7 + .../readable-stream/lib/_stream_writable.js | 5 + .../node_modules/core-util-is/package.json | 2 +- .../node_modules/string_decoder/index.js | 75 +- .../node_modules/string_decoder/package.json | 32 +- .../node_modules/readable-stream/package.json | 36 +- .../node_modules/multipipe/package.json | 2 +- .../gulp-util/node_modules/through2/README.md | 4 +- .../readable-stream/lib/_stream_readable.js | 35 +- .../readable-stream/lib/_stream_writable.js | 1 - .../node_modules/core-util-is/package.json | 3 +- .../node_modules/inherits/package.json | 2 +- .../node_modules/isarray/package.json | 5 +- .../node_modules/string_decoder/index.js | 75 +- .../node_modules/string_decoder/package.json | 32 +- .../node_modules/readable-stream/package.json | 20 +- .../through2/node_modules/xtend/README.md | 8 +- .../xtend/{index.js => immutable.js} | 0 .../through2/node_modules/xtend/package.json | 23 +- .../node_modules/through2/package.json | 32 +- .../node_modules/through2/through2.js | 26 +- .../node_modules/vinyl/.jshintignore | 2 + .../gulp-util/node_modules/vinyl/.jshintrc | 36 + .../gulp-util/node_modules/vinyl/.travis.yml | 3 +- .../gulp-util/node_modules/vinyl/LICENSE | 0 .../gulp-util/node_modules/vinyl/README.md | 12 +- .../node_modules/vinyl/coverage/coverage.json | 1 + .../vinyl/coverage/lcov-report/index.html | 363 + .../vinyl/coverage/lcov-report/prettify.css | 1 + .../vinyl/coverage/lcov-report/prettify.js | 1 + .../coverage/lcov-report/vinyl/index.html | 350 + .../coverage/lcov-report/vinyl/index.js.html | 847 ++ .../lcov-report/vinyl/lib/cloneBuffer.js.html | 343 + .../coverage/lcov-report/vinyl/lib/index.html | 402 + .../vinyl/lib/inspectStream.js.html | 355 + .../lcov-report/vinyl/lib/isBuffer.js.html | 340 + .../lcov-report/vinyl/lib/isNull.js.html | 331 + .../lcov-report/vinyl/lib/isStream.js.html | 334 + .../node_modules/vinyl/coverage/lcov.info | 280 + .../gulp-util/node_modules/vinyl/index.js | 81 +- .../node_modules/vinyl/lib/cloneBuffer.js | 2 +- .../node_modules/vinyl/lib/inspectStream.js | 5 +- .../node_modules/vinyl/lib/isNull.js | 2 +- .../node_modules/clone-stats/package.json | 2 +- .../gulp-util/node_modules/vinyl/package.json | 47 +- .../node_modules/vinyl/perf/clone.js | 59 + .../gulp-util/node_modules/vinyl/test/File.js | 395 +- .../node_modules/vinyl/test/cloneBuffer.js | 3 +- .../node_modules/vinyl/test/isBuffer.js | 4 +- .../node_modules/vinyl/test/isNull.js | 7 +- .../node_modules/vinyl/test/isStream.js | 4 +- .../gulp/node_modules/gulp-util/package.json | 28 +- .../gulp/node_modules/interpret/CHANGELOG | 4 + .../gulp/node_modules/interpret/README.md | 6 +- .../gulp/node_modules/interpret/index.js | 2 + .../gulp/node_modules/interpret/package.json | 23 +- .../gulp/node_modules/liftoff/CHANGELOG | 4 + .../gulp/node_modules/liftoff/index.js | 5 +- .../liftoff/node_modules/extend/.travis.yml | 17 +- .../liftoff/node_modules/extend/LICENSE} | 9 +- .../liftoff/node_modules/extend/README.md | 17 +- .../node_modules/extend/component.json | 31 + .../liftoff/node_modules/extend/index.js | 58 +- .../liftoff/node_modules/extend/package.json | 33 +- .../node_modules/glob/package.json | 2 +- .../node_modules/lodash/package.json | 3 +- .../node_modules/findup-sync/package.json | 2 +- .../liftoff/node_modules/minimist/index.js | 13 +- .../node_modules/minimist/package.json | 21 +- .../node_modules/minimist/readme.markdown | 4 +- .../node_modules/minimist/test/all_bool.js | 32 + .../liftoff/node_modules/resolve/lib/async.js | 11 +- .../liftoff/node_modules/resolve/lib/sync.js | 7 +- .../liftoff/node_modules/resolve/package.json | 21 +- .../node_modules/resolve/test/dotdot.js | 29 + .../resolve/test/dotdot/abc/index.js | 2 + .../node_modules/resolve/test/dotdot/index.js | 1 + .../node_modules/resolve/test/nonstring.js | 9 + .../gulp/node_modules/liftoff/package.json | 26 +- .../gulp/node_modules/minimist/package.json | 2 +- .../node_modules/orchestrator/lib/runTask.js | 6 +- .../node_modules/end-of-stream/package.json | 2 +- .../node_modules/sequencify/package.json | 2 +- .../node_modules/stream-consume/.npmignore | 1 + .../node_modules/stream-consume/README.md | 53 + .../node_modules/stream-consume/index.js | 14 + .../node_modules/stream-consume/package.json | 47 + .../node_modules/stream-consume/test/tests.js | 180 + .../node_modules/orchestrator/package.json | 20 +- .../node_modules/pretty-hrtime/package.json | 2 +- .../gulp/node_modules/semver/README.md | 10 +- .../gulp/node_modules/semver/bin/semver | 4 +- .../gulp/node_modules/semver/package.json | 19 +- .../node_modules/semver/semver.browser.js | 44 +- .../node_modules/semver/semver.browser.js.gz | Bin 7238 -> 7247 bytes .../gulp/node_modules/semver/semver.js | 44 +- .../gulp/node_modules/semver/semver.min.js | 2 +- .../gulp/node_modules/semver/semver.min.js.gz | Bin 3304 -> 3318 bytes .../gulp/node_modules/semver/test/clean.js | 25 + .../gulp/node_modules/semver/test/index.js | 6 +- .../gulp/node_modules/semver/test/ltr.js | 3 +- .../gulp/node_modules/tildify/package.json | 2 +- .../node_modules/vinyl-fs/lib/dest/index.js | 4 +- .../vinyl-fs/lib/dest/writeContents/index.js | 34 +- .../node_modules/vinyl-fs/lib/src/index.js | 6 +- .../glob-stream/node_modules/glob/LICENSE | 36 +- .../glob/node_modules/inherits/package.json | 2 +- .../glob/node_modules/once/package.json | 2 +- .../node_modules/glob/package.json | 22 +- .../node_modules/glob2base/.editorconfig | 10 + .../node_modules/glob2base/.jshintrc | 19 + .../node_modules/glob2base/.npmignore | 5 +- .../node_modules/glob2base/.travis.yml | 9 +- .../node_modules/glob2base/LICENSE | 2 +- .../node_modules/glob2base/README.md | 51 +- .../node_modules/glob2base/index.js | 21 +- .../node_modules/lodash.findindex/LICENSE.txt | 22 - .../node_modules/lodash.findindex/README.md | 15 - .../node_modules/lodash.findindex/index.js | 65 - .../lodash.createcallback/LICENSE.txt | 22 - .../lodash.createcallback/README.md | 15 - .../lodash.createcallback/index.js | 81 - .../lodash._basecreatecallback/LICENSE.txt | 22 - .../lodash._basecreatecallback/README.md | 15 - .../lodash._basecreatecallback/index.js | 80 - .../lodash._setbinddata/LICENSE.txt | 22 - .../lodash._setbinddata/README.md | 15 - .../node_modules/lodash._setbinddata/index.js | 43 - .../node_modules/lodash._isnative/LICENSE.txt | 22 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash.noop/LICENSE.txt | 22 - .../node_modules/lodash.noop/README.md | 15 - .../node_modules/lodash.noop/index.js | 26 - .../node_modules/lodash.noop/package.json | 83 - .../lodash._setbinddata/package.json | 79 - .../node_modules/lodash.bind/LICENSE.txt | 22 - .../node_modules/lodash.bind/README.md | 15 - .../node_modules/lodash.bind/index.js | 40 - .../lodash._createwrapper/LICENSE.txt | 22 - .../lodash._createwrapper/README.md | 15 - .../lodash._createwrapper/index.js | 106 - .../node_modules/lodash._basebind/LICENSE.txt | 22 - .../node_modules/lodash._basebind/README.md | 15 - .../node_modules/lodash._basebind/index.js | 62 - .../lodash._basecreate/LICENSE.txt | 22 - .../node_modules/lodash._basecreate/README.md | 15 - .../node_modules/lodash._basecreate/index.js | 42 - .../node_modules/lodash._isnative/LICENSE.txt | 22 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash.noop/LICENSE.txt | 22 - .../node_modules/lodash.noop/README.md | 15 - .../node_modules/lodash.noop/index.js | 26 - .../node_modules/lodash.noop/package.json | 83 - .../lodash._basecreate/package.json | 80 - .../lodash._basebind/package.json | 81 - .../lodash._basecreatewrapper/LICENSE.txt | 22 - .../lodash._basecreatewrapper/README.md | 15 - .../lodash._basecreatewrapper/index.js | 78 - .../lodash._basecreate/LICENSE.txt | 22 - .../node_modules/lodash._basecreate/README.md | 15 - .../node_modules/lodash._basecreate/index.js | 42 - .../node_modules/lodash._isnative/LICENSE.txt | 22 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash.noop/LICENSE.txt | 22 - .../node_modules/lodash.noop/README.md | 15 - .../node_modules/lodash.noop/index.js | 26 - .../node_modules/lodash.noop/package.json | 83 - .../lodash._basecreate/package.json | 80 - .../lodash._basecreatewrapper/package.json | 81 - .../lodash.isfunction/LICENSE.txt | 22 - .../node_modules/lodash.isfunction/README.md | 15 - .../node_modules/lodash.isfunction/index.js | 27 - .../lodash.isfunction/package.json | 53 - .../lodash._createwrapper/package.json | 81 - .../node_modules/lodash._slice/LICENSE.txt | 22 - .../node_modules/lodash._slice/README.md | 15 - .../node_modules/lodash._slice/index.js | 38 - .../node_modules/lodash._slice/package.json | 75 - .../node_modules/lodash.bind/package.json | 86 - .../node_modules/lodash.identity/LICENSE.txt | 22 - .../node_modules/lodash.identity/README.md | 15 - .../node_modules/lodash.identity/index.js | 28 - .../node_modules/lodash.identity/package.json | 82 - .../node_modules/lodash.support/LICENSE.txt | 22 - .../node_modules/lodash.support/README.md | 15 - .../node_modules/lodash.support/index.js | 40 - .../node_modules/lodash._isnative/LICENSE.txt | 22 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash.support/package.json | 85 - .../lodash._basecreatecallback/package.json | 81 - .../lodash._baseisequal/LICENSE.txt | 22 - .../lodash._baseisequal/README.md | 15 - .../node_modules/lodash._baseisequal/index.js | 209 - .../node_modules/lodash._getarray/LICENSE.txt | 22 - .../node_modules/lodash._getarray/README.md | 15 - .../node_modules/lodash._getarray/index.js | 21 - .../lodash._arraypool/LICENSE.txt | 22 - .../node_modules/lodash._arraypool/README.md | 15 - .../node_modules/lodash._arraypool/index.js | 13 - .../lodash._arraypool/package.json | 75 - .../lodash._getarray/package.json | 78 - .../lodash._objecttypes/LICENSE.txt | 22 - .../lodash._objecttypes/README.md | 15 - .../node_modules/lodash._objecttypes/index.js | 20 - .../lodash._objecttypes/package.json | 46 - .../lodash._releasearray/LICENSE.txt | 22 - .../lodash._releasearray/README.md | 15 - .../lodash._releasearray/index.js | 25 - .../lodash._arraypool/LICENSE.txt | 22 - .../node_modules/lodash._arraypool/README.md | 15 - .../node_modules/lodash._arraypool/index.js | 13 - .../lodash._arraypool/package.json | 75 - .../lodash._maxpoolsize/LICENSE.txt | 22 - .../lodash._maxpoolsize/README.md | 15 - .../node_modules/lodash._maxpoolsize/index.js | 13 - .../lodash._maxpoolsize/package.json | 75 - .../lodash._releasearray/package.json | 79 - .../node_modules/lodash.forin/LICENSE.txt | 22 - .../node_modules/lodash.forin/README.md | 15 - .../node_modules/lodash.forin/index.js | 54 - .../node_modules/lodash.forin/package.json | 86 - .../lodash.isfunction/LICENSE.txt | 22 - .../node_modules/lodash.isfunction/README.md | 15 - .../node_modules/lodash.isfunction/index.js | 27 - .../lodash.isfunction/package.json | 53 - .../lodash._baseisequal/package.json | 82 - .../node_modules/lodash.isobject/LICENSE.txt | 22 - .../node_modules/lodash.isobject/README.md | 15 - .../node_modules/lodash.isobject/index.js | 39 - .../lodash._objecttypes/LICENSE.txt | 22 - .../lodash._objecttypes/README.md | 15 - .../node_modules/lodash._objecttypes/index.js | 20 - .../lodash._objecttypes/package.json | 46 - .../node_modules/lodash.isobject/package.json | 56 - .../node_modules/lodash.keys/LICENSE.txt | 22 - .../node_modules/lodash.keys/README.md | 15 - .../node_modules/lodash.keys/index.js | 36 - .../node_modules/lodash._isnative/LICENSE.txt | 22 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash._shimkeys/LICENSE.txt | 22 - .../node_modules/lodash._shimkeys/README.md | 15 - .../node_modules/lodash._shimkeys/index.js | 38 - .../lodash._objecttypes/LICENSE.txt | 22 - .../lodash._objecttypes/README.md | 15 - .../node_modules/lodash._objecttypes/index.js | 20 - .../lodash._objecttypes/package.json | 46 - .../lodash._shimkeys/package.json | 79 - .../node_modules/lodash.keys/package.json | 88 - .../node_modules/lodash.property/LICENSE.txt | 22 - .../node_modules/lodash.property/README.md | 15 - .../node_modules/lodash.property/index.js | 40 - .../node_modules/lodash.property/package.json | 82 - .../lodash.createcallback/package.json | 89 - .../lodash.findindex/package.json | 85 - .../node_modules/glob2base/package.json | 37 +- .../node_modules/minimatch/.travis.yml | 4 + .../node_modules/minimatch/minimatch.js | 14 +- .../node_modules/lru-cache/package.json | 2 +- .../node_modules/sigmund/package.json | 2 +- .../node_modules/minimatch/package.json | 30 +- .../minimatch/test/brace-expand.js | 7 + .../ordered-read-streams/package.json | 3 +- .../node_modules/unique-stream/package.json | 2 +- .../node_modules/glob-stream/package.json | 27 +- .../glob/node_modules/inherits/package.json | 3 +- .../node_modules/gaze/package.json | 2 +- .../node_modules/glob-watcher/package.json | 5 +- .../node_modules/graceful-fs/package.json | 2 +- .../node_modules/lodash.defaults/LICENSE.txt | 22 - .../node_modules/lodash.defaults/README.md | 15 - .../node_modules/lodash.defaults/index.js | 54 - .../lodash._objecttypes/LICENSE.txt | 22 - .../lodash._objecttypes/README.md | 15 - .../node_modules/lodash._objecttypes/index.js | 20 - .../lodash._objecttypes/package.json | 46 - .../node_modules/lodash.keys/LICENSE.txt | 22 - .../node_modules/lodash.keys/README.md | 15 - .../node_modules/lodash.keys/index.js | 36 - .../node_modules/lodash._isnative/LICENSE.txt | 22 - .../node_modules/lodash._isnative/README.md | 15 - .../node_modules/lodash._isnative/index.js | 34 - .../lodash._isnative/package.json | 46 - .../node_modules/lodash._shimkeys/LICENSE.txt | 22 - .../node_modules/lodash._shimkeys/README.md | 15 - .../node_modules/lodash._shimkeys/index.js | 38 - .../lodash._shimkeys/package.json | 78 - .../node_modules/lodash.isobject/LICENSE.txt | 22 - .../node_modules/lodash.isobject/README.md | 15 - .../node_modules/lodash.isobject/index.js | 39 - .../node_modules/lodash.isobject/package.json | 56 - .../node_modules/lodash.keys/package.json | 87 - .../node_modules/lodash.defaults/package.json | 86 - .../vinyl-fs/node_modules/lodash}/LICENSE.txt | 0 .../vinyl-fs/node_modules/lodash/README.md | 163 + .../node_modules/lodash/dist/lodash.compat.js | 7157 ++++++++++++++++ .../lodash/dist/lodash.compat.min.js | 61 + .../node_modules/lodash/dist/lodash.js | 6785 ++++++++++++++++ .../node_modules/lodash/dist/lodash.min.js | 56 + .../lodash/dist/lodash.underscore.js | 4979 ++++++++++++ .../lodash/dist/lodash.underscore.min.js | 39 + .../vinyl-fs/node_modules/lodash/lodash.js | 7179 +++++++++++++++++ .../vinyl-fs/node_modules/lodash/package.json | 103 + .../vinyl-fs/node_modules/mkdirp/package.json | 2 +- .../vinyl-fs/node_modules/strip-bom/cli.js | 28 +- .../vinyl-fs/node_modules/strip-bom/index.js | 4 +- .../first-chunk-stream/package.json | 21 +- .../node_modules/is-utf8/package.json | 2 +- .../node_modules/strip-bom/package.json | 26 +- .../vinyl-fs/node_modules/strip-bom/readme.md | 18 +- .../vinyl-fs/node_modules/through2/README.md | 4 +- .../readable-stream/lib/_stream_readable.js | 35 +- .../readable-stream/lib/_stream_writable.js | 1 - .../node_modules/core-util-is/package.json | 2 +- .../node_modules/inherits/package.json | 2 +- .../node_modules/isarray/package.json | 5 +- .../node_modules/string_decoder/index.js | 75 +- .../node_modules/string_decoder/package.json | 32 +- .../node_modules/readable-stream/package.json | 20 +- .../through2/node_modules/xtend/README.md | 8 +- .../xtend/{index.js => immutable.js} | 0 .../through2/node_modules/xtend/package.json | 23 +- .../node_modules/through2/package.json | 32 +- .../node_modules/through2/through2.js | 26 +- .../vinyl-fs/node_modules/vinyl/.jshintignore | 2 + .../vinyl-fs/node_modules/vinyl/.jshintrc | 36 + .../vinyl-fs/node_modules/vinyl/.travis.yml | 3 +- .../vinyl-fs/node_modules/vinyl/LICENSE | 0 .../vinyl-fs/node_modules/vinyl/README.md | 12 +- .../node_modules/vinyl/coverage/coverage.json | 1 + .../vinyl/coverage/lcov-report/index.html | 363 + .../vinyl/coverage/lcov-report/prettify.css | 1 + .../vinyl/coverage/lcov-report/prettify.js | 1 + .../coverage/lcov-report/vinyl/index.html | 350 + .../coverage/lcov-report/vinyl/index.js.html | 847 ++ .../lcov-report/vinyl/lib/cloneBuffer.js.html | 343 + .../coverage/lcov-report/vinyl/lib/index.html | 402 + .../vinyl/lib/inspectStream.js.html | 355 + .../lcov-report/vinyl/lib/isBuffer.js.html | 340 + .../lcov-report/vinyl/lib/isNull.js.html | 331 + .../lcov-report/vinyl/lib/isStream.js.html | 334 + .../node_modules/vinyl/coverage/lcov.info | 280 + .../vinyl-fs/node_modules/vinyl/index.js | 81 +- .../node_modules/vinyl/lib/cloneBuffer.js | 2 +- .../node_modules/vinyl/lib/inspectStream.js | 5 +- .../vinyl-fs/node_modules/vinyl/lib/isNull.js | 2 +- .../node_modules/clone-stats/package.json | 2 +- .../vinyl-fs/node_modules/vinyl/package.json | 47 +- .../vinyl-fs/node_modules/vinyl/perf/clone.js | 59 + .../vinyl-fs/node_modules/vinyl/test/File.js | 395 +- .../node_modules/vinyl/test/cloneBuffer.js | 3 +- .../node_modules/vinyl/test/isBuffer.js | 4 +- .../node_modules/vinyl/test/isNull.js | 7 +- .../node_modules/vinyl/test/isStream.js | 4 +- .../gulp/node_modules/vinyl-fs/package.json | 32 +- .../gulp/node_modules/vinyl-fs/test/dest.js | 246 + .../gulp/node_modules/vinyl-fs/test/spy.js | 27 + .../gulp/node_modules/vinyl-fs/test/src.js | 4 + node_modules/gulp/package.json | 23 +- package.json | 2 +- src/Please.js | 177 +- 1089 files changed, 224550 insertions(+), 20649 deletions(-) delete mode 100644 node_modules/gulp-uglify/lib/error.js rename node_modules/{gulp-watch/node_modules/glob2base/node_modules/lodash.findindex => gulp-uglify/node_modules/gulp-util/node_modules/lodash}/LICENSE.txt (100%) create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/README.md create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.min.js create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/dist/lodash.js create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/dist/lodash.min.js create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/dist/lodash.underscore.js create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/dist/lodash.underscore.min.js create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/lodash.js create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/package.json create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/test/unknown.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/.npmignore delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/README.md delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/README.md delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/float.patch delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/util.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/LICENSE delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/README.md delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/inherits.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/inherits_browser.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/test.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/build/build.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/package.json delete mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/through2.js create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.jshintignore create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.jshintrc mode change 100755 => 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/LICENSE create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info create mode 100644 node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/perf/clone.js rename node_modules/gulp-uglify/node_modules/{gulp-util/node_modules => }/through2/node_modules/xtend/.jshintrc (100%) delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/has-keys.js rename node_modules/gulp-uglify/node_modules/{gulp-util/node_modules/through2/node_modules/xtend/index.js => through2/node_modules/xtend/immutable.js} (100%) delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/index.js delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js delete mode 100644 node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js rename node_modules/{gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend => gulp-watch/node_modules/glob/node_modules/minimatch}/.npmignore (100%) create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/.travis.yml rename node_modules/{gulp-uglify/node_modules/gulp-util/node_modules/through2 => gulp-watch/node_modules/glob/node_modules/minimatch}/LICENSE (57%) create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/README.md create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/minimatch.js create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js rename node_modules/{gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream => gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund}/LICENSE (100%) create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/package.json create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/basic.js create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/brace-expand.js create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/caching.js create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/defaults.js create mode 100644 node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js create mode 100644 node_modules/gulp-watch/node_modules/glob2base/.editorconfig create mode 100644 node_modules/gulp-watch/node_modules/glob2base/.jshintrc delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/README.md delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/index.js delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/package.json delete mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/package.json rename node_modules/gulp-watch/node_modules/glob2base/node_modules/{lodash.findindex/node_modules/lodash.createcallback => lodash}/LICENSE.txt (100%) create mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/README.md create mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/dist/lodash.compat.js create mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/dist/lodash.compat.min.js create mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/dist/lodash.js create mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/dist/lodash.min.js create mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/dist/lodash.underscore.js create mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/dist/lodash.underscore.min.js create mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/lodash.js create mode 100644 node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/package.json rename node_modules/gulp-watch/node_modules/{glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback => gulp-util/node_modules/lodash}/LICENSE.txt (100%) create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/README.md create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.min.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/dist/lodash.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/dist/lodash.min.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/dist/lodash.underscore.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/dist/lodash.underscore.min.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/lodash.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/package.json create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/test/unknown.js rename node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/{index.js => immutable.js} (100%) create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.jshintignore create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.jshintrc create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.npmignore create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.travis.yml rename node_modules/gulp-watch/node_modules/{glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt => gulp-util/node_modules/vinyl/LICENSE} (77%) create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/README.md create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/index.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js rename node_modules/{gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE => gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md} (94%) create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/package.json create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/perf/clone.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/File.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/isNull.js create mode 100644 node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/isStream.js rename node_modules/{gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys => gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch}/.npmignore (100%) create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/.travis.yml create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/LICENSE create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/README.md create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/minimatch.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/.npmignore create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/LICENSE create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/README.md create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/package.json create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/basic.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/foreach.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/LICENSE create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/README.md create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/bench.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/package.json create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/sigmund.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/test/basic.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/package.json create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/basic.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/brace-expand.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/caching.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/defaults.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/extglob-ending-with-state-char.js delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/README.md delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/index.js delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/README.md delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/index.js delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/README.md delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/index.js delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/package.json delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/package.json delete mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/package.json rename node_modules/gulp-watch/node_modules/{glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata => vinyl-fs/node_modules/lodash}/LICENSE.txt (100%) create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/README.md create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.compat.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.compat.min.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.min.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.underscore.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.underscore.min.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/lodash.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/package.json rename node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/{index.js => immutable.js} (100%) create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.jshintignore create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.jshintrc create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.npmignore create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.travis.yml rename node_modules/gulp-watch/node_modules/{glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/LICENSE.txt => vinyl-fs/node_modules/vinyl/LICENSE} (77%) create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/README.md create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/coverage.json create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/index.html create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.css create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.html create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov.info create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/index.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isBuffer.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isStream.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/LICENSE.md create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/README.md create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/index.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/package.json create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/test.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/package.json create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/perf/clone.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/File.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/cloneBuffer.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/inspectStream.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isBuffer.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isNull.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isStream.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl-fs/test/spy.js mode change 100755 => 100644 node_modules/gulp-watch/node_modules/vinyl/LICENSE rename node_modules/gulp-watch/node_modules/{glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative => vinyl/node_modules/lodash}/LICENSE.txt (100%) create mode 100644 node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/README.md create mode 100644 node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/dist/lodash.compat.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/dist/lodash.compat.min.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/dist/lodash.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/dist/lodash.min.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/dist/lodash.underscore.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/dist/lodash.underscore.min.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/lodash.js create mode 100644 node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/package.json rename node_modules/{gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop => gulp/node_modules/gulp-util/node_modules/lodash}/LICENSE.txt (100%) create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/lodash/README.md create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.min.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/lodash/dist/lodash.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/lodash/dist/lodash.min.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/lodash/dist/lodash.underscore.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/lodash/dist/lodash.underscore.min.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/lodash/lodash.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/lodash/package.json rename node_modules/{gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys => gulp/node_modules/gulp-util/node_modules/minimist}/.travis.yml (82%) create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/LICENSE create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/example/parse.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/index.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/package.json create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/readme.markdown create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/all_bool.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/bool.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/dash.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/dotted.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/long.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/num.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/parse.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/short.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/unknown.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/whitespace.js rename node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/{index.js => immutable.js} (100%) create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.jshintignore create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.jshintrc mode change 100755 => 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/LICENSE create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info create mode 100644 node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/perf/clone.js rename node_modules/{gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/LICENSE.txt => gulp/node_modules/liftoff/node_modules/extend/LICENSE} (77%) create mode 100644 node_modules/gulp/node_modules/liftoff/node_modules/extend/component.json create mode 100644 node_modules/gulp/node_modules/liftoff/node_modules/minimist/test/all_bool.js create mode 100644 node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot.js create mode 100644 node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot/abc/index.js create mode 100644 node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot/index.js create mode 100644 node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/nonstring.js create mode 100644 node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/.npmignore create mode 100644 node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/README.md create mode 100644 node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/index.js create mode 100644 node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/package.json create mode 100644 node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/test/tests.js create mode 100644 node_modules/gulp/node_modules/semver/test/clean.js create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.editorconfig create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.jshintrc delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/package.json create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/.travis.yml delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/README.md delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/index.js delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/package.json delete mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/package.json rename node_modules/{gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind => gulp/node_modules/vinyl-fs/node_modules/lodash}/LICENSE.txt (100%) create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/README.md create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.compat.js create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.compat.min.js create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.js create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.min.js create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.underscore.js create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.underscore.min.js create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/lodash.js create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/package.json rename node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/{index.js => immutable.js} (100%) create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.jshintignore create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.jshintrc mode change 100755 => 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/LICENSE create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/coverage.json create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/index.html create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.css create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.js create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.html create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov.info create mode 100644 node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/perf/clone.js create mode 100644 node_modules/gulp/node_modules/vinyl-fs/test/spy.js diff --git a/bower.json b/bower.json index ac958f1..228e90f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pleasejs", - "version": "0.2.2", + "version": "0.2.3", "homepage": "https://github.com/Fooidge/PleaseJS", "authors": [ "Fooidge" diff --git a/dist/Please.js b/dist/Please.js index e8103e9..967bcf8 100644 --- a/dist/Please.js +++ b/dist/Please.js @@ -1 +1 @@ -!function(e,r,a){"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?module.exports=a():r[e]=a()}("Please",this,function(){"use strict";function e(){function e(e,r){return Math.floor(Math.random()*(r-e+1))+e}function r(e,r){return Math.random()*(r-e)+e}function a(e,r,a){return Math.max(r,Math.min(e,a))}function o(e,r){switch(e){case"hex":for(var a=0;a=128?"dark":"light"}function t(e){var r={};for(var a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);return r}var l={},F={aliceblue:"F0F8FF",antiquewhite:"FAEBD7",aqua:"00FFFF",aquamarine:"7FFFD4",azure:"F0FFFF",beige:"F5F5DC",bisque:"FFE4C4",black:"000000",blanchedalmond:"FFEBCD",blue:"0000FF",blueviolet:"8A2BE2",brown:"A52A2A",burlywood:"DEB887",cadetblue:"5F9EA0",chartreuse:"7FFF00",chocolate:"D2691E",coral:"FF7F50",cornflowerblue:"6495ED",cornsilk:"FFF8DC",crimson:"DC143C",cyan:"00FFFF",darkblue:"00008B",darkcyan:"008B8B",darkgoldenrod:"B8860B",darkgray:"A9A9A9",darkgrey:"A9A9A9",darkgreen:"006400",darkkhaki:"BDB76B",darkmagenta:"8B008B",darkolivegreen:"556B2F",darkorange:"FF8C00",darkorchid:"9932CC",darkred:"8B0000",darksalmon:"E9967A",darkseagreen:"8FBC8F",darkslateblue:"483D8B",darkslategray:"2F4F4F",darkslategrey:"2F4F4F",darkturquoise:"00CED1",darkviolet:"9400D3",deeppink:"FF1493",deepskyblue:"00BFFF",dimgray:"696969",dimgrey:"696969",dodgerblue:"1E90FF",firebrick:"B22222",floralwhite:"FFFAF0",forestgreen:"228B22",fuchsia:"FF00FF",gainsboro:"DCDCDC",ghostwhite:"F8F8FF",gold:"FFD700",goldenrod:"DAA520",gray:"808080",grey:"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",lightgrey:"D3D3D3",lightgreen:"90EE90",lightpink:"FFB6C1",lightsalmon:"FFA07A",lightseagreen:"20B2AA",lightskyblue:"87CEFA",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"B0C4DE",lightyellow:"FFFFE0",lime:"00FF00",limegreen:"32CD32",linen:"FAF0E6",magenta:"FF00FF",maroon:"800000",mediumaquamarine:"66CDAA",mediumblue:"0000CD",mediumorchid:"BA55D3",mediumpurple:"9370D8",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:"D87093",papayawhip:"FFEFD5",peachpuff:"FFDAB9",peru:"CD853F",pink:"FFC0CB",plum:"DDA0DD",powderblue:"B0E0E6",purple:"800080",rebeccapurple:"663399",red:"FF0000",rosybrown:"BC8F8F",royalblue:"4169E1",saddlebrown:"8B4513",salmon:"FA8072",sandybrown:"F4A460",seagreen:"2E8B57",seashell:"FFF5EE",sienna:"A0522D",silver:"C0C0C0",skyblue:"87CEEB",slateblue:"6A5ACD",slategray:"708090",slategrey:"708090",snow:"FFFAFA",springgreen:"00FF7F",steelblue:"4682B4",tan:"D2B48C",teal:"008080",thistle:"D8BFD8",tomato:"FF6347",turquoise:"40E0D0",violet:"EE82EE",wheat:"F5DEB3",white:"FFFFFF",whitesmoke:"F5F5F5",yellow:"FFFF00",yellowgreen:"9ACD32"},s=.618033988749895,i={hue:null,saturation:null,value:null,base_color:"",greyscale:!1,grayscale:!1,golden:!0,full_random:!1,colors_returned:1,format:"hex"},u={scheme_type:"analogous",format:"hex"},h={golden:!1,format:"hex"};return l.NAME_to_HEX=function(e){return e in F?F[e]:void console.log("Color name not recognized.")},l.NAME_to_RGB=function(e){return l.HEX_to_RGB(l.NAME_to_HEX(e))},l.NAME_to_HSV=function(e){return l.HEX_to_HSV(l.NAME_to_HEX(e))},l.HEX_to_RGB=function(e){var r=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(r,function(e,r,a,o){return r+r+a+a+o+o});var a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return a?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null},l.RGB_to_HEX=function(e){return"#"+((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)},l.HSV_to_RGB=function(e){var r,a,o,n=e.h/360,t=e.s,l=e.v,F=Math.floor(6*n),s=6*n-F,i=l*(1-t),u=l*(1-s*t),h=l*(1-(1-s)*t);switch(F%6){case 0:r=l,a=h,o=i;break;case 1:r=u,a=l,o=i;break;case 2:r=i,a=l,o=h;break;case 3:r=i,a=u,o=l;break;case 4:r=h,a=i,o=l;break;case 5:r=l,a=i,o=u}return{r:Math.floor(255*r),g:Math.floor(255*a),b:Math.floor(255*o)}},l.RGB_to_HSV=function(e){var r,a,o,n=0,t=0,l=0;r=e.r/255,a=e.g/255,o=e.b/255;var F=Math.min(r,Math.min(a,o)),s=Math.max(r,Math.max(a,o));if(F==s)return l=F,{h:0,s:0,v:l};var i=r==F?a-o:o==F?r-a:o-r,u=r==F?3:o==F?1:5;return n=60*(u-i/(s-F)),t=(s-F)/s,l=s,{h:n,s:t,v:l}},l.HSV_to_HEX=function(e){return l.RGB_to_HEX(l.HSV_to_RGB(e))},l.HEX_to_HSV=function(e){return l.RGB_to_HSV(l.HEX_to_RGB(e))},l.make_scheme=function(e,r){function n(e){return{h:e.h,s:e.s,v:e.v}}var l=t(u);if(null!=r)for(var F in r)r.hasOwnProperty(F)&&(l[F]=r[F]);var s=[e];switch(l.scheme_type.toLowerCase()){case"monochromatic":case"mono":for(var i=1;2>=i;i++){var h=n(e),c=h.s+.1*i;c=a(c,0,1);var d=h.v+.1*i;d=a(d,0,1),h.s=c,h.v=d,s.push(h)}for(var i=1;2>=i;i++){var h=n(e),c=h.s-.1*i;c=a(c,0,1);var d=h.v-.1*i;d=a(d,0,1),h.s=c,h.v=d,s.push(h)}break;case"complementary":case"complement":case"comp":var h=n(e);h.h=(h.h+180)%360,s.push(h);break;case"split-complementary":case"split-complement":case"split":var h=n(e);h.h=(h.h+165)%360,s.push(h);var h=n(e);h.h=Math.abs((h.h-165)%360),s.push(h);break;case"double-complementary":case"double-complement":case"double":var h=n(e);h.h=(h.h+180)%360,s.push(h),h.h=(h.h+30)%360;var g=n(h);s.push(h),h.h=(h.h+180)%360,s.push(g);break;case"analogous":case"ana":for(var i=1;5>=i;i++){var h=n(e);h.h=(h.h+20*i)%360,s.push(h)}break;case"triadic":case"triad":case"tri":for(var i=1;3>i;i++){var h=n(e);h.h=(h.h+120*i)%360,s.push(h)}break;default:console.log("Color scheme not recognized.")}return o(l.format.toLowerCase(),s),s},l.make_color=function(n){var u=[],h=t(i);if(null!=n)for(var c in n)n.hasOwnProperty(c)&&(h[c]=n[c]);var d;h.base_color.length>0&&(d=F[h.base_color.toLowerCase()],d=l.HEX_to_HSV(d));for(var g=0;g=128?"dark":"light"}function t(e){var r={};for(var a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);return r}var l={},F={aliceblue:"F0F8FF",antiquewhite:"FAEBD7",aqua:"00FFFF",aquamarine:"7FFFD4",azure:"F0FFFF",beige:"F5F5DC",bisque:"FFE4C4",black:"000000",blanchedalmond:"FFEBCD",blue:"0000FF",blueviolet:"8A2BE2",brown:"A52A2A",burlywood:"DEB887",cadetblue:"5F9EA0",chartreuse:"7FFF00",chocolate:"D2691E",coral:"FF7F50",cornflowerblue:"6495ED",cornsilk:"FFF8DC",crimson:"DC143C",cyan:"00FFFF",darkblue:"00008B",darkcyan:"008B8B",darkgoldenrod:"B8860B",darkgray:"A9A9A9",darkgrey:"A9A9A9",darkgreen:"006400",darkkhaki:"BDB76B",darkmagenta:"8B008B",darkolivegreen:"556B2F",darkorange:"FF8C00",darkorchid:"9932CC",darkred:"8B0000",darksalmon:"E9967A",darkseagreen:"8FBC8F",darkslateblue:"483D8B",darkslategray:"2F4F4F",darkslategrey:"2F4F4F",darkturquoise:"00CED1",darkviolet:"9400D3",deeppink:"FF1493",deepskyblue:"00BFFF",dimgray:"696969",dimgrey:"696969",dodgerblue:"1E90FF",firebrick:"B22222",floralwhite:"FFFAF0",forestgreen:"228B22",fuchsia:"FF00FF",gainsboro:"DCDCDC",ghostwhite:"F8F8FF",gold:"FFD700",goldenrod:"DAA520",gray:"808080",grey:"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",lightgrey:"D3D3D3",lightgreen:"90EE90",lightpink:"FFB6C1",lightsalmon:"FFA07A",lightseagreen:"20B2AA",lightskyblue:"87CEFA",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"B0C4DE",lightyellow:"FFFFE0",lime:"00FF00",limegreen:"32CD32",linen:"FAF0E6",magenta:"FF00FF",maroon:"800000",mediumaquamarine:"66CDAA",mediumblue:"0000CD",mediumorchid:"BA55D3",mediumpurple:"9370D8",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:"D87093",papayawhip:"FFEFD5",peachpuff:"FFDAB9",peru:"CD853F",pink:"FFC0CB",plum:"DDA0DD",powderblue:"B0E0E6",purple:"800080",rebeccapurple:"663399",red:"FF0000",rosybrown:"BC8F8F",royalblue:"4169E1",saddlebrown:"8B4513",salmon:"FA8072",sandybrown:"F4A460",seagreen:"2E8B57",seashell:"FFF5EE",sienna:"A0522D",silver:"C0C0C0",skyblue:"87CEEB",slateblue:"6A5ACD",slategray:"708090",slategrey:"708090",snow:"FFFAFA",springgreen:"00FF7F",steelblue:"4682B4",tan:"D2B48C",teal:"008080",thistle:"D8BFD8",tomato:"FF6347",turquoise:"40E0D0",violet:"EE82EE",wheat:"F5DEB3",white:"FFFFFF",whitesmoke:"F5F5F5",yellow:"FFFF00",yellowgreen:"9ACD32"},s=.618033988749895,i={hue:null,saturation:null,value:null,base_color:"",greyscale:!1,grayscale:!1,golden:!0,full_random:!1,colors_returned:1,format:"hex"},u={scheme_type:"analogous",format:"hex"},c={golden:!1,format:"hex"};return l.NAME_to_HEX=function(e){return e in F?F[e]:(console.error("Color name not recognized."),void 0)},l.NAME_to_RGB=function(e){return l.HEX_to_RGB(l.NAME_to_HEX(e))},l.NAME_to_HSV=function(e){return l.HEX_to_HSV(l.NAME_to_HEX(e))},l.HEX_to_RGB=function(e){var r=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(r,function(e,r,a){return e+e+r+r+a+a});var a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return a?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null},l.RGB_to_HEX=function(e){return"#"+((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)},l.HSV_to_RGB=function(e){var r,a,o,n=e.h/360,t=e.s,l=e.v,F=Math.floor(6*n),s=6*n-F,i=l*(1-t),u=l*(1-s*t),c=l*(1-(1-s)*t);switch(F%6){case 0:r=l,a=c,o=i;break;case 1:r=u,a=l,o=i;break;case 2:r=i,a=l,o=c;break;case 3:r=i,a=u,o=l;break;case 4:r=c,a=i,o=l;break;case 5:r=l,a=i,o=u}return{r:Math.floor(255*r),g:Math.floor(255*a),b:Math.floor(255*o)}},l.RGB_to_HSV=function(e){var r,a,o,n=0,t=0,l=0;r=e.r/255,a=e.g/255,o=e.b/255;var F=Math.min(r,Math.min(a,o)),s=Math.max(r,Math.max(a,o));if(F==s)return l=F,{h:0,s:0,v:l};var i=r==F?a-o:o==F?r-a:o-r,u=r==F?3:o==F?1:5;return n=60*(u-i/(s-F)),t=(s-F)/s,l=s,{h:n,s:t,v:l}},l.HSV_to_HEX=function(e){return l.RGB_to_HEX(l.HSV_to_RGB(e))},l.HEX_to_HSV=function(e){return l.RGB_to_HSV(l.HEX_to_RGB(e))},l.make_scheme=function(e,r){function n(e){return{h:e.h,s:e.s,v:e.v}}var l,F,s,i,c=t(u);if(null!==r)for(var h in r)r.hasOwnProperty(h)&&(c[h]=r[h]);var d=[e];switch(c.scheme_type.toLowerCase()){case"monochromatic":case"mono":for(i=1;2>=i;i++)l=n(e),F=l.s+.1*i,F=a(F,0,1),s=l.v+.1*i,s=a(s,0,1),l.s=F,l.v=s,d.push(l);for(i=1;2>=i;i++)l=n(e),F=l.s-.1*i,F=a(F,0,1),s=l.v-.1*i,s=a(s,0,1),l.s=F,l.v=s,d.push(l);break;case"complementary":case"complement":case"comp":l=n(e),l.h=(l.h+180)%360,d.push(l);break;case"split-complementary":case"split-complement":case"split":l=n(e),l.h=(l.h+165)%360,d.push(l),l=n(e),l.h=Math.abs((l.h-165)%360),d.push(l);break;case"double-complementary":case"double-complement":case"double":l=n(e),l.h=(l.h+180)%360,d.push(l),l.h=(l.h+30)%360,secondary=n(l),d.push(l),l.h=(l.h+180)%360,d.push(secondary);break;case"analogous":case"ana":for(i=1;5>=i;i++)l=n(e),l.h=(l.h+20*i)%360,d.push(l);break;case"triadic":case"triad":case"tri":for(i=1;3>i;i++)l=n(e),l.h=(l.h+120*i)%360,d.push(l);break;default:console.error("Color scheme not recognized.")}return o(c.format.toLowerCase(),d),d},l.make_color=function(n){var u=[],c=t(i);if(null!==n)for(var h in n)n.hasOwnProperty(h)&&(c[h]=n[h]);if(c.base_color.length>0){var d=F[c.base_color.toLowerCase()];d=l.HEX_to_HSV(d)}for(var g=0;g= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; + var available = (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; + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; if (this.charReceived < this.charLength) { // still not enough chars in this buffer? wait for more ... return ''; } + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + // 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 + // CESU-8: 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; @@ -100,34 +121,33 @@ StringDecoder.prototype.write = function(buffer) { 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); + if (buffer.length === 0) { + return charStr; + } break; } - var lenIncomplete = this.detectIncompleteChar(buffer); + // determine and set charLength / charReceived + 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; + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } 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 + // CESU-8: 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); + buffer.copy(this.charBuffer, 0, 0, size); return charStr.substring(0, end); } @@ -135,6 +155,10 @@ StringDecoder.prototype.write = function(buffer) { return charStr; }; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. 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; @@ -164,8 +188,7 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { break; } } - - return i; + this.charReceived = i; }; StringDecoder.prototype.end = function(buffer) { @@ -188,13 +211,11 @@ function passThroughWrite(buffer) { } function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } diff --git a/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json index 7f5d001..a8c586b 100644 --- a/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,6 +1,6 @@ { "name": "string_decoder", - "version": "0.10.25-1", + "version": "0.10.31", "description": "The string_decoder module from Node core", "main": "index.js", "dependencies": {}, @@ -22,11 +22,33 @@ "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", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@~0.10.x", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json b/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json index e760eff..69eee6c 100644 --- a/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json +++ b/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.1.13-1", + "version": "1.1.13", "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", "main": "readable.js", "dependencies": { @@ -33,12 +33,38 @@ "url": "http://blog.izs.me/" }, "license": "MIT", - "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", + "gitHead": "3b672fd7ae92acf5b4ffdbabf74b372a0a56b051", "bugs": { "url": "https://github.com/isaacs/readable-stream/issues" }, "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.1.13-1", - "_from": "readable-stream@~1.1.9" + "_id": "readable-stream@1.1.13", + "_shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "_from": "readable-stream@~1.1.9", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json index 4967bde..a2e13d9 100644 --- a/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json +++ b/node_modules/gulp-jshint/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json @@ -39,7 +39,7 @@ "shasum": "b88f94a82cf38b8791d58046ea4029ad88ca99d1", "tarball": "http://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" }, - "_from": "clone-stats@~0.0.1", + "_from": "clone-stats@0.0.1", "_npmVersion": "1.3.22", "_npmUser": { "name": "hughsk", diff --git a/node_modules/gulp-jshint/node_modules/jshint/dist/jshint-rhino.js b/node_modules/gulp-jshint/node_modules/jshint/dist/jshint-rhino.js index 23dda2a..9409763 100755 --- a/node_modules/gulp-jshint/node_modules/jshint/dist/jshint-rhino.js +++ b/node_modules/gulp-jshint/node_modules/jshint/dist/jshint-rhino.js @@ -1,6 +1,6 @@ #!/usr/bin/env rhino var window = {}; -/*! 2.5.2 */ +/*! 2.5.4 */ var JSHINT; if (typeof window === 'undefined') window = {}; (function () { @@ -999,8 +999,8 @@ function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -}).call(this,require("/Users/antonkovalyov/src/jshint/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":5,"/Users/antonkovalyov/src/jshint/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":9,"inherits":8}],7:[function(require,module,exports){ +}).call(this,require("FWaASH"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./support/isBuffer":5,"FWaASH":9,"inherits":8}],7:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -1148,7 +1148,10 @@ EventEmitter.prototype.addListener = function(type, listener) { 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length); - console.trace(); + if (typeof console.trace === 'function') { + // not supported in IE 10 + console.trace(); + } } } @@ -1372,6 +1375,16 @@ process.browser = true; process.env = {}; process.argv = []; +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + process.binding = function (name) { throw new Error('process.binding is not supported'); } @@ -1386,11 +1399,12 @@ process.chdir = function (dir) { module.exports=require(5) },{}],11:[function(require,module,exports){ module.exports=require(6) -},{"./support/isBuffer":10,"/Users/antonkovalyov/src/jshint/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":9,"inherits":8}],12:[function(require,module,exports){ +},{"./support/isBuffer":10,"FWaASH":9,"inherits":8}],12:[function(require,module,exports){ (function (global){ /*global window, global*/ var util = require("util") var assert = require("assert") +var now = require("date-now") var slice = Array.prototype.slice var console @@ -1401,19 +1415,19 @@ if (typeof global !== "undefined" && global.console) { } else if (typeof window !== "undefined" && window.console) { console = window.console } else { - console = window.console = {} + console = {} } var functions = [ - [log, "log"] - , [info, "info"] - , [warn, "warn"] - , [error, "error"] - , [time, "time"] - , [timeEnd, "timeEnd"] - , [trace, "trace"] - , [dir, "dir"] - , [assert, "assert"] + [log, "log"], + [info, "info"], + [warn, "warn"], + [error, "error"], + [time, "time"], + [timeEnd, "timeEnd"], + [trace, "trace"], + [dir, "dir"], + [consoleAssert, "assert"] ] for (var i = 0; i < functions.length; i++) { @@ -1443,7 +1457,7 @@ function error() { } function time(label) { - times[label] = Date.now() + times[label] = now() } function timeEnd(label) { @@ -1452,7 +1466,7 @@ function timeEnd(label) { throw new Error("No such label: " + label) } - var duration = Date.now() - time + var duration = now() - time console.log(label + ": " + duration + "ms") } @@ -1467,7 +1481,7 @@ function dir(object) { console.log(util.inspect(object) + "\n") } -function assert(expression) { +function consoleAssert(expression) { if (!expression) { var arr = slice.call(arguments, 1) assert.ok(false, util.format.apply(null, arr)) @@ -1475,10 +1489,17 @@ function assert(expression) { } }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"assert":4,"util":11}],13:[function(require,module,exports){ -// Underscore.js 1.4.4 +},{"assert":4,"date-now":13,"util":11}],13:[function(require,module,exports){ +module.exports = now + +function now() { + return new Date().getTime() +} + +},{}],14:[function(require,module,exports){ +// Underscore.js 1.6.0 // http://underscorejs.org -// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. +// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. (function() { @@ -1486,7 +1507,7 @@ function assert(expression) { // Baseline setup // -------------- - // Establish the root object, `window` in the browser, or `global` on the server. + // Establish the root object, `window` in the browser, or `exports` on the server. var root = this; // Save the previous value of the `_` variable. @@ -1499,11 +1520,12 @@ function assert(expression) { var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; // Create quick reference variables for speed access to core prototypes. - var push = ArrayProto.push, - slice = ArrayProto.slice, - concat = ArrayProto.concat, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; + var + push = ArrayProto.push, + slice = ArrayProto.slice, + concat = ArrayProto.concat, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; // All **ECMAScript 5** native function implementations that we hope to use // are declared here. @@ -1542,7 +1564,7 @@ function assert(expression) { } // Current version. - _.VERSION = '1.4.4'; + _.VERSION = '1.6.0'; // Collection Functions // -------------------- @@ -1551,20 +1573,20 @@ function assert(expression) { // Handles objects with the built-in `forEach`, arrays, and raw objects. // Delegates to **ECMAScript 5**'s native `forEach` if available. var each = _.each = _.forEach = function(obj, iterator, context) { - if (obj == null) return; + if (obj == null) return obj; if (nativeForEach && obj.forEach === nativeForEach) { obj.forEach(iterator, context); } else if (obj.length === +obj.length) { - for (var i = 0, l = obj.length; i < l; i++) { + for (var i = 0, length = obj.length; i < length; i++) { if (iterator.call(context, obj[i], i, obj) === breaker) return; } } else { - for (var key in obj) { - if (_.has(obj, key)) { - if (iterator.call(context, obj[key], key, obj) === breaker) return; - } + var keys = _.keys(obj); + for (var i = 0, length = keys.length; i < length; i++) { + if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return; } } + return obj; }; // Return the results of applying the iterator to each element. @@ -1574,7 +1596,7 @@ function assert(expression) { if (obj == null) return results; if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); each(obj, function(value, index, list) { - results[results.length] = iterator.call(context, value, index, list); + results.push(iterator.call(context, value, index, list)); }); return results; }; @@ -1630,10 +1652,10 @@ function assert(expression) { }; // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, iterator, context) { + _.find = _.detect = function(obj, predicate, context) { var result; any(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) { + if (predicate.call(context, value, index, list)) { result = value; return true; } @@ -1644,33 +1666,33 @@ function assert(expression) { // Return all the elements that pass a truth test. // Delegates to **ECMAScript 5**'s native `filter` if available. // Aliased as `select`. - _.filter = _.select = function(obj, iterator, context) { + _.filter = _.select = function(obj, predicate, context) { var results = []; if (obj == null) return results; - if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); + if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context); each(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) results[results.length] = value; + if (predicate.call(context, value, index, list)) results.push(value); }); return results; }; // Return all the elements for which a truth test fails. - _.reject = function(obj, iterator, context) { + _.reject = function(obj, predicate, context) { return _.filter(obj, function(value, index, list) { - return !iterator.call(context, value, index, list); + return !predicate.call(context, value, index, list); }, context); }; // Determine whether all of the elements match a truth test. // Delegates to **ECMAScript 5**'s native `every` if available. // Aliased as `all`. - _.every = _.all = function(obj, iterator, context) { - iterator || (iterator = _.identity); + _.every = _.all = function(obj, predicate, context) { + predicate || (predicate = _.identity); var result = true; if (obj == null) return result; - if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); + if (nativeEvery && obj.every === nativeEvery) return obj.every(predicate, context); each(obj, function(value, index, list) { - if (!(result = result && iterator.call(context, value, index, list))) return breaker; + if (!(result = result && predicate.call(context, value, index, list))) return breaker; }); return !!result; }; @@ -1678,13 +1700,13 @@ function assert(expression) { // Determine if at least one element in the object matches a truth test. // Delegates to **ECMAScript 5**'s native `some` if available. // Aliased as `any`. - var any = _.some = _.any = function(obj, iterator, context) { - iterator || (iterator = _.identity); + var any = _.some = _.any = function(obj, predicate, context) { + predicate || (predicate = _.identity); var result = false; if (obj == null) return result; - if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); + if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context); each(obj, function(value, index, list) { - if (result || (result = iterator.call(context, value, index, list))) return breaker; + if (result || (result = predicate.call(context, value, index, list))) return breaker; }); return !!result; }; @@ -1710,41 +1732,37 @@ function assert(expression) { // Convenience version of a common use case of `map`: fetching a property. _.pluck = function(obj, key) { - return _.map(obj, function(value){ return value[key]; }); + return _.map(obj, _.property(key)); }; // Convenience version of a common use case of `filter`: selecting only objects // containing specific `key:value` pairs. - _.where = function(obj, attrs, first) { - if (_.isEmpty(attrs)) return first ? null : []; - return _[first ? 'find' : 'filter'](obj, function(value) { - for (var key in attrs) { - if (attrs[key] !== value[key]) return false; - } - return true; - }); + _.where = function(obj, attrs) { + return _.filter(obj, _.matches(attrs)); }; // Convenience version of a common use case of `find`: getting the first object // containing specific `key:value` pairs. _.findWhere = function(obj, attrs) { - return _.where(obj, attrs, true); + return _.find(obj, _.matches(attrs)); }; // Return the maximum element or (element-based computation). // Can't optimize arrays of integers longer than 65,535 elements. - // See: https://bugs.webkit.org/show_bug.cgi?id=80797 + // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797) _.max = function(obj, iterator, context) { if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { return Math.max.apply(Math, obj); } - if (!iterator && _.isEmpty(obj)) return -Infinity; - var result = {computed : -Infinity, value: -Infinity}; + var result = -Infinity, lastComputed = -Infinity; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; - computed >= result.computed && (result = {value : value, computed : computed}); + if (computed > lastComputed) { + result = value; + lastComputed = computed; + } }); - return result.value; + return result; }; // Return the minimum element (or element-based computation). @@ -1752,16 +1770,19 @@ function assert(expression) { if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { return Math.min.apply(Math, obj); } - if (!iterator && _.isEmpty(obj)) return Infinity; - var result = {computed : Infinity, value: Infinity}; + var result = Infinity, lastComputed = Infinity; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; - computed < result.computed && (result = {value : value, computed : computed}); + if (computed < lastComputed) { + result = value; + lastComputed = computed; + } }); - return result.value; + return result; }; - // Shuffle an array. + // Shuffle an array, using the modern version of the + // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). _.shuffle = function(obj) { var rand; var index = 0; @@ -1774,19 +1795,32 @@ function assert(expression) { return shuffled; }; + // Sample **n** random values from a collection. + // If **n** is not specified, returns a single random element. + // The internal `guard` argument allows it to work with `map`. + _.sample = function(obj, n, guard) { + if (n == null || guard) { + if (obj.length !== +obj.length) obj = _.values(obj); + return obj[_.random(obj.length - 1)]; + } + return _.shuffle(obj).slice(0, Math.max(0, n)); + }; + // An internal function to generate lookup iterators. var lookupIterator = function(value) { - return _.isFunction(value) ? value : function(obj){ return obj[value]; }; + if (value == null) return _.identity; + if (_.isFunction(value)) return value; + return _.property(value); }; // Sort the object's values by a criterion produced by an iterator. - _.sortBy = function(obj, value, context) { - var iterator = lookupIterator(value); + _.sortBy = function(obj, iterator, context) { + iterator = lookupIterator(iterator); return _.pluck(_.map(obj, function(value, index, list) { return { - value : value, - index : index, - criteria : iterator.call(context, value, index, list) + value: value, + index: index, + criteria: iterator.call(context, value, index, list) }; }).sort(function(left, right) { var a = left.criteria; @@ -1795,43 +1829,46 @@ function assert(expression) { if (a > b || a === void 0) return 1; if (a < b || b === void 0) return -1; } - return left.index < right.index ? -1 : 1; + return left.index - right.index; }), 'value'); }; // An internal function used for aggregate "group by" operations. - var group = function(obj, value, context, behavior) { - var result = {}; - var iterator = lookupIterator(value || _.identity); - each(obj, function(value, index) { - var key = iterator.call(context, value, index, obj); - behavior(result, key, value); - }); - return result; + var group = function(behavior) { + return function(obj, iterator, context) { + var result = {}; + iterator = lookupIterator(iterator); + each(obj, function(value, index) { + var key = iterator.call(context, value, index, obj); + behavior(result, key, value); + }); + return result; + }; }; // Groups the object's values by a criterion. Pass either a string attribute // to group by, or a function that returns the criterion. - _.groupBy = function(obj, value, context) { - return group(obj, value, context, function(result, key, value) { - (_.has(result, key) ? result[key] : (result[key] = [])).push(value); - }); - }; + _.groupBy = group(function(result, key, value) { + _.has(result, key) ? result[key].push(value) : result[key] = [value]; + }); + + // Indexes the object's values by a criterion, similar to `groupBy`, but for + // when you know that your index values will be unique. + _.indexBy = group(function(result, key, value) { + result[key] = value; + }); // Counts instances of an object that group by a certain criterion. Pass // either a string attribute to count by, or a function that returns the // criterion. - _.countBy = function(obj, value, context) { - return group(obj, value, context, function(result, key) { - if (!_.has(result, key)) result[key] = 0; - result[key]++; - }); - }; + _.countBy = group(function(result, key) { + _.has(result, key) ? result[key]++ : result[key] = 1; + }); // Use a comparator function to figure out the smallest index at which // an object should be inserted so as to maintain order. Uses binary search. _.sortedIndex = function(array, obj, iterator, context) { - iterator = iterator == null ? _.identity : lookupIterator(iterator); + iterator = lookupIterator(iterator); var value = iterator.call(context, obj); var low = 0, high = array.length; while (low < high) { @@ -1841,7 +1878,7 @@ function assert(expression) { return low; }; - // Safely convert anything iterable into a real, live array. + // Safely create a real, live array from anything iterable. _.toArray = function(obj) { if (!obj) return []; if (_.isArray(obj)) return slice.call(obj); @@ -1863,7 +1900,9 @@ function assert(expression) { // allows it to work with `_.map`. _.first = _.head = _.take = function(array, n, guard) { if (array == null) return void 0; - return (n != null) && !guard ? slice.call(array, 0, n) : array[0]; + if ((n == null) || guard) return array[0]; + if (n < 0) return []; + return slice.call(array, 0, n); }; // Returns everything but the last entry of the array. Especially useful on @@ -1878,11 +1917,8 @@ function assert(expression) { // values in the array. The **guard** check allows it to work with `_.map`. _.last = function(array, n, guard) { if (array == null) return void 0; - if ((n != null) && !guard) { - return slice.call(array, Math.max(array.length - n, 0)); - } else { - return array[array.length - 1]; - } + if ((n == null) || guard) return array[array.length - 1]; + return slice.call(array, Math.max(array.length - n, 0)); }; // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. @@ -1900,8 +1936,11 @@ function assert(expression) { // Internal implementation of a recursive `flatten` function. var flatten = function(input, shallow, output) { + if (shallow && _.every(input, _.isArray)) { + return concat.apply(output, input); + } each(input, function(value) { - if (_.isArray(value)) { + if (_.isArray(value) || _.isArguments(value)) { shallow ? push.apply(output, value) : flatten(value, shallow, output); } else { output.push(value); @@ -1910,7 +1949,7 @@ function assert(expression) { return output; }; - // Return a completely flattened version of an array. + // Flatten out an array, either recursively (by default), or just one level. _.flatten = function(array, shallow) { return flatten(array, shallow, []); }; @@ -1920,6 +1959,16 @@ function assert(expression) { return _.difference(array, slice.call(arguments, 1)); }; + // Split an array into two arrays: one whose elements all satisfy the given + // predicate, and one whose elements all do not satisfy the predicate. + _.partition = function(array, predicate) { + var pass = [], fail = []; + each(array, function(elem) { + (predicate(elem) ? pass : fail).push(elem); + }); + return [pass, fail]; + }; + // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. // Aliased as `unique`. @@ -1944,7 +1993,7 @@ function assert(expression) { // Produce an array that contains the union: each distinct element from all of // the passed-in arrays. _.union = function() { - return _.uniq(concat.apply(ArrayProto, arguments)); + return _.uniq(_.flatten(arguments, true)); }; // Produce an array that contains every item shared between all the @@ -1953,7 +2002,7 @@ function assert(expression) { var rest = slice.call(arguments, 1); return _.filter(_.uniq(array), function(item) { return _.every(rest, function(other) { - return _.indexOf(other, item) >= 0; + return _.contains(other, item); }); }); }; @@ -1968,11 +2017,10 @@ function assert(expression) { // Zip together multiple lists into a single array -- elements that share // an index go together. _.zip = function() { - var args = slice.call(arguments); - var length = _.max(_.pluck(args, 'length')); + var length = _.max(_.pluck(arguments, 'length').concat(0)); var results = new Array(length); for (var i = 0; i < length; i++) { - results[i] = _.pluck(args, "" + i); + results[i] = _.pluck(arguments, '' + i); } return results; }; @@ -1983,7 +2031,7 @@ function assert(expression) { _.object = function(list, values) { if (list == null) return {}; var result = {}; - for (var i = 0, l = list.length; i < l; i++) { + for (var i = 0, length = list.length; i < length; i++) { if (values) { result[list[i]] = values[i]; } else { @@ -2001,17 +2049,17 @@ function assert(expression) { // for **isSorted** to use binary search. _.indexOf = function(array, item, isSorted) { if (array == null) return -1; - var i = 0, l = array.length; + var i = 0, length = array.length; if (isSorted) { if (typeof isSorted == 'number') { - i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted); + i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted); } else { i = _.sortedIndex(array, item); return array[i] === item ? i : -1; } } if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted); - for (; i < l; i++) if (array[i] === item) return i; + for (; i < length; i++) if (array[i] === item) return i; return -1; }; @@ -2037,11 +2085,11 @@ function assert(expression) { } step = arguments[2] || 1; - var len = Math.max(Math.ceil((stop - start) / step), 0); + var length = Math.max(Math.ceil((stop - start) / step), 0); var idx = 0; - var range = new Array(len); + var range = new Array(length); - while(idx < len) { + while(idx < length) { range[idx++] = start; start += step; } @@ -2052,31 +2100,50 @@ function assert(expression) { // Function (ahem) Functions // ------------------ + // Reusable constructor function for prototype setting. + var ctor = function(){}; + // Create a function bound to a given object (assigning `this`, and arguments, // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if // available. _.bind = function(func, context) { - if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - var args = slice.call(arguments, 2); - return function() { - return func.apply(context, args.concat(slice.call(arguments))); + var args, bound; + if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); + if (!_.isFunction(func)) throw new TypeError; + args = slice.call(arguments, 2); + return bound = function() { + if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments))); + ctor.prototype = func.prototype; + var self = new ctor; + ctor.prototype = null; + var result = func.apply(self, args.concat(slice.call(arguments))); + if (Object(result) === result) return result; + return self; }; }; // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. + // arguments pre-filled, without changing its dynamic `this` context. _ acts + // as a placeholder, allowing any combination of arguments to be pre-filled. _.partial = function(func) { - var args = slice.call(arguments, 1); + var boundArgs = slice.call(arguments, 1); return function() { - return func.apply(this, args.concat(slice.call(arguments))); + var position = 0; + var args = boundArgs.slice(); + for (var i = 0, length = args.length; i < length; i++) { + if (args[i] === _) args[i] = arguments[position++]; + } + while (position < arguments.length) args.push(arguments[position++]); + return func.apply(this, args); }; }; - // Bind all of an object's methods to that object. Useful for ensuring that - // all callbacks defined on an object belong to it. + // Bind a number of an object's methods to that object. Remaining arguments + // are the method names to be bound. Useful for ensuring that all callbacks + // defined on an object belong to it. _.bindAll = function(obj) { var funcs = slice.call(arguments, 1); - if (funcs.length === 0) funcs = _.functions(obj); + if (funcs.length === 0) throw new Error('bindAll must be passed function names'); each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); return obj; }; @@ -2105,17 +2172,24 @@ function assert(expression) { }; // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. - _.throttle = function(func, wait) { - var context, args, timeout, result; + // during a given window of time. Normally, the throttled function will run + // as much as it can, without ever going more than once per `wait` duration; + // but if you'd like to disable the execution on the leading edge, pass + // `{leading: false}`. To disable execution on the trailing edge, ditto. + _.throttle = function(func, wait, options) { + var context, args, result; + var timeout = null; var previous = 0; + options || (options = {}); var later = function() { - previous = new Date; + previous = options.leading === false ? 0 : _.now(); timeout = null; result = func.apply(context, args); + context = args = null; }; return function() { - var now = new Date; + var now = _.now(); + if (!previous && options.leading === false) previous = now; var remaining = wait - (now - previous); context = this; args = arguments; @@ -2124,7 +2198,8 @@ function assert(expression) { timeout = null; previous = now; result = func.apply(context, args); - } else if (!timeout) { + context = args = null; + } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } return result; @@ -2136,17 +2211,34 @@ function assert(expression) { // N milliseconds. If `immediate` is passed, trigger the function on the // leading edge, instead of the trailing. _.debounce = function(func, wait, immediate) { - var timeout, result; - return function() { - var context = this, args = arguments; - var later = function() { + var timeout, args, context, timestamp, result; + + var later = function() { + var last = _.now() - timestamp; + if (last < wait) { + timeout = setTimeout(later, wait - last); + } else { timeout = null; - if (!immediate) result = func.apply(context, args); - }; + if (!immediate) { + result = func.apply(context, args); + context = args = null; + } + } + }; + + return function() { + context = this; + args = arguments; + timestamp = _.now(); var callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) result = func.apply(context, args); + if (!timeout) { + timeout = setTimeout(later, wait); + } + if (callNow) { + result = func.apply(context, args); + context = args = null; + } + return result; }; }; @@ -2168,11 +2260,7 @@ function assert(expression) { // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. _.wrap = function(func, wrapper) { - return function() { - var args = [func]; - push.apply(args, arguments); - return wrapper.apply(this, args); - }; + return _.partial(wrapper, func); }; // Returns a function that is the composition of a list of functions, each @@ -2190,7 +2278,6 @@ function assert(expression) { // Returns a function that will only be executed after being called N times. _.after = function(times, func) { - if (times <= 0) return func(); return function() { if (--times < 1) { return func.apply(this, arguments); @@ -2203,31 +2290,43 @@ function assert(expression) { // Retrieve the names of an object's properties. // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = nativeKeys || function(obj) { - if (obj !== Object(obj)) throw new TypeError('Invalid object'); + _.keys = function(obj) { + if (!_.isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); var keys = []; - for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key; + for (var key in obj) if (_.has(obj, key)) keys.push(key); return keys; }; // Retrieve the values of an object's properties. _.values = function(obj) { - var values = []; - for (var key in obj) if (_.has(obj, key)) values.push(obj[key]); + var keys = _.keys(obj); + var length = keys.length; + var values = new Array(length); + for (var i = 0; i < length; i++) { + values[i] = obj[keys[i]]; + } return values; }; // Convert an object into a list of `[key, value]` pairs. _.pairs = function(obj) { - var pairs = []; - for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]); + var keys = _.keys(obj); + var length = keys.length; + var pairs = new Array(length); + for (var i = 0; i < length; i++) { + pairs[i] = [keys[i], obj[keys[i]]]; + } return pairs; }; // Invert the keys and values of an object. The values must be serializable. _.invert = function(obj) { var result = {}; - for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key; + var keys = _.keys(obj); + for (var i = 0, length = keys.length; i < length; i++) { + result[obj[keys[i]]] = keys[i]; + } return result; }; @@ -2278,7 +2377,7 @@ function assert(expression) { each(slice.call(arguments, 1), function(source) { if (source) { for (var prop in source) { - if (obj[prop] == null) obj[prop] = source[prop]; + if (obj[prop] === void 0) obj[prop] = source[prop]; } } }); @@ -2302,7 +2401,7 @@ function assert(expression) { // Internal recursive comparison function for `isEqual`. var eq = function(a, b, aStack, bStack) { // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal. + // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). if (a === b) return a !== 0 || 1 / a == 1 / b; // A strict comparison is necessary because `null == undefined`. if (a == null || b == null) return a === b; @@ -2344,6 +2443,14 @@ function assert(expression) { // unique nested structures. if (aStack[length] == a) return bStack[length] == b; } + // Objects with different constructors are not equivalent, but `Object`s + // from different frames are. + var aCtor = a.constructor, bCtor = b.constructor; + if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) && + _.isFunction(bCtor) && (bCtor instanceof bCtor)) + && ('constructor' in a && 'constructor' in b)) { + return false; + } // Add the first object to the stack of traversed objects. aStack.push(a); bStack.push(b); @@ -2360,13 +2467,6 @@ function assert(expression) { } } } else { - // Objects with different constructors are not equivalent, but `Object`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) && - _.isFunction(bCtor) && (bCtor instanceof bCtor))) { - return false; - } // Deep compare objects. for (var key in a) { if (_.has(a, key)) { @@ -2488,9 +2588,33 @@ function assert(expression) { return value; }; + _.constant = function(value) { + return function () { + return value; + }; + }; + + _.property = function(key) { + return function(obj) { + return obj[key]; + }; + }; + + // Returns a predicate for checking whether an object has a given set of `key:value` pairs. + _.matches = function(attrs) { + return function(obj) { + if (obj === attrs) return true; //avoid comparing an object to itself. + for (var key in attrs) { + if (attrs[key] !== obj[key]) + return false; + } + return true; + } + }; + // Run a function **n** times. _.times = function(n, iterator, context) { - var accum = Array(n); + var accum = Array(Math.max(0, n)); for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i); return accum; }; @@ -2504,6 +2628,9 @@ function assert(expression) { return min + Math.floor(Math.random() * (max - min + 1)); }; + // A (possibly faster) way to get the current timestamp as an integer. + _.now = Date.now || function() { return new Date().getTime(); }; + // List of HTML entities for escaping. var entityMap = { escape: { @@ -2511,8 +2638,7 @@ function assert(expression) { '<': '<', '>': '>', '"': '"', - "'": ''', - '/': '/' + "'": ''' } }; entityMap.unescape = _.invert(entityMap.escape); @@ -2533,17 +2659,17 @@ function assert(expression) { }; }); - // If the value of the named property is a function then invoke it; - // otherwise, return it. + // If the value of the named `property` is a function then invoke it with the + // `object` as context; otherwise, return it. _.result = function(object, property) { - if (object == null) return null; + if (object == null) return void 0; var value = object[property]; return _.isFunction(value) ? value.call(object) : value; }; // Add your own custom functions to the Underscore object. _.mixin = function(obj) { - each(_.functions(obj), function(name){ + each(_.functions(obj), function(name) { var func = _[name] = obj[name]; _.prototype[name] = function() { var args = [this._wrapped]; @@ -2701,10 +2827,20 @@ function assert(expression) { }); + // AMD registration happens at the end for compatibility with AMD loaders + // that may not enforce next-turn semantics on modules. Even though general + // practice for AMD registration is to be anonymous, underscore registers + // as a named module because, like jQuery, it is a base library that is + // popular enough to be bundled in a third party lib, but not be part of + // an AMD load request. Those cases could generate an error when an + // anonymous define() is called outside of a loader request. + if (typeof define === 'function' && define.amd) { + define('underscore', [], function() { + return _; + }); + } }).call(this); -},{}],"jshint":[function(require,module,exports){ -module.exports=require('fNbQ4d'); },{}],"fNbQ4d":[function(require,module,exports){ /*! * JSHint, by JSHint Community. @@ -2790,20 +2926,15 @@ var JSHINT = (function () { curly : true, // if curly braces around all blocks should be required dojo : true, // if Dojo Toolkit globals should be predefined eqeqeq : true, // if === should be required - eqnull : true, // if == null comparisons should be tolerated notypeof : true, // if should report typos in typeof comparisons es3 : true, // if ES3 syntax should be allowed es5 : true, // if ES5 syntax should be allowed (is now set per default) - esnext : true, // if es.next specific syntax should be allowed - expr : true, // if ExpressionStatement should be allowed as Programs forin : true, // if for in statements must filter funcscope : true, // if only function scope should be used for scope tests globalstrict: true, // if global "use strict"; should be allowed (also enables 'strict') immed : true, // if immediate invocations must be wrapped in parens iterator : true, // if the `__iterator__` property should be allowed - lastsemic : true, // if semicolons may be ommitted for the trailing // statements inside of a one-line blocks. - loopfunc : true, // if functions should be allowed to be defined within newcap : true, // if constructor names must be capitalized noarg : true, // if arguments.caller and arguments.callee should be noempty : true, // if empty blocks should be disallowed @@ -2835,7 +2966,12 @@ var JSHINT = (function () { // This is a function scoped option only. withstmt : true, // if with statements should be allowed moz : true, // if mozilla specific syntax should be allowed - noyield : true // allow generators without a yield + noyield : true, // allow generators without a yield + eqnull : true, // if == null comparisons should be tolerated + lastsemic : true, // if semicolons may be ommitted for the trailing + loopfunc : true, // if functions should be allowed to be defined within + expr : true, // if ExpressionStatement should be allowed as Programs + esnext : true // if es.next specific syntax should be allowed }, // Third party globals @@ -2858,6 +2994,7 @@ var JSHINT = (function () { nonstandard : true, // if non-standard (but widely adopted) globals should // be predefined browser : true, // if the standard browser globals should be predefined + browserify : true, // if the standard browserify globals should be predefined devel : true, // if logging globals should be predefined (console, alert, etc.) // Obsolete options @@ -2990,10 +3127,10 @@ var JSHINT = (function () { } function isIdentifier(tkn, value) { - if(!tkn) + if (!tkn) return false; - if(!tkn.identifier || tkn.value !== value) + if (!tkn.identifier || tkn.value !== value) return false; return true; @@ -3043,12 +3180,12 @@ var JSHINT = (function () { function processenforceall() { if (state.option.enforceall) { - for(var enforceopt in boolOptions.enforcing) { + for (var enforceopt in boolOptions.enforcing) { if (state.option[enforceopt] === undefined) { state.option[enforceopt] = true; } } - for(var relaxopt in boolOptions.relaxing){ + for (var relaxopt in boolOptions.relaxing) { if (state.option[relaxopt] === undefined) { state.option[relaxopt] = false; } @@ -3113,6 +3250,12 @@ var JSHINT = (function () { combine(predefined, vars.typed); } + if (state.option.browserify) { + combine(predefined, vars.browser); + combine(predefined, vars.typed); + combine(predefined, vars.browserify); + } + if (state.option.nonstandard) { combine(predefined, vars.nonstandard); } @@ -3175,7 +3318,6 @@ var JSHINT = (function () { } return state.option.es3; }; - } // Produce an error warning. @@ -3711,6 +3853,10 @@ var JSHINT = (function () { if (state.tokens.next.id === "(end)") error("E006", state.tokens.curr); + if (state.tokens.next.type === "(template)") { + doTemplateLiteral(); + } + var isDangerous = state.option.asi && state.tokens.prev.line < state.tokens.curr.line && @@ -4225,12 +4371,14 @@ var JSHINT = (function () { // argument (see identifier()) // prop means that this identifier is that of an object property - function optionalidentifier(fnparam, prop) { + function optionalidentifier(fnparam, prop, preserve) { if (!state.tokens.next.identifier) { return; } - advance(); + if (!preserve) { + advance(); + } var curr = state.tokens.curr; var val = state.tokens.curr.value; @@ -4428,7 +4576,7 @@ var JSHINT = (function () { } - function statements(startLine) { + function statements() { var a = [], p; while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") { @@ -4441,7 +4589,7 @@ var JSHINT = (function () { advance(";"); } else { - a.push(statement(startLine === state.tokens.next.line)); + a.push(statement()); } } return a; @@ -4567,7 +4715,7 @@ var JSHINT = (function () { } } - a = statements(line); + a = statements(); metrics.statementCount += a.length; @@ -4684,10 +4832,6 @@ var JSHINT = (function () { return this; }); - type("(template)", function () { - return this; - }); - state.syntax["(identifier)"] = { type: "(identifier)", lbp: 0, @@ -4836,6 +4980,21 @@ var JSHINT = (function () { } }; + state.syntax["(template)"] = { + type: "(template)", + lbp: 0, + identifier: false, + fud: doTemplateLiteral + }; + + type("(template middle)", function () { + return this; + }); + + type("(template tail)", function () { + return this; + }); + type("(regexp)", function () { return this; }); @@ -4887,12 +5046,12 @@ var JSHINT = (function () { }; assignop("%=", "assignmod", 20); - bitwiseassignop("&=", "assignbitand", 20); - bitwiseassignop("|=", "assignbitor", 20); - bitwiseassignop("^=", "assignbitxor", 20); - bitwiseassignop("<<=", "assignshiftleft", 20); - bitwiseassignop(">>=", "assignshiftright", 20); - bitwiseassignop(">>>=", "assignshiftrightunsigned", 20); + bitwiseassignop("&="); + bitwiseassignop("|="); + bitwiseassignop("^="); + bitwiseassignop("<<="); + bitwiseassignop(">>="); + bitwiseassignop(">>>="); infix(",", function (left, that) { var expr; that.exprs = [left]; @@ -5043,11 +5202,11 @@ var JSHINT = (function () { infix("/", "div", 140); infix("%", "mod", 140); - suffix("++", "postinc"); + suffix("++"); prefix("++", "preinc"); state.syntax["++"].exps = true; - suffix("--", "postdec"); + suffix("--"); prefix("--", "predec"); state.syntax["--"].exps = true; prefix("delete", function () { @@ -5400,7 +5559,7 @@ var JSHINT = (function () { } prefix("[", function () { - var blocktype = lookupBlockType(true); + var blocktype = lookupBlockType(); if (blocktype.isCompArray) { if (!state.option.inESNext()) { warning("W119", state.tokens.curr, "array comprehension"); @@ -5444,19 +5603,23 @@ var JSHINT = (function () { } advance("]", this); return this; - }, 160); + }); - function property_name() { - var id = optionalidentifier(false, true); + function property_name(preserve) { + var id = optionalidentifier(false, true, preserve); if (!id) { if (state.tokens.next.id === "(string)") { id = state.tokens.next.value; - advance(); + if (!preserve) { + advance(); + } } else if (state.tokens.next.id === "(number)") { id = state.tokens.next.value.toString(); - advance(); + if (!preserve) { + advance(); + } } } @@ -5610,6 +5773,22 @@ var JSHINT = (function () { return funct; } + function doTemplateLiteral() { + while (state.tokens.next.type !== "(template tail)" && state.tokens.next.id !== "(end)") { + advance(); + if (state.tokens.next.type === "(template tail)") { + break; + } else if (state.tokens.next.type !== "(template middle)" && + state.tokens.next.type !== "(end)") { + expression(10); // should probably have different rbp? + } + } + return { + id: "(template)", + type: "(template)" + }; + } + function doFunction(name, statement, generator, fatarrowparams) { var f; var oldOption = state.option; @@ -5885,21 +6064,33 @@ var JSHINT = (function () { advance("*"); g = true; } - i = property_name(); - saveProperty(tag + i, state.tokens.next); - - if (typeof i !== "string") { - break; - } - - if (state.tokens.next.value === "(") { + if (!isclassdef && + state.tokens.next.identifier && + (peek().id === "," || peek().id === "}")) { if (!state.option.inESNext()) { - warning("W104", state.tokens.curr, "concise methods"); + warning("W104", state.tokens.curr, "object short notation"); } - doFunction(i, undefined, g); - } else if (!isclassdef) { - advance(":"); + i = property_name(true); + saveProperty(tag + i, state.tokens.next); + expression(10); + } else { + i = property_name(); + saveProperty(tag + i, state.tokens.next); + + if (typeof i !== "string") { + break; + } + + if (state.tokens.next.value === "(") { + if (!state.option.inESNext()) { + warning("W104", state.tokens.curr, "concise methods"); + } + doFunction(i, undefined, g); + } else if (!isclassdef) { + advance(":"); + expression(10); + } } } // It is a Syntax Error if PropName of MethodDefinition is "prototype". @@ -6128,7 +6319,9 @@ var JSHINT = (function () { warning("W080", state.tokens.prev, state.tokens.prev.value); } if (peek(0).id === "=" && state.tokens.next.identifier) { - warning("W120", state.tokens.next, state.tokens.next.value); + if (!funct["(params)"] || funct["(params)"].indexOf(state.tokens.next.value) === -1) { + warning("W120", state.tokens.next, state.tokens.next.value); + } } value = expression(10); if (lone) { @@ -6322,7 +6515,7 @@ var JSHINT = (function () { if (state.tokens.next.id === "else") { advance("else"); if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") { - statement(true); + statement(); } else { block(true, true); } @@ -7329,6 +7522,8 @@ var JSHINT = (function () { if (item[0] === "-") { slice = item.slice(1); JSHINT.blacklist[slice] = slice; + // remove from predefined if there + delete predefined[slice]; } else { prop = Object.getOwnPropertyDescriptor(o.predef, item); predefined[item] = prop ? prop.value : false; @@ -7476,8 +7671,10 @@ var JSHINT = (function () { directives(); if (state.directive["use strict"]) { - if (!state.option.globalstrict && !(state.option.node || state.option.phantom)) { - warning("W097", state.tokens.prev); + if (!state.option.globalstrict) { + if (!(state.option.node || state.option.phantom || state.option.browserify)) { + warning("W097", state.tokens.prev); + } } } @@ -7771,7 +7968,9 @@ if (typeof exports === "object" && exports) { exports.JSHINT = JSHINT; } -},{"./lex.js":16,"./messages.js":17,"./reg.js":18,"./state.js":19,"./style.js":20,"./vars.js":21,"console-browserify":12,"events":7,"underscore":13}],16:[function(require,module,exports){ +},{"./lex.js":17,"./messages.js":18,"./reg.js":19,"./state.js":20,"./style.js":21,"./vars.js":22,"console-browserify":12,"events":7,"underscore":14}],"jshint":[function(require,module,exports){ +module.exports=require('fNbQ4d'); +},{}],17:[function(require,module,exports){ /* * Lexical analysis and token construction. */ @@ -7803,7 +8002,9 @@ var Token = { NullLiteral: 7, BooleanLiteral: 8, RegExp: 9, - TemplateLiteral: 10 + TemplateHead: 10, + TemplateMiddle: 11, + TemplateTail: 12 }; // Object that handles postponed lexing verifications that checks the parsed @@ -7883,6 +8084,9 @@ function Lexer(source) { this.from = 1; this.input = ""; this.inComment = false; + this.inTemplate = false; + this.templateLine = null; + this.templateChar = null; for (var i = 0; i < state.option.indent; i += 1) { state.tab += " "; @@ -8092,13 +8296,10 @@ Lexer.prototype = { }; } - // Special case: /=. We need to make sure that this is an - // operator and not a regular expression. + // Special case: /=. if (ch1 === "/") { - if (ch2 === "=" && /\/=(?!(\S*\/[gim]?))/.test(this.input)) { - // /= is not a part of a regular expression, return it as a - // punctuator. + if (ch2 === "=") { return { type: Token.Punctuator, value: "/=" @@ -8146,6 +8347,8 @@ Lexer.prototype = { value += "*/"; } + body = body.replace(/\n/g, " "); + special.forEach(function (str) { if (isSpecial) { return; @@ -8627,52 +8830,75 @@ Lexer.prototype = { * the char pointer. */ scanTemplateLiteral: function () { + var tokenType; + var value = ''; + var ch; + // String must start with a backtick. - if (!state.option.esnext || this.peek() !== "`") { + if (!this.inTemplate) { + if (!state.option.esnext || this.peek() !== "`") { + return null; + } + this.templateLine = this.line; + this.templateChar = this.char; + this.skip(1); + } else if (this.peek() !== '}') { + // If we're in a template, and we don't have a '}', lex something else instead. return null; } - var startLine = this.line; - var startChar = this.char; - var jump = 1; - var value = ""; - - // For now, do not perform any linting of the content of the template - // string. Just skip until the next backtick is found. - this.skip(); - while (this.peek() !== "`") { - while (this.peek() === "") { - // End of line --- For template literals in ES6, no backslash is - // required to precede newlines. + while ((ch = this.peek()) === "") { if (!this.nextLine()) { + // Unclosed template literal --- point to the starting line, or the EOF? + tokenType = this.inTemplate ? Token.TemplateHead : Token.TemplateMiddle; + this.inTemplate = false; this.trigger("error", { code: "E052", - line: startLine, - character: startChar + line: this.templateLine, + character: this.templateChar }); - return { - type: Token.TemplateLiteral, + type: tokenType, value: value, isUnclosed: true }; } - value += "\n"; } - // TODO: do more interesting linting here, similar to string literal - // linting. - var char = this.peek(); - this.skip(jump); - value += char; + if (ch === '$' && this.peek(1) === '{') { + value += '${'; + tokenType = value.charAt(0) === '}' ? Token.TemplateMiddle : Token.TemplateHead; + // Either TokenHead or TokenMiddle --- depending on if the initial value + // is '}' or not. + this.skip(2); + this.inTemplate = true; + return { + type: tokenType, + value: value, + isUnclosed: false + }; + } else if (ch === '\\') { + // TODO: Parse escape sequence, warn about invalid escae sequences + value += ch; + this.skip(1); + } else { + // Otherwise, append the value and continue. + value += ch; + this.skip(1); + } } - this.skip(); + // Final value is either TokenTail or NoSubstititionTemplate --- essentially a string + tokenType = this.inTemplate ? Token.TemplateTail : Token.StringLiteral; + this.inTemplate = false; + this.skip(1); + return { - type: Token.TemplateLiteral, + type: tokenType, value: value, - isUnclosed: false + isUnclosed: false, + quote: "`" }; }, @@ -9058,7 +9284,7 @@ Lexer.prototype = { }, /* - * Scan for any occurence of non-breaking spaces. Non-breaking spaces + * Scan for any occurrence of non-breaking spaces. Non-breaking spaces * can be mistakenly typed on OS X with option-space. Non UTF-8 web * pages with non-breaking pages produce syntax errors. */ @@ -9200,7 +9426,7 @@ Lexer.prototype = { /* * Produce the next token. This function is called by advance() to get - * the next token. It retuns a token in a JSLint-compatible format. + * the next token. It returns a token in a JSLint-compatible format. */ token: function () { /*jshint loopfunc:true */ @@ -9252,6 +9478,8 @@ Lexer.prototype = { case "~": case "#": case "]": + case "++": + case "--": this.prereg = false; break; default: @@ -9331,8 +9559,8 @@ Lexer.prototype = { return create("(string)", token.value); - case Token.TemplateLiteral: - this.trigger("Template", { + case Token.TemplateHead: + this.trigger("TemplateHead", { line: this.line, char: this.char, from: this.from, @@ -9340,6 +9568,24 @@ Lexer.prototype = { }); return create("(template)", token.value); + case Token.TemplateMiddle: + this.trigger("TemplateMiddle", { + line: this.line, + char: this.char, + from: this.from, + value: token.value + }); + return create("(template middle)", token.value); + + case Token.TemplateTail: + this.trigger("TemplateTail", { + line: this.line, + char: this.char, + from: this.from, + value: token.value + }); + return create("(template tail)", token.value); + case Token.Identifier: this.trigger("Identifier", { line: this.line, @@ -9424,7 +9670,7 @@ Lexer.prototype = { exports.Lexer = Lexer; -},{"../data/ascii-identifier-data.js":1,"../data/non-ascii-identifier-part-only.js":2,"../data/non-ascii-identifier-start.js":3,"./reg.js":18,"./state.js":19,"events":7,"underscore":13}],17:[function(require,module,exports){ +},{"../data/ascii-identifier-data.js":1,"../data/non-ascii-identifier-part-only.js":2,"../data/non-ascii-identifier-start.js":3,"./reg.js":19,"./state.js":20,"events":7,"underscore":14}],18:[function(require,module,exports){ "use strict"; var _ = require("underscore"); @@ -9649,14 +9895,14 @@ _.each(info, function (desc, code) { exports.info[code] = { code: code, desc: desc }; }); -},{"underscore":13}],18:[function(require,module,exports){ +},{"underscore":14}],19:[function(require,module,exports){ /* * Regular expressions. Some of these are stupidly long. */ /*jshint maxlen:1000 */ -"use string"; +"use strict"; // Unsafe comment or string (ax) exports.unsafeString = @@ -9689,7 +9935,7 @@ exports.fallsThrough = /^\s*\/\*\s*falls?\sthrough\s*\*\/\s*$/; // to relax the maxlen option exports.maxlenException = /^(?:(?:\/\/|\/\*|\*) ?)?[^ ]+$/; -},{}],19:[function(require,module,exports){ +},{}],20:[function(require,module,exports){ "use strict"; var state = { @@ -9719,7 +9965,7 @@ var state = { exports.state = state; -},{}],20:[function(require,module,exports){ +},{}],21:[function(require,module,exports){ "use strict"; exports.register = function (linter) { @@ -9778,12 +10024,18 @@ exports.register = function (linter) { linter.on("String", function style_scanQuotes(data) { var quotmark = linter.getOption("quotmark"); + var esnext = linter.getOption("esnext"); var code; if (!quotmark) { return; } + // If quotmark is enabled, return if this is a template literal. + if (esnext && data.quote === "`") { + return; + } + // If quotmark is set to 'single' warn about all double-quotes. if (quotmark === "single" && data.quote !== "'") { @@ -9864,7 +10116,7 @@ exports.register = function (linter) { }); }; -},{}],21:[function(require,module,exports){ +},{}],22:[function(require,module,exports){ // jshint -W001 "use strict"; @@ -9892,18 +10144,24 @@ exports.ecmaIdentifiers = { isFinite : false, isNaN : false, JSON : false, + Map : false, Math : false, Number : false, Object : false, + Proxy : false, + Promise : false, parseInt : false, parseFloat : false, RangeError : false, ReferenceError : false, RegExp : false, + Set : false, String : false, SyntaxError : false, TypeError : false, URIError : false, + WeakMap : false, + WeakSet : false }; exports.newEcmaIdentifiers = { @@ -10276,6 +10534,17 @@ exports.node = { clearImmediate: true // v0.9.1+ }; +exports.browserify = { + __filename : false, + __dirname : false, + global : false, + module : false, + require : false, + Buffer : true, + exports : true, + process : true +}; + exports.phantom = { phantom : true, require : true, diff --git a/node_modules/gulp-jshint/node_modules/jshint/dist/jshint.js b/node_modules/gulp-jshint/node_modules/jshint/dist/jshint.js index 9aca3d3..3c7ca55 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/dist/jshint.js +++ b/node_modules/gulp-jshint/node_modules/jshint/dist/jshint.js @@ -1,4 +1,4 @@ -/*! 2.5.2 */ +/*! 2.5.4 */ var JSHINT; if (typeof window === 'undefined') window = {}; (function () { @@ -997,8 +997,8 @@ function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -}).call(this,require("/Users/antonkovalyov/src/jshint/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":5,"/Users/antonkovalyov/src/jshint/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":9,"inherits":8}],7:[function(require,module,exports){ +}).call(this,require("FWaASH"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./support/isBuffer":5,"FWaASH":9,"inherits":8}],7:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -1146,7 +1146,10 @@ EventEmitter.prototype.addListener = function(type, listener) { 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length); - console.trace(); + if (typeof console.trace === 'function') { + // not supported in IE 10 + console.trace(); + } } } @@ -1370,6 +1373,16 @@ process.browser = true; process.env = {}; process.argv = []; +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + process.binding = function (name) { throw new Error('process.binding is not supported'); } @@ -1384,11 +1397,12 @@ process.chdir = function (dir) { module.exports=require(5) },{}],11:[function(require,module,exports){ module.exports=require(6) -},{"./support/isBuffer":10,"/Users/antonkovalyov/src/jshint/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":9,"inherits":8}],12:[function(require,module,exports){ +},{"./support/isBuffer":10,"FWaASH":9,"inherits":8}],12:[function(require,module,exports){ (function (global){ /*global window, global*/ var util = require("util") var assert = require("assert") +var now = require("date-now") var slice = Array.prototype.slice var console @@ -1399,19 +1413,19 @@ if (typeof global !== "undefined" && global.console) { } else if (typeof window !== "undefined" && window.console) { console = window.console } else { - console = window.console = {} + console = {} } var functions = [ - [log, "log"] - , [info, "info"] - , [warn, "warn"] - , [error, "error"] - , [time, "time"] - , [timeEnd, "timeEnd"] - , [trace, "trace"] - , [dir, "dir"] - , [assert, "assert"] + [log, "log"], + [info, "info"], + [warn, "warn"], + [error, "error"], + [time, "time"], + [timeEnd, "timeEnd"], + [trace, "trace"], + [dir, "dir"], + [consoleAssert, "assert"] ] for (var i = 0; i < functions.length; i++) { @@ -1441,7 +1455,7 @@ function error() { } function time(label) { - times[label] = Date.now() + times[label] = now() } function timeEnd(label) { @@ -1450,7 +1464,7 @@ function timeEnd(label) { throw new Error("No such label: " + label) } - var duration = Date.now() - time + var duration = now() - time console.log(label + ": " + duration + "ms") } @@ -1465,7 +1479,7 @@ function dir(object) { console.log(util.inspect(object) + "\n") } -function assert(expression) { +function consoleAssert(expression) { if (!expression) { var arr = slice.call(arguments, 1) assert.ok(false, util.format.apply(null, arr)) @@ -1473,10 +1487,17 @@ function assert(expression) { } }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"assert":4,"util":11}],13:[function(require,module,exports){ -// Underscore.js 1.4.4 +},{"assert":4,"date-now":13,"util":11}],13:[function(require,module,exports){ +module.exports = now + +function now() { + return new Date().getTime() +} + +},{}],14:[function(require,module,exports){ +// Underscore.js 1.6.0 // http://underscorejs.org -// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. +// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. (function() { @@ -1484,7 +1505,7 @@ function assert(expression) { // Baseline setup // -------------- - // Establish the root object, `window` in the browser, or `global` on the server. + // Establish the root object, `window` in the browser, or `exports` on the server. var root = this; // Save the previous value of the `_` variable. @@ -1497,11 +1518,12 @@ function assert(expression) { var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; // Create quick reference variables for speed access to core prototypes. - var push = ArrayProto.push, - slice = ArrayProto.slice, - concat = ArrayProto.concat, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; + var + push = ArrayProto.push, + slice = ArrayProto.slice, + concat = ArrayProto.concat, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; // All **ECMAScript 5** native function implementations that we hope to use // are declared here. @@ -1540,7 +1562,7 @@ function assert(expression) { } // Current version. - _.VERSION = '1.4.4'; + _.VERSION = '1.6.0'; // Collection Functions // -------------------- @@ -1549,20 +1571,20 @@ function assert(expression) { // Handles objects with the built-in `forEach`, arrays, and raw objects. // Delegates to **ECMAScript 5**'s native `forEach` if available. var each = _.each = _.forEach = function(obj, iterator, context) { - if (obj == null) return; + if (obj == null) return obj; if (nativeForEach && obj.forEach === nativeForEach) { obj.forEach(iterator, context); } else if (obj.length === +obj.length) { - for (var i = 0, l = obj.length; i < l; i++) { + for (var i = 0, length = obj.length; i < length; i++) { if (iterator.call(context, obj[i], i, obj) === breaker) return; } } else { - for (var key in obj) { - if (_.has(obj, key)) { - if (iterator.call(context, obj[key], key, obj) === breaker) return; - } + var keys = _.keys(obj); + for (var i = 0, length = keys.length; i < length; i++) { + if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return; } } + return obj; }; // Return the results of applying the iterator to each element. @@ -1572,7 +1594,7 @@ function assert(expression) { if (obj == null) return results; if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); each(obj, function(value, index, list) { - results[results.length] = iterator.call(context, value, index, list); + results.push(iterator.call(context, value, index, list)); }); return results; }; @@ -1628,10 +1650,10 @@ function assert(expression) { }; // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, iterator, context) { + _.find = _.detect = function(obj, predicate, context) { var result; any(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) { + if (predicate.call(context, value, index, list)) { result = value; return true; } @@ -1642,33 +1664,33 @@ function assert(expression) { // Return all the elements that pass a truth test. // Delegates to **ECMAScript 5**'s native `filter` if available. // Aliased as `select`. - _.filter = _.select = function(obj, iterator, context) { + _.filter = _.select = function(obj, predicate, context) { var results = []; if (obj == null) return results; - if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); + if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context); each(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) results[results.length] = value; + if (predicate.call(context, value, index, list)) results.push(value); }); return results; }; // Return all the elements for which a truth test fails. - _.reject = function(obj, iterator, context) { + _.reject = function(obj, predicate, context) { return _.filter(obj, function(value, index, list) { - return !iterator.call(context, value, index, list); + return !predicate.call(context, value, index, list); }, context); }; // Determine whether all of the elements match a truth test. // Delegates to **ECMAScript 5**'s native `every` if available. // Aliased as `all`. - _.every = _.all = function(obj, iterator, context) { - iterator || (iterator = _.identity); + _.every = _.all = function(obj, predicate, context) { + predicate || (predicate = _.identity); var result = true; if (obj == null) return result; - if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); + if (nativeEvery && obj.every === nativeEvery) return obj.every(predicate, context); each(obj, function(value, index, list) { - if (!(result = result && iterator.call(context, value, index, list))) return breaker; + if (!(result = result && predicate.call(context, value, index, list))) return breaker; }); return !!result; }; @@ -1676,13 +1698,13 @@ function assert(expression) { // Determine if at least one element in the object matches a truth test. // Delegates to **ECMAScript 5**'s native `some` if available. // Aliased as `any`. - var any = _.some = _.any = function(obj, iterator, context) { - iterator || (iterator = _.identity); + var any = _.some = _.any = function(obj, predicate, context) { + predicate || (predicate = _.identity); var result = false; if (obj == null) return result; - if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); + if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context); each(obj, function(value, index, list) { - if (result || (result = iterator.call(context, value, index, list))) return breaker; + if (result || (result = predicate.call(context, value, index, list))) return breaker; }); return !!result; }; @@ -1708,41 +1730,37 @@ function assert(expression) { // Convenience version of a common use case of `map`: fetching a property. _.pluck = function(obj, key) { - return _.map(obj, function(value){ return value[key]; }); + return _.map(obj, _.property(key)); }; // Convenience version of a common use case of `filter`: selecting only objects // containing specific `key:value` pairs. - _.where = function(obj, attrs, first) { - if (_.isEmpty(attrs)) return first ? null : []; - return _[first ? 'find' : 'filter'](obj, function(value) { - for (var key in attrs) { - if (attrs[key] !== value[key]) return false; - } - return true; - }); + _.where = function(obj, attrs) { + return _.filter(obj, _.matches(attrs)); }; // Convenience version of a common use case of `find`: getting the first object // containing specific `key:value` pairs. _.findWhere = function(obj, attrs) { - return _.where(obj, attrs, true); + return _.find(obj, _.matches(attrs)); }; // Return the maximum element or (element-based computation). // Can't optimize arrays of integers longer than 65,535 elements. - // See: https://bugs.webkit.org/show_bug.cgi?id=80797 + // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797) _.max = function(obj, iterator, context) { if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { return Math.max.apply(Math, obj); } - if (!iterator && _.isEmpty(obj)) return -Infinity; - var result = {computed : -Infinity, value: -Infinity}; + var result = -Infinity, lastComputed = -Infinity; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; - computed >= result.computed && (result = {value : value, computed : computed}); + if (computed > lastComputed) { + result = value; + lastComputed = computed; + } }); - return result.value; + return result; }; // Return the minimum element (or element-based computation). @@ -1750,16 +1768,19 @@ function assert(expression) { if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { return Math.min.apply(Math, obj); } - if (!iterator && _.isEmpty(obj)) return Infinity; - var result = {computed : Infinity, value: Infinity}; + var result = Infinity, lastComputed = Infinity; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; - computed < result.computed && (result = {value : value, computed : computed}); + if (computed < lastComputed) { + result = value; + lastComputed = computed; + } }); - return result.value; + return result; }; - // Shuffle an array. + // Shuffle an array, using the modern version of the + // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). _.shuffle = function(obj) { var rand; var index = 0; @@ -1772,19 +1793,32 @@ function assert(expression) { return shuffled; }; + // Sample **n** random values from a collection. + // If **n** is not specified, returns a single random element. + // The internal `guard` argument allows it to work with `map`. + _.sample = function(obj, n, guard) { + if (n == null || guard) { + if (obj.length !== +obj.length) obj = _.values(obj); + return obj[_.random(obj.length - 1)]; + } + return _.shuffle(obj).slice(0, Math.max(0, n)); + }; + // An internal function to generate lookup iterators. var lookupIterator = function(value) { - return _.isFunction(value) ? value : function(obj){ return obj[value]; }; + if (value == null) return _.identity; + if (_.isFunction(value)) return value; + return _.property(value); }; // Sort the object's values by a criterion produced by an iterator. - _.sortBy = function(obj, value, context) { - var iterator = lookupIterator(value); + _.sortBy = function(obj, iterator, context) { + iterator = lookupIterator(iterator); return _.pluck(_.map(obj, function(value, index, list) { return { - value : value, - index : index, - criteria : iterator.call(context, value, index, list) + value: value, + index: index, + criteria: iterator.call(context, value, index, list) }; }).sort(function(left, right) { var a = left.criteria; @@ -1793,43 +1827,46 @@ function assert(expression) { if (a > b || a === void 0) return 1; if (a < b || b === void 0) return -1; } - return left.index < right.index ? -1 : 1; + return left.index - right.index; }), 'value'); }; // An internal function used for aggregate "group by" operations. - var group = function(obj, value, context, behavior) { - var result = {}; - var iterator = lookupIterator(value || _.identity); - each(obj, function(value, index) { - var key = iterator.call(context, value, index, obj); - behavior(result, key, value); - }); - return result; + var group = function(behavior) { + return function(obj, iterator, context) { + var result = {}; + iterator = lookupIterator(iterator); + each(obj, function(value, index) { + var key = iterator.call(context, value, index, obj); + behavior(result, key, value); + }); + return result; + }; }; // Groups the object's values by a criterion. Pass either a string attribute // to group by, or a function that returns the criterion. - _.groupBy = function(obj, value, context) { - return group(obj, value, context, function(result, key, value) { - (_.has(result, key) ? result[key] : (result[key] = [])).push(value); - }); - }; + _.groupBy = group(function(result, key, value) { + _.has(result, key) ? result[key].push(value) : result[key] = [value]; + }); + + // Indexes the object's values by a criterion, similar to `groupBy`, but for + // when you know that your index values will be unique. + _.indexBy = group(function(result, key, value) { + result[key] = value; + }); // Counts instances of an object that group by a certain criterion. Pass // either a string attribute to count by, or a function that returns the // criterion. - _.countBy = function(obj, value, context) { - return group(obj, value, context, function(result, key) { - if (!_.has(result, key)) result[key] = 0; - result[key]++; - }); - }; + _.countBy = group(function(result, key) { + _.has(result, key) ? result[key]++ : result[key] = 1; + }); // Use a comparator function to figure out the smallest index at which // an object should be inserted so as to maintain order. Uses binary search. _.sortedIndex = function(array, obj, iterator, context) { - iterator = iterator == null ? _.identity : lookupIterator(iterator); + iterator = lookupIterator(iterator); var value = iterator.call(context, obj); var low = 0, high = array.length; while (low < high) { @@ -1839,7 +1876,7 @@ function assert(expression) { return low; }; - // Safely convert anything iterable into a real, live array. + // Safely create a real, live array from anything iterable. _.toArray = function(obj) { if (!obj) return []; if (_.isArray(obj)) return slice.call(obj); @@ -1861,7 +1898,9 @@ function assert(expression) { // allows it to work with `_.map`. _.first = _.head = _.take = function(array, n, guard) { if (array == null) return void 0; - return (n != null) && !guard ? slice.call(array, 0, n) : array[0]; + if ((n == null) || guard) return array[0]; + if (n < 0) return []; + return slice.call(array, 0, n); }; // Returns everything but the last entry of the array. Especially useful on @@ -1876,11 +1915,8 @@ function assert(expression) { // values in the array. The **guard** check allows it to work with `_.map`. _.last = function(array, n, guard) { if (array == null) return void 0; - if ((n != null) && !guard) { - return slice.call(array, Math.max(array.length - n, 0)); - } else { - return array[array.length - 1]; - } + if ((n == null) || guard) return array[array.length - 1]; + return slice.call(array, Math.max(array.length - n, 0)); }; // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. @@ -1898,8 +1934,11 @@ function assert(expression) { // Internal implementation of a recursive `flatten` function. var flatten = function(input, shallow, output) { + if (shallow && _.every(input, _.isArray)) { + return concat.apply(output, input); + } each(input, function(value) { - if (_.isArray(value)) { + if (_.isArray(value) || _.isArguments(value)) { shallow ? push.apply(output, value) : flatten(value, shallow, output); } else { output.push(value); @@ -1908,7 +1947,7 @@ function assert(expression) { return output; }; - // Return a completely flattened version of an array. + // Flatten out an array, either recursively (by default), or just one level. _.flatten = function(array, shallow) { return flatten(array, shallow, []); }; @@ -1918,6 +1957,16 @@ function assert(expression) { return _.difference(array, slice.call(arguments, 1)); }; + // Split an array into two arrays: one whose elements all satisfy the given + // predicate, and one whose elements all do not satisfy the predicate. + _.partition = function(array, predicate) { + var pass = [], fail = []; + each(array, function(elem) { + (predicate(elem) ? pass : fail).push(elem); + }); + return [pass, fail]; + }; + // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. // Aliased as `unique`. @@ -1942,7 +1991,7 @@ function assert(expression) { // Produce an array that contains the union: each distinct element from all of // the passed-in arrays. _.union = function() { - return _.uniq(concat.apply(ArrayProto, arguments)); + return _.uniq(_.flatten(arguments, true)); }; // Produce an array that contains every item shared between all the @@ -1951,7 +2000,7 @@ function assert(expression) { var rest = slice.call(arguments, 1); return _.filter(_.uniq(array), function(item) { return _.every(rest, function(other) { - return _.indexOf(other, item) >= 0; + return _.contains(other, item); }); }); }; @@ -1966,11 +2015,10 @@ function assert(expression) { // Zip together multiple lists into a single array -- elements that share // an index go together. _.zip = function() { - var args = slice.call(arguments); - var length = _.max(_.pluck(args, 'length')); + var length = _.max(_.pluck(arguments, 'length').concat(0)); var results = new Array(length); for (var i = 0; i < length; i++) { - results[i] = _.pluck(args, "" + i); + results[i] = _.pluck(arguments, '' + i); } return results; }; @@ -1981,7 +2029,7 @@ function assert(expression) { _.object = function(list, values) { if (list == null) return {}; var result = {}; - for (var i = 0, l = list.length; i < l; i++) { + for (var i = 0, length = list.length; i < length; i++) { if (values) { result[list[i]] = values[i]; } else { @@ -1999,17 +2047,17 @@ function assert(expression) { // for **isSorted** to use binary search. _.indexOf = function(array, item, isSorted) { if (array == null) return -1; - var i = 0, l = array.length; + var i = 0, length = array.length; if (isSorted) { if (typeof isSorted == 'number') { - i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted); + i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted); } else { i = _.sortedIndex(array, item); return array[i] === item ? i : -1; } } if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted); - for (; i < l; i++) if (array[i] === item) return i; + for (; i < length; i++) if (array[i] === item) return i; return -1; }; @@ -2035,11 +2083,11 @@ function assert(expression) { } step = arguments[2] || 1; - var len = Math.max(Math.ceil((stop - start) / step), 0); + var length = Math.max(Math.ceil((stop - start) / step), 0); var idx = 0; - var range = new Array(len); + var range = new Array(length); - while(idx < len) { + while(idx < length) { range[idx++] = start; start += step; } @@ -2050,31 +2098,50 @@ function assert(expression) { // Function (ahem) Functions // ------------------ + // Reusable constructor function for prototype setting. + var ctor = function(){}; + // Create a function bound to a given object (assigning `this`, and arguments, // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if // available. _.bind = function(func, context) { - if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - var args = slice.call(arguments, 2); - return function() { - return func.apply(context, args.concat(slice.call(arguments))); + var args, bound; + if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); + if (!_.isFunction(func)) throw new TypeError; + args = slice.call(arguments, 2); + return bound = function() { + if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments))); + ctor.prototype = func.prototype; + var self = new ctor; + ctor.prototype = null; + var result = func.apply(self, args.concat(slice.call(arguments))); + if (Object(result) === result) return result; + return self; }; }; // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. + // arguments pre-filled, without changing its dynamic `this` context. _ acts + // as a placeholder, allowing any combination of arguments to be pre-filled. _.partial = function(func) { - var args = slice.call(arguments, 1); + var boundArgs = slice.call(arguments, 1); return function() { - return func.apply(this, args.concat(slice.call(arguments))); + var position = 0; + var args = boundArgs.slice(); + for (var i = 0, length = args.length; i < length; i++) { + if (args[i] === _) args[i] = arguments[position++]; + } + while (position < arguments.length) args.push(arguments[position++]); + return func.apply(this, args); }; }; - // Bind all of an object's methods to that object. Useful for ensuring that - // all callbacks defined on an object belong to it. + // Bind a number of an object's methods to that object. Remaining arguments + // are the method names to be bound. Useful for ensuring that all callbacks + // defined on an object belong to it. _.bindAll = function(obj) { var funcs = slice.call(arguments, 1); - if (funcs.length === 0) funcs = _.functions(obj); + if (funcs.length === 0) throw new Error('bindAll must be passed function names'); each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); return obj; }; @@ -2103,17 +2170,24 @@ function assert(expression) { }; // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. - _.throttle = function(func, wait) { - var context, args, timeout, result; + // during a given window of time. Normally, the throttled function will run + // as much as it can, without ever going more than once per `wait` duration; + // but if you'd like to disable the execution on the leading edge, pass + // `{leading: false}`. To disable execution on the trailing edge, ditto. + _.throttle = function(func, wait, options) { + var context, args, result; + var timeout = null; var previous = 0; + options || (options = {}); var later = function() { - previous = new Date; + previous = options.leading === false ? 0 : _.now(); timeout = null; result = func.apply(context, args); + context = args = null; }; return function() { - var now = new Date; + var now = _.now(); + if (!previous && options.leading === false) previous = now; var remaining = wait - (now - previous); context = this; args = arguments; @@ -2122,7 +2196,8 @@ function assert(expression) { timeout = null; previous = now; result = func.apply(context, args); - } else if (!timeout) { + context = args = null; + } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } return result; @@ -2134,17 +2209,34 @@ function assert(expression) { // N milliseconds. If `immediate` is passed, trigger the function on the // leading edge, instead of the trailing. _.debounce = function(func, wait, immediate) { - var timeout, result; - return function() { - var context = this, args = arguments; - var later = function() { + var timeout, args, context, timestamp, result; + + var later = function() { + var last = _.now() - timestamp; + if (last < wait) { + timeout = setTimeout(later, wait - last); + } else { timeout = null; - if (!immediate) result = func.apply(context, args); - }; + if (!immediate) { + result = func.apply(context, args); + context = args = null; + } + } + }; + + return function() { + context = this; + args = arguments; + timestamp = _.now(); var callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) result = func.apply(context, args); + if (!timeout) { + timeout = setTimeout(later, wait); + } + if (callNow) { + result = func.apply(context, args); + context = args = null; + } + return result; }; }; @@ -2166,11 +2258,7 @@ function assert(expression) { // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. _.wrap = function(func, wrapper) { - return function() { - var args = [func]; - push.apply(args, arguments); - return wrapper.apply(this, args); - }; + return _.partial(wrapper, func); }; // Returns a function that is the composition of a list of functions, each @@ -2188,7 +2276,6 @@ function assert(expression) { // Returns a function that will only be executed after being called N times. _.after = function(times, func) { - if (times <= 0) return func(); return function() { if (--times < 1) { return func.apply(this, arguments); @@ -2201,31 +2288,43 @@ function assert(expression) { // Retrieve the names of an object's properties. // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = nativeKeys || function(obj) { - if (obj !== Object(obj)) throw new TypeError('Invalid object'); + _.keys = function(obj) { + if (!_.isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); var keys = []; - for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key; + for (var key in obj) if (_.has(obj, key)) keys.push(key); return keys; }; // Retrieve the values of an object's properties. _.values = function(obj) { - var values = []; - for (var key in obj) if (_.has(obj, key)) values.push(obj[key]); + var keys = _.keys(obj); + var length = keys.length; + var values = new Array(length); + for (var i = 0; i < length; i++) { + values[i] = obj[keys[i]]; + } return values; }; // Convert an object into a list of `[key, value]` pairs. _.pairs = function(obj) { - var pairs = []; - for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]); + var keys = _.keys(obj); + var length = keys.length; + var pairs = new Array(length); + for (var i = 0; i < length; i++) { + pairs[i] = [keys[i], obj[keys[i]]]; + } return pairs; }; // Invert the keys and values of an object. The values must be serializable. _.invert = function(obj) { var result = {}; - for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key; + var keys = _.keys(obj); + for (var i = 0, length = keys.length; i < length; i++) { + result[obj[keys[i]]] = keys[i]; + } return result; }; @@ -2276,7 +2375,7 @@ function assert(expression) { each(slice.call(arguments, 1), function(source) { if (source) { for (var prop in source) { - if (obj[prop] == null) obj[prop] = source[prop]; + if (obj[prop] === void 0) obj[prop] = source[prop]; } } }); @@ -2300,7 +2399,7 @@ function assert(expression) { // Internal recursive comparison function for `isEqual`. var eq = function(a, b, aStack, bStack) { // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal. + // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). if (a === b) return a !== 0 || 1 / a == 1 / b; // A strict comparison is necessary because `null == undefined`. if (a == null || b == null) return a === b; @@ -2342,6 +2441,14 @@ function assert(expression) { // unique nested structures. if (aStack[length] == a) return bStack[length] == b; } + // Objects with different constructors are not equivalent, but `Object`s + // from different frames are. + var aCtor = a.constructor, bCtor = b.constructor; + if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) && + _.isFunction(bCtor) && (bCtor instanceof bCtor)) + && ('constructor' in a && 'constructor' in b)) { + return false; + } // Add the first object to the stack of traversed objects. aStack.push(a); bStack.push(b); @@ -2358,13 +2465,6 @@ function assert(expression) { } } } else { - // Objects with different constructors are not equivalent, but `Object`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) && - _.isFunction(bCtor) && (bCtor instanceof bCtor))) { - return false; - } // Deep compare objects. for (var key in a) { if (_.has(a, key)) { @@ -2486,9 +2586,33 @@ function assert(expression) { return value; }; + _.constant = function(value) { + return function () { + return value; + }; + }; + + _.property = function(key) { + return function(obj) { + return obj[key]; + }; + }; + + // Returns a predicate for checking whether an object has a given set of `key:value` pairs. + _.matches = function(attrs) { + return function(obj) { + if (obj === attrs) return true; //avoid comparing an object to itself. + for (var key in attrs) { + if (attrs[key] !== obj[key]) + return false; + } + return true; + } + }; + // Run a function **n** times. _.times = function(n, iterator, context) { - var accum = Array(n); + var accum = Array(Math.max(0, n)); for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i); return accum; }; @@ -2502,6 +2626,9 @@ function assert(expression) { return min + Math.floor(Math.random() * (max - min + 1)); }; + // A (possibly faster) way to get the current timestamp as an integer. + _.now = Date.now || function() { return new Date().getTime(); }; + // List of HTML entities for escaping. var entityMap = { escape: { @@ -2509,8 +2636,7 @@ function assert(expression) { '<': '<', '>': '>', '"': '"', - "'": ''', - '/': '/' + "'": ''' } }; entityMap.unescape = _.invert(entityMap.escape); @@ -2531,17 +2657,17 @@ function assert(expression) { }; }); - // If the value of the named property is a function then invoke it; - // otherwise, return it. + // If the value of the named `property` is a function then invoke it with the + // `object` as context; otherwise, return it. _.result = function(object, property) { - if (object == null) return null; + if (object == null) return void 0; var value = object[property]; return _.isFunction(value) ? value.call(object) : value; }; // Add your own custom functions to the Underscore object. _.mixin = function(obj) { - each(_.functions(obj), function(name){ + each(_.functions(obj), function(name) { var func = _[name] = obj[name]; _.prototype[name] = function() { var args = [this._wrapped]; @@ -2699,10 +2825,20 @@ function assert(expression) { }); + // AMD registration happens at the end for compatibility with AMD loaders + // that may not enforce next-turn semantics on modules. Even though general + // practice for AMD registration is to be anonymous, underscore registers + // as a named module because, like jQuery, it is a base library that is + // popular enough to be bundled in a third party lib, but not be part of + // an AMD load request. Those cases could generate an error when an + // anonymous define() is called outside of a loader request. + if (typeof define === 'function' && define.amd) { + define('underscore', [], function() { + return _; + }); + } }).call(this); -},{}],"jshint":[function(require,module,exports){ -module.exports=require('fNbQ4d'); },{}],"fNbQ4d":[function(require,module,exports){ /*! * JSHint, by JSHint Community. @@ -2788,20 +2924,15 @@ var JSHINT = (function () { curly : true, // if curly braces around all blocks should be required dojo : true, // if Dojo Toolkit globals should be predefined eqeqeq : true, // if === should be required - eqnull : true, // if == null comparisons should be tolerated notypeof : true, // if should report typos in typeof comparisons es3 : true, // if ES3 syntax should be allowed es5 : true, // if ES5 syntax should be allowed (is now set per default) - esnext : true, // if es.next specific syntax should be allowed - expr : true, // if ExpressionStatement should be allowed as Programs forin : true, // if for in statements must filter funcscope : true, // if only function scope should be used for scope tests globalstrict: true, // if global "use strict"; should be allowed (also enables 'strict') immed : true, // if immediate invocations must be wrapped in parens iterator : true, // if the `__iterator__` property should be allowed - lastsemic : true, // if semicolons may be ommitted for the trailing // statements inside of a one-line blocks. - loopfunc : true, // if functions should be allowed to be defined within newcap : true, // if constructor names must be capitalized noarg : true, // if arguments.caller and arguments.callee should be noempty : true, // if empty blocks should be disallowed @@ -2833,7 +2964,12 @@ var JSHINT = (function () { // This is a function scoped option only. withstmt : true, // if with statements should be allowed moz : true, // if mozilla specific syntax should be allowed - noyield : true // allow generators without a yield + noyield : true, // allow generators without a yield + eqnull : true, // if == null comparisons should be tolerated + lastsemic : true, // if semicolons may be ommitted for the trailing + loopfunc : true, // if functions should be allowed to be defined within + expr : true, // if ExpressionStatement should be allowed as Programs + esnext : true // if es.next specific syntax should be allowed }, // Third party globals @@ -2856,6 +2992,7 @@ var JSHINT = (function () { nonstandard : true, // if non-standard (but widely adopted) globals should // be predefined browser : true, // if the standard browser globals should be predefined + browserify : true, // if the standard browserify globals should be predefined devel : true, // if logging globals should be predefined (console, alert, etc.) // Obsolete options @@ -2988,10 +3125,10 @@ var JSHINT = (function () { } function isIdentifier(tkn, value) { - if(!tkn) + if (!tkn) return false; - if(!tkn.identifier || tkn.value !== value) + if (!tkn.identifier || tkn.value !== value) return false; return true; @@ -3041,12 +3178,12 @@ var JSHINT = (function () { function processenforceall() { if (state.option.enforceall) { - for(var enforceopt in boolOptions.enforcing) { + for (var enforceopt in boolOptions.enforcing) { if (state.option[enforceopt] === undefined) { state.option[enforceopt] = true; } } - for(var relaxopt in boolOptions.relaxing){ + for (var relaxopt in boolOptions.relaxing) { if (state.option[relaxopt] === undefined) { state.option[relaxopt] = false; } @@ -3111,6 +3248,12 @@ var JSHINT = (function () { combine(predefined, vars.typed); } + if (state.option.browserify) { + combine(predefined, vars.browser); + combine(predefined, vars.typed); + combine(predefined, vars.browserify); + } + if (state.option.nonstandard) { combine(predefined, vars.nonstandard); } @@ -3173,7 +3316,6 @@ var JSHINT = (function () { } return state.option.es3; }; - } // Produce an error warning. @@ -3709,6 +3851,10 @@ var JSHINT = (function () { if (state.tokens.next.id === "(end)") error("E006", state.tokens.curr); + if (state.tokens.next.type === "(template)") { + doTemplateLiteral(); + } + var isDangerous = state.option.asi && state.tokens.prev.line < state.tokens.curr.line && @@ -4223,12 +4369,14 @@ var JSHINT = (function () { // argument (see identifier()) // prop means that this identifier is that of an object property - function optionalidentifier(fnparam, prop) { + function optionalidentifier(fnparam, prop, preserve) { if (!state.tokens.next.identifier) { return; } - advance(); + if (!preserve) { + advance(); + } var curr = state.tokens.curr; var val = state.tokens.curr.value; @@ -4426,7 +4574,7 @@ var JSHINT = (function () { } - function statements(startLine) { + function statements() { var a = [], p; while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") { @@ -4439,7 +4587,7 @@ var JSHINT = (function () { advance(";"); } else { - a.push(statement(startLine === state.tokens.next.line)); + a.push(statement()); } } return a; @@ -4565,7 +4713,7 @@ var JSHINT = (function () { } } - a = statements(line); + a = statements(); metrics.statementCount += a.length; @@ -4682,10 +4830,6 @@ var JSHINT = (function () { return this; }); - type("(template)", function () { - return this; - }); - state.syntax["(identifier)"] = { type: "(identifier)", lbp: 0, @@ -4834,6 +4978,21 @@ var JSHINT = (function () { } }; + state.syntax["(template)"] = { + type: "(template)", + lbp: 0, + identifier: false, + fud: doTemplateLiteral + }; + + type("(template middle)", function () { + return this; + }); + + type("(template tail)", function () { + return this; + }); + type("(regexp)", function () { return this; }); @@ -4885,12 +5044,12 @@ var JSHINT = (function () { }; assignop("%=", "assignmod", 20); - bitwiseassignop("&=", "assignbitand", 20); - bitwiseassignop("|=", "assignbitor", 20); - bitwiseassignop("^=", "assignbitxor", 20); - bitwiseassignop("<<=", "assignshiftleft", 20); - bitwiseassignop(">>=", "assignshiftright", 20); - bitwiseassignop(">>>=", "assignshiftrightunsigned", 20); + bitwiseassignop("&="); + bitwiseassignop("|="); + bitwiseassignop("^="); + bitwiseassignop("<<="); + bitwiseassignop(">>="); + bitwiseassignop(">>>="); infix(",", function (left, that) { var expr; that.exprs = [left]; @@ -5041,11 +5200,11 @@ var JSHINT = (function () { infix("/", "div", 140); infix("%", "mod", 140); - suffix("++", "postinc"); + suffix("++"); prefix("++", "preinc"); state.syntax["++"].exps = true; - suffix("--", "postdec"); + suffix("--"); prefix("--", "predec"); state.syntax["--"].exps = true; prefix("delete", function () { @@ -5398,7 +5557,7 @@ var JSHINT = (function () { } prefix("[", function () { - var blocktype = lookupBlockType(true); + var blocktype = lookupBlockType(); if (blocktype.isCompArray) { if (!state.option.inESNext()) { warning("W119", state.tokens.curr, "array comprehension"); @@ -5442,19 +5601,23 @@ var JSHINT = (function () { } advance("]", this); return this; - }, 160); + }); - function property_name() { - var id = optionalidentifier(false, true); + function property_name(preserve) { + var id = optionalidentifier(false, true, preserve); if (!id) { if (state.tokens.next.id === "(string)") { id = state.tokens.next.value; - advance(); + if (!preserve) { + advance(); + } } else if (state.tokens.next.id === "(number)") { id = state.tokens.next.value.toString(); - advance(); + if (!preserve) { + advance(); + } } } @@ -5608,6 +5771,22 @@ var JSHINT = (function () { return funct; } + function doTemplateLiteral() { + while (state.tokens.next.type !== "(template tail)" && state.tokens.next.id !== "(end)") { + advance(); + if (state.tokens.next.type === "(template tail)") { + break; + } else if (state.tokens.next.type !== "(template middle)" && + state.tokens.next.type !== "(end)") { + expression(10); // should probably have different rbp? + } + } + return { + id: "(template)", + type: "(template)" + }; + } + function doFunction(name, statement, generator, fatarrowparams) { var f; var oldOption = state.option; @@ -5883,21 +6062,33 @@ var JSHINT = (function () { advance("*"); g = true; } - i = property_name(); - saveProperty(tag + i, state.tokens.next); - - if (typeof i !== "string") { - break; - } - - if (state.tokens.next.value === "(") { + if (!isclassdef && + state.tokens.next.identifier && + (peek().id === "," || peek().id === "}")) { if (!state.option.inESNext()) { - warning("W104", state.tokens.curr, "concise methods"); + warning("W104", state.tokens.curr, "object short notation"); } - doFunction(i, undefined, g); - } else if (!isclassdef) { - advance(":"); + i = property_name(true); + saveProperty(tag + i, state.tokens.next); + expression(10); + } else { + i = property_name(); + saveProperty(tag + i, state.tokens.next); + + if (typeof i !== "string") { + break; + } + + if (state.tokens.next.value === "(") { + if (!state.option.inESNext()) { + warning("W104", state.tokens.curr, "concise methods"); + } + doFunction(i, undefined, g); + } else if (!isclassdef) { + advance(":"); + expression(10); + } } } // It is a Syntax Error if PropName of MethodDefinition is "prototype". @@ -6126,7 +6317,9 @@ var JSHINT = (function () { warning("W080", state.tokens.prev, state.tokens.prev.value); } if (peek(0).id === "=" && state.tokens.next.identifier) { - warning("W120", state.tokens.next, state.tokens.next.value); + if (!funct["(params)"] || funct["(params)"].indexOf(state.tokens.next.value) === -1) { + warning("W120", state.tokens.next, state.tokens.next.value); + } } value = expression(10); if (lone) { @@ -6320,7 +6513,7 @@ var JSHINT = (function () { if (state.tokens.next.id === "else") { advance("else"); if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") { - statement(true); + statement(); } else { block(true, true); } @@ -7327,6 +7520,8 @@ var JSHINT = (function () { if (item[0] === "-") { slice = item.slice(1); JSHINT.blacklist[slice] = slice; + // remove from predefined if there + delete predefined[slice]; } else { prop = Object.getOwnPropertyDescriptor(o.predef, item); predefined[item] = prop ? prop.value : false; @@ -7474,8 +7669,10 @@ var JSHINT = (function () { directives(); if (state.directive["use strict"]) { - if (!state.option.globalstrict && !(state.option.node || state.option.phantom)) { - warning("W097", state.tokens.prev); + if (!state.option.globalstrict) { + if (!(state.option.node || state.option.phantom || state.option.browserify)) { + warning("W097", state.tokens.prev); + } } } @@ -7769,7 +7966,9 @@ if (typeof exports === "object" && exports) { exports.JSHINT = JSHINT; } -},{"./lex.js":16,"./messages.js":17,"./reg.js":18,"./state.js":19,"./style.js":20,"./vars.js":21,"console-browserify":12,"events":7,"underscore":13}],16:[function(require,module,exports){ +},{"./lex.js":17,"./messages.js":18,"./reg.js":19,"./state.js":20,"./style.js":21,"./vars.js":22,"console-browserify":12,"events":7,"underscore":14}],"jshint":[function(require,module,exports){ +module.exports=require('fNbQ4d'); +},{}],17:[function(require,module,exports){ /* * Lexical analysis and token construction. */ @@ -7801,7 +8000,9 @@ var Token = { NullLiteral: 7, BooleanLiteral: 8, RegExp: 9, - TemplateLiteral: 10 + TemplateHead: 10, + TemplateMiddle: 11, + TemplateTail: 12 }; // Object that handles postponed lexing verifications that checks the parsed @@ -7881,6 +8082,9 @@ function Lexer(source) { this.from = 1; this.input = ""; this.inComment = false; + this.inTemplate = false; + this.templateLine = null; + this.templateChar = null; for (var i = 0; i < state.option.indent; i += 1) { state.tab += " "; @@ -8090,13 +8294,10 @@ Lexer.prototype = { }; } - // Special case: /=. We need to make sure that this is an - // operator and not a regular expression. + // Special case: /=. if (ch1 === "/") { - if (ch2 === "=" && /\/=(?!(\S*\/[gim]?))/.test(this.input)) { - // /= is not a part of a regular expression, return it as a - // punctuator. + if (ch2 === "=") { return { type: Token.Punctuator, value: "/=" @@ -8144,6 +8345,8 @@ Lexer.prototype = { value += "*/"; } + body = body.replace(/\n/g, " "); + special.forEach(function (str) { if (isSpecial) { return; @@ -8625,52 +8828,75 @@ Lexer.prototype = { * the char pointer. */ scanTemplateLiteral: function () { + var tokenType; + var value = ''; + var ch; + // String must start with a backtick. - if (!state.option.esnext || this.peek() !== "`") { + if (!this.inTemplate) { + if (!state.option.esnext || this.peek() !== "`") { + return null; + } + this.templateLine = this.line; + this.templateChar = this.char; + this.skip(1); + } else if (this.peek() !== '}') { + // If we're in a template, and we don't have a '}', lex something else instead. return null; } - var startLine = this.line; - var startChar = this.char; - var jump = 1; - var value = ""; - - // For now, do not perform any linting of the content of the template - // string. Just skip until the next backtick is found. - this.skip(); - while (this.peek() !== "`") { - while (this.peek() === "") { - // End of line --- For template literals in ES6, no backslash is - // required to precede newlines. + while ((ch = this.peek()) === "") { if (!this.nextLine()) { + // Unclosed template literal --- point to the starting line, or the EOF? + tokenType = this.inTemplate ? Token.TemplateHead : Token.TemplateMiddle; + this.inTemplate = false; this.trigger("error", { code: "E052", - line: startLine, - character: startChar + line: this.templateLine, + character: this.templateChar }); - return { - type: Token.TemplateLiteral, + type: tokenType, value: value, isUnclosed: true }; } - value += "\n"; } - // TODO: do more interesting linting here, similar to string literal - // linting. - var char = this.peek(); - this.skip(jump); - value += char; + if (ch === '$' && this.peek(1) === '{') { + value += '${'; + tokenType = value.charAt(0) === '}' ? Token.TemplateMiddle : Token.TemplateHead; + // Either TokenHead or TokenMiddle --- depending on if the initial value + // is '}' or not. + this.skip(2); + this.inTemplate = true; + return { + type: tokenType, + value: value, + isUnclosed: false + }; + } else if (ch === '\\') { + // TODO: Parse escape sequence, warn about invalid escae sequences + value += ch; + this.skip(1); + } else { + // Otherwise, append the value and continue. + value += ch; + this.skip(1); + } } - this.skip(); + // Final value is either TokenTail or NoSubstititionTemplate --- essentially a string + tokenType = this.inTemplate ? Token.TemplateTail : Token.StringLiteral; + this.inTemplate = false; + this.skip(1); + return { - type: Token.TemplateLiteral, + type: tokenType, value: value, - isUnclosed: false + isUnclosed: false, + quote: "`" }; }, @@ -9056,7 +9282,7 @@ Lexer.prototype = { }, /* - * Scan for any occurence of non-breaking spaces. Non-breaking spaces + * Scan for any occurrence of non-breaking spaces. Non-breaking spaces * can be mistakenly typed on OS X with option-space. Non UTF-8 web * pages with non-breaking pages produce syntax errors. */ @@ -9198,7 +9424,7 @@ Lexer.prototype = { /* * Produce the next token. This function is called by advance() to get - * the next token. It retuns a token in a JSLint-compatible format. + * the next token. It returns a token in a JSLint-compatible format. */ token: function () { /*jshint loopfunc:true */ @@ -9250,6 +9476,8 @@ Lexer.prototype = { case "~": case "#": case "]": + case "++": + case "--": this.prereg = false; break; default: @@ -9329,8 +9557,8 @@ Lexer.prototype = { return create("(string)", token.value); - case Token.TemplateLiteral: - this.trigger("Template", { + case Token.TemplateHead: + this.trigger("TemplateHead", { line: this.line, char: this.char, from: this.from, @@ -9338,6 +9566,24 @@ Lexer.prototype = { }); return create("(template)", token.value); + case Token.TemplateMiddle: + this.trigger("TemplateMiddle", { + line: this.line, + char: this.char, + from: this.from, + value: token.value + }); + return create("(template middle)", token.value); + + case Token.TemplateTail: + this.trigger("TemplateTail", { + line: this.line, + char: this.char, + from: this.from, + value: token.value + }); + return create("(template tail)", token.value); + case Token.Identifier: this.trigger("Identifier", { line: this.line, @@ -9422,7 +9668,7 @@ Lexer.prototype = { exports.Lexer = Lexer; -},{"../data/ascii-identifier-data.js":1,"../data/non-ascii-identifier-part-only.js":2,"../data/non-ascii-identifier-start.js":3,"./reg.js":18,"./state.js":19,"events":7,"underscore":13}],17:[function(require,module,exports){ +},{"../data/ascii-identifier-data.js":1,"../data/non-ascii-identifier-part-only.js":2,"../data/non-ascii-identifier-start.js":3,"./reg.js":19,"./state.js":20,"events":7,"underscore":14}],18:[function(require,module,exports){ "use strict"; var _ = require("underscore"); @@ -9647,14 +9893,14 @@ _.each(info, function (desc, code) { exports.info[code] = { code: code, desc: desc }; }); -},{"underscore":13}],18:[function(require,module,exports){ +},{"underscore":14}],19:[function(require,module,exports){ /* * Regular expressions. Some of these are stupidly long. */ /*jshint maxlen:1000 */ -"use string"; +"use strict"; // Unsafe comment or string (ax) exports.unsafeString = @@ -9687,7 +9933,7 @@ exports.fallsThrough = /^\s*\/\*\s*falls?\sthrough\s*\*\/\s*$/; // to relax the maxlen option exports.maxlenException = /^(?:(?:\/\/|\/\*|\*) ?)?[^ ]+$/; -},{}],19:[function(require,module,exports){ +},{}],20:[function(require,module,exports){ "use strict"; var state = { @@ -9717,7 +9963,7 @@ var state = { exports.state = state; -},{}],20:[function(require,module,exports){ +},{}],21:[function(require,module,exports){ "use strict"; exports.register = function (linter) { @@ -9776,12 +10022,18 @@ exports.register = function (linter) { linter.on("String", function style_scanQuotes(data) { var quotmark = linter.getOption("quotmark"); + var esnext = linter.getOption("esnext"); var code; if (!quotmark) { return; } + // If quotmark is enabled, return if this is a template literal. + if (esnext && data.quote === "`") { + return; + } + // If quotmark is set to 'single' warn about all double-quotes. if (quotmark === "single" && data.quote !== "'") { @@ -9862,7 +10114,7 @@ exports.register = function (linter) { }); }; -},{}],21:[function(require,module,exports){ +},{}],22:[function(require,module,exports){ // jshint -W001 "use strict"; @@ -9890,18 +10142,24 @@ exports.ecmaIdentifiers = { isFinite : false, isNaN : false, JSON : false, + Map : false, Math : false, Number : false, Object : false, + Proxy : false, + Promise : false, parseInt : false, parseFloat : false, RangeError : false, ReferenceError : false, RegExp : false, + Set : false, String : false, SyntaxError : false, TypeError : false, URIError : false, + WeakMap : false, + WeakSet : false }; exports.newEcmaIdentifiers = { @@ -10274,6 +10532,17 @@ exports.node = { clearImmediate: true // v0.9.1+ }; +exports.browserify = { + __filename : false, + __dirname : false, + global : false, + module : false, + require : false, + Buffer : true, + exports : true, + process : true +}; + exports.phantom = { phantom : true, require : true, diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/cli/cli.js b/node_modules/gulp-jshint/node_modules/jshint/node_modules/cli/cli.js index 43bf2ad..96f6af0 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/cli/cli.js +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/cli/cli.js @@ -37,7 +37,7 @@ cli.argc = 0; cli.options = {}; cli.args = []; -cli.command; +cli.command = null; cli.width = 70; cli.option_width = 25; @@ -55,7 +55,7 @@ var define_native = function (module) { configurable: true, get: function() { delete cli.native[module]; - return cli.native[module] = require(module); + return (cli.native[module] = require(module)); } }); }; @@ -262,9 +262,9 @@ cli.parse = function (opts, command_def) { if (commands && !Array.isArray(commands)) { command_list = Object.keys(commands); } - while (o = cli.next()) { + while ((o = cli.next())) { seen = false; - for (opt in opt_list) { + for (var opt in opt_list) { if (!(opt_list[opt] instanceof Array)) { continue; } @@ -365,7 +365,7 @@ cli.parse = function (opts, command_def) { } } //Fill the remaining options with their default value or null - for (opt in opt_list) { + for (var opt in opt_list) { default_val = opt_list[opt].length === 4 ? opt_list[opt][3] : null; if (!(opt_list[opt] instanceof Array)) { parsed[opt] = opt_list[opt]; @@ -595,7 +595,7 @@ cli.getUsage = function (code) { console.error('\x1b[1mUsage\x1b[0m:\n ' + usage); console.error('\n\x1b[1mOptions\x1b[0m: '); } - for (opt in opt_list) { + for (var opt in opt_list) { if (opt.length === 1) { long = opt_list[opt][0]; @@ -955,7 +955,7 @@ cli.daemon = function (arg, callback) { cli.native.fs.readFileSync(lock_file); } catch (e) { return cli.error('Daemon is not running'); - }; + } daemon.kill(lock_file, function (err, pid) { if (err && err.errno === 3) { return cli.error('Daemon is not running'); @@ -980,7 +980,7 @@ cli.daemon = function (arg, callback) { cli.native.fs.createReadStream(log_file, {encoding: 'utf8'}).pipe(process.stdout); } catch (e) { return cli.error('No daemon log file'); - }; + } break; case 'pid': try { @@ -989,7 +989,7 @@ cli.daemon = function (arg, callback) { cli.info(pid); } catch (e) { return cli.error('Daemon is not running'); - }; + } break; default: start(); @@ -1035,8 +1035,9 @@ cli.createServer = function(/*layers*/) { res.writeHead(404, {"Content-Type": "text/plain"}); res.end("Not Found\n"); }; - var handle = error = defaultStackErrorHandler, - layers = Array.prototype.slice.call(arguments); + var handle, error; + handle = error = defaultStackErrorHandler; + var layers = Array.prototype.slice.call(arguments); //Allow createServer(a,b,c) and createServer([a,b,c]) if (layers.length && layers[0] instanceof Array) { diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/cli/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/cli/package.json index aa05ddd..826a5c9 100755 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/cli/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/cli/package.json @@ -1,7 +1,7 @@ { "name": "cli", "description": "A tool for rapidly building command line apps", - "version": "0.6.3", + "version": "0.6.4", "homepage": "http://github.com/chriso/cli", "keywords": [ "cli", @@ -47,10 +47,12 @@ "type": "MIT" } ], - "_id": "cli@0.6.3", - "_shasum": "31418ed08d60a1b02cf180c6d6fee3204bfe65cd", + "gitHead": "98aca4fb116450fea8bc5f79ab34724d7adede02", + "_id": "cli@0.6.4", + "scripts": {}, + "_shasum": "105c4e9b29ecdbc1ee0c8e418276f62d8351f88e", "_from": "cli@0.6.x", - "_npmVersion": "1.4.10", + "_npmVersion": "2.0.0-alpha-5", "_npmUser": { "name": "cohara87", "email": "cohara87@gmail.com" @@ -62,9 +64,10 @@ } ], "dist": { - "shasum": "31418ed08d60a1b02cf180c6d6fee3204bfe65cd", - "tarball": "http://registry.npmjs.org/cli/-/cli-0.6.3.tgz" + "shasum": "105c4e9b29ecdbc1ee0c8e418276f62d8351f88e", + "tarball": "http://registry.npmjs.org/cli/-/cli-0.6.4.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/cli/-/cli-0.6.3.tgz" + "_resolved": "https://registry.npmjs.org/cli/-/cli-0.6.4.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/package.json index b200e6a..e524bd9 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/package.json @@ -85,5 +85,6 @@ ], "directories": {}, "_shasum": "eaf439fd4d4848ad74e5cc7dbef200672b9e345b", - "_resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz" + "_resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/console-browserify/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/console-browserify/package.json index 0dba13e..6375345 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/console-browserify/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/console-browserify/package.json @@ -84,5 +84,6 @@ ], "directories": {}, "_shasum": "f0241c45730a9fc6323b206dbf38edc741d0bb10", - "_resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz" + "_resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/package.json index 75995bf..9923b2f 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/package.json @@ -36,5 +36,9 @@ ], "directories": {}, "_shasum": "7887acbda7614bb0a3dbe1b5e394f77a8ed297cf", - "_resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.1.tgz" + "_resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.1.tgz", + "bugs": { + "url": "https://github.com/FB55/domelementtype/issues" + }, + "homepage": "https://github.com/FB55/domelementtype" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/package.json index f8f6af9..39c903d 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/package.json @@ -67,5 +67,6 @@ } ], "_shasum": "bfa4ceb8b7ab6f9423fe59154e04da6cc3ff3949", - "_resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.0.tgz" + "_resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/package.json index 6a1003b..c98fe1e 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/package.json @@ -75,5 +75,6 @@ } ], "_shasum": "b2987aa3821347fcde642b24fdfc9e4fb712bf26", - "_resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz" + "_resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/README.md b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/README.md index 34c1189..e46b823 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/README.md +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/README.md @@ -2,8 +2,8 @@ ***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/) +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/) This package is a mirror of the Streams2 and Streams3 implementations in Node-core. diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_readable.js index 7f4e3b8..19ab358 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_readable.js @@ -63,6 +63,8 @@ if (debug && debug.debuglog) { util.inherits(Readable, Stream); function ReadableState(options, stream) { + var Duplex = require('./_stream_duplex'); + options = options || {}; // the point at which it stops calling _read() to fill the buffer @@ -100,6 +102,9 @@ function ReadableState(options, stream) { // make all the buffer merging and length checks go away this.objectMode = !!options.objectMode; + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; + // 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. @@ -126,6 +131,8 @@ function ReadableState(options, stream) { } function Readable(options) { + var Duplex = require('./_stream_duplex'); + if (!(this instanceof Readable)) return new Readable(options); diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_writable.js index 9ea2829..db8539c 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_writable.js @@ -48,6 +48,8 @@ function WriteReq(chunk, encoding, cb) { } function WritableState(options, stream) { + var Duplex = require('./_stream_duplex'); + options = options || {}; // the point at which write() starts returning false @@ -61,6 +63,9 @@ function WritableState(options, stream) { // contains buffers or objects. this.objectMode = !!options.objectMode; + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.writableObjectMode; + // cast to ints. this.highWaterMark = ~~this.highWaterMark; diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/index.js index 2e44a03..b00e54f 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -36,6 +36,14 @@ function assertEncoding(encoding) { } } +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. var StringDecoder = exports.StringDecoder = function(encoding) { this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); assertEncoding(encoding); @@ -60,37 +68,50 @@ var StringDecoder = exports.StringDecoder = function(encoding) { return; } + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. this.charLength = 0; }; +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . 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; + var available = (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; + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; if (this.charReceived < this.charLength) { // still not enough chars in this buffer? wait for more ... return ''; } + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + // 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 + // CESU-8: 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; @@ -100,34 +121,33 @@ StringDecoder.prototype.write = function(buffer) { 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); + if (buffer.length === 0) { + return charStr; + } break; } - var lenIncomplete = this.detectIncompleteChar(buffer); + // determine and set charLength / charReceived + 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; + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } 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 + // CESU-8: 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); + buffer.copy(this.charBuffer, 0, 0, size); return charStr.substring(0, end); } @@ -135,6 +155,10 @@ StringDecoder.prototype.write = function(buffer) { return charStr; }; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. 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; @@ -164,8 +188,7 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { break; } } - - return i; + this.charReceived = i; }; StringDecoder.prototype.end = function(buffer) { @@ -188,13 +211,11 @@ function passThroughWrite(buffer) { } function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/package.json index 7f5d001..a8c586b 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,6 +1,6 @@ { "name": "string_decoder", - "version": "0.10.25-1", + "version": "0.10.31", "description": "The string_decoder module from Node core", "main": "index.js", "dependencies": {}, @@ -22,11 +22,33 @@ "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", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@~0.10.x", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/package.json index 685d557..152dcc5 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.1.13-1", + "version": "1.1.13", "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", "main": "readable.js", "dependencies": { @@ -33,12 +33,38 @@ "url": "http://blog.izs.me/" }, "license": "MIT", - "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", + "gitHead": "3b672fd7ae92acf5b4ffdbabf74b372a0a56b051", "bugs": { "url": "https://github.com/isaacs/readable-stream/issues" }, "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.1.13-1", - "_from": "readable-stream@1.1" + "_id": "readable-stream@1.1.13", + "_shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "_from": "readable-stream@1.1", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/package.json index 38eb2b7..7618820 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/htmlparser2/package.json @@ -87,5 +87,6 @@ "shasum": "6a64c77637c08c6f30ec2a8157a53333be7cb05e", "tarball": "http://registry.npmjs.org/htmlparser2/-/htmlparser2-3.7.3.tgz" }, - "_resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.7.3.tgz" + "_resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.7.3.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/shelljs/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/shelljs/package.json index 34efef7..3ef1819 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/shelljs/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/shelljs/package.json @@ -57,5 +57,6 @@ ], "directories": {}, "_shasum": "3596e6307a781544f591f37da618360f31db57b1", - "_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz" + "_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/strip-json-comments/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/strip-json-comments/package.json index e08b6ff..893c4b2 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/strip-json-comments/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/strip-json-comments/package.json @@ -72,5 +72,6 @@ "tarball": "http://registry.npmjs.org/strip-json-comments/-/strip-json-comments-0.1.3.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-0.1.3.tgz" + "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-0.1.3.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/node_modules/underscore/package.json b/node_modules/gulp-jshint/node_modules/jshint/node_modules/underscore/package.json index cb20f6d..ee7db20 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/node_modules/underscore/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/node_modules/underscore/package.json @@ -62,5 +62,6 @@ ], "directories": {}, "_shasum": "8b38b10cacdef63337b8b24e4ff86d45aea529a8", - "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz" + "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/package.json b/node_modules/gulp-jshint/node_modules/jshint/package.json index d836509..51b55bf 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/package.json +++ b/node_modules/gulp-jshint/node_modules/jshint/package.json @@ -1,6 +1,6 @@ { "name": "jshint", - "version": "2.5.2", + "version": "2.5.5", "homepage": "http://jshint.com/", "description": "Static analysis tool for JavaScript", "author": { @@ -57,24 +57,30 @@ "data", "dist" ], - "_id": "jshint@2.5.2", - "dist": { - "shasum": "bec223d5149e49ef6ea96dcf8b3504a27613e8be", - "tarball": "http://registry.npmjs.org/jshint/-/jshint-2.5.2.tgz" - }, + "gitHead": "94df11c872bccd979c8deffed612e4421abdf17d", + "_id": "jshint@2.5.5", + "_shasum": "9f24958dcd11c5e2ceba96ec92225873b02f4775", "_from": "jshint@^2.5.0", - "_npmVersion": "1.4.6", + "_npmVersion": "1.5.0-alpha-1", "_npmUser": { - "name": "antonkovalyov", - "email": "anton@kovalyov.net" + "name": "rwaldron", + "email": "waldron.rick@gmail.com" }, "maintainers": [ { "name": "antonkovalyov", "email": "anton@kovalyov.net" + }, + { + "name": "rwaldron", + "email": "waldron.rick@gmail.com" } ], + "dist": { + "shasum": "9f24958dcd11c5e2ceba96ec92225873b02f4775", + "tarball": "http://registry.npmjs.org/jshint/-/jshint-2.5.5.tgz" + }, "directories": {}, - "_shasum": "bec223d5149e49ef6ea96dcf8b3504a27613e8be", - "_resolved": "https://registry.npmjs.org/jshint/-/jshint-2.5.2.tgz" + "_resolved": "https://registry.npmjs.org/jshint/-/jshint-2.5.5.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/jshint/src/cli.js b/node_modules/gulp-jshint/node_modules/jshint/src/cli.js index 6ebd73e..00f9628 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/src/cli.js +++ b/node_modules/gulp-jshint/node_modules/jshint/src/cli.js @@ -91,19 +91,21 @@ function findConfig(file) { } function getHomeDir() { + var homePath = ""; var environment = global.process.env; - var paths = [environment.HOME, - environment.USERPROFILE, - environment.HOMEPATH, - environment.HOMEDRIVE + environment.HOMEPATH]; - - for (var homeIndex in paths) - if (paths.hasOwnProperty(homeIndex)) { - var homePath = paths[homeIndex]; - - if (homePath && fs.existsSync(homePath)) - return homePath; + var paths = [ + environment.USERPROFILE, + environment.HOME, + environment.HOMEPATH, + environment.HOMEDRIVE + environment.HOMEPATH + ]; + + while (paths.length) { + homePath = paths.shift(); + if (fs.existsSync(homePath)) { + return homePath; } + } } /** @@ -159,22 +161,22 @@ var findFileResults = {}; * * @returns {string} normalized filename */ -function findFile(name, dir) { - dir = dir || process.cwd(); +function findFile(name, cwd) { + cwd = cwd || process.cwd(); - var filename = path.normalize(path.join(dir, name)); + var filename = path.normalize(path.join(cwd, name)); if (findFileResults[filename] !== undefined) { return findFileResults[filename]; } - var parent = path.resolve(dir, "../"); + var parent = path.resolve(cwd, "../"); if (shjs.test("-e", filename)) { findFileResults[filename] = filename; return filename; } - if (dir === parent) { + if (cwd === parent) { findFileResults[filename] = null; return null; } @@ -188,15 +190,15 @@ function findFile(name, dir) { * * @return {array} a list of files to ignore. */ -function loadIgnores(exclude, excludePath) { - var file = findFile(excludePath || ".jshintignore"); +function loadIgnores(params) { + var file = findFile(params.excludePath || ".jshintignore", params.cwd); - if (!file && !exclude) { + if (!file && !params.exclude) { return []; } var lines = (file ? shjs.cat(file) : "").split("\n"); - lines.unshift(exclude || ""); + lines.unshift(params.exclude || ""); return lines .filter(function (line) { @@ -463,7 +465,7 @@ function lint(code, results, config, data, file) { if (config.overrides) { if (file) { _.each(config.overrides, function (options, pattern) { - if (minimatch(file, pattern, { nocase: true, matchBase: true })) { + if (minimatch(path.normalize(file), pattern, { nocase: true, matchBase: true })) { if (options.globals) { globals = _.extend(globals || {}, options.globals); delete options.globals; @@ -558,9 +560,10 @@ var exports = { (!opts.extensions ? "" : "|" + opts.extensions.replace(/,/g, "|").replace(/[\. ]/g, "")) + ")$"); - var ignores = !opts.ignores ? loadIgnores() : opts.ignores.map(function (target) { - return path.resolve(target); - }); + var ignores = !opts.ignores ? loadIgnores({cwd: opts.cwd}) : + opts.ignores.map(function (target) { + return path.resolve(target); + }); opts.args.forEach(function (target) { collect(target, files, ignores, reg); @@ -718,7 +721,7 @@ var exports = { args: cli.args, config: config, reporter: reporter, - ignores: loadIgnores(options.exclude, options["exclude-path"]), + ignores: loadIgnores({exclude: options.exclude, excludePath: options["exclude-path"]}), extensions: options["extra-ext"], verbose: options.verbose, extract: options.extract, diff --git a/node_modules/gulp-jshint/node_modules/jshint/src/jshint.js b/node_modules/gulp-jshint/node_modules/jshint/src/jshint.js index 41bc9d9..ea25587 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/src/jshint.js +++ b/node_modules/gulp-jshint/node_modules/jshint/src/jshint.js @@ -82,20 +82,15 @@ var JSHINT = (function () { curly : true, // if curly braces around all blocks should be required dojo : true, // if Dojo Toolkit globals should be predefined eqeqeq : true, // if === should be required - eqnull : true, // if == null comparisons should be tolerated notypeof : true, // if should report typos in typeof comparisons es3 : true, // if ES3 syntax should be allowed es5 : true, // if ES5 syntax should be allowed (is now set per default) - esnext : true, // if es.next specific syntax should be allowed - expr : true, // if ExpressionStatement should be allowed as Programs forin : true, // if for in statements must filter funcscope : true, // if only function scope should be used for scope tests globalstrict: true, // if global "use strict"; should be allowed (also enables 'strict') immed : true, // if immediate invocations must be wrapped in parens iterator : true, // if the `__iterator__` property should be allowed - lastsemic : true, // if semicolons may be ommitted for the trailing // statements inside of a one-line blocks. - loopfunc : true, // if functions should be allowed to be defined within newcap : true, // if constructor names must be capitalized noarg : true, // if arguments.caller and arguments.callee should be noempty : true, // if empty blocks should be disallowed @@ -127,7 +122,12 @@ var JSHINT = (function () { // This is a function scoped option only. withstmt : true, // if with statements should be allowed moz : true, // if mozilla specific syntax should be allowed - noyield : true // allow generators without a yield + noyield : true, // allow generators without a yield + eqnull : true, // if == null comparisons should be tolerated + lastsemic : true, // if semicolons may be ommitted for the trailing + loopfunc : true, // if functions should be allowed to be defined within + expr : true, // if ExpressionStatement should be allowed as Programs + esnext : true // if es.next specific syntax should be allowed }, // Third party globals @@ -150,6 +150,7 @@ var JSHINT = (function () { nonstandard : true, // if non-standard (but widely adopted) globals should // be predefined browser : true, // if the standard browser globals should be predefined + browserify : true, // if the standard browserify globals should be predefined devel : true, // if logging globals should be predefined (console, alert, etc.) // Obsolete options @@ -282,10 +283,10 @@ var JSHINT = (function () { } function isIdentifier(tkn, value) { - if(!tkn) + if (!tkn) return false; - if(!tkn.identifier || tkn.value !== value) + if (!tkn.identifier || tkn.value !== value) return false; return true; @@ -335,12 +336,12 @@ var JSHINT = (function () { function processenforceall() { if (state.option.enforceall) { - for(var enforceopt in boolOptions.enforcing) { + for (var enforceopt in boolOptions.enforcing) { if (state.option[enforceopt] === undefined) { state.option[enforceopt] = true; } } - for(var relaxopt in boolOptions.relaxing){ + for (var relaxopt in boolOptions.relaxing) { if (state.option[relaxopt] === undefined) { state.option[relaxopt] = false; } @@ -405,6 +406,12 @@ var JSHINT = (function () { combine(predefined, vars.typed); } + if (state.option.browserify) { + combine(predefined, vars.browser); + combine(predefined, vars.typed); + combine(predefined, vars.browserify); + } + if (state.option.nonstandard) { combine(predefined, vars.nonstandard); } @@ -467,7 +474,6 @@ var JSHINT = (function () { } return state.option.es3; }; - } // Produce an error warning. @@ -1003,6 +1009,10 @@ var JSHINT = (function () { if (state.tokens.next.id === "(end)") error("E006", state.tokens.curr); + if (state.tokens.next.type === "(template)") { + doTemplateLiteral(); + } + var isDangerous = state.option.asi && state.tokens.prev.line < state.tokens.curr.line && @@ -1517,12 +1527,14 @@ var JSHINT = (function () { // argument (see identifier()) // prop means that this identifier is that of an object property - function optionalidentifier(fnparam, prop) { + function optionalidentifier(fnparam, prop, preserve) { if (!state.tokens.next.identifier) { return; } - advance(); + if (!preserve) { + advance(); + } var curr = state.tokens.curr; var val = state.tokens.curr.value; @@ -1720,7 +1732,7 @@ var JSHINT = (function () { } - function statements(startLine) { + function statements() { var a = [], p; while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") { @@ -1733,7 +1745,7 @@ var JSHINT = (function () { advance(";"); } else { - a.push(statement(startLine === state.tokens.next.line)); + a.push(statement()); } } return a; @@ -1859,7 +1871,7 @@ var JSHINT = (function () { } } - a = statements(line); + a = statements(); metrics.statementCount += a.length; @@ -1976,10 +1988,6 @@ var JSHINT = (function () { return this; }); - type("(template)", function () { - return this; - }); - state.syntax["(identifier)"] = { type: "(identifier)", lbp: 0, @@ -2128,6 +2136,21 @@ var JSHINT = (function () { } }; + state.syntax["(template)"] = { + type: "(template)", + lbp: 0, + identifier: false, + fud: doTemplateLiteral + }; + + type("(template middle)", function () { + return this; + }); + + type("(template tail)", function () { + return this; + }); + type("(regexp)", function () { return this; }); @@ -2179,12 +2202,12 @@ var JSHINT = (function () { }; assignop("%=", "assignmod", 20); - bitwiseassignop("&=", "assignbitand", 20); - bitwiseassignop("|=", "assignbitor", 20); - bitwiseassignop("^=", "assignbitxor", 20); - bitwiseassignop("<<=", "assignshiftleft", 20); - bitwiseassignop(">>=", "assignshiftright", 20); - bitwiseassignop(">>>=", "assignshiftrightunsigned", 20); + bitwiseassignop("&="); + bitwiseassignop("|="); + bitwiseassignop("^="); + bitwiseassignop("<<="); + bitwiseassignop(">>="); + bitwiseassignop(">>>="); infix(",", function (left, that) { var expr; that.exprs = [left]; @@ -2335,11 +2358,11 @@ var JSHINT = (function () { infix("/", "div", 140); infix("%", "mod", 140); - suffix("++", "postinc"); + suffix("++"); prefix("++", "preinc"); state.syntax["++"].exps = true; - suffix("--", "postdec"); + suffix("--"); prefix("--", "predec"); state.syntax["--"].exps = true; prefix("delete", function () { @@ -2692,7 +2715,7 @@ var JSHINT = (function () { } prefix("[", function () { - var blocktype = lookupBlockType(true); + var blocktype = lookupBlockType(); if (blocktype.isCompArray) { if (!state.option.inESNext()) { warning("W119", state.tokens.curr, "array comprehension"); @@ -2736,19 +2759,23 @@ var JSHINT = (function () { } advance("]", this); return this; - }, 160); + }); - function property_name() { - var id = optionalidentifier(false, true); + function property_name(preserve) { + var id = optionalidentifier(false, true, preserve); if (!id) { if (state.tokens.next.id === "(string)") { id = state.tokens.next.value; - advance(); + if (!preserve) { + advance(); + } } else if (state.tokens.next.id === "(number)") { id = state.tokens.next.value.toString(); - advance(); + if (!preserve) { + advance(); + } } } @@ -2902,6 +2929,22 @@ var JSHINT = (function () { return funct; } + function doTemplateLiteral() { + while (state.tokens.next.type !== "(template tail)" && state.tokens.next.id !== "(end)") { + advance(); + if (state.tokens.next.type === "(template tail)") { + break; + } else if (state.tokens.next.type !== "(template middle)" && + state.tokens.next.type !== "(end)") { + expression(10); // should probably have different rbp? + } + } + return { + id: "(template)", + type: "(template)" + }; + } + function doFunction(name, statement, generator, fatarrowparams) { var f; var oldOption = state.option; @@ -3177,21 +3220,33 @@ var JSHINT = (function () { advance("*"); g = true; } - i = property_name(); - saveProperty(tag + i, state.tokens.next); - - if (typeof i !== "string") { - break; - } - - if (state.tokens.next.value === "(") { + if (!isclassdef && + state.tokens.next.identifier && + (peek().id === "," || peek().id === "}")) { if (!state.option.inESNext()) { - warning("W104", state.tokens.curr, "concise methods"); + warning("W104", state.tokens.curr, "object short notation"); } - doFunction(i, undefined, g); - } else if (!isclassdef) { - advance(":"); + i = property_name(true); + saveProperty(tag + i, state.tokens.next); + expression(10); + } else { + i = property_name(); + saveProperty(tag + i, state.tokens.next); + + if (typeof i !== "string") { + break; + } + + if (state.tokens.next.value === "(") { + if (!state.option.inESNext()) { + warning("W104", state.tokens.curr, "concise methods"); + } + doFunction(i, undefined, g); + } else if (!isclassdef) { + advance(":"); + expression(10); + } } } // It is a Syntax Error if PropName of MethodDefinition is "prototype". @@ -3420,7 +3475,9 @@ var JSHINT = (function () { warning("W080", state.tokens.prev, state.tokens.prev.value); } if (peek(0).id === "=" && state.tokens.next.identifier) { - warning("W120", state.tokens.next, state.tokens.next.value); + if (!funct["(params)"] || funct["(params)"].indexOf(state.tokens.next.value) === -1) { + warning("W120", state.tokens.next, state.tokens.next.value); + } } value = expression(10); if (lone) { @@ -3614,7 +3671,7 @@ var JSHINT = (function () { if (state.tokens.next.id === "else") { advance("else"); if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") { - statement(true); + statement(); } else { block(true, true); } @@ -4621,6 +4678,8 @@ var JSHINT = (function () { if (item[0] === "-") { slice = item.slice(1); JSHINT.blacklist[slice] = slice; + // remove from predefined if there + delete predefined[slice]; } else { prop = Object.getOwnPropertyDescriptor(o.predef, item); predefined[item] = prop ? prop.value : false; @@ -4768,8 +4827,10 @@ var JSHINT = (function () { directives(); if (state.directive["use strict"]) { - if (!state.option.globalstrict && !(state.option.node || state.option.phantom)) { - warning("W097", state.tokens.prev); + if (!state.option.globalstrict) { + if (!(state.option.node || state.option.phantom || state.option.browserify)) { + warning("W097", state.tokens.prev); + } } } diff --git a/node_modules/gulp-jshint/node_modules/jshint/src/lex.js b/node_modules/gulp-jshint/node_modules/jshint/src/lex.js index 6dbc99a..4e65b72 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/src/lex.js +++ b/node_modules/gulp-jshint/node_modules/jshint/src/lex.js @@ -29,7 +29,9 @@ var Token = { NullLiteral: 7, BooleanLiteral: 8, RegExp: 9, - TemplateLiteral: 10 + TemplateHead: 10, + TemplateMiddle: 11, + TemplateTail: 12 }; // Object that handles postponed lexing verifications that checks the parsed @@ -109,6 +111,9 @@ function Lexer(source) { this.from = 1; this.input = ""; this.inComment = false; + this.inTemplate = false; + this.templateLine = null; + this.templateChar = null; for (var i = 0; i < state.option.indent; i += 1) { state.tab += " "; @@ -318,13 +323,10 @@ Lexer.prototype = { }; } - // Special case: /=. We need to make sure that this is an - // operator and not a regular expression. + // Special case: /=. if (ch1 === "/") { - if (ch2 === "=" && /\/=(?!(\S*\/[gim]?))/.test(this.input)) { - // /= is not a part of a regular expression, return it as a - // punctuator. + if (ch2 === "=") { return { type: Token.Punctuator, value: "/=" @@ -372,6 +374,8 @@ Lexer.prototype = { value += "*/"; } + body = body.replace(/\n/g, " "); + special.forEach(function (str) { if (isSpecial) { return; @@ -853,52 +857,75 @@ Lexer.prototype = { * the char pointer. */ scanTemplateLiteral: function () { + var tokenType; + var value = ''; + var ch; + // String must start with a backtick. - if (!state.option.esnext || this.peek() !== "`") { + if (!this.inTemplate) { + if (!state.option.esnext || this.peek() !== "`") { + return null; + } + this.templateLine = this.line; + this.templateChar = this.char; + this.skip(1); + } else if (this.peek() !== '}') { + // If we're in a template, and we don't have a '}', lex something else instead. return null; } - var startLine = this.line; - var startChar = this.char; - var jump = 1; - var value = ""; - - // For now, do not perform any linting of the content of the template - // string. Just skip until the next backtick is found. - this.skip(); - while (this.peek() !== "`") { - while (this.peek() === "") { - // End of line --- For template literals in ES6, no backslash is - // required to precede newlines. + while ((ch = this.peek()) === "") { if (!this.nextLine()) { + // Unclosed template literal --- point to the starting line, or the EOF? + tokenType = this.inTemplate ? Token.TemplateHead : Token.TemplateMiddle; + this.inTemplate = false; this.trigger("error", { code: "E052", - line: startLine, - character: startChar + line: this.templateLine, + character: this.templateChar }); - return { - type: Token.TemplateLiteral, + type: tokenType, value: value, isUnclosed: true }; } - value += "\n"; } - // TODO: do more interesting linting here, similar to string literal - // linting. - var char = this.peek(); - this.skip(jump); - value += char; + if (ch === '$' && this.peek(1) === '{') { + value += '${'; + tokenType = value.charAt(0) === '}' ? Token.TemplateMiddle : Token.TemplateHead; + // Either TokenHead or TokenMiddle --- depending on if the initial value + // is '}' or not. + this.skip(2); + this.inTemplate = true; + return { + type: tokenType, + value: value, + isUnclosed: false + }; + } else if (ch === '\\') { + // TODO: Parse escape sequence, warn about invalid escae sequences + value += ch; + this.skip(1); + } else { + // Otherwise, append the value and continue. + value += ch; + this.skip(1); + } } - this.skip(); + // Final value is either TokenTail or NoSubstititionTemplate --- essentially a string + tokenType = this.inTemplate ? Token.TemplateTail : Token.StringLiteral; + this.inTemplate = false; + this.skip(1); + return { - type: Token.TemplateLiteral, + type: tokenType, value: value, - isUnclosed: false + isUnclosed: false, + quote: "`" }; }, @@ -1284,7 +1311,7 @@ Lexer.prototype = { }, /* - * Scan for any occurence of non-breaking spaces. Non-breaking spaces + * Scan for any occurrence of non-breaking spaces. Non-breaking spaces * can be mistakenly typed on OS X with option-space. Non UTF-8 web * pages with non-breaking pages produce syntax errors. */ @@ -1426,7 +1453,7 @@ Lexer.prototype = { /* * Produce the next token. This function is called by advance() to get - * the next token. It retuns a token in a JSLint-compatible format. + * the next token. It returns a token in a JSLint-compatible format. */ token: function () { /*jshint loopfunc:true */ @@ -1478,6 +1505,8 @@ Lexer.prototype = { case "~": case "#": case "]": + case "++": + case "--": this.prereg = false; break; default: @@ -1557,8 +1586,8 @@ Lexer.prototype = { return create("(string)", token.value); - case Token.TemplateLiteral: - this.trigger("Template", { + case Token.TemplateHead: + this.trigger("TemplateHead", { line: this.line, char: this.char, from: this.from, @@ -1566,6 +1595,24 @@ Lexer.prototype = { }); return create("(template)", token.value); + case Token.TemplateMiddle: + this.trigger("TemplateMiddle", { + line: this.line, + char: this.char, + from: this.from, + value: token.value + }); + return create("(template middle)", token.value); + + case Token.TemplateTail: + this.trigger("TemplateTail", { + line: this.line, + char: this.char, + from: this.from, + value: token.value + }); + return create("(template tail)", token.value); + case Token.Identifier: this.trigger("Identifier", { line: this.line, diff --git a/node_modules/gulp-jshint/node_modules/jshint/src/reg.js b/node_modules/gulp-jshint/node_modules/jshint/src/reg.js index e6436dc..1944b2b 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/src/reg.js +++ b/node_modules/gulp-jshint/node_modules/jshint/src/reg.js @@ -4,7 +4,7 @@ /*jshint maxlen:1000 */ -"use string"; +"use strict"; // Unsafe comment or string (ax) exports.unsafeString = diff --git a/node_modules/gulp-jshint/node_modules/jshint/src/style.js b/node_modules/gulp-jshint/node_modules/jshint/src/style.js index 0dc93ea..c7d4379 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/src/style.js +++ b/node_modules/gulp-jshint/node_modules/jshint/src/style.js @@ -56,12 +56,18 @@ exports.register = function (linter) { linter.on("String", function style_scanQuotes(data) { var quotmark = linter.getOption("quotmark"); + var esnext = linter.getOption("esnext"); var code; if (!quotmark) { return; } + // If quotmark is enabled, return if this is a template literal. + if (esnext && data.quote === "`") { + return; + } + // If quotmark is set to 'single' warn about all double-quotes. if (quotmark === "single" && data.quote !== "'") { diff --git a/node_modules/gulp-jshint/node_modules/jshint/src/vars.js b/node_modules/gulp-jshint/node_modules/jshint/src/vars.js index fa6ba2e..993a237 100644 --- a/node_modules/gulp-jshint/node_modules/jshint/src/vars.js +++ b/node_modules/gulp-jshint/node_modules/jshint/src/vars.js @@ -25,18 +25,24 @@ exports.ecmaIdentifiers = { isFinite : false, isNaN : false, JSON : false, + Map : false, Math : false, Number : false, Object : false, + Proxy : false, + Promise : false, parseInt : false, parseFloat : false, RangeError : false, ReferenceError : false, RegExp : false, + Set : false, String : false, SyntaxError : false, TypeError : false, URIError : false, + WeakMap : false, + WeakSet : false }; exports.newEcmaIdentifiers = { @@ -409,6 +415,17 @@ exports.node = { clearImmediate: true // v0.9.1+ }; +exports.browserify = { + __filename : false, + __dirname : false, + global : false, + module : false, + require : false, + Buffer : true, + exports : true, + process : true +}; + exports.phantom = { phantom : true, require : true, diff --git a/node_modules/gulp-jshint/node_modules/lodash/package.json b/node_modules/gulp-jshint/node_modules/lodash/package.json index 4bbe5c9..2df2bd6 100644 --- a/node_modules/gulp-jshint/node_modules/lodash/package.json +++ b/node_modules/gulp-jshint/node_modules/lodash/package.json @@ -98,5 +98,6 @@ "readme": "# Lo-Dash v2.4.1\nA utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features).\n\n## Download\n\nCheck out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences]) for details over the differences between builds.\n\n* Modern builds perfect for newer browsers/environments:
\n[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.js) &\n[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.min.js)\n\n* Compatibility builds for older environment support too:
\n[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.js) &\n[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.min.js)\n\n* Underscore builds to use as a drop-in replacement:
\n[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.js) &\n[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.min.js)\n\nCDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed.\n\nLove modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method.\n\n## Dive in\n\nThere’s plenty of **[documentation](http://lodash.com/docs)**, [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).
\nCheck out DevDocs as a fast, organized, & searchable interface for our documentation.\n\nThe full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).
\nA list of upcoming features is available on our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap).\n\n## Features *not* in Underscore\n\n * AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.)\n * [_(…)](http://lodash.com/docs#_) supports intuitive chaining\n * [_.at](http://lodash.com/docs#at) for cherry-picking collection values\n * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods\n * [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects\n * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects\n * [_.constant](http://lodash.com/docs#constant) & [_.property](http://lodash.com/docs#property) function generators for composing functions\n * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex`\n * [_.create](http://lodash.com/docs#create) for easier object inheritance\n * [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins\n * [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions\n * [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control\n * [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys\n * [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early\n * [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties\n * [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties\n * [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object`\n * [_.mapValues](http://lodash.com/docs#mapValues) for [mapping](http://lodash.com/docs#map) values to an object\n * [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions\n * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend)\n * [_.noop](http://lodash.com/docs#noop) for function placeholders\n * [_.now](http://lodash.com/docs#now) as a cross-browser `Date.now` alternative\n * [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior\n * [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays\n * [_.random](http://lodash.com/docs#random) supports returning floating-point numbers\n * [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking\n * [_.sortBy](http://lodash.com/docs#sortBy) supports sorting by multiple properties\n * [_.support](http://lodash.com/docs#support) for flagging environment features\n * [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals)\n * [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects\n * [_.where](http://lodash.com/docs#where) supports deep object comparisons\n * [_.xor](http://lodash.com/docs#xor) as a companion to [_.difference](http://lodash.com/docs#difference), [_.intersection](http://lodash.com/docs#intersection), & [_.union](http://lodash.com/docs#union)\n * [_.zip](http://lodash.com/docs#zip) is capable of unzipping values\n * [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), &\n [more](http://lodash.com/docs \"_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest\") accept callbacks\n * [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), &\n [more](http://lodash.com/docs \"_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where\") accept strings\n * [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), &\n [more](http://lodash.com/docs \"_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq\") support *“_.pluck”* & *“_.where”* shorthands\n * [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), &\n [more](http://lodash.com/docs \"_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight\") right-associative methods\n\n## Resources\n\n * Podcasts\n - [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/)\n\n * Posts\n - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/)\n - [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/)\n\n * Videos\n - [Introduction](https://vimeo.com/44154599)\n - [Origins](https://vimeo.com/44154600)\n - [Optimizations & builds](https://vimeo.com/44154601)\n - [Native method use](https://vimeo.com/48576012)\n - [Testing](https://vimeo.com/45865290)\n - [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk)\n\n A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources).\n\n## Support\n\nTested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.21~0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
\nAutomated browser test results [are available](https://saucelabs.com/u/lodash) as well as [Travis CI](https://travis-ci.org/) builds for [lodash](https://travis-ci.org/lodash/lodash/), [lodash-cli](https://travis-ci.org/lodash/lodash-cli/), [lodash-amd](https://travis-ci.org/lodash/lodash-amd/), [lodash-node](https://travis-ci.org/lodash/lodash-node/), & [grunt-lodash](https://travis-ci.org/lodash/grunt-lodash).\n\nSpecial thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
\n[![Sauce Labs](http://lodash.com/_img/sauce.png)](https://saucelabs.com/ \"Sauce Labs: Selenium Testing & More\")\n\n## Installation & usage\n\nIn browsers:\n\n```html\n\n```\n\nUsing [`npm`](http://npmjs.org/):\n\n```bash\nnpm i --save lodash\n\n{sudo} npm i -g lodash\nnpm ln lodash\n```\n\nIn [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/):\n\n```js\nvar _ = require('lodash');\n// or as Underscore\nvar _ = require('lodash/dist/lodash.underscore');\n```\n\n**Notes:**\n * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL\n * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('lodash.js');\n```\n\nIn an AMD loader:\n\n```js\nrequire({\n 'packages': [\n { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }\n ]\n},\n['lodash'], function(_) {\n console.log(_.VERSION);\n});\n```\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\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", "readmeFilename": "README.md", "_id": "lodash@2.4.1", - "_from": "lodash@^2.4.1" + "_from": "lodash@^2.4.1", + "scripts": {} } diff --git a/node_modules/gulp-jshint/node_modules/rcloader/node_modules/rcfinder/package.json b/node_modules/gulp-jshint/node_modules/rcloader/node_modules/rcfinder/package.json index 9f79471..98e4072 100644 --- a/node_modules/gulp-jshint/node_modules/rcloader/node_modules/rcfinder/package.json +++ b/node_modules/gulp-jshint/node_modules/rcloader/node_modules/rcfinder/package.json @@ -54,5 +54,6 @@ "shasum": "5fa24066830cf6a665f9e3820cb3c67f0af4058e", "tarball": "http://registry.npmjs.org/rcfinder/-/rcfinder-0.1.8.tgz" }, - "_resolved": "https://registry.npmjs.org/rcfinder/-/rcfinder-0.1.8.tgz" + "_resolved": "https://registry.npmjs.org/rcfinder/-/rcfinder-0.1.8.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/rcloader/package.json b/node_modules/gulp-jshint/node_modules/rcloader/package.json index 6c161ad..2fbc703 100644 --- a/node_modules/gulp-jshint/node_modules/rcloader/package.json +++ b/node_modules/gulp-jshint/node_modules/rcloader/package.json @@ -53,5 +53,6 @@ ], "directories": {}, "_shasum": "a0963a6437d09ef8cb92d932d2dad497b0d1736c", - "_resolved": "https://registry.npmjs.org/rcloader/-/rcloader-0.1.2.tgz" + "_resolved": "https://registry.npmjs.org/rcloader/-/rcloader-0.1.2.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js index 0ca7705..6307220 100644 --- a/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js @@ -240,7 +240,7 @@ function howMuchToRead(n, state) { if (state.objectMode) return n === 0 ? 0 : 1; - if (isNaN(n) || n === null) { + if (n === null || isNaN(n)) { // only flow one buffer at a time if (state.flowing && state.buffer.length) return state.buffer[0].length; @@ -275,6 +275,7 @@ Readable.prototype.read = function(n) { var state = this._readableState; state.calledRead = true; var nOrig = n; + var ret; if (typeof n !== 'number' || n > 0) state.emittedReadable = false; @@ -293,9 +294,28 @@ Readable.prototype.read = function(n) { // if we've ended, and we're now clear, then finish it up. if (n === 0 && state.ended) { + ret = null; + + // In cases where the decoder did not receive enough data + // to produce a full chunk, then immediately received an + // EOF, state.buffer will contain [, ]. + // howMuchToRead will see this and coerce the amount to + // read to zero (because it's looking at the length of the + // first in state.buffer), and we'll end up here. + // + // This can only happen via state.decoder -- no other venue + // exists for pushing a zero-length chunk into state.buffer + // and triggering this behavior. In this case, we return our + // remaining data and end the stream, if appropriate. + if (state.length > 0 && state.decoder) { + ret = fromList(n, state); + state.length -= ret.length; + } + if (state.length === 0) endReadable(this); - return null; + + return ret; } // All the actual chunk generation logic needs to be @@ -349,7 +369,6 @@ Readable.prototype.read = function(n) { if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - var ret; if (n > 0) ret = fromList(n, state); else @@ -382,8 +401,7 @@ function chunkInvalid(state, chunk) { 'string' !== typeof chunk && chunk !== null && chunk !== undefined && - !state.objectMode && - !er) { + !state.objectMode) { er = new TypeError('Invalid non-string/buffer chunk'); } return er; @@ -814,7 +832,12 @@ Readable.prototype.wrap = function(stream) { stream.on('data', function(chunk) { if (state.decoder) chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) + + // don't skip over falsy values in objectMode + //if (state.objectMode && util.isNullOrUndefined(chunk)) + if (state.objectMode && (chunk === null || chunk === undefined)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) return; var ret = self.push(chunk); diff --git a/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js index d0254d5..4bdaa4f 100644 --- a/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js @@ -37,7 +37,6 @@ var util = require('core-util-is'); util.inherits = require('inherits'); /**/ - var Stream = require('stream'); util.inherits(Writable, Stream); diff --git a/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js index 2e44a03..b00e54f 100644 --- a/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -36,6 +36,14 @@ function assertEncoding(encoding) { } } +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. var StringDecoder = exports.StringDecoder = function(encoding) { this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); assertEncoding(encoding); @@ -60,37 +68,50 @@ var StringDecoder = exports.StringDecoder = function(encoding) { return; } + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. this.charLength = 0; }; +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . 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; + var available = (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; + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; if (this.charReceived < this.charLength) { // still not enough chars in this buffer? wait for more ... return ''; } + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + // 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 + // CESU-8: 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; @@ -100,34 +121,33 @@ StringDecoder.prototype.write = function(buffer) { 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); + if (buffer.length === 0) { + return charStr; + } break; } - var lenIncomplete = this.detectIncompleteChar(buffer); + // determine and set charLength / charReceived + 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; + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } 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 + // CESU-8: 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); + buffer.copy(this.charBuffer, 0, 0, size); return charStr.substring(0, end); } @@ -135,6 +155,10 @@ StringDecoder.prototype.write = function(buffer) { return charStr; }; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. 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; @@ -164,8 +188,7 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { break; } } - - return i; + this.charReceived = i; }; StringDecoder.prototype.end = function(buffer) { @@ -188,13 +211,11 @@ function passThroughWrite(buffer) { } function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } diff --git a/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json index 7f5d001..a8c586b 100644 --- a/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,6 +1,6 @@ { "name": "string_decoder", - "version": "0.10.25-1", + "version": "0.10.31", "description": "The string_decoder module from Node core", "main": "index.js", "dependencies": {}, @@ -22,11 +22,33 @@ "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", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@~0.10.x", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/package.json index afdd6ef..adbbd7e 100644 --- a/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/package.json +++ b/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.0.27-1", + "version": "1.0.31", "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", "main": "readable.js", "dependencies": { @@ -37,13 +37,10 @@ "url": "https://github.com/isaacs/readable-stream/issues" }, "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.27-1", - "dist": { - "shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz" - }, + "_id": "readable-stream@1.0.31", + "_shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", "_from": "readable-stream@~1.0.17", - "_npmVersion": "1.4.3", + "_npmVersion": "1.4.9", "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" @@ -62,8 +59,11 @@ "email": "rod@vagg.org" } ], + "dist": { + "shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz" + }, "directories": {}, - "_shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-jshint/package.json b/node_modules/gulp-jshint/package.json index ee0c392..383a464 100644 --- a/node_modules/gulp-jshint/package.json +++ b/node_modules/gulp-jshint/package.json @@ -53,7 +53,7 @@ }, "_id": "gulp-jshint@1.7.1", "_shasum": "c5ce3d7e20b1a4853528f95d5ad6750080fa6739", - "_from": "gulp-jshint@", + "_from": "gulp-jshint@1.7.1", "_npmVersion": "1.4.14", "_npmUser": { "name": "spenceralger", @@ -74,5 +74,6 @@ "tarball": "http://registry.npmjs.org/gulp-jshint/-/gulp-jshint-1.7.1.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/gulp-jshint/-/gulp-jshint-1.7.1.tgz" + "_resolved": "https://registry.npmjs.org/gulp-jshint/-/gulp-jshint-1.7.1.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/CHANGELOG.md b/node_modules/gulp-uglify/CHANGELOG.md index 3313cd6..d663f51 100644 --- a/node_modules/gulp-uglify/CHANGELOG.md +++ b/node_modules/gulp-uglify/CHANGELOG.md @@ -1,5 +1,12 @@ # gulp-uglify changelog +## 0.3.2 + +- Removed the PluginError factory wrapper +- Removed test that was failing due to gulp-util issue. +- Tests should end the streams they are writing to. +- Update dependencies. Fixes #44. Fixes #42. + ## 0.3.1 - Fixed homepage URL in npm metadata diff --git a/node_modules/gulp-uglify/index.js b/node_modules/gulp-uglify/index.js index 82cc81d..63944fd 100644 --- a/node_modules/gulp-uglify/index.js +++ b/node_modules/gulp-uglify/index.js @@ -2,8 +2,9 @@ var through = require('through2'), uglify = require('uglify-js'), merge = require('deepmerge'), - uglifyError = require('./lib/error.js'), - reSourceMapComment = /\n\/\/# sourceMappingURL=.+?$/; + PluginError = require('gulp-util/lib/PluginError'), + reSourceMapComment = /\n\/\/# sourceMappingURL=.+?$/, + pluginName = 'gulp-uglify'; module.exports = function(opt) { @@ -16,7 +17,7 @@ module.exports = function(opt) { } if (file.isStream()) { - return callback(uglifyError('Streaming not supported', { + return callback(new PluginError(pluginName, 'Streaming not supported', { fileName: file.path, showStack: false })); @@ -51,7 +52,7 @@ module.exports = function(opt) { mangled = uglify.minify(String(file.contents), options); file.contents = new Buffer(mangled.code.replace(reSourceMapComment, '')); } catch (e) { - return callback(uglifyError(e.message, { + return callback(new PluginError(pluginName, e.message, { fileName: file.path, lineNumber: e.line, stack: e.stack, diff --git a/node_modules/gulp-uglify/lib/error.js b/node_modules/gulp-uglify/lib/error.js deleted file mode 100644 index 04f7525..0000000 --- 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/deepmerge/package.json b/node_modules/gulp-uglify/node_modules/deepmerge/package.json index 71ed28f..aa66467 100644 --- a/node_modules/gulp-uglify/node_modules/deepmerge/package.json +++ b/node_modules/gulp-uglify/node_modules/deepmerge/package.json @@ -26,7 +26,7 @@ "shasum": "3a5ab8d37311c4d1aefb22209693afe0a91a0563", "tarball": "http://registry.npmjs.org/deepmerge/-/deepmerge-0.2.7.tgz" }, - "_from": "deepmerge@~0.2.7", + "_from": "deepmerge@>=0.2.7 <0.3.0-0", "_npmVersion": "1.2.18", "_npmUser": { "name": "nfisher", @@ -40,5 +40,9 @@ ], "directories": {}, "_shasum": "3a5ab8d37311c4d1aefb22209693afe0a91a0563", - "_resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-0.2.7.tgz" + "_resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-0.2.7.tgz", + "bugs": { + "url": "https://github.com/nrf110/deepmerge/issues" + }, + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/README.md index a8d9b19..bc57626 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/README.md +++ b/node_modules/gulp-uglify/node_modules/gulp-util/README.md @@ -64,9 +64,9 @@ This is just [vinyl](https://github.com/wearefractal/vinyl) ```javascript var file = new gutil.File({ - base: join(__dirname, './fixtures/'), + base: path.join(__dirname, './fixtures/'), cwd: __dirname, - path: join(__dirname, './fixtures/test.coffee') + path: path.join(__dirname, './fixtures/test.coffee') }); ``` @@ -109,6 +109,7 @@ gulp.src('stuff/*.js') - 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. - Note that if you pass in a custom stack string you need to include the message along with that. +- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options. These are all acceptable forms of instantiation: 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 index 6640346..0cdabd3 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/PluginError.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/lib/PluginError.js @@ -1,21 +1,31 @@ var util = require('util'); var colors = require('./colors'); +var _ = require('lodash'); + +var nonEnumberableProperties = ['name', 'message', 'stack']; +var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']); // 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.error = message; - opt.plugin = plugin; - } else if (typeof message === 'object') { - opt = message; - opt.plugin = plugin; - } else if (typeof opt === 'object') { + } else { + if (message instanceof Error) { + opt.error = message; + } else if (typeof message === 'object') { + opt = message; + } else { + opt.message = message; + } opt.plugin = plugin; - opt.message = message; } + + _.defaults(opt, { + showStack: false, + showProperties: true + }) + return opt; }; @@ -26,18 +36,17 @@ function PluginError(plugin, message, opt) { var options = parseOptions(plugin, message, opt); - this.plugin = options.plugin; - this.showStack = options.showStack === true; - - var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack']; - // if options has an error, grab details from it if (options.error) { - properties.forEach(function(prop) { - if (prop in options.error) this[prop] = options.error[prop]; - }, this); + // These properties are not enumerable, so we have to add them explicitly. + _.uniq(Object.keys(options.error).concat(nonEnumberableProperties)) + .forEach(function(prop) { + this[prop] = options.error[prop]; + }, this); } + var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin']; + // options object can override properties.forEach(function(prop) { if (prop in options) this[prop] = options[prop]; @@ -46,8 +55,18 @@ function PluginError(plugin, message, opt) { // 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.stack) { + // Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to. + // Since we are using our own toString method which controls when to display the stack trace if we don't go through this + // safety object, then we'll get stack overflow problems. + var safety = { + toString: function() { + return this._messageWithDetails() + '\nStack:'; + }.bind(this) + }; + Error.captureStackTrace(safety, arguments.callee || this.constructor); + this.__safety = safety; + } if (!this.plugin) throw new Error('Missing plugin name'); if (!this.message) throw new Error('Missing error message'); @@ -55,9 +74,46 @@ function PluginError(plugin, message, opt) { util.inherits(PluginError, Error); +PluginError.prototype._messageWithDetails = function() { + var messageWithDetails = 'Message:\n ' + this.message; + var details = this._messageDetails(); + + if (details !== '') { + messageWithDetails += '\n' + details; + } + + return messageWithDetails; +}; + +PluginError.prototype._messageDetails = function() { + var properties; + if (this.showProperties) { + var properties = _(Object.keys(this)) + .filter(function(prop) { return propertiesNotToDisplay.indexOf(prop) === -1; }) + .map(function(prop) { return '\n ' + prop + ': ' + this[prop]; }, this) + .reduce(function(properties, next) { return properties + next; }); + } + return properties === undefined ? '' : ('Details:' + properties) +}; + PluginError.prototype.toString = function () { - var sig = this.name+' in plugin \''+colors.cyan(this.plugin)+'\''; - var msg = this.showStack ? (this._stack || this.stack) : this.message; + var sig = colors.red(this.name) + ' in plugin \'' + colors.cyan(this.plugin) + '\''; + var detailsWithStack = function(stack) { + return this._messageWithDetails() + '\nStack:\n' + stack; + }.bind(this); + + if (this.showStack) { + if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor + msg = this.__safety.stack; + } else if (this._stack) { + msg = detailsWithStack(this._stack); + } else { // Stack from wrapped error + msg = detailsWithStack(this.stack); + } + } else { + msg = this._messageWithDetails(); + } + return sig+'\n'+msg; }; diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json index 716ae00..111dbbb 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json @@ -57,7 +57,7 @@ "homepage": "https://github.com/sindresorhus/ansi-regex", "_id": "ansi-regex@0.2.1", "_shasum": "0d8e946967a3d8143f93e24e298525fc1b2235f9", - "_from": "ansi-regex@^0.2.1", + "_from": "ansi-regex@^0.2.0", "_npmVersion": "1.4.9", "_npmUser": { "name": "sindresorhus", diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json index 716ae00..111dbbb 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json @@ -57,7 +57,7 @@ "homepage": "https://github.com/sindresorhus/ansi-regex", "_id": "ansi-regex@0.2.1", "_shasum": "0d8e946967a3d8143f93e24e298525fc1b2235f9", - "_from": "ansi-regex@^0.2.1", + "_from": "ansi-regex@^0.2.0", "_npmVersion": "1.4.9", "_npmUser": { "name": "sindresorhus", diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/dateformat/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/dateformat/package.json index e5a5076..cba6827 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/dateformat/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/dateformat/package.json @@ -56,5 +56,6 @@ "directories": {}, "_shasum": "5d60c5d574dc778a7f98139156c6cfc9d851d1e7", "_resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.8-1.2.3.tgz", - "readme": "ERROR: No README data found!" + "readme": "ERROR: No README data found!", + "scripts": {} } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json index 0836ea4..7e5167c 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "4f1227aa5a8711fc632f5b07a1f4607aab8b3222", - "_resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json index 3710c16..e1ed1c6 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "ecfe22618a2ade50bfeea43937e51df66f0edb72", - "_resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json index 0955275..7d395e5 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json @@ -82,5 +82,6 @@ ], "directories": {}, "_shasum": "a7e8885f05e68851144b6e12a8f3678026bc4c54", - "_resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json index e35b071..70fc63a 100644 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb", - "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json index f61df3b..20a946e 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json @@ -74,5 +74,6 @@ ], "directories": {}, "_shasum": "df67c3bb6b7e8e1e831ab48bfa0795b92afe899d", - "_resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json index e35b071..70fc63a 100644 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb", - "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json index a0ddcbf..f1d77c5 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json @@ -75,5 +75,6 @@ ], "directories": {}, "_shasum": "747c4fc40103eb3bb8a0976e571f7a2659e93ba7", - "_resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json index a88e9fb..5c9869f 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json @@ -83,5 +83,6 @@ ], "directories": {}, "_shasum": "2ce12c5e084db0a57dda5e5d1eeeb9f5d175a3b4", - "_resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json index 2741238..639cba4 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json @@ -82,5 +82,6 @@ ], "directories": {}, "_shasum": "ea76c75d11eb86d4dbe89a83893bb861929ac699", - "_resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json index 679515e..620268c 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json @@ -81,5 +81,6 @@ ], "directories": {}, "_shasum": "abf514436b3cb705001627978cbcf30b1280eea4", - "_resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/package.json index f2a918e..6c1728e 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash.template/package.json @@ -87,5 +87,6 @@ ], "directories": {}, "_shasum": "9e611007edf629129a974ab3c48b817b3e1cf20d", - "_resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/LICENSE.txt b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/LICENSE.txt similarity index 100% rename from node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/LICENSE.txt rename to node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/LICENSE.txt diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/README.md new file mode 100644 index 0000000..6f9598e --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/README.md @@ -0,0 +1,163 @@ +# Lo-Dash v2.4.1 +A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features). + +## Download + +Check out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences]) for details over the differences between builds. + +* Modern builds perfect for newer browsers/environments:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.min.js) + +* Compatibility builds for older environment support too:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.min.js) + +* Underscore builds to use as a drop-in replacement:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.min.js) + +CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed. + +Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method. + +## Dive in + +There’s plenty of **[documentation](http://lodash.com/docs)**, [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).
+Check out DevDocs as a fast, organized, & searchable interface for our documentation. + +The full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).
+A list of upcoming features is available on our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap). + +## Features *not* in Underscore + + * AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.) + * [_(…)](http://lodash.com/docs#_) supports intuitive chaining + * [_.at](http://lodash.com/docs#at) for cherry-picking collection values + * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.constant](http://lodash.com/docs#constant) & [_.property](http://lodash.com/docs#property) function generators for composing functions + * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` + * [_.create](http://lodash.com/docs#create) for easier object inheritance + * [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins + * [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions + * [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control + * [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys + * [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early + * [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties + * [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties + * [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object` + * [_.mapValues](http://lodash.com/docs#mapValues) for [mapping](http://lodash.com/docs#map) values to an object + * [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions + * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend) + * [_.noop](http://lodash.com/docs#noop) for function placeholders + * [_.now](http://lodash.com/docs#now) as a cross-browser `Date.now` alternative + * [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior + * [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays + * [_.random](http://lodash.com/docs#random) supports returning floating-point numbers + * [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking + * [_.sortBy](http://lodash.com/docs#sortBy) supports sorting by multiple properties + * [_.support](http://lodash.com/docs#support) for flagging environment features + * [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals) + * [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects + * [_.where](http://lodash.com/docs#where) supports deep object comparisons + * [_.xor](http://lodash.com/docs#xor) as a companion to [_.difference](http://lodash.com/docs#difference), [_.intersection](http://lodash.com/docs#intersection), & [_.union](http://lodash.com/docs#union) + * [_.zip](http://lodash.com/docs#zip) is capable of unzipping values + * [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), & + [more](http://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks + * [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), & + [more](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings + * [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), & + [more](http://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands + * [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), & + [more](http://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight") right-associative methods + +## Resources + + * Podcasts + - [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/) + + * Posts + - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/) + - [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/) + + * Videos + - [Introduction](https://vimeo.com/44154599) + - [Origins](https://vimeo.com/44154600) + - [Optimizations & builds](https://vimeo.com/44154601) + - [Native method use](https://vimeo.com/48576012) + - [Testing](https://vimeo.com/45865290) + - [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk) + + A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources). + +## Support + +Tested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.21~0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
+Automated browser test results [are available](https://saucelabs.com/u/lodash) as well as [Travis CI](https://travis-ci.org/) builds for [lodash](https://travis-ci.org/lodash/lodash/), [lodash-cli](https://travis-ci.org/lodash/lodash-cli/), [lodash-amd](https://travis-ci.org/lodash/lodash-amd/), [lodash-node](https://travis-ci.org/lodash/lodash-node/), & [grunt-lodash](https://travis-ci.org/lodash/grunt-lodash). + +Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
+[![Sauce Labs](http://lodash.com/_img/sauce.png)](https://saucelabs.com/ "Sauce Labs: Selenium Testing & More") + +## Installation & usage + +In browsers: + +```html + +``` + +Using [`npm`](http://npmjs.org/): + +```bash +npm i --save lodash + +{sudo} npm i -g lodash +npm ln lodash +``` + +In [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/): + +```js +var _ = require('lodash'); +// or as Underscore +var _ = require('lodash/dist/lodash.underscore'); +``` + +**Notes:** + * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL + * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it + +In [Rhino](http://www.mozilla.org/rhino/): + +```js +load('lodash.js'); +``` + +In an AMD loader: + +```js +require({ + 'packages': [ + { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' } + ] +}, +['lodash'], function(_) { + console.log(_.VERSION); +}); +``` + +## 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/) | + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js new file mode 100644 index 0000000..23798ba --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js @@ -0,0 +1,7157 @@ +/** + * @license + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash -o ./dist/lodash.compat.js` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre ES5 environments */ + var undefined; + + /** Used to pool arrays and objects used internally */ + var arrayPool = [], + objectPool = []; + + /** Used to generate unique IDs */ + var idCounter = 0; + + /** Used internally to indicate various things */ + var indicatorObject = {}; + + /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */ + var keyPrefix = +new Date + ''; + + /** Used as the size when optimizations are enabled for large arrays */ + var largeArraySize = 75; + + /** Used as the max size of the `arrayPool` and `objectPool` */ + var maxPoolSize = 40; + + /** Used to detect and test whitespace */ + var whitespace = ( + // whitespace + ' \t\x0B\f\xA0\ufeff' + + + // line terminators + '\n\r\u2028\u2029' + + + // unicode category "Zs" space separators + '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' + ); + + /** 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 match regexp flags from their coerced string values */ + var reFlags = /\w*$/; + + /** Used to detected named functions */ + var reFuncName = /^\s*function[ \n\r\t]+\w/; + + /** Used to match "interpolate" template delimiters */ + var reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match leading whitespace and zeros to be removed */ + var reLeadingSpacesAndZeros = RegExp('^[' + whitespace + ']*0+(?=.$)'); + + /** Used to ensure capturing order of template delimiters */ + var reNoMatch = /($^)/; + + /** Used to detect functions containing a `this` reference */ + var reThis = /\bthis\b/; + + /** Used to match unescaped characters in compiled string literals */ + var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; + + /** Used to assign default `context` object properties */ + var contextProps = [ + 'Array', 'Boolean', 'Date', 'Error', 'Function', 'Math', 'Number', 'Object', + 'RegExp', 'String', '_', 'attachEvent', 'clearTimeout', 'isFinite', 'isNaN', + 'parseInt', 'setTimeout' + ]; + + /** Used to fix the JScript [[DontEnum]] bug */ + var shadowedProps = [ + 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', + 'toLocaleString', 'toString', 'valueOf' + ]; + + /** Used to make template sourceURLs easier to identify */ + var templateCounter = 0; + + /** `Object#toString` result shortcuts */ + var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + boolClass = '[object Boolean]', + dateClass = '[object Date]', + errorClass = '[object Error]', + funcClass = '[object Function]', + numberClass = '[object Number]', + objectClass = '[object Object]', + regexpClass = '[object RegExp]', + stringClass = '[object String]'; + + /** Used to identify object classifications that `_.clone` supports */ + var cloneableClasses = {}; + cloneableClasses[funcClass] = false; + cloneableClasses[argsClass] = cloneableClasses[arrayClass] = + cloneableClasses[boolClass] = cloneableClasses[dateClass] = + cloneableClasses[numberClass] = cloneableClasses[objectClass] = + cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true; + + /** Used as an internal `_.debounce` options object */ + var debounceOptions = { + 'leading': false, + 'maxWait': 0, + 'trailing': false + }; + + /** Used as the property descriptor for `__bindData__` */ + var descriptor = { + 'configurable': false, + 'enumerable': false, + 'value': null, + 'writable': false + }; + + /** Used as the data object for `iteratorTemplate` */ + var iteratorData = { + 'args': '', + 'array': null, + 'bottom': '', + 'firstArg': '', + 'init': '', + 'keys': null, + 'loop': '', + 'shadowedProps': null, + 'support': null, + 'top': '', + 'useHas': false + }; + + /** 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 + }; + + /** Used to escape characters for inclusion in compiled string literals */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\t': 't', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Used as a reference to the global object */ + var root = (objectTypes[typeof window] && window) || this; + + /** Detect free variable `exports` */ + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports` */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + + /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ + var freeGlobal = objectTypes[typeof global] && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.indexOf` without support for binary searches + * or `fromIndex` constraints. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * An implementation of `_.contains` for cache objects that mimics the return + * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var type = typeof value; + cache = cache.cache; + + if (type == 'boolean' || value == null) { + return cache[value] ? 0 : -1; + } + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value; + cache = (cache = cache[type]) && cache[key]; + + return type == 'object' + ? (cache && baseIndexOf(cache, value) > -1 ? 0 : -1) + : (cache ? 0 : -1); + } + + /** + * Adds a given value to the corresponding cache object. + * + * @private + * @param {*} value The value to add to the cache. + */ + function cachePush(value) { + var cache = this.cache, + type = typeof value; + + if (type == 'boolean' || value == null) { + cache[value] = true; + } else { + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value, + typeCache = cache[type] || (cache[type] = {}); + + if (type == 'object') { + (typeCache[key] || (typeCache[key] = [])).push(value); + } else { + typeCache[key] = true; + } + } + } + + /** + * Used by `_.max` and `_.min` as the default callback when a given + * collection is a string value. + * + * @private + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. + */ + function charAtCallback(value) { + return value.charCodeAt(0); + } + + /** + * Used by `sortBy` to compare transformed `collection` elements, stable sorting + * them in ascending order. + * + * @private + * @param {Object} a The object to compare to `b`. + * @param {Object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. + */ + function compareAscending(a, b) { + var ac = a.criteria, + bc = b.criteria, + index = -1, + length = ac.length; + + while (++index < length) { + var value = ac[index], + other = bc[index]; + + if (value !== other) { + if (value > other || typeof value == 'undefined') { + return 1; + } + if (value < other || typeof other == 'undefined') { + return -1; + } + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to return the same value for + // `a` and `b`. See https://github.com/jashkenas/underscore/pull/1247 + // + // This also ensures a stable sort in V8 and other engines. + // See http://code.google.com/p/v8/issues/detail?id=90 + return a.index - b.index; + } + + /** + * Creates a cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [array=[]] The array to search. + * @returns {null|Object} Returns the cache object or `null` if caching should not be used. + */ + function createCache(array) { + var index = -1, + length = array.length, + first = array[0], + mid = array[(length / 2) | 0], + last = array[length - 1]; + + if (first && typeof first == 'object' && + mid && typeof mid == 'object' && last && typeof last == 'object') { + return false; + } + var cache = getObject(); + cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false; + + var result = getObject(); + result.array = array; + result.cache = cache; + result.push = cachePush; + + while (++index < length) { + result.push(array[index]); + } + return result; + } + + /** + * 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]; + } + + /** + * Gets an array from the array pool or creates a new one if the pool is empty. + * + * @private + * @returns {Array} The array from the pool. + */ + function getArray() { + return arrayPool.pop() || []; + } + + /** + * Gets an object from the object pool or creates a new one if the pool is empty. + * + * @private + * @returns {Object} The object from the pool. + */ + function getObject() { + return objectPool.pop() || { + 'array': null, + 'cache': null, + 'criteria': null, + 'false': false, + 'index': 0, + 'null': false, + 'number': null, + 'object': null, + 'push': null, + 'string': null, + 'true': false, + 'undefined': false, + 'value': null + }; + } + + /** + * Checks if `value` is a DOM node in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM node, else `false`. + */ + function isNode(value) { + // IE < 9 presents DOM nodes as `Object` objects except they have `toString` + // methods that are `typeof` "string" and still can coerce nodes to strings + return typeof value.toString != 'function' && typeof (value + '') == 'string'; + } + + /** + * Releases the given array back to the array pool. + * + * @private + * @param {Array} [array] The array to release. + */ + function releaseArray(array) { + array.length = 0; + if (arrayPool.length < maxPoolSize) { + arrayPool.push(array); + } + } + + /** + * Releases the given object back to the object pool. + * + * @private + * @param {Object} [object] The object to release. + */ + function releaseObject(object) { + var cache = object.cache; + if (cache) { + releaseObject(cache); + } + object.array = object.cache = object.criteria = object.object = object.number = object.string = object.value = null; + if (objectPool.length < maxPoolSize) { + objectPool.push(object); + } + } + + /** + * Slices the `collection` from the `start` index up to, but not including, + * the `end` index. + * + * Note: This function is used instead of `Array#slice` to support node lists + * in IE < 9 and to ensure dense arrays are returned. + * + * @private + * @param {Array|Object|string} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {Array} Returns the new array. + */ + function slice(array, start, end) { + start || (start = 0); + if (typeof end == 'undefined') { + end = array ? array.length : 0; + } + var index = -1, + length = end - start || 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = array[start + index]; + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new `lodash` function using the given context object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} [context=root] The context object. + * @returns {Function} Returns the `lodash` function. + */ + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See http://es5.github.io/#x11.1.5. + context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; + + /** Native constructor references */ + var Array = context.Array, + Boolean = context.Boolean, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ + var arrayRef = []; + + /** Used for native method references */ + var errorProto = Error.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + + /** Used to restore the original `_` reference in `noConflict` */ + var oldDash = context._; + + /** 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, '.*?') + '$' + ); + + /** Native method shortcuts */ + var ceil = Math.ceil, + clearTimeout = context.clearTimeout, + floor = Math.floor, + fnToString = Function.prototype.toString, + getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf, + hasOwnProperty = objectProto.hasOwnProperty, + push = arrayRef.push, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + setTimeout = context.setTimeout, + splice = arrayRef.splice, + unshift = arrayRef.unshift; + + /** Used to set meta data on functions */ + var defineProperty = (function() { + // IE 8 only accepts DOM elements + try { + var o = {}, + func = isNative(func = Object.defineProperty) && func, + result = func(o, o, o) && func; + } catch(e) { } + return result; + }()); + + /* Native method shortcuts for methods with the same name as other `lodash` methods */ + var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate, + nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray, + nativeIsFinite = context.isFinite, + nativeIsNaN = context.isNaN, + nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys, + nativeMax = Math.max, + nativeMin = Math.min, + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + + /** Used to lookup a built-in constructor by [[Class]] */ + var ctorByClass = {}; + ctorByClass[arrayClass] = Array; + ctorByClass[boolClass] = Boolean; + ctorByClass[dateClass] = Date; + ctorByClass[funcClass] = Function; + ctorByClass[objectClass] = Object; + ctorByClass[numberClass] = Number; + ctorByClass[regexpClass] = RegExp; + ctorByClass[stringClass] = String; + + /** Used to avoid iterating non-enumerable properties in IE < 9 */ + var nonEnumProps = {}; + nonEnumProps[arrayClass] = nonEnumProps[dateClass] = nonEnumProps[numberClass] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; + nonEnumProps[boolClass] = nonEnumProps[stringClass] = { 'constructor': true, 'toString': true, 'valueOf': true }; + nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true }; + nonEnumProps[objectClass] = { 'constructor': true }; + + (function() { + var length = shadowedProps.length; + while (length--) { + var key = shadowedProps[length]; + for (var className in nonEnumProps) { + if (hasOwnProperty.call(nonEnumProps, className) && !hasOwnProperty.call(nonEnumProps[className], key)) { + nonEnumProps[className][key] = false; + } + } + } + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps the given value to enable intuitive + * method chaining. + * + * In addition to Lo-Dash methods, wrappers also have the following `Array` methods: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, + * and `unshift` + * + * Chaining is supported in custom builds as long as the `value` method is + * implicitly or explicitly included in the build. + * + * The chainable wrapper functions are: + * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, + * `compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`, + * `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, + * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`, + * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, + * `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, + * `union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, + * and `zip` + * + * The non-chainable wrapper functions are: + * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`, + * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, + * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, + * `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, + * `template`, `unescape`, `uniqueId`, and `value` + * + * The wrapper functions `first` and `last` return wrapped values when `n` is + * provided, otherwise they return unwrapped values. + * + * Explicit chaining can be enabled by using the `_.chain` method. + * + * @name _ + * @constructor + * @category Chaining + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(num) { + * return num * num; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + // don't wrap if already wrapped, even if wrapped by a different `lodash` constructor + return (value && typeof value == 'object' && !isArray(value) && hasOwnProperty.call(value, '__wrapped__')) + ? value + : new lodashWrapper(value); + } + + /** + * A fast path for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {Object} Returns a `lodash` instance. + */ + function lodashWrapper(value, chainAll) { + this.__chain__ = !!chainAll; + this.__wrapped__ = value; + } + // ensure `new lodashWrapper` is an instance of `lodash` + lodashWrapper.prototype = lodash.prototype; + + /** + * An object used to flag environments features. + * + * @static + * @memberOf _ + * @type Object + */ + var support = lodash.support = {}; + + (function() { + var ctor = function() { this.x = 1; }, + object = { '0': 1, 'length': 1 }, + props = []; + + ctor.prototype = { 'valueOf': 1, 'y': 1 }; + for (var key in new ctor) { props.push(key); } + for (key in arguments) { } + + /** + * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.argsClass = toString.call(arguments) == argsClass; + + /** + * Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5). + * + * @memberOf _.support + * @type boolean + */ + support.argsObject = arguments.constructor == Object && !(arguments instanceof Array); + + /** + * Detect if `name` or `message` properties of `Error.prototype` are + * enumerable by default. (IE < 9, Safari < 5.1) + * + * @memberOf _.support + * @type boolean + */ + support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); + + /** + * Detect if `prototype` properties are enumerable by default. + * + * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 + * (if the prototype or a property on the prototype has been set) + * incorrectly sets a function's `prototype` property [[Enumerable]] + * value to `true`. + * + * @memberOf _.support + * @type boolean + */ + support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); + + /** + * Detect if functions can be decompiled by `Function#toString` + * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). + * + * @memberOf _.support + * @type boolean + */ + support.funcDecomp = !isNative(context.WinRTError) && reThis.test(runInContext); + + /** + * Detect if `Function#name` is supported (all but IE). + * + * @memberOf _.support + * @type boolean + */ + support.funcNames = typeof Function.name == 'string'; + + /** + * Detect if `arguments` object indexes are non-enumerable + * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumArgs = key != 0; + + /** + * Detect if properties shadowing those on `Object.prototype` are non-enumerable. + * + * In IE < 9 an objects own properties, shadowing non-enumerable ones, are + * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumShadows = !/valueOf/.test(props); + + /** + * Detect if own properties are iterated after inherited properties (all but IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.ownLast = props[0] != 'x'; + + /** + * Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. + * + * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` + * and `splice()` functions that fail to remove the last element, `value[0]`, + * of array-like objects even though the `length` property is set to `0`. + * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` + * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. + * + * @memberOf _.support + * @type boolean + */ + support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); + + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index and IE 8 can only access + * characters by index on string literals. + * + * @memberOf _.support + * @type boolean + */ + support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; + + /** + * Detect if a DOM node's [[Class]] is resolvable (all but IE < 9) + * and that the JS engine errors when attempting to coerce an object to + * a string without a `toString` function. + * + * @memberOf _.support + * @type boolean + */ + try { + support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); + } catch(e) { + support.nodeClass = true; + } + }(1)); + + /** + * 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 + */ + lodash.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 + */ + '_': lodash + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The template used to create iterator functions. + * + * @private + * @param {Object} data The data object used to populate the text. + * @returns {string} Returns the interpolated text. + */ + var iteratorTemplate = function(obj) { + + var __p = 'var index, iterable = ' + + (obj.firstArg) + + ', result = ' + + (obj.init) + + ';\nif (!iterable) return result;\n' + + (obj.top) + + ';'; + if (obj.array) { + __p += '\nvar length = iterable.length; index = -1;\nif (' + + (obj.array) + + ') { '; + if (support.unindexedChars) { + __p += '\n if (isString(iterable)) {\n iterable = iterable.split(\'\')\n } '; + } + __p += '\n while (++index < length) {\n ' + + (obj.loop) + + ';\n }\n}\nelse { '; + } else if (support.nonEnumArgs) { + __p += '\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += \'\';\n ' + + (obj.loop) + + ';\n }\n } else { '; + } + + if (support.enumPrototypes) { + __p += '\n var skipProto = typeof iterable == \'function\';\n '; + } + + if (support.enumErrorProps) { + __p += '\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n '; + } + + var conditions = []; if (support.enumPrototypes) { conditions.push('!(skipProto && index == "prototype")'); } if (support.enumErrorProps) { conditions.push('!(skipErrorProps && (index == "message" || index == "name"))'); } + + if (obj.useHas && obj.keys) { + __p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n'; + if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + } else { + __p += '\n for (index in iterable) {\n'; + if (obj.useHas) { conditions.push("hasOwnProperty.call(iterable, index)"); } if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + if (support.nonEnumShadows) { + __p += '\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n '; + for (k = 0; k < 7; k++) { + __p += '\n index = \'' + + (obj.shadowedProps[k]) + + '\';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))'; + if (!obj.useHas) { + __p += ' || (!nonEnum[index] && iterable[index] !== objectProto[index])'; + } + __p += ') {\n ' + + (obj.loop) + + ';\n } '; + } + __p += '\n } '; + } + + } + + if (obj.array || support.nonEnumArgs) { + __p += '\n}'; + } + __p += + (obj.bottom) + + ';\nreturn result'; + + return __p + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.bind` that creates the bound function and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new bound function. + */ + function baseBind(bindData) { + var func = bindData[0], + partialArgs = bindData[2], + thisArg = bindData[4]; + + function bound() { + // `Function#bind` spec + // http://es5.github.io/#x15.3.4.5 + if (partialArgs) { + // avoid `arguments` object deoptimizations by using `slice` instead + // of `Array.prototype.slice.call` and not assigning `arguments` to a + // variable as a ternary expression + var args = slice(partialArgs); + push.apply(args, arguments); + } + // mimic the constructor's `return` behavior + // http://es5.github.io/#x13.2.2 + if (this instanceof bound) { + // ensure `new bound` is an instance of `func` + var thisBinding = baseCreate(func.prototype), + result = func.apply(thisBinding, args || arguments); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisArg, args || arguments); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.clone` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, callback, stackA, stackB) { + if (callback) { + var result = callback(value); + if (typeof result != 'undefined') { + return result; + } + } + // inspect [[Class]] + var isObj = isObject(value); + if (isObj) { + var className = toString.call(value); + if (!cloneableClasses[className] || (!support.nodeClass && isNode(value))) { + return value; + } + var ctor = ctorByClass[className]; + switch (className) { + case boolClass: + case dateClass: + return new ctor(+value); + + case numberClass: + case stringClass: + return new ctor(value); + + case regexpClass: + result = ctor(value.source, reFlags.exec(value)); + result.lastIndex = value.lastIndex; + return result; + } + } else { + return value; + } + var isArr = isArray(value); + if (isDeep) { + // check for circular references and return corresponding clone + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + result = isArr ? ctor(value.length) : {}; + } + else { + result = isArr ? slice(value) : assign({}, value); + } + // add array properties assigned by `RegExp#exec` + if (isArr) { + if (hasOwnProperty.call(value, 'index')) { + result.index = value.index; + } + if (hasOwnProperty.call(value, 'input')) { + result.input = value.input; + } + } + // exit for shallow clone + if (!isDeep) { + return result; + } + // add the source value to the stack of traversed objects + // and associate it with its clone + stackA.push(value); + stackB.push(result); + + // recursively populate clone (susceptible to call stack limits) + (isArr ? baseEach : forOwn)(value, function(objValue, key) { + result[key] = baseClone(objValue, isDeep, callback, stackA, stackB); + }); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + function baseCreate(prototype, properties) { + return isObject(prototype) ? nativeCreate(prototype) : {}; + } + // fallback for browsers without `Object.create` + if (!nativeCreate) { + baseCreate = (function() { + function Object() {} + return function(prototype) { + if (isObject(prototype)) { + Object.prototype = prototype; + var result = new Object; + Object.prototype = null; + } + return result || context.Object(); + }; + }()); + } + + /** + * The base implementation of `_.createCallback` without support for creating + * "_.pluck" or "_.where" style callbacks. + * + * @private + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + */ + function baseCreateCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + // exit early for no `thisArg` or already bound by `Function#bind` + if (typeof thisArg == 'undefined' || !('prototype' in func)) { + return func; + } + var bindData = func.__bindData__; + if (typeof bindData == 'undefined') { + if (support.funcNames) { + bindData = !func.name; + } + bindData = bindData || !support.funcDecomp; + if (!bindData) { + var source = fnToString.call(func); + if (!support.funcNames) { + bindData = !reFuncName.test(source); + } + if (!bindData) { + // checks if `func` references the `this` keyword and stores the result + bindData = reThis.test(source); + setBindData(func, bindData); + } + } + } + // exit early if there are no `this` references or `func` is bound + if (bindData === false || (bindData !== true && bindData[1] & 1)) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 2: return function(a, b) { + return func.call(thisArg, a, b); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + } + return bind(func, thisArg); + } + + /** + * The base implementation of `createWrapper` that creates the wrapper and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new function. + */ + function baseCreateWrapper(bindData) { + var func = bindData[0], + bitmask = bindData[1], + partialArgs = bindData[2], + partialRightArgs = bindData[3], + thisArg = bindData[4], + arity = bindData[5]; + + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + key = func; + + function bound() { + var thisBinding = isBind ? thisArg : this; + if (partialArgs) { + var args = slice(partialArgs); + push.apply(args, arguments); + } + if (partialRightArgs || isCurry) { + args || (args = slice(arguments)); + if (partialRightArgs) { + push.apply(args, partialRightArgs); + } + if (isCurry && args.length < arity) { + bitmask |= 16 & ~32; + return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]); + } + } + args || (args = arguments); + if (isBindKey) { + func = thisBinding[key]; + } + if (this instanceof bound) { + thisBinding = baseCreate(func.prototype); + var result = func.apply(thisBinding, args); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisBinding, args); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.difference` that accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to process. + * @param {Array} [values] The array of values to exclude. + * @returns {Array} Returns a new array of filtered values. + */ + function baseDifference(array, values) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + isLarge = length >= largeArraySize && indexOf === baseIndexOf, + result = []; + + if (isLarge) { + var cache = createCache(values); + if (cache) { + indexOf = cacheIndexOf; + values = cache; + } else { + isLarge = false; + } + } + while (++index < length) { + var value = array[index]; + if (indexOf(values, value) < 0) { + result.push(value); + } + } + if (isLarge) { + releaseObject(values); + } + return result; + } + + /** + * The base implementation of `_.flatten` without support for callback + * shorthands or `thisArg` binding. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isStrict=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {Array} Returns a new flattened array. + */ + function baseFlatten(array, isShallow, isStrict, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (value && typeof value == 'object' && typeof value.length == 'number' + && (isArray(value) || isArguments(value))) { + // recursively flatten arrays (susceptible to call stack limits) + if (!isShallow) { + value = baseFlatten(value, isShallow, isStrict); + } + var valIndex = -1, + valLength = value.length, + resIndex = result.length; + + result.length += valLength; + while (++valIndex < valLength) { + result[resIndex++] = value[valIndex]; + } + } else if (!isStrict) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.isEqual`, without support for `thisArg` binding, + * that allows partial "_.where" style comparisons. + * + * @private + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `a` objects. + * @param {Array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { + // used to indicate that when comparing objects, `a` has at least the properties of `b` + if (callback) { + var result = callback(a, b); + if (typeof result != 'undefined') { + return !!result; + } + } + // exit early for identical values + if (a === b) { + // treat `+0` vs. `-0` as not equal + return a !== 0 || (1 / a == 1 / b); + } + var type = typeof a, + otherType = typeof b; + + // exit early for unlike primitive values + if (a === a && + !(a && objectTypes[type]) && + !(b && objectTypes[otherType])) { + return false; + } + // exit early for `null` and `undefined` avoiding ES3's Function#call behavior + // http://es5.github.io/#x15.3.4.4 + if (a == null || b == null) { + return a === b; + } + // compare [[Class]] names + var className = toString.call(a), + otherClass = toString.call(b); + + if (className == argsClass) { + className = objectClass; + } + if (otherClass == argsClass) { + otherClass = objectClass; + } + if (className != otherClass) { + return false; + } + switch (className) { + case boolClass: + case dateClass: + // coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal + return +a == +b; + + case numberClass: + // treat `NaN` vs. `NaN` as equal + return (a != +a) + ? b != +b + // but treat `+0` vs. `-0` as not equal + : (a == 0 ? (1 / a == 1 / b) : a == +b); + + case regexpClass: + case stringClass: + // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) + // treat string primitives and their corresponding object instances as equal + return a == String(b); + } + var isArr = className == arrayClass; + if (!isArr) { + // unwrap any `lodash` wrapped values + var aWrapped = hasOwnProperty.call(a, '__wrapped__'), + bWrapped = hasOwnProperty.call(b, '__wrapped__'); + + if (aWrapped || bWrapped) { + return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB); + } + // exit for functions and DOM nodes + if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) { + return false; + } + // in older versions of Opera, `arguments` objects have `Array` constructors + var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor, + ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor; + + // non `Object` object instances with different constructors are not equal + if (ctorA != ctorB && + !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && + ('constructor' in a && 'constructor' in b) + ) { + return false; + } + } + // assume cyclic structures are equal + // the algorithm for detecting cyclic structures is adapted from ES 5.1 + // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == a) { + return stackB[length] == b; + } + } + var size = 0; + result = true; + + // add `a` and `b` to the stack of traversed objects + stackA.push(a); + stackB.push(b); + + // recursively compare objects and arrays (susceptible to call stack limits) + if (isArr) { + // compare lengths to determine if a deep comparison is necessary + length = a.length; + size = b.length; + result = size == length; + + if (result || isWhere) { + // deep compare the contents, ignoring non-numeric properties + while (size--) { + var index = length, + value = b[size]; + + if (isWhere) { + while (index--) { + if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } + } + else { + // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` + // which, in this case, is more costly + forIn(b, function(value, key, b) { + if (hasOwnProperty.call(b, key)) { + // count the number of properties. + size++; + // deep compare each property value. + return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB)); + } + }); + + if (result && !isWhere) { + // ensure both objects have the same number of properties + forIn(a, function(value, key, a) { + if (hasOwnProperty.call(a, key)) { + // `size` will be `-1` if `a` has more properties than `b` + return (result = --size > -1); + } + }); + } + } + stackA.pop(); + stackB.pop(); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.merge` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [callback] The function to customize merging properties. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + */ + function baseMerge(object, source, callback, stackA, stackB) { + (isArray(source) ? forEach : forOwn)(source, function(source, key) { + var found, + isArr, + result = source, + value = object[key]; + + if (source && ((isArr = isArray(source)) || isPlainObject(source))) { + // avoid merging previously merged cyclic sources + var stackLength = stackA.length; + while (stackLength--) { + if ((found = stackA[stackLength] == source)) { + value = stackB[stackLength]; + break; + } + } + if (!found) { + var isShallow; + if (callback) { + result = callback(value, source); + if ((isShallow = typeof result != 'undefined')) { + value = result; + } + } + if (!isShallow) { + value = isArr + ? (isArray(value) ? value : []) + : (isPlainObject(value) ? value : {}); + } + // add `source` and associated `value` to the stack of traversed objects + stackA.push(source); + stackB.push(value); + + // recursively merge objects and arrays (susceptible to call stack limits) + if (!isShallow) { + baseMerge(value, source, callback, stackA, stackB); + } + } + } + else { + if (callback) { + result = callback(value, source); + if (typeof result == 'undefined') { + result = source; + } + } + if (typeof result != 'undefined') { + value = result; + } + } + object[key] = value; + }); + } + + /** + * The base implementation of `_.random` without argument juggling or support + * for returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns a random number. + */ + function baseRandom(min, max) { + return min + floor(nativeRandom() * (max - min + 1)); + } + + /** + * The base implementation of `_.uniq` without support for callback shorthands + * or `thisArg` binding. + * + * @private + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. + */ + function baseUniq(array, isSorted, callback) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + result = []; + + var isLarge = !isSorted && length >= largeArraySize && indexOf === baseIndexOf, + seen = (callback || isLarge) ? getArray() : result; + + if (isLarge) { + var cache = createCache(seen); + indexOf = cacheIndexOf; + seen = cache; + } + while (++index < length) { + var value = array[index], + computed = callback ? callback(value, index, array) : value; + + if (isSorted + ? !index || seen[seen.length - 1] !== computed + : indexOf(seen, computed) < 0 + ) { + if (callback || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + if (isLarge) { + releaseArray(seen.array); + releaseObject(seen); + } else if (callback) { + releaseArray(seen); + } + return result; + } + + /** + * Creates a function that aggregates a collection, creating an object composed + * of keys generated from the results of running each element of the collection + * through a callback. The given `setter` function sets the keys and values + * of the composed object. + * + * @private + * @param {Function} setter The setter function. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter) { + return function(collection, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, callback(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, callback(value, key, collection), collection); + }); + } + return result; + }; + } + + /** + * Creates a function that, when called, either curries or invokes `func` + * with an optional `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` + * 8 - `_.curry` (bound) + * 16 - `_.partial` + * 32 - `_.partialRight` + * @param {Array} [partialArgs] An array of arguments to prepend to those + * provided to the new function. + * @param {Array} [partialRightArgs] An array of arguments to append to those + * provided to the new function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new function. + */ + function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + isPartial = bitmask & 16, + isPartialRight = bitmask & 32; + + if (!isBindKey && !isFunction(func)) { + throw new TypeError; + } + if (isPartial && !partialArgs.length) { + bitmask &= ~16; + isPartial = partialArgs = false; + } + if (isPartialRight && !partialRightArgs.length) { + bitmask &= ~32; + isPartialRight = partialRightArgs = false; + } + var bindData = func && func.__bindData__; + if (bindData && bindData !== true) { + // clone `bindData` + bindData = slice(bindData); + if (bindData[2]) { + bindData[2] = slice(bindData[2]); + } + if (bindData[3]) { + bindData[3] = slice(bindData[3]); + } + // set `thisBinding` is not previously bound + if (isBind && !(bindData[1] & 1)) { + bindData[4] = thisArg; + } + // set if previously bound but not currently (subsequent curried functions) + if (!isBind && bindData[1] & 1) { + bitmask |= 8; + } + // set curried arity if not yet set + if (isCurry && !(bindData[1] & 4)) { + bindData[5] = arity; + } + // append partial left arguments + if (isPartial) { + push.apply(bindData[2] || (bindData[2] = []), partialArgs); + } + // append partial right arguments + if (isPartialRight) { + unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs); + } + // merge flags + bindData[1] |= bitmask; + return createWrapper.apply(null, bindData); + } + // fast path for `_.bind` + var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper; + return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]); + } + + /** + * Creates compiled iteration functions. + * + * @private + * @param {...Object} [options] The compile options object(s). + * @param {string} [options.array] Code to determine if the iterable is an array or array-like. + * @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop. + * @param {Function} [options.keys] A reference to `_.keys` for use in own property iteration. + * @param {string} [options.args] A comma separated string of iteration function arguments. + * @param {string} [options.top] Code to execute before the iteration branches. + * @param {string} [options.loop] Code to execute in the object loop. + * @param {string} [options.bottom] Code to execute after the iteration branches. + * @returns {Function} Returns the compiled function. + */ + function createIterator() { + // data properties + iteratorData.shadowedProps = shadowedProps; + + // iterator options + iteratorData.array = iteratorData.bottom = iteratorData.loop = iteratorData.top = ''; + iteratorData.init = 'iterable'; + iteratorData.useHas = true; + + // merge options into a template data object + for (var object, index = 0; object = arguments[index]; index++) { + for (var key in object) { + iteratorData[key] = object[key]; + } + } + var args = iteratorData.args; + iteratorData.firstArg = /^[^,]+/.exec(args)[0]; + + // create the function factory + var factory = Function( + 'baseCreateCallback, errorClass, errorProto, hasOwnProperty, ' + + 'indicatorObject, isArguments, isArray, isString, keys, objectProto, ' + + 'objectTypes, nonEnumProps, stringClass, stringProto, toString', + 'return function(' + args + ') {\n' + iteratorTemplate(iteratorData) + '\n}' + ); + + // return the compiled function + return factory( + baseCreateCallback, errorClass, errorProto, hasOwnProperty, + indicatorObject, isArguments, isArray, isString, iteratorData.keys, objectProto, + objectTypes, nonEnumProps, stringClass, stringProto, toString + ); + } + + /** + * 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]; + } + + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized, this method returns the custom method, otherwise it returns + * the `baseIndexOf` function. + * + * @private + * @returns {Function} Returns the "indexOf" function. + */ + function getIndexOf() { + var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result; + return result; + } + + /** + * 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); + } + + /** + * Sets `this` binding data on a given function. + * + * @private + * @param {Function} func The function to set data on. + * @param {Array} value The data array to set. + */ + var setBindData = !defineProperty ? noop : function(func, value) { + descriptor.value = value; + defineProperty(func, '__bindData__', descriptor); + }; + + /** + * A fallback implementation of `isPlainObject` which checks if a given value + * is an object created by the `Object` constructor, assuming objects created + * by the `Object` constructor have no inherited enumerable properties and that + * there are no `Object.prototype` extensions. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + */ + function shimIsPlainObject(value) { + var ctor, + result; + + // avoid non Object objects, `arguments` objects, and DOM elements + if (!(value && toString.call(value) == objectClass) || + (ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor)) || + (!support.argsClass && isArguments(value)) || + (!support.nodeClass && isNode(value))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + if (support.ownLast) { + forIn(value, function(value, key, object) { + result = hasOwnProperty.call(object, key); + return false; + }); + return result !== false; + } + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + forIn(value, function(value, key) { + result = key; + }); + return typeof result == 'undefined' || hasOwnProperty.call(value, result); + } + + /** + * Used by `unescape` to convert HTML entities to characters. + * + * @private + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + function unescapeHtmlChar(match) { + return htmlUnescapes[match]; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Checks if `value` is an `arguments` object. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @example + * + * (function() { return _.isArguments(arguments); })(1, 2, 3); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == argsClass || false; + } + // fallback for browsers that can't detect `arguments` objects by [[Class]] + if (!support.argsClass) { + isArguments = function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee') || false; + }; + } + + /** + * Checks if `value` is an array. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. + * @example + * + * (function() { return _.isArray(arguments); })(); + * // => false + * + * _.isArray([1, 2, 3]); + * // => true + */ + var isArray = nativeIsArray || function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == arrayClass || false; + }; + + /** + * 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 = createIterator({ + 'args': 'object', + 'init': '[]', + 'top': 'if (!(objectTypes[typeof object])) return result', + 'loop': 'result.push(index)' + }); + + /** + * 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 []; + } + if ((support.enumPrototypes && typeof object == 'function') || + (support.nonEnumArgs && object.length && isArguments(object))) { + return shimKeys(object); + } + return nativeKeys(object); + }; + + /** Reusable iterator options shared by `each`, `forIn`, and `forOwn` */ + var eachIteratorOptions = { + 'args': 'collection, callback, thisArg', + 'top': "callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)", + 'array': "typeof length == 'number'", + 'keys': keys, + 'loop': 'if (callback(iterable[index], index, collection) === false) return result' + }; + + /** Reusable iterator options for `assign` and `defaults` */ + var defaultsIteratorOptions = { + 'args': 'object, source, guard', + 'top': + 'var args = arguments,\n' + + ' argsIndex = 0,\n' + + " argsLength = typeof guard == 'number' ? 2 : args.length;\n" + + 'while (++argsIndex < argsLength) {\n' + + ' iterable = args[argsIndex];\n' + + ' if (iterable && objectTypes[typeof iterable]) {', + 'keys': keys, + 'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]", + 'bottom': ' }\n}' + }; + + /** Reusable iterator options for `forIn` and `forOwn` */ + var forOwnIteratorOptions = { + 'top': 'if (!objectTypes[typeof iterable]) return result;\n' + eachIteratorOptions.top, + 'array': false + }; + + /** + * 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 = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to convert HTML entities to characters */ + var htmlUnescapes = invert(htmlEscapes); + + /** Used to match HTML entities and HTML characters */ + var reEscapedHtml = RegExp('(' + keys(htmlUnescapes).join('|') + ')', 'g'), + reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); + + /** + * A function compiled to iterate `arguments` objects, arrays, objects, and + * strings consistenly across environments, executing the callback for each + * element in the collection. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index|key, collection). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @private + * @type Function + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEach = createIterator(eachIteratorOptions); + + /*--------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources will overwrite property assignments of previous + * sources. If a callback is provided it will be executed to produce the + * assigned values. The callback is bound to `thisArg` and invoked with two + * arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @type Function + * @alias extend + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * _.assign({ 'name': 'fred' }, { 'employer': 'slate' }); + * // => { 'name': 'fred', 'employer': 'slate' } + * + * var defaults = _.partialRight(_.assign, function(a, b) { + * return typeof a == 'undefined' ? b : a; + * }); + * + * var object = { 'name': 'barney' }; + * defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ + var assign = createIterator(defaultsIteratorOptions, { + 'top': + defaultsIteratorOptions.top.replace(';', + ';\n' + + "if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n" + + ' var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n' + + "} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n" + + ' callback = args[--argsLength];\n' + + '}' + ), + 'loop': 'result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]' + }); + + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects will also + * be cloned, otherwise they will be assigned by reference. If a callback + * is provided it will be executed to produce the cloned values. If the + * callback returns `undefined` cloning will be handled by the method instead. + * The callback is bound to `thisArg` and invoked with one argument; (value). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var shallow = _.clone(characters); + * shallow[0] === characters[0]; + * // => true + * + * var deep = _.clone(characters, true); + * deep[0] === characters[0]; + * // => false + * + * _.mixin({ + * 'clone': _.partialRight(_.clone, function(value) { + * return _.isElement(value) ? value.cloneNode(false) : undefined; + * }) + * }); + * + * var clone = _.clone(document.body); + * clone.childNodes.length; + * // => 0 + */ + function clone(value, isDeep, callback, thisArg) { + // allows working with "Collections" methods without using their `index` + // and `collection` arguments for `isDeep` and `callback` + if (typeof isDeep != 'boolean' && isDeep != null) { + thisArg = callback; + callback = isDeep; + isDeep = false; + } + return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates a deep clone of `value`. If a callback is provided it will be + * executed to produce the cloned values. If the callback returns `undefined` + * cloning will be handled by the method instead. The callback is bound to + * `thisArg` and invoked with one argument; (value). + * + * Note: This method is loosely based on the structured clone algorithm. Functions + * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and + * objects created by constructors other than `Object` are cloned to plain `Object` objects. + * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var deep = _.cloneDeep(characters); + * deep[0] === characters[0]; + * // => false + * + * var view = { + * 'label': 'docs', + * 'node': element + * }; + * + * var clone = _.cloneDeep(view, function(value) { + * return _.isElement(value) ? value.cloneNode(true) : undefined; + * }); + * + * clone.node == view.node; + * // => false + */ + function cloneDeep(value, callback, thisArg) { + return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { 'constructor': Circle }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties ? assign(result, properties) : result; + } + + /** + * 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 = createIterator(defaultsIteratorOptions); + + /** + * This method is like `_.findIndex` except that it returns the key of the + * first element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': false }, + * 'fred': { 'age': 40, 'blocked': true }, + * 'pebbles': { 'age': 1, 'blocked': false } + * }; + * + * _.findKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (property order is not guaranteed across environments) + * + * // using "_.where" callback shorthand + * _.findKey(characters, { 'age': 1 }); + * // => 'pebbles' + * + * // using "_.pluck" callback shorthand + * _.findKey(characters, 'blocked'); + * // => 'fred' + */ + function findKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwn(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * This method is like `_.findKey` except that it iterates over elements + * of a `collection` in the opposite order. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': true }, + * 'fred': { 'age': 40, 'blocked': false }, + * 'pebbles': { 'age': 1, 'blocked': true } + * }; + * + * _.findLastKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles`, assuming `_.findKey` returns `barney` + * + * // using "_.where" callback shorthand + * _.findLastKey(characters, { 'age': 40 }); + * // => 'fred' + * + * // using "_.pluck" callback shorthand + * _.findLastKey(characters, 'blocked'); + * // => 'pebbles' + */ + function findLastKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwnRight(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * Iterates over own and inherited enumerable properties of an object, + * executing the callback for each property. The callback is bound to `thisArg` + * and invoked with three arguments; (value, key, object). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forIn(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) + */ + var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, { + 'useHas': false + }); + + /** + * This method is like `_.forIn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forInRight(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'move', 'y', and 'x' assuming `_.forIn ` logs 'x', 'y', and 'move' + */ + function forInRight(object, callback, thisArg) { + var pairs = []; + + forIn(object, function(value, key) { + pairs.push(key, value); + }); + + var length = pairs.length; + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + if (callback(pairs[length--], pairs[length], object) === false) { + break; + } + } + return object; + } + + /** + * Iterates over own enumerable properties of an object, executing the callback + * for each property. The callback is bound to `thisArg` and invoked with three + * arguments; (value, key, object). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs '0', '1', and 'length' (property order is not guaranteed across environments) + */ + var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions); + + /** + * This method is like `_.forOwn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs 'length', '1', and '0' assuming `_.forOwn` logs '0', '1', and 'length' + */ + function forOwnRight(object, callback, thisArg) { + var props = keys(object), + length = props.length; + + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + var key = props[length]; + if (callback(object[key], key, object) === false) { + break; + } + } + return object; + } + + /** + * Creates a sorted array of property names of all enumerable properties, + * own and inherited, of `object` that have function values. + * + * @static + * @memberOf _ + * @alias methods + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names that have function values. + * @example + * + * _.functions(_); + * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] + */ + function functions(object) { + var result = []; + forIn(object, function(value, key) { + if (isFunction(value)) { + result.push(key); + } + }); + return result.sort(); + } + + /** + * Checks if the specified property name exists as a direct property of `object`, + * instead of an inherited property. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to check. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. + * @example + * + * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + * // => true + */ + function has(object, key) { + return object ? hasOwnProperty.call(object, key) : false; + } + + /** + * Creates an object composed of the inverted keys and values of the given object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to invert. + * @returns {Object} Returns the created inverted object. + * @example + * + * _.invert({ 'first': 'fred', 'second': 'barney' }); + * // => { 'fred': 'first', 'barney': 'second' } + */ + function invert(object) { + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + result[object[key]] = key; + } + return result; + } + + /** + * Checks if `value` is a boolean value. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @example + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + value && typeof value == 'object' && toString.call(value) == boolClass || false; + } + + /** + * Checks if `value` is a date. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + */ + function isDate(value) { + return value && typeof value == 'object' && toString.call(value) == dateClass || false; + } + + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + */ + function isElement(value) { + return value && value.nodeType === 1 || false; + } + + /** + * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a + * length of `0` and objects with no own enumerable properties are considered + * "empty". + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. + * @example + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({}); + * // => true + * + * _.isEmpty(''); + * // => true + */ + function isEmpty(value) { + var result = true; + if (!value) { + return result; + } + var className = toString.call(value), + length = value.length; + + if ((className == arrayClass || className == stringClass || + (support.argsClass ? className == argsClass : isArguments(value))) || + (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { + return !length; + } + forOwn(value, function() { + return (result = false); + }); + return result; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent to each other. If a callback is provided it will be executed + * to compare values. If the callback returns `undefined` comparisons will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (a, b). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'name': 'fred' }; + * var copy = { 'name': 'fred' }; + * + * object == copy; + * // => false + * + * _.isEqual(object, copy); + * // => true + * + * var words = ['hello', 'goodbye']; + * var otherWords = ['hi', 'goodbye']; + * + * _.isEqual(words, otherWords, function(a, b) { + * var reGreet = /^(?:hello|hi)$/i, + * aGreet = _.isString(a) && reGreet.test(a), + * bGreet = _.isString(b) && reGreet.test(b); + * + * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; + * }); + * // => true + */ + function isEqual(a, b, callback, thisArg) { + return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2)); + } + + /** + * Checks if `value` is, or can be coerced to, a finite number. + * + * Note: This is not the same as native `isFinite` which will return true for + * booleans and empty strings. See http://es5.github.io/#x15.1.2.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. + * @example + * + * _.isFinite(-101); + * // => true + * + * _.isFinite('10'); + * // => true + * + * _.isFinite(true); + * // => false + * + * _.isFinite(''); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + function isFinite(value) { + return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); + } + + /** + * Checks if `value` is a function. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + */ + function isFunction(value) { + return typeof value == 'function'; + } + // fallback for older versions of Chrome and Safari + if (isFunction(/x/)) { + isFunction = function(value) { + return typeof value == 'function' && toString.call(value) == funcClass; + }; + } + + /** + * 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]); + } + + /** + * Checks if `value` is `NaN`. + * + * Note: This is not the same as native `isNaN` which will return `true` for + * `undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // `NaN` as a primitive is the only value that is not equal to itself + // (perform the [[Class]] check first to avoid errors with some host objects in IE) + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(undefined); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is a number. + * + * Note: `NaN` is considered a number. See http://es5.github.io/#x8.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. + * @example + * + * _.isNumber(8.4 * 5); + * // => true + */ + function isNumber(value) { + return typeof value == 'number' || + value && typeof value == 'object' && toString.call(value) == numberClass || false; + } + + /** + * Checks if `value` is an object created by the `Object` constructor. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * _.isPlainObject(new Shape); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + */ + var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { + if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) { + return false; + } + var valueOf = value.valueOf, + objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); + + return objProto + ? (value == objProto || getPrototypeOf(value) == objProto) + : shimIsPlainObject(value); + }; + + /** + * Checks if `value` is a regular expression. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @example + * + * _.isRegExp(/fred/); + * // => true + */ + function isRegExp(value) { + return value && objectTypes[typeof value] && toString.call(value) == regexpClass || false; + } + + /** + * Checks if `value` is a string. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. + * @example + * + * _.isString('fred'); + * // => true + */ + function isString(value) { + return typeof value == 'string' || + value && typeof value == 'object' && toString.call(value) == stringClass || false; + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + */ + function isUndefined(value) { + return typeof value == 'undefined'; + } + + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new object with values of the results of each `callback` execution. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + * + * var characters = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // using "_.pluck" callback shorthand + * _.mapValues(characters, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } + */ + function mapValues(object, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + forOwn(object, function(value, key, object) { + result[key] = callback(value, key, object); + }); + return result; + } + + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * will overwrite property assignments of previous sources. If a callback is + * provided it will be executed to produce the merged values of the destination + * and source properties. If the callback returns `undefined` merging will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * var names = { + * 'characters': [ + * { 'name': 'barney' }, + * { 'name': 'fred' } + * ] + * }; + * + * var ages = { + * 'characters': [ + * { 'age': 36 }, + * { 'age': 40 } + * ] + * }; + * + * _.merge(names, ages); + * // => { 'characters': [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] } + * + * var food = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var otherFood = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(food, otherFood, function(a, b) { + * return _.isArray(a) ? a.concat(b) : undefined; + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } + */ + function merge(object) { + var args = arguments, + length = 2; + + if (!isObject(object)) { + return object; + } + // allows working with `_.reduce` and `_.reduceRight` without using + // their `index` and `collection` arguments + if (typeof args[2] != 'number') { + length = args.length; + } + if (length > 3 && typeof args[length - 2] == 'function') { + var callback = baseCreateCallback(args[--length - 1], args[length--], 2); + } else if (length > 2 && typeof args[length - 1] == 'function') { + callback = args[--length]; + } + var sources = slice(arguments, 1, length), + index = -1, + stackA = getArray(), + stackB = getArray(); + + while (++index < length) { + baseMerge(object, sources[index], callback, stackA, stackB); + } + releaseArray(stackA); + releaseArray(stackB); + return object; + } + + /** + * Creates a shallow clone of `object` excluding the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` omitting the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object without the omitted properties. + * @example + * + * _.omit({ 'name': 'fred', 'age': 40 }, 'age'); + * // => { 'name': 'fred' } + * + * _.omit({ 'name': 'fred', 'age': 40 }, function(value) { + * return typeof value == 'number'; + * }); + * // => { 'name': 'fred' } + */ + function omit(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var props = []; + forIn(object, function(value, key) { + props.push(key); + }); + props = baseDifference(props, baseFlatten(arguments, true, false, 1)); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + result[key] = object[key]; + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (!callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * Creates a two dimensional array of an object's key-value pairs, + * i.e. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments) + */ + function pairs(object) { + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; + } + + /** + * Creates a shallow clone of `object` composed of the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` picking the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object composed of the picked properties. + * @example + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, 'name'); + * // => { 'name': 'fred' } + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) { + * return key.charAt(0) != '_'; + * }); + * // => { 'name': 'fred' } + */ + function pick(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var index = -1, + props = baseFlatten(arguments, true, false, 1), + length = isObject(object) ? props.length : 0; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * An alternative to `_.reduce` this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable properties through a callback, with each callback execution + * potentially mutating the `accumulator` object. The callback is bound to + * `thisArg` and invoked with four arguments; (accumulator, value, key, object). + * Callbacks may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { + * num *= num; + * if (num % 2) { + * return result.push(num) < 3; + * } + * }); + * // => [1, 9, 25] + * + * var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function transform(object, callback, accumulator, thisArg) { + var isArr = isArray(object); + if (accumulator == null) { + if (isArr) { + accumulator = []; + } else { + var ctor = object && object.constructor, + proto = ctor && ctor.prototype; + + accumulator = baseCreate(proto); + } + } + if (callback) { + callback = lodash.createCallback(callback, thisArg, 4); + (isArr ? baseEach : forOwn)(object, function(value, index, object) { + return callback(accumulator, value, index, object); + }); + } + return accumulator; + } + + /** + * 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; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array of elements from the specified indexes, or keys, of the + * `collection`. Indexes may be specified as individual arguments or as arrays + * of indexes. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` + * to retrieve, specified as individual indexes or arrays of indexes. + * @returns {Array} Returns a new array of elements corresponding to the + * provided indexes. + * @example + * + * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); + * // => ['a', 'c', 'e'] + * + * _.at(['fred', 'barney', 'pebbles'], 0, 2); + * // => ['fred', 'pebbles'] + */ + function at(collection) { + var args = arguments, + index = -1, + props = baseFlatten(args, true, false, 1), + length = (args[2] && args[2][args[1]] === collection) ? 1 : props.length, + result = Array(length); + + if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + while(++index < length) { + result[index] = collection[props[index]]; + } + return result; + } + + /** + * Checks if a given value is present in a collection using strict equality + * for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the + * offset from the end of the collection. + * + * @static + * @memberOf _ + * @alias include + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. + * @example + * + * _.contains([1, 2, 3], 1); + * // => true + * + * _.contains([1, 2, 3], 1, 2); + * // => false + * + * _.contains({ 'name': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.contains('pebbles', 'eb'); + * // => true + */ + function contains(collection, target, fromIndex) { + var index = -1, + indexOf = getIndexOf(), + length = collection ? collection.length : 0, + result = false; + + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; + if (isArray(collection)) { + result = indexOf(collection, target, fromIndex) > -1; + } else if (typeof length == 'number') { + result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1; + } else { + baseEach(collection, function(value) { + if (++index >= fromIndex) { + return !(result = value === target); + } + }); + } + return result; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through the callback. The corresponding value + * of each key is the number of times the key was returned by the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1); + }); + + /** + * Checks if the given callback returns truey value for **all** elements of + * a collection. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes']); + * // => false + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.every(characters, 'age'); + * // => true + * + * // using "_.where" callback shorthand + * _.every(characters, { 'age': 36 }); + * // => false + */ + function every(collection, callback, thisArg) { + var result = true; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (!(result = !!callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return (result = !!callback(value, index, collection)); + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning an array of all elements + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that passed the callback check. + * @example + * + * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [2, 4, 6] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.filter(characters, 'blocked'); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + * + * // using "_.where" callback shorthand + * _.filter(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + */ + function filter(collection, callback, thisArg) { + var result = []; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + result.push(value); + } + } + } else { + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result.push(value); + } + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning the first element that + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias detect, findWhere + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.find(characters, function(chr) { + * return chr.age < 40; + * }); + * // => { 'name': 'barney', 'age': 36, 'blocked': false } + * + * // using "_.where" callback shorthand + * _.find(characters, { 'age': 1 }); + * // => { 'name': 'pebbles', 'age': 1, 'blocked': false } + * + * // using "_.pluck" callback shorthand + * _.find(characters, 'blocked'); + * // => { 'name': 'fred', 'age': 40, 'blocked': true } + */ + function find(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + return value; + } + } + } else { + var result; + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + } + + /** + * This method is like `_.find` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(num) { + * return num % 2 == 1; + * }); + * // => 3 + */ + function findLast(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forEachRight(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + + /** + * Iterates over elements of a collection, executing the callback for each + * element. The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * Note: As with other "Collections" methods, objects with a `length` property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); + * // => logs each number and returns '1,2,3' + * + * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); }); + * // => logs each number and returns the object (property order is not guaranteed across environments) + */ + function forEach(collection, callback, thisArg) { + if (callback && typeof thisArg == 'undefined' && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (callback(collection[index], index, collection) === false) { + break; + } + } + } else { + baseEach(collection, callback, thisArg); + } + return collection; + } + + /** + * This method is like `_.forEach` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); + * // => logs each number from right to left and returns '3,2,1' + */ + function forEachRight(collection, callback, thisArg) { + var iterable = collection, + length = collection ? collection.length : 0; + + callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (length--) { + if (callback(collection[length], length, collection) === false) { + break; + } + } + } else { + if (typeof length != 'number') { + var props = keys(collection); + length = props.length; + } else if (support.unindexedChars && isString(collection)) { + iterable = collection.split(''); + } + baseEach(collection, function(value, key, collection) { + key = props ? props[--length] : --length; + return callback(iterable[key], key, collection); + }); + } + return collection; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of a collection through the callback. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false` + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using "_.pluck" callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value); + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of the collection through the given callback. The corresponding + * value of each key is the last element responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keys = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keys, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keys, function(key) { return String.fromCharCode(key.code); }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + + /** + * Invokes the method named by `methodName` on each element in the `collection` + * returning an array of the results of each invoked method. Additional arguments + * will be provided to each invoked method. If `methodName` is a function it + * will be invoked for, and `this` bound to, each element in the `collection`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|string} methodName The name of the method to invoke or + * the function invoked per iteration. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {Array} Returns a new array of the results of each invoked method. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + function invoke(collection, methodName) { + var args = slice(arguments, 2), + index = -1, + isFunc = typeof methodName == 'function', + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args); + }); + return result; + } + + /** + * Creates an array of values by running each element in the collection + * through the callback. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias collect + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of the results of each `callback` execution. + * @example + * + * _.map([1, 2, 3], function(num) { return num * 3; }); + * // => [3, 6, 9] + * + * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); + * // => [3, 6, 9] (property order is not guaranteed across environments) + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(characters, 'name'); + * // => ['barney', 'fred'] + */ + function map(collection, callback, thisArg) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + callback = lodash.createCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (++index < length) { + result[index] = callback(collection[index], index, collection); + } + } else { + baseEach(collection, function(value, key, collection) { + result[++index] = callback(value, key, collection); + }); + } + return result; + } + + /** + * Retrieves the maximum value of a collection. If the collection is empty or + * falsey `-Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.max(characters, function(chr) { return chr.age; }); + * // => { 'name': 'fred', 'age': 40 }; + * + * // using "_.pluck" callback shorthand + * _.max(characters, 'age'); + * // => { 'name': 'fred', 'age': 40 }; + */ + function max(collection, callback, thisArg) { + var computed = -Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value > result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current > computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the minimum value of a collection. If the collection is empty or + * falsey `Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.min(characters, function(chr) { return chr.age; }); + * // => { 'name': 'barney', 'age': 36 }; + * + * // using "_.pluck" callback shorthand + * _.min(characters, 'age'); + * // => { 'name': 'barney', 'age': 36 }; + */ + function min(collection, callback, thisArg) { + var computed = Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value < result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current < computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the value of a specified property from all elements in the collection. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {string} property The name of the property to pluck. + * @returns {Array} Returns a new array of property values. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.pluck(characters, 'name'); + * // => ['barney', 'fred'] + */ + var pluck = map; + + /** + * Reduces a collection to a value which is the accumulated result of running + * each element in the collection through the callback, where each successive + * callback execution consumes the return value of the previous execution. If + * `accumulator` is not provided the first element of the collection will be + * used as the initial `accumulator` value. The callback is bound to `thisArg` + * and invoked with four arguments; (accumulator, value, index|key, collection). + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var sum = _.reduce([1, 2, 3], function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function reduce(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + if (noaccum) { + accumulator = collection[++index]; + } + while (++index < length) { + accumulator = callback(accumulator, collection[index], index, collection); + } + } else { + baseEach(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection) + }); + } + return accumulator; + } + + /** + * This method is like `_.reduce` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var list = [[0, 1], [2, 3], [4, 5]]; + * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + forEachRight(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The opposite of `_.filter` this method returns the elements of a + * collection that the callback does **not** return truey for. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that failed the callback check. + * @example + * + * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [1, 3, 5] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.reject(characters, 'blocked'); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + * + * // using "_.where" callback shorthand + * _.reject(characters, { 'age': 36 }); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + */ + function reject(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + return filter(collection, function(value, index, collection) { + return !callback(value, index, collection); + }); + } + + /** + * Retrieves a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Allows working with functions like `_.map` + * without using their `index` arguments as `n`. + * @returns {Array} Returns the random sample(s) of `collection`. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + function sample(collection, n, guard) { + if (collection && typeof collection.length != 'number') { + collection = values(collection); + } else if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + if (n == null || guard) { + return collection ? collection[baseRandom(0, collection.length - 1)] : undefined; + } + var result = shuffle(collection); + result.length = nativeMin(nativeMax(0, n), result.length); + return result; + } + + /** + * Creates an array of shuffled values, using a version of the Fisher-Yates + * shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns a new shuffled collection. + * @example + * + * _.shuffle([1, 2, 3, 4, 5, 6]); + * // => [4, 1, 6, 3, 5, 2] + */ + function shuffle(collection) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + var rand = baseRandom(0, ++index); + result[index] = result[rand]; + result[rand] = value; + }); + return result; + } + + /** + * Gets the size of the `collection` by returning `collection.length` for arrays + * and array-like objects or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. + * @example + * + * _.size([1, 2]); + * // => 2 + * + * _.size({ 'one': 1, 'two': 2, 'three': 3 }); + * // => 3 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + var length = collection ? collection.length : 0; + return typeof length == 'number' ? length : keys(collection).length; + } + + /** + * Checks if the callback returns a truey value for **any** element of a + * collection. The function returns as soon as it finds a passing value and + * does not iterate over the entire collection. The callback is bound to + * `thisArg` and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.some(characters, 'blocked'); + * // => true + * + * // using "_.where" callback shorthand + * _.some(characters, { 'age': 1 }); + * // => false + */ + function some(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if ((result = callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return !(result = callback(value, index, collection)); + }); + } + return !!result; + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through the callback. This method + * performs a stable sort, that is, it will preserve the original sort order + * of equal elements. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an array of property names is provided for `callback` the collection + * will be sorted by each property value. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of sorted elements. + * @example + * + * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); + * // => [3, 1, 2] + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 26 }, + * { 'name': 'fred', 'age': 30 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(_.sortBy(characters, 'age'), _.values); + * // => [['barney', 26], ['fred', 30], ['barney', 36], ['fred', 40]] + * + * // sorting by multiple properties + * _.map(_.sortBy(characters, ['name', 'age']), _.values); + * // = > [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]] + */ + function sortBy(collection, callback, thisArg) { + var index = -1, + isArr = isArray(callback), + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + if (!isArr) { + callback = lodash.createCallback(callback, thisArg, 3); + } + forEach(collection, function(value, key, collection) { + var object = result[++index] = getObject(); + if (isArr) { + object.criteria = map(callback, function(key) { return value[key]; }); + } else { + (object.criteria = getArray())[0] = callback(value, key, collection); + } + object.index = index; + object.value = value; + }); + + length = result.length; + result.sort(compareAscending); + while (length--) { + var object = result[length]; + result[length] = object.value; + if (!isArr) { + releaseArray(object.criteria); + } + releaseObject(object); + } + return result; + } + + /** + * Converts the `collection` to an array. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to convert. + * @returns {Array} Returns the new converted array. + * @example + * + * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); + * // => [2, 3, 4] + */ + function toArray(collection) { + if (collection && typeof collection.length == 'number') { + return (support.unindexedChars && isString(collection)) + ? collection.split('') + : slice(collection); + } + return values(collection); + } + + /** + * Performs a deep comparison of each element in a `collection` to the given + * `properties` object, returning an array of all elements that have equivalent + * property values. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Object} props The object of property values to filter by. + * @returns {Array} Returns a new array of elements that have the given properties. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.where(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }] + * + * _.where(characters, { 'pets': ['dino'] }); + * // => [{ 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] }] + */ + var where = filter; + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are all falsey. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to compact. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result.push(value); + } + } + return result; + } + + /** + * Creates an array excluding all values of the provided arrays using strict + * equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to process. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); + * // => [1, 3, 4] + */ + function difference(array) { + return baseDifference(array, baseFlatten(arguments, true, true, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.findIndex(characters, function(chr) { + * return chr.age < 20; + * }); + * // => 2 + * + * // using "_.where" callback shorthand + * _.findIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findIndex(characters, 'blocked'); + * // => 1 + */ + function findIndex(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + if (callback(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of a `collection` from right to left. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': true }, + * { 'name': 'fred', 'age': 40, 'blocked': false }, + * { 'name': 'pebbles', 'age': 1, 'blocked': true } + * ]; + * + * _.findLastIndex(characters, function(chr) { + * return chr.age > 30; + * }); + * // => 1 + * + * // using "_.where" callback shorthand + * _.findLastIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findLastIndex(characters, 'blocked'); + * // => 2 + */ + function findLastIndex(array, callback, thisArg) { + var length = array ? array.length : 0; + callback = lodash.createCallback(callback, thisArg, 3); + while (length--) { + if (callback(array[length], length, array)) { + return length; + } + } + return -1; + } + + /** + * Gets the first element or first `n` elements of an array. If a callback + * is provided elements at the beginning of the array are returned as long + * as the callback returns truey. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias head, take + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([1, 2, 3], 2); + * // => [1, 2] + * + * _.first([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [1, 2] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.first(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': true, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.first(characters, { 'employer': 'slate' }), 'name'); + * // => ['barney', 'fred'] + */ + function first(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = -1; + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[0] : undefined; + } + } + return slice(array, 0, nativeMin(nativeMax(0, n), length)); + } + + /** + * Flattens a nested array (the nesting can be to any depth). If `isShallow` + * is truey, the array will only be flattened a single level. If a callback + * is provided each element of the array is passed through the callback before + * flattening. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new flattened array. + * @example + * + * _.flatten([1, [2], [3, [[4]]]]); + * // => [1, 2, 3, 4]; + * + * _.flatten([1, [2], [3, [[4]]]], true); + * // => [1, 2, 3, [[4]]]; + * + * var characters = [ + * { 'name': 'barney', 'age': 30, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * // using "_.pluck" callback shorthand + * _.flatten(characters, 'pets'); + * // => ['hoppy', 'baby puss', 'dino'] + */ + function flatten(array, isShallow, callback, thisArg) { + // juggle arguments + if (typeof isShallow != 'boolean' && isShallow != null) { + thisArg = callback; + callback = (typeof isShallow != 'function' && thisArg && thisArg[isShallow] === array) ? null : isShallow; + isShallow = false; + } + if (callback != null) { + array = map(array, callback, thisArg); + } + return baseFlatten(array, isShallow); + } + + /** + * Gets the index at which the first occurrence of `value` is found using + * strict equality for comparisons, i.e. `===`. If the array is already sorted + * providing `true` for `fromIndex` will run a faster binary search. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2); + * // => 1 + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 4 + * + * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); + * // => 2 + */ + function indexOf(array, value, fromIndex) { + if (typeof fromIndex == 'number') { + var length = array ? array.length : 0; + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0); + } else if (fromIndex) { + var index = sortedIndex(array, value); + return array[index] === value ? index : -1; + } + return baseIndexOf(array, value, fromIndex); + } + + /** + * Gets all but the last element or last `n` elements of an array. If a + * callback is provided elements at the end of the array are excluded from + * the result as long as the callback returns truey. The callback is bound + * to `thisArg` and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + * + * _.initial([1, 2, 3], 2); + * // => [1] + * + * _.initial([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [1] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.initial(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': false, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.initial(characters, { 'employer': 'na' }), 'name'); + * // => ['barney', 'fred'] + */ + function initial(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : callback || n; + } + return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); + } + + /** + * Creates an array of unique values present in all provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of shared values. + * @example + * + * _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2] + */ + function intersection() { + var args = [], + argsIndex = -1, + argsLength = arguments.length, + caches = getArray(), + indexOf = getIndexOf(), + trustIndexOf = indexOf === baseIndexOf, + seen = getArray(); + + while (++argsIndex < argsLength) { + var value = arguments[argsIndex]; + if (isArray(value) || isArguments(value)) { + args.push(value); + caches.push(trustIndexOf && value.length >= largeArraySize && + createCache(argsIndex ? args[argsIndex] : seen)); + } + } + var array = args[0], + index = -1, + length = array ? array.length : 0, + result = []; + + outer: + while (++index < length) { + var cache = caches[0]; + value = array[index]; + + if ((cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0) { + argsIndex = argsLength; + (cache || seen).push(value); + while (--argsIndex) { + cache = caches[argsIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) { + continue outer; + } + } + result.push(value); + } + } + while (argsLength--) { + cache = caches[argsLength]; + if (cache) { + releaseObject(cache); + } + } + releaseArray(caches); + releaseArray(seen); + return result; + } + + /** + * Gets the last element or last `n` elements of an array. If a callback is + * provided elements at the end of the array are returned as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + * + * _.last([1, 2, 3], 2); + * // => [2, 3] + * + * _.last([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [2, 3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.last(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.last(characters, { 'employer': 'na' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function last(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[length - 1] : undefined; + } + } + return slice(array, nativeMax(0, length - n)); + } + + /** + * Gets the index at which the last occurrence of `value` is found using strict + * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used + * as the offset from the end of the collection. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); + * // => 4 + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var index = array ? array.length : 0; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * Removes all provided values from the given array using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + function pull(array) { + var args = arguments, + argsIndex = 0, + argsLength = args.length, + length = array ? array.length : 0; + + while (++argsIndex < argsLength) { + var index = -1, + value = args[argsIndex]; + while (++index < length) { + if (array[index] === value) { + splice.call(array, index--, 1); + length--; + } + } + } + return array; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to but not including `end`. If `start` is less than `stop` a + * zero-length range is created unless a negative `step` is specified. + * + * @static + * @memberOf _ + * @category Arrays + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns a new range array. + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + function range(start, end, step) { + start = +start || 0; + step = typeof step == 'number' ? step : (+step || 1); + + if (end == null) { + end = start; + start = 0; + } + // use `Array(length)` so engines like Chakra and V8 avoid slower modes + // http://youtu.be/XAqIpGU8ZZk#t=17m25s + var index = -1, + length = nativeMax(0, ceil((end - start) / (step || 1))), + result = Array(length); + + while (++index < length) { + result[index] = start; + start += step; + } + return result; + } + + /** + * Removes all elements from an array that the callback returns truey for + * and returns an array of removed elements. The callback is bound to `thisArg` + * and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4, 5, 6]; + * var evens = _.remove(array, function(num) { return num % 2 == 0; }); + * + * console.log(array); + * // => [1, 3, 5] + * + * console.log(evens); + * // => [2, 4, 6] + */ + function remove(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0, + result = []; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (callback(value, index, array)) { + result.push(value); + splice.call(array, index--, 1); + length--; + } + } + return result; + } + + /** + * The opposite of `_.initial` this method gets all but the first element or + * first `n` elements of an array. If a callback function is provided elements + * at the beginning of the array are excluded from the result as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias drop, tail + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + * + * _.rest([1, 2, 3], 2); + * // => [3] + * + * _.rest([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.rest(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.rest(characters, { 'employer': 'slate' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function rest(array, callback, thisArg) { + if (typeof callback != 'number' && callback != null) { + var n = 0, + index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : nativeMax(0, callback); + } + return slice(array, n); + } + + /** + * Uses a binary search to determine the smallest index at which a value + * should be inserted into a given sorted array in order to maintain the sort + * order of the array. If a callback is provided it will be executed for + * `value` and each element of `array` to compute their sort ranking. The + * callback is bound to `thisArg` and invoked with one argument; (value). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([20, 30, 50], 40); + * // => 2 + * + * // using "_.pluck" callback shorthand + * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 2 + * + * var dict = { + * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } + * }; + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return dict.wordToNumber[word]; + * }); + * // => 2 + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return this.wordToNumber[word]; + * }, dict); + * // => 2 + */ + function sortedIndex(array, value, callback, thisArg) { + var low = 0, + high = array ? array.length : low; + + // explicitly reference `identity` for better inlining in Firefox + callback = callback ? lodash.createCallback(callback, thisArg, 1) : identity; + value = callback(value); + + while (low < high) { + var mid = (low + high) >>> 1; + (callback(array[mid]) < value) + ? low = mid + 1 + : high = mid; + } + return low; + } + + /** + * Creates an array of unique values, in order, of the provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of combined values. + * @example + * + * _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2, 3, 5, 4] + */ + function union() { + return baseUniq(baseFlatten(arguments, true, true)); + } + + /** + * Creates a duplicate-value-free version of an array using strict equality + * for comparisons, i.e. `===`. If the array is sorted, providing + * `true` for `isSorted` will use a faster algorithm. If a callback is provided + * each element of `array` is passed through the callback before uniqueness + * is computed. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Arrays + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a duplicate-value-free array. + * @example + * + * _.uniq([1, 2, 1, 3, 1]); + * // => [1, 2, 3] + * + * _.uniq([1, 1, 2, 2, 3], true); + * // => [1, 2, 3] + * + * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); }); + * // => ['A', 'b', 'C'] + * + * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math); + * // => [1, 2.5, 3] + * + * // using "_.pluck" callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniq(array, isSorted, callback, thisArg) { + // juggle arguments + if (typeof isSorted != 'boolean' && isSorted != null) { + thisArg = callback; + callback = (typeof isSorted != 'function' && thisArg && thisArg[isSorted] === array) ? null : isSorted; + isSorted = false; + } + if (callback != null) { + callback = lodash.createCallback(callback, thisArg, 3); + } + return baseUniq(array, isSorted, callback); + } + + /** + * Creates an array excluding all provided values using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); + * // => [2, 3, 4] + */ + function without(array) { + return baseDifference(array, slice(arguments, 1)); + } + + /** + * Creates an array that is the symmetric difference of the provided arrays. + * See http://en.wikipedia.org/wiki/Symmetric_difference. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of values. + * @example + * + * _.xor([1, 2, 3], [5, 2, 1, 4]); + * // => [3, 5, 4] + * + * _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); + * // => [1, 4, 5] + */ + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArray(array) || isArguments(array)) { + var result = result + ? baseUniq(baseDifference(result, array).concat(baseDifference(array, result))) + : array; + } + } + return result || []; + } + + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second + * elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @alias unzip + * @category Arrays + * @param {...Array} [array] Arrays to process. + * @returns {Array} Returns a new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + function zip() { + var array = arguments.length > 1 ? arguments : arguments[0], + index = -1, + length = array ? max(pluck(array, 'length')) : 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = pluck(array, index); + } + return result; + } + + /** + * Creates an object composed from arrays of `keys` and `values`. Provide + * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` + * or two arrays, one of `keys` and one of corresponding `values`. + * + * @static + * @memberOf _ + * @alias object + * @category Arrays + * @param {Array} keys The array of keys. + * @param {Array} [values=[]] The array of values. + * @returns {Object} Returns an object composed of the given keys and + * corresponding values. + * @example + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + function zipObject(keys, values) { + var index = -1, + length = keys ? keys.length : 0, + result = {}; + + if (!values && length && !isArray(keys[0])) { + values = []; + } + while (++index < length) { + var key = keys[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that executes `func`, with the `this` binding and + * arguments of the created function, only after being called `n` times. + * + * @static + * @memberOf _ + * @category Functions + * @param {number} n The number of times the function must be called before + * `func` is executed. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('Done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'Done saving!', after all saves have completed + */ + function after(n, func) { + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that, when called, invokes `func` with the `this` + * binding of `thisArg` and prepends any additional `bind` arguments to those + * provided to the bound function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var func = function(greeting) { + * return greeting + ' ' + this.name; + * }; + * + * func = _.bind(func, { 'name': 'fred' }, 'hi'); + * func(); + * // => 'hi fred' + */ + function bind(func, thisArg) { + return arguments.length > 2 + ? createWrapper(func, 17, slice(arguments, 2), null, thisArg) + : createWrapper(func, 1, null, null, thisArg); + } + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all the function properties + * of `object` will be bound. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to + * bind, specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { console.log('clicked ' + this.label); } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs', when the button is clicked + */ + function bindAll(object) { + var funcs = arguments.length > 1 ? baseFlatten(arguments, true, false, 1) : functions(object), + index = -1, + length = funcs.length; + + while (++index < length) { + var key = funcs[index]; + object[key] = createWrapper(object[key], 1, null, null, object); + } + return object; + } + + /** + * Creates a function that, when called, invokes the method at `object[key]` + * and prepends any additional `bindKey` arguments to those provided to the bound + * function. This method differs from `_.bind` by allowing bound functions to + * reference methods that will be redefined or don't yet exist. + * See http://michaux.ca/articles/lazy-function-definition-pattern. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'name': 'fred', + * 'greet': function(greeting) { + * return greeting + ' ' + this.name; + * } + * }; + * + * var func = _.bindKey(object, 'greet', 'hi'); + * func(); + * // => 'hi fred' + * + * object.greet = function(greeting) { + * return greeting + 'ya ' + this.name + '!'; + * }; + * + * func(); + * // => 'hiya fred!' + */ + function bindKey(object, key) { + return arguments.length > 2 + ? createWrapper(key, 19, slice(arguments, 2), null, object) + : createWrapper(key, 3, null, null, object); + } + + /** + * Creates a function that is the composition of the provided functions, + * where each function consumes the return value of the function that follows. + * For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + * Each function is executed with the `this` binding of the composed function. + * + * @static + * @memberOf _ + * @category Functions + * @param {...Function} [func] Functions to compose. + * @returns {Function} Returns the new composed function. + * @example + * + * var realNameMap = { + * 'pebbles': 'penelope' + * }; + * + * var format = function(name) { + * name = realNameMap[name.toLowerCase()] || name; + * return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase(); + * }; + * + * var greet = function(formatted) { + * return 'Hiya ' + formatted + '!'; + * }; + * + * var welcome = _.compose(greet, format); + * welcome('pebbles'); + * // => 'Hiya Penelope!' + */ + function compose() { + var funcs = arguments, + length = funcs.length; + + while (length--) { + if (!isFunction(funcs[length])) { + throw new TypeError; + } + } + return function() { + var args = arguments, + length = funcs.length; + + while (length--) { + args = [funcs[length].apply(this, args)]; + } + return args[0]; + }; + } + + /** + * Creates a function which accepts one or more arguments of `func` that when + * invoked either executes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` can be specified + * if `func.length` is not sufficient. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {Function} Returns the new curried function. + * @example + * + * var curried = _.curry(function(a, b, c) { + * console.log(a + b + c); + * }); + * + * curried(1)(2)(3); + * // => 6 + * + * curried(1, 2)(3); + * // => 6 + * + * curried(1, 2, 3); + * // => 6 + */ + function curry(func, arity) { + arity = typeof arity == 'number' ? arity : (+arity || func.length); + return createWrapper(func, 4, null, null, null, arity); + } + + /** + * Creates a function that will delay the execution of `func` until after + * `wait` milliseconds have elapsed since the last time it was invoked. + * Provide an options object to indicate that `func` should be invoked on + * the leading and/or trailing edge of the `wait` timeout. Subsequent calls + * to the debounced function will return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * var lazyLayout = _.debounce(calculateLayout, 150); + * jQuery(window).on('resize', lazyLayout); + * + * // execute `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * }); + * + * // ensure `batchLog` is executed once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * source.addEventListener('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * }, false); + */ + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + wait = nativeMax(0, wait) || 0; + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = options.leading; + maxWait = 'maxWait' in options && (nativeMax(wait, options.maxWait) || 0); + trailing = 'trailing' in options ? options.trailing : trailing; + } + var delayed = function() { + var remaining = wait - (now() - stamp); + if (remaining <= 0) { + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + var isCalled = trailingCall; + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + } else { + timeoutId = setTimeout(delayed, remaining); + } + }; + + var maxDelayed = function() { + if (timeoutId) { + clearTimeout(timeoutId); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (trailing || (maxWait !== wait)) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + }; + + return function() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + return result; + }; + } + + /** + * Defers executing the `func` function until the current call stack has cleared. + * Additional arguments will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { console.log(text); }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + function defer(func) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 1); + return setTimeout(function() { func.apply(undefined, args); }, 1); + } + + /** + * Executes the `func` function after `wait` milliseconds. Additional arguments + * will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { console.log(text); }, 1000, 'later'); + * // => logs 'later' after one second + */ + function delay(func, wait) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 2); + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it will be used to determine the cache key for storing the result + * based on the arguments provided to the memoized function. By default, the + * first argument provided to the memoized function is used as the cache key. + * The `func` is executed with the `this` binding of the memoized function. + * The result cache is exposed as the `cache` property on the memoized function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] A function used to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var fibonacci = _.memoize(function(n) { + * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); + * }); + * + * fibonacci(9) + * // => 34 + * + * var data = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // modifying the result cache + * var get = _.memoize(function(name) { return data[name]; }, _.identity); + * get('pebbles'); + * // => { 'name': 'pebbles', 'age': 1 } + * + * get.cache.pebbles.name = 'penelope'; + * get('pebbles'); + * // => { 'name': 'penelope', 'age': 1 } + */ + function memoize(func, resolver) { + if (!isFunction(func)) { + throw new TypeError; + } + var memoized = function() { + var cache = memoized.cache, + key = resolver ? resolver.apply(this, arguments) : keyPrefix + arguments[0]; + + return hasOwnProperty.call(cache, key) + ? cache[key] + : (cache[key] = func.apply(this, arguments)); + } + memoized.cache = {}; + return memoized; + } + + /** + * Creates a function that is restricted to execute `func` once. Repeat calls to + * the function will return the value of the first call. The `func` is executed + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` executes `createApplication` once + */ + function once(func) { + var ran, + result; + + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (ran) { + return result; + } + ran = true; + result = func.apply(this, arguments); + + // clear the `func` variable so the function may be garbage collected + func = null; + return result; + }; + } + + /** + * Creates a function that, when called, invokes `func` with any additional + * `partial` arguments prepended to those provided to the new function. This + * method is similar to `_.bind` except it does **not** alter the `this` binding. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { return greeting + ' ' + name; }; + * var hi = _.partial(greet, 'hi'); + * hi('fred'); + * // => 'hi fred' + */ + function partial(func) { + return createWrapper(func, 16, slice(arguments, 1)); + } + + /** + * This method is like `_.partial` except that `partial` arguments are + * appended to those provided to the new function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var defaultsDeep = _.partialRight(_.merge, _.defaults); + * + * var options = { + * 'variable': 'data', + * 'imports': { 'jq': $ } + * }; + * + * defaultsDeep(options, _.templateSettings); + * + * options.variable + * // => 'data' + * + * options.imports + * // => { '_': _, 'jq': $ } + */ + function partialRight(func) { + return createWrapper(func, 32, null, slice(arguments, 1)); + } + + /** + * Creates a function that, when executed, will only call the `func` function + * at most once per every `wait` milliseconds. Provide an options object to + * indicate that `func` should be invoked on the leading and/or trailing edge + * of the `wait` timeout. Subsequent calls to the throttled function will + * return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * var throttled = _.throttle(updatePosition, 100); + * jQuery(window).on('scroll', throttled); + * + * // execute `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? options.leading : leading; + trailing = 'trailing' in options ? options.trailing : trailing; + } + debounceOptions.leading = leading; + debounceOptions.maxWait = wait; + debounceOptions.trailing = trailing; + + return debounce(func, wait, debounceOptions); + } + + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Additional arguments provided to the function are appended + * to those provided to the wrapper function. The wrapper is executed with + * the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('Fred, Wilma, & Pebbles'); + * // => '

Fred, Wilma, & Pebbles

' + */ + function wrap(value, wrapper) { + return createWrapper(wrapper, 16, [value]); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'name': 'fred' }; + * var getter = _.constant(object); + * getter() === object; + * // => true + */ + function constant(value) { + return function() { + return value; + }; + } + + /** + * Produces a callback bound to an optional `thisArg`. If `func` is a property + * name the created callback will return the property value for a given element. + * If `func` is an object the created callback will return `true` for elements + * that contain the equivalent object properties, otherwise it will return `false`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // wrap to create custom callback shorthands + * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { + * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); + * return !match ? func(callback, thisArg) : function(object) { + * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; + * }; + * }); + * + * _.filter(characters, 'age__gt38'); + * // => [{ 'name': 'fred', 'age': 40 }] + */ + function createCallback(func, thisArg, argCount) { + var type = typeof func; + if (func == null || type == 'function') { + return baseCreateCallback(func, thisArg, argCount); + } + // handle "_.pluck" style callback shorthands + if (type != 'object') { + return property(func); + } + var props = keys(func), + key = props[0], + a = func[key]; + + // handle "_.where" style callback shorthands + if (props.length == 1 && a === a && !isObject(a)) { + // fast path the common case of providing an object with a single + // property containing a primitive value + return function(object) { + var b = object[key]; + return a === b && (a !== 0 || (1 / a == 1 / b)); + }; + } + return function(object) { + var length = props.length, + result = false; + + while (length--) { + if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) { + break; + } + } + return result; + }; + } + + /** + * 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); + } + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'name': 'fred' }; + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + /** + * Adds function properties of a source object to the destination object. + * If `object` is a function methods will be added to its prototype as well. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Function|Object} [object=lodash] object The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options] The options object. + * @param {boolean} [options.chain=true] Specify whether the functions added are chainable. + * @example + * + * function capitalize(string) { + * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); + * } + * + * _.mixin({ 'capitalize': capitalize }); + * _.capitalize('fred'); + * // => 'Fred' + * + * _('fred').capitalize().value(); + * // => 'Fred' + * + * _.mixin({ 'capitalize': capitalize }, { 'chain': false }); + * _('fred').capitalize(); + * // => 'Fred' + */ + function mixin(object, source, options) { + var chain = true, + methodNames = source && functions(source); + + if (!source || (!options && !methodNames.length)) { + if (options == null) { + options = source; + } + ctor = lodashWrapper; + source = object; + object = lodash; + methodNames = functions(source); + } + if (options === false) { + chain = false; + } else if (isObject(options) && 'chain' in options) { + chain = options.chain; + } + var ctor = object, + isFunc = isFunction(ctor); + + forEach(methodNames, function(methodName) { + var func = object[methodName] = source[methodName]; + if (isFunc) { + ctor.prototype[methodName] = function() { + var chainAll = this.__chain__, + value = this.__wrapped__, + args = [value]; + + push.apply(args, arguments); + var result = func.apply(object, args); + if (chain || chainAll) { + if (value === result && isObject(result)) { + return this; + } + result = new ctor(result); + result.__chain__ = chainAll; + } + return result; + }; + } + }); + } + + /** + * Reverts the '_' variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @memberOf _ + * @category Utilities + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + context._ = oldDash; + return this; + } + + /** + * A no-operation function. + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var object = { 'name': 'fred' }; + * _.noop(object) === undefined; + * // => true + */ + function noop() { + // no operation performed + } + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var stamp = _.now(); + * _.defer(function() { console.log(_.now() - stamp); }); + * // => logs the number of milliseconds it took for the deferred function to be called + */ + var now = isNative(now = Date.now) && now || function() { + return new Date().getTime(); + }; + + /** + * Converts the given value into an integer of the specified radix. + * If `radix` is `undefined` or `0` a `radix` of `10` is used unless the + * `value` is a hexadecimal, in which case a `radix` of `16` is used. + * + * Note: This method avoids differences in native ES3 and ES5 `parseInt` + * implementations. See http://es5.github.io/#E. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. + * @example + * + * _.parseInt('08'); + * // => 8 + */ + var parseInt = nativeParseInt(whitespace + '08') == 8 ? nativeParseInt : function(value, radix) { + // Firefox < 21 and Opera < 15 follow the ES3 specified implementation of `parseInt` + return nativeParseInt(isString(value) ? value.replace(reLeadingSpacesAndZeros, '') : value, radix || 0); + }; + + /** + * Creates a "_.pluck" style function, which returns the `key` value of a + * given object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} key The name of the property to retrieve. + * @returns {Function} Returns the new function. + * @example + * + * var characters = [ + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 36 } + * ]; + * + * var getName = _.property('name'); + * + * _.map(characters, getName); + * // => ['barney', 'fred'] + * + * _.sortBy(characters, getName); + * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] + */ + function property(key) { + return function(object) { + return object[key]; + }; + } + + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number will be + * returned. If `floating` is truey or either `min` or `max` are floats a + * floating-point number will be returned instead of an integer. + * + * @static + * @memberOf _ + * @category Utilities + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating=false] Specify returning a floating-point number. + * @returns {number} Returns a random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(min, max, floating) { + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (typeof min == 'boolean' && noMax) { + floating = min; + min = 1; + } + else if (!noMax && typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand +'').length - 1)))), max); + } + return baseRandom(min, max); + } + + /** + * Resolves the value of property `key` on `object`. If `key` is a function + * it will be invoked with the `this` binding of `object` and its result returned, + * else the property value is returned. If `object` is falsey then `undefined` + * is returned. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to resolve. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { + * 'cheese': 'crumpets', + * 'stuff': function() { + * return 'nonsense'; + * } + * }; + * + * _.result(object, 'cheese'); + * // => 'crumpets' + * + * _.result(object, 'stuff'); + * // => 'nonsense' + */ + function result(object, key) { + if (object) { + var value = object[key]; + return isFunction(value) ? object[key]() : value; + } + } + + /** + * 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('<%- value %>', { 'value': '\n```\n\nUsing [`npm`](http://npmjs.org/):\n\n```bash\nnpm i --save lodash\n\n{sudo} npm i -g lodash\nnpm ln lodash\n```\n\nIn [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/):\n\n```js\nvar _ = require('lodash');\n// or as Underscore\nvar _ = require('lodash/dist/lodash.underscore');\n```\n\n**Notes:**\n * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL\n * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('lodash.js');\n```\n\nIn an AMD loader:\n\n```js\nrequire({\n 'packages': [\n { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }\n ]\n},\n['lodash'], function(_) {\n console.log(_.VERSION);\n});\n```\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\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", + "readmeFilename": "README.md", + "_id": "lodash@2.4.1", + "_from": "lodash@^2.4.1", + "scripts": {} +} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/index.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/index.js index 9549c96..cb0afc2 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/index.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/index.js @@ -1,7 +1,11 @@ module.exports = function (args, opts) { if (!opts) opts = {}; - var flags = { bools : {}, strings : {} }; + var flags = { bools : {}, strings : {}, unknownFn: null }; + + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { flags.allBools = true; @@ -42,7 +46,16 @@ module.exports = function (args, opts) { args = args.slice(0, args.indexOf('--')); } - function setArg (key, val) { + function argDefined(key, arg) { + return (flags.allBools && /^--[^=]+$/.test(arg)) || + flags.strings[key] || flags.bools[key] || aliases[key]; + } + + function setArg (key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } + var value = !flags.strings[key] && isNumber(val) ? Number(val) : val ; @@ -61,11 +74,11 @@ module.exports = function (args, opts) { // 'dotall' regex modifier. See: // http://stackoverflow.com/a/1068308/13216 var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); + setArg(m[1], m[2], arg); } else if (/^--no-.+/.test(arg)) { var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); + setArg(key, false, arg); } else if (/^--.+/.test(arg)) { var key = arg.match(/^--(.+)/)[1]; @@ -74,15 +87,15 @@ module.exports = function (args, opts) { && !flags.bools[key] && !flags.allBools && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); + setArg(key, next, arg); i++; } else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); + setArg(key, next === 'true', arg); i++; } else { - setArg(key, flags.strings[key] ? '' : true); + setArg(key, flags.strings[key] ? '' : true, arg); } } else if (/^-[^-]+/.test(arg)) { @@ -93,24 +106,24 @@ module.exports = function (args, opts) { var next = arg.slice(j+2); if (next === '-') { - setArg(letters[j], next) + setArg(letters[j], next, arg) continue; } if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); + setArg(letters[j], next, arg); broken = true; break; } if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); + setArg(letters[j], arg.slice(j+2), arg); broken = true; break; } else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); } } @@ -119,22 +132,28 @@ module.exports = function (args, opts) { if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) && !flags.bools[key] && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); + setArg(key, args[i+1], arg); i++; } else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); + setArg(key, args[i+1] === 'true', arg); i++; } else { - setArg(key, flags.strings[key] ? '' : true); + setArg(key, flags.strings[key] ? '' : true, arg); } } } else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } } } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/package.json index 3b36570..4d20429 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/package.json @@ -1,14 +1,16 @@ { "name": "minimist", - "version": "0.2.0", + "version": "1.1.0", "description": "parse argument options", "main": "index.js", "devDependencies": { "tape": "~1.0.4", - "tap": "~0.4.0" + "tap": "~0.4.0", + "covert": "^1.0.0" }, "scripts": { - "test": "tap test/*.js" + "test": "tap test/*.js", + "coverage": "covert test/*.js" }, "testling": { "files": "test/*.js", @@ -40,14 +42,14 @@ "url": "http://substack.net" }, "license": "MIT", - "gitHead": "f904dcc3c28f10eb11840091e9f0bab9d9519b5c", + "gitHead": "e2563e462be40c344c6c65b7cde85091fe261976", "bugs": { "url": "https://github.com/substack/minimist/issues" }, - "_id": "minimist@0.2.0", - "_shasum": "4dffe525dae2b864c66c2e23c6271d7afdecefce", - "_from": "minimist@^0.2.0", - "_npmVersion": "1.4.15", + "_id": "minimist@1.1.0", + "_shasum": "cdf225e8898f840a258ded44fc91776770afdc93", + "_from": "minimist@^1.1.0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "substack", "email": "mail@substack.net" @@ -59,10 +61,10 @@ } ], "dist": { - "shasum": "4dffe525dae2b864c66c2e23c6271d7afdecefce", - "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz" + "shasum": "cdf225e8898f840a258ded44fc91776770afdc93", + "tarball": "http://registry.npmjs.org/minimist/-/minimist-1.1.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz", + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/readme.markdown b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/readme.markdown index 8253221..30a74cf 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/readme.markdown +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/readme.markdown @@ -61,8 +61,13 @@ as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) * `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 +* `opts.stopEarly` - when true, populate `argv._` with everything after the +first non-option * `opts['--']` - when true, populate `argv._` with everything before the `--` and `argv['--']` with everything after the `--`. Here's an example: +* `opts.unknown` - a function which is invoked with a command line parameter not +defined in the `opts` configuration object. If the function returns `false`, the +unknown option is not added to `argv`. ``` > require('./')('one two three -- four five --six'.split(' '), { '--': true }) diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/test/stop_early.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/test/stop_early.js new file mode 100644 index 0000000..bdf9fbc --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/test/stop_early.js @@ -0,0 +1,15 @@ +var parse = require('../'); +var test = require('tape'); + +test('stops parsing on the first non-option when stopEarly is set', function (t) { + var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { + stopEarly: true + }); + + t.deepEqual(argv, { + aaa: 'bbb', + _: ['ccc', '--ddd'] + }); + + t.end(); +}); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/test/unknown.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/test/unknown.js new file mode 100644 index 0000000..462a36b --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/minimist/test/unknown.js @@ -0,0 +1,102 @@ +var parse = require('../'); +var test = require('tape'); + +test('boolean and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'true', '--derp', 'true' ]; + var regular = [ '--herp', 'true', '-d', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('flag boolean true any double hyphen argument is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { + boolean: true, + unknown: unknownFn + }); + t.same(unknown, ['--tacos=good', 'cow', '-p']); + t.same(argv, { + honk: true, + _: [] + }); + t.end(); +}); + +test('string and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; + var regular = [ '--herp', 'hello', '-d', 'moon' ]; + var opts = { + alias: { h: 'herp' }, + string: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('default and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello' ]; + var regular = [ '--herp', 'hello' ]; + var opts = { + default: { 'h': 'bar' }, + alias: { 'h': 'herp' }, + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, []); + t.end(); + unknownFn(); // exercise fn for 100% coverage +}); + +test('value following -- is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '--bad', '--', 'good', 'arg' ]; + var opts = { + '--': true, + unknown: unknownFn + }; + var argv = parse(aliased, opts); + + t.same(unknown, ['--bad']); + t.same(argv, { + '--': ['good', 'arg'], + '_': [] + }) + t.end(); +}); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md index 34c1189..e46b823 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md @@ -2,8 +2,8 @@ ***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/) +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/) This package is a mirror of the Streams2 and Streams3 implementations in Node-core. diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js index 7f4e3b8..19ab358 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js @@ -63,6 +63,8 @@ if (debug && debug.debuglog) { util.inherits(Readable, Stream); function ReadableState(options, stream) { + var Duplex = require('./_stream_duplex'); + options = options || {}; // the point at which it stops calling _read() to fill the buffer @@ -100,6 +102,9 @@ function ReadableState(options, stream) { // make all the buffer merging and length checks go away this.objectMode = !!options.objectMode; + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; + // 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. @@ -126,6 +131,8 @@ function ReadableState(options, stream) { } function Readable(options) { + var Duplex = require('./_stream_duplex'); + if (!(this instanceof Readable)) return new Readable(options); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js index 9ea2829..db8539c 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js @@ -48,6 +48,8 @@ function WriteReq(chunk, encoding, cb) { } function WritableState(options, stream) { + var Duplex = require('./_stream_duplex'); + options = options || {}; // the point at which write() starts returning false @@ -61,6 +63,9 @@ function WritableState(options, stream) { // contains buffers or objects. this.objectMode = !!options.objectMode; + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.writableObjectMode; + // cast to ints. this.highWaterMark = ~~this.highWaterMark; diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js index 2e44a03..b00e54f 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -36,6 +36,14 @@ function assertEncoding(encoding) { } } +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. var StringDecoder = exports.StringDecoder = function(encoding) { this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); assertEncoding(encoding); @@ -60,37 +68,50 @@ var StringDecoder = exports.StringDecoder = function(encoding) { return; } + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. this.charLength = 0; }; +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . 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; + var available = (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; + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; if (this.charReceived < this.charLength) { // still not enough chars in this buffer? wait for more ... return ''; } + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + // 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 + // CESU-8: 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; @@ -100,34 +121,33 @@ StringDecoder.prototype.write = function(buffer) { 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); + if (buffer.length === 0) { + return charStr; + } break; } - var lenIncomplete = this.detectIncompleteChar(buffer); + // determine and set charLength / charReceived + 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; + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } 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 + // CESU-8: 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); + buffer.copy(this.charBuffer, 0, 0, size); return charStr.substring(0, end); } @@ -135,6 +155,10 @@ StringDecoder.prototype.write = function(buffer) { return charStr; }; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. 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; @@ -164,8 +188,7 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { break; } } - - return i; + this.charReceived = i; }; StringDecoder.prototype.end = function(buffer) { @@ -188,13 +211,11 @@ function passThroughWrite(buffer) { } function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json index 7f5d001..a8c586b 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,6 +1,6 @@ { "name": "string_decoder", - "version": "0.10.25-1", + "version": "0.10.31", "description": "The string_decoder module from Node core", "main": "index.js", "dependencies": {}, @@ -22,11 +22,33 @@ "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", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@~0.10.x", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json index e760eff..69eee6c 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.1.13-1", + "version": "1.1.13", "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", "main": "readable.js", "dependencies": { @@ -33,12 +33,38 @@ "url": "http://blog.izs.me/" }, "license": "MIT", - "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", + "gitHead": "3b672fd7ae92acf5b4ffdbabf74b372a0a56b051", "bugs": { "url": "https://github.com/isaacs/readable-stream/issues" }, "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.1.13-1", - "_from": "readable-stream@~1.1.9" + "_id": "readable-stream@1.1.13", + "_shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "_from": "readable-stream@~1.1.9", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/.npmignore b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/.npmignore deleted file mode 100644 index 1e1dcab..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -test -.jshintrc -.travis.yml \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/README.md deleted file mode 100644 index 33aa01e..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/README.md +++ /dev/null @@ -1,140 +0,0 @@ -# through2 - - - -[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) - - - -**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) { ... })`. - -Note: A **Streams3** version of through2 is available in npm with the tag `"1.0"` rather than `"latest"` so an `npm install through2` will get you the current Streams2 version (version number is 0.x.x). To use a Streams3 version use `npm install through2@1` to fetch the latest version 1.x.x. More information about Streams2 vs Streams3 and recommendations [here](http://www.nearform.com/nodecrunch/dont-use-nodes-core-stream-module). - -```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 - -through2([ options, ] [ transformFunction ] [, flushFunction ]) - -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. - -through2.ctor([ options, ] transformFunction[, flushFunction ]) - -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}) -``` - -## See Also - - - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. - - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. - - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. - - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. - -## 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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f8..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index 34c1189..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index b513d61..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,89 +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 objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -forEach(objectKeys(Writable.prototype), 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)); -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 895ca50..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,46 +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('core-util-is'); -util.inherits = require('inherits'); -/**/ - -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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 0ca7705..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,959 +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; - -/**/ -var isArray = require('isarray'); -/**/ - - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -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('core-util-is'); -util.inherits = require('inherits'); -/**/ - -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 (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 - forEach(state.pipes, 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 = indexOf(state.pipes, 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']; - forEach(events, 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'); - } - }); - } -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf (xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index eb188df..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/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('core-util-is'); -util.inherits = require('inherits'); -/**/ - -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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index d0254d5..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,387 +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; - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - - -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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b41..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/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/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/float.patch b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c0..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/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/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js deleted file mode 100644 index 9074e8e..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/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/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json deleted file mode 100644 index d28ffc4..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json +++ /dev/null @@ -1,36 +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", - "scripts": {} -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/util.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/util.js deleted file mode 100644 index 007fa10..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/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/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/LICENSE b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/README.md deleted file mode 100644 index b1c5665..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/inherits.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/inherits.js deleted file mode 100644 index 29f5e24..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/inherits.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inherits diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/inherits_browser.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a7..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json deleted file mode 100644 index c532ca6..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/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.0.1" -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/test.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/test.js deleted file mode 100644 index fc53012..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md deleted file mode 100644 index 052a62b..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/build/build.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/build/build.js deleted file mode 100644 index ec58596..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/build/build.js +++ /dev/null @@ -1,209 +0,0 @@ - -/** - * Require the given path. - * - * @param {String} path - * @return {Object} exports - * @api public - */ - -function require(path, parent, orig) { - var resolved = require.resolve(path); - - // lookup failed - if (null == resolved) { - orig = orig || path; - parent = parent || 'root'; - var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); - err.path = orig; - err.parent = parent; - err.require = true; - throw err; - } - - var module = require.modules[resolved]; - - // perform real require() - // by invoking the module's - // registered function - if (!module.exports) { - module.exports = {}; - module.client = module.component = true; - module.call(this, module.exports, require.relative(resolved), module); - } - - return module.exports; -} - -/** - * Registered modules. - */ - -require.modules = {}; - -/** - * Registered aliases. - */ - -require.aliases = {}; - -/** - * Resolve `path`. - * - * Lookup: - * - * - PATH/index.js - * - PATH.js - * - PATH - * - * @param {String} path - * @return {String} path or null - * @api private - */ - -require.resolve = function(path) { - if (path.charAt(0) === '/') path = path.slice(1); - var index = path + '/index.js'; - - var paths = [ - path, - path + '.js', - path + '.json', - path + '/index.js', - path + '/index.json' - ]; - - for (var i = 0; i < paths.length; i++) { - var path = paths[i]; - if (require.modules.hasOwnProperty(path)) return path; - } - - if (require.aliases.hasOwnProperty(index)) { - return require.aliases[index]; - } -}; - -/** - * Normalize `path` relative to the current path. - * - * @param {String} curr - * @param {String} path - * @return {String} - * @api private - */ - -require.normalize = function(curr, path) { - var segs = []; - - if ('.' != path.charAt(0)) return path; - - curr = curr.split('/'); - path = path.split('/'); - - for (var i = 0; i < path.length; ++i) { - if ('..' == path[i]) { - curr.pop(); - } else if ('.' != path[i] && '' != path[i]) { - segs.push(path[i]); - } - } - - return curr.concat(segs).join('/'); -}; - -/** - * Register module at `path` with callback `definition`. - * - * @param {String} path - * @param {Function} definition - * @api private - */ - -require.register = function(path, definition) { - require.modules[path] = definition; -}; - -/** - * Alias a module definition. - * - * @param {String} from - * @param {String} to - * @api private - */ - -require.alias = function(from, to) { - if (!require.modules.hasOwnProperty(from)) { - throw new Error('Failed to alias "' + from + '", it does not exist'); - } - require.aliases[to] = from; -}; - -/** - * Return a require function relative to the `parent` path. - * - * @param {String} parent - * @return {Function} - * @api private - */ - -require.relative = function(parent) { - var p = require.normalize(parent, '..'); - - /** - * lastIndexOf helper. - */ - - function lastIndexOf(arr, obj) { - var i = arr.length; - while (i--) { - if (arr[i] === obj) return i; - } - return -1; - } - - /** - * The relative require() itself. - */ - - function localRequire(path) { - var resolved = localRequire.resolve(path); - return require(resolved, parent, path); - } - - /** - * Resolve relative to the parent. - */ - - localRequire.resolve = function(path) { - var c = path.charAt(0); - if ('/' == c) return path.slice(1); - if ('.' == c) return require.normalize(p, path); - - // resolve deps by returning - // the dep in the nearest "deps" - // directory - var segs = parent.split('/'); - var i = lastIndexOf(segs, 'deps') + 1; - if (!i) i = 0; - path = segs.slice(0, i + 1).join('/') + '/deps/' + path; - return path; - }; - - /** - * Check if module is defined at `path`. - */ - - localRequire.exists = function(path) { - return require.modules.hasOwnProperty(localRequire.resolve(path)); - }; - - return localRequire; -}; -require.register("isarray/index.js", function(exports, require, module){ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; - -}); -require.alias("isarray/index.js", "isarray/index.js"); - diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json deleted file mode 100644 index 9e31b68..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js deleted file mode 100644 index 5f5ad45..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json deleted file mode 100644 index fc7904b..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "isarray", - "description": "Array#isArray for older browsers", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "homepage": "https://github.com/juliangruber/isarray", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": {}, - "devDependencies": { - "tap": "*" - }, - "keywords": [ - "browser", - "isarray", - "array" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "readme": "\n# isarray\n\n`Array#isArray` for older browsers.\n\n## Usage\n\n```js\nvar isArray = require('isarray');\n\nconsole.log(isArray([])); // => true\nconsole.log(isArray({})); // => false\n```\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isarray\n```\n\nThen bundle for the browser with\n[browserify](https://github.com/substack/browserify).\n\nWith [component](http://component.io) do\n\n```bash\n$ component install juliangruber/isarray\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\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\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject 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", - "readmeFilename": "README.md", - "_id": "isarray@0.0.1", - "dist": { - "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "_from": "isarray@0.0.1", - "_npmVersion": "1.2.18", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "directories": {}, - "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - } -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320c..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa00..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index 2e44a03..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index 7f5d001..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index afdd6ef..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.27-1", - "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", - "main": "readable.js", - "dependencies": { - "core-util-is": "~1.0.0", - "isarray": "0.0.1", - "string_decoder": "~0.10.x", - "inherits": "~2.0.1" - }, - "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" - ], - "browser": { - "util": false - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.27-1", - "dist": { - "shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz" - }, - "_from": "readable-stream@~1.0.17", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "directories": {}, - "_shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index 4d1ddfc..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f0..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efd..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md deleted file mode 100644 index e754831..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md +++ /dev/null @@ -1,28 +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") - -// extend returns a new object. Does not mutate arguments -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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js deleted file mode 100644 index a34475e..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = extend - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json deleted file mode 100644 index 99147b6..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "xtend", - "version": "3.0.0", - "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": {}, - "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" - }, - "_id": "xtend@3.0.0", - "dist": { - "shasum": "5cce7407baf642cba7becda568111c493f59665a", - "tarball": "http://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" - }, - "_from": "xtend@~3.0.0", - "_npmVersion": "1.4.6", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "directories": {}, - "_shasum": "5cce7407baf642cba7becda568111c493f59665a", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js deleted file mode 100644 index 3369d79..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/package.json deleted file mode 100644 index 673a482..0000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "through2", - "version": "0.5.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": "~3.0.0" - }, - "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" - }, - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.5.1", - "dist": { - "shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "tarball": "http://registry.npmjs.org/through2/-/through2-0.5.1.tgz" - }, - "_from": "through2@^0.5.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "bryce", - "email": "bryce@ravenwall.com" - } - ], - "directories": {}, - "_shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/through2.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/through2.js deleted file mode 100644 index d3610aa..0000000 --- a/node_modules/gulp-uglify/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, highWaterMark: 16 }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.jshintignore b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.jshintignore new file mode 100644 index 0000000..ba2a97b --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.jshintignore @@ -0,0 +1,2 @@ +node_modules +coverage diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.jshintrc b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.jshintrc new file mode 100644 index 0000000..373d6c3 --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.jshintrc @@ -0,0 +1,36 @@ +{ + "indent": 2, + "smarttabs": true, + "latedef": "nofunc", + "undef": true, + "unused": true, + "trailing": true, + "laxcomma": false, + "eqeqeq": true, + "eqnull": true, + "boss": true, + "expr": true, + "sub": true, + "newcap": true, + "quotmark": true, + "loopfunc": true, + "lastsemic": true, + "funcscope": true, + "browser": true, + "nonstandard": true, + "jquery": true, + "devel": true, + "node": true, + "esnext": true, + "globals": { + "describe": false, + "xdescribe": false, + "it": false, + "xit": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false, + "define": false + } +} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.travis.yml b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.travis.yml index 33ad9f8..8b95a9f 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.travis.yml +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/.travis.yml @@ -1,6 +1,5 @@ language: node_js node_js: - - "0.9" - "0.10" after_script: - - npm run coveralls \ No newline at end of file + - npm run coveralls diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/LICENSE b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/LICENSE old mode 100755 new mode 100644 diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/README.md index 3f97efc..ae6f16f 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/README.md +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/README.md @@ -17,6 +17,10 @@ +## What is this? + +Read this for more info about how this plays into the grand scheme of things https://medium.com/@eschoff/3828e8126466 + ## File ```javascript @@ -25,7 +29,7 @@ var File = require('vinyl'); var coffeeFile = new File({ cwd: "/", base: "/test/", - path: "/test/file.coffee" + path: "/test/file.coffee", contents: new Buffer("test = 123") }); ``` @@ -79,7 +83,7 @@ Returns true if file.contents is null. ### clone() -Returns a new File object with all attributes cloned. +Returns a new File object with all attributes cloned. Custom attributes are deep-cloned. ### pipe(stream[, opt]) @@ -89,7 +93,7 @@ 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). +If opt.end is false, the destination stream will not be ended (same as node core). Returns the stream. @@ -120,4 +124,4 @@ console.log(file.relative); // file.coffee [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 +[depstat-image]: https://david-dm.org/wearefractal/vinyl.png diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json new file mode 100644 index 0000000..2bf4c62 --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json @@ -0,0 +1 @@ +{"/Users/contra/Projects/vinyl/index.js":{"path":"/Users/contra/Projects/vinyl/index.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":73,"12":14,"13":73,"14":73,"15":73,"16":73,"17":73,"18":73,"19":1,"20":26,"21":1,"22":29,"23":1,"24":6,"25":1,"26":3,"27":1,"28":14,"29":2,"30":12,"31":7,"32":5,"33":5,"34":14,"35":14,"36":1,"37":1,"38":13,"39":6,"40":14,"41":14,"42":75,"43":70,"44":5,"45":14,"46":1,"47":6,"48":3,"49":6,"50":3,"51":6,"52":2,"53":4,"54":2,"55":1,"56":1,"57":2,"58":2,"59":1,"60":2,"61":1,"62":6,"63":6,"64":6,"65":4,"66":6,"67":3,"68":6,"69":1,"70":6,"71":1,"72":99,"73":78,"74":1,"75":77,"76":1,"77":7,"78":1,"79":6,"80":1,"81":5,"82":1,"83":1,"84":46,"85":9,"86":1,"87":8,"88":5,"89":1},"b":{"1":[14,59],"2":[25,48],"3":[73,33],"4":[73,32],"5":[73,39],"6":[73,65],"7":[73,44],"8":[3,1,1],"9":[2,12],"10":[7,5],"11":[1,13],"12":[6,7],"13":[5,1],"14":[2,12],"15":[70,5],"16":[75,61,47,33,33,19],"17":[2,3],"18":[3,3],"19":[3,3],"20":[2,4],"21":[2,2],"22":[1,1],"23":[1,1],"24":[3,3],"25":[6,5],"26":[4,2],"27":[3,3],"28":[1,5],"29":[1,77],"30":[78,57,46],"31":[1,6],"32":[1,5],"33":[1,8],"34":[5,3],"35":[8,7]},"f":{"1":73,"2":26,"3":29,"4":6,"5":3,"6":14,"7":75,"8":6,"9":6,"10":99,"11":78,"12":7,"13":1,"14":46,"15":9},"fnMap":{"1":{"name":"File","line":11,"loc":{"start":{"line":11,"column":0},"end":{"line":11,"column":20}}},"2":{"name":"(anonymous_2)","line":30,"loc":{"start":{"line":30,"column":26},"end":{"line":30,"column":37}}},"3":{"name":"(anonymous_3)","line":34,"loc":{"start":{"line":34,"column":26},"end":{"line":34,"column":37}}},"4":{"name":"(anonymous_4)","line":38,"loc":{"start":{"line":38,"column":24},"end":{"line":38,"column":35}}},"5":{"name":"(anonymous_5)","line":43,"loc":{"start":{"line":43,"column":29},"end":{"line":43,"column":40}}},"6":{"name":"(anonymous_6)","line":47,"loc":{"start":{"line":47,"column":23},"end":{"line":47,"column":37}}},"7":{"name":"(anonymous_7)","line":81,"loc":{"start":{"line":81,"column":28},"end":{"line":81,"column":42}}},"8":{"name":"(anonymous_8)","line":93,"loc":{"start":{"line":93,"column":22},"end":{"line":93,"column":44}}},"9":{"name":"(anonymous_9)","line":114,"loc":{"start":{"line":114,"column":25},"end":{"line":114,"column":36}}},"10":{"name":"(anonymous_10)","line":138,"loc":{"start":{"line":138,"column":7},"end":{"line":138,"column":18}}},"11":{"name":"(anonymous_11)","line":141,"loc":{"start":{"line":141,"column":7},"end":{"line":141,"column":21}}},"12":{"name":"(anonymous_12)","line":151,"loc":{"start":{"line":151,"column":7},"end":{"line":151,"column":18}}},"13":{"name":"(anonymous_13)","line":156,"loc":{"start":{"line":156,"column":7},"end":{"line":156,"column":18}}},"14":{"name":"(anonymous_14)","line":162,"loc":{"start":{"line":162,"column":7},"end":{"line":162,"column":18}}},"15":{"name":"(anonymous_15)","line":165,"loc":{"start":{"line":165,"column":7},"end":{"line":165,"column":22}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":27}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":36}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":40}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":47}},"5":{"start":{"line":5,"column":0},"end":{"line":5,"column":41}},"6":{"start":{"line":6,"column":0},"end":{"line":6,"column":41}},"7":{"start":{"line":7,"column":0},"end":{"line":7,"column":37}},"8":{"start":{"line":8,"column":0},"end":{"line":8,"column":51}},"9":{"start":{"line":9,"column":0},"end":{"line":9,"column":31}},"10":{"start":{"line":11,"column":0},"end":{"line":28,"column":1}},"11":{"start":{"line":12,"column":2},"end":{"line":12,"column":23}},"12":{"start":{"line":12,"column":13},"end":{"line":12,"column":23}},"13":{"start":{"line":15,"column":2},"end":{"line":15,"column":55}},"14":{"start":{"line":16,"column":2},"end":{"line":16,"column":31}},"15":{"start":{"line":19,"column":2},"end":{"line":19,"column":39}},"16":{"start":{"line":20,"column":2},"end":{"line":20,"column":36}},"17":{"start":{"line":24,"column":2},"end":{"line":24,"column":32}},"18":{"start":{"line":27,"column":2},"end":{"line":27,"column":40}},"19":{"start":{"line":30,"column":0},"end":{"line":32,"column":2}},"20":{"start":{"line":31,"column":2},"end":{"line":31,"column":33}},"21":{"start":{"line":34,"column":0},"end":{"line":36,"column":2}},"22":{"start":{"line":35,"column":2},"end":{"line":35,"column":33}},"23":{"start":{"line":38,"column":0},"end":{"line":40,"column":2}},"24":{"start":{"line":39,"column":2},"end":{"line":39,"column":31}},"25":{"start":{"line":43,"column":0},"end":{"line":45,"column":2}},"26":{"start":{"line":44,"column":2},"end":{"line":44,"column":63}},"27":{"start":{"line":47,"column":0},"end":{"line":91,"column":2}},"28":{"start":{"line":48,"column":2},"end":{"line":61,"column":3}},"29":{"start":{"line":49,"column":4},"end":{"line":52,"column":6}},"30":{"start":{"line":53,"column":9},"end":{"line":61,"column":3}},"31":{"start":{"line":54,"column":4},"end":{"line":57,"column":6}},"32":{"start":{"line":59,"column":4},"end":{"line":59,"column":33}},"33":{"start":{"line":60,"column":4},"end":{"line":60,"column":42}},"34":{"start":{"line":64,"column":2},"end":{"line":64,"column":15}},"35":{"start":{"line":65,"column":2},"end":{"line":70,"column":3}},"36":{"start":{"line":66,"column":4},"end":{"line":66,"column":60}},"37":{"start":{"line":67,"column":4},"end":{"line":67,"column":65}},"38":{"start":{"line":68,"column":9},"end":{"line":70,"column":3}},"39":{"start":{"line":69,"column":4},"end":{"line":69,"column":73}},"40":{"start":{"line":72,"column":2},"end":{"line":78,"column":5}},"41":{"start":{"line":81,"column":2},"end":{"line":89,"column":11}},"42":{"start":{"line":83,"column":4},"end":{"line":87,"column":5}},"43":{"start":{"line":86,"column":6},"end":{"line":86,"column":13}},"44":{"start":{"line":88,"column":4},"end":{"line":88,"column":62}},"45":{"start":{"line":90,"column":2},"end":{"line":90,"column":14}},"46":{"start":{"line":93,"column":0},"end":{"line":112,"column":2}},"47":{"start":{"line":94,"column":2},"end":{"line":94,"column":21}},"48":{"start":{"line":94,"column":12},"end":{"line":94,"column":21}},"49":{"start":{"line":95,"column":2},"end":{"line":95,"column":53}},"50":{"start":{"line":95,"column":38},"end":{"line":95,"column":53}},"51":{"start":{"line":97,"column":2},"end":{"line":99,"column":3}},"52":{"start":{"line":98,"column":4},"end":{"line":98,"column":43}},"53":{"start":{"line":100,"column":2},"end":{"line":107,"column":3}},"54":{"start":{"line":101,"column":4},"end":{"line":105,"column":5}},"55":{"start":{"line":102,"column":6},"end":{"line":102,"column":32}},"56":{"start":{"line":104,"column":6},"end":{"line":104,"column":34}},"57":{"start":{"line":106,"column":4},"end":{"line":106,"column":18}},"58":{"start":{"line":110,"column":2},"end":{"line":110,"column":28}},"59":{"start":{"line":110,"column":15},"end":{"line":110,"column":28}},"60":{"start":{"line":111,"column":2},"end":{"line":111,"column":16}},"61":{"start":{"line":114,"column":0},"end":{"line":133,"column":2}},"62":{"start":{"line":115,"column":2},"end":{"line":115,"column":19}},"63":{"start":{"line":118,"column":2},"end":{"line":118,"column":70}},"64":{"start":{"line":120,"column":2},"end":{"line":122,"column":3}},"65":{"start":{"line":121,"column":4},"end":{"line":121,"column":35}},"66":{"start":{"line":124,"column":2},"end":{"line":126,"column":3}},"67":{"start":{"line":125,"column":4},"end":{"line":125,"column":42}},"68":{"start":{"line":128,"column":2},"end":{"line":130,"column":3}},"69":{"start":{"line":129,"column":4},"end":{"line":129,"column":47}},"70":{"start":{"line":132,"column":2},"end":{"line":132,"column":40}},"71":{"start":{"line":137,"column":0},"end":{"line":147,"column":3}},"72":{"start":{"line":139,"column":4},"end":{"line":139,"column":26}},"73":{"start":{"line":142,"column":4},"end":{"line":144,"column":5}},"74":{"start":{"line":143,"column":6},"end":{"line":143,"column":80}},"75":{"start":{"line":145,"column":4},"end":{"line":145,"column":25}},"76":{"start":{"line":150,"column":0},"end":{"line":159,"column":3}},"77":{"start":{"line":152,"column":4},"end":{"line":152,"column":80}},"78":{"start":{"line":152,"column":20},"end":{"line":152,"column":80}},"79":{"start":{"line":153,"column":4},"end":{"line":153,"column":80}},"80":{"start":{"line":153,"column":20},"end":{"line":153,"column":80}},"81":{"start":{"line":154,"column":4},"end":{"line":154,"column":47}},"82":{"start":{"line":157,"column":4},"end":{"line":157,"column":103}},"83":{"start":{"line":161,"column":0},"end":{"line":173,"column":3}},"84":{"start":{"line":163,"column":4},"end":{"line":163,"column":49}},"85":{"start":{"line":166,"column":4},"end":{"line":166,"column":75}},"86":{"start":{"line":166,"column":34},"end":{"line":166,"column":75}},"87":{"start":{"line":169,"column":4},"end":{"line":171,"column":5}},"88":{"start":{"line":170,"column":6},"end":{"line":170,"column":30}},"89":{"start":{"line":175,"column":0},"end":{"line":175,"column":22}}},"branchMap":{"1":{"line":12,"type":"if","locations":[{"start":{"line":12,"column":2},"end":{"line":12,"column":2}},{"start":{"line":12,"column":2},"end":{"line":12,"column":2}}]},"2":{"line":15,"type":"cond-expr","locations":[{"start":{"line":15,"column":28},"end":{"line":15,"column":39}},{"start":{"line":15,"column":42},"end":{"line":15,"column":54}}]},"3":{"line":16,"type":"binary-expr","locations":[{"start":{"line":16,"column":17},"end":{"line":16,"column":24}},{"start":{"line":16,"column":28},"end":{"line":16,"column":30}}]},"4":{"line":19,"type":"binary-expr","locations":[{"start":{"line":19,"column":13},"end":{"line":19,"column":21}},{"start":{"line":19,"column":25},"end":{"line":19,"column":38}}]},"5":{"line":20,"type":"binary-expr","locations":[{"start":{"line":20,"column":14},"end":{"line":20,"column":23}},{"start":{"line":20,"column":27},"end":{"line":20,"column":35}}]},"6":{"line":24,"type":"binary-expr","locations":[{"start":{"line":24,"column":14},"end":{"line":24,"column":23}},{"start":{"line":24,"column":27},"end":{"line":24,"column":31}}]},"7":{"line":27,"type":"binary-expr","locations":[{"start":{"line":27,"column":18},"end":{"line":27,"column":31}},{"start":{"line":27,"column":35},"end":{"line":27,"column":39}}]},"8":{"line":44,"type":"binary-expr","locations":[{"start":{"line":44,"column":9},"end":{"line":44,"column":22}},{"start":{"line":44,"column":26},"end":{"line":44,"column":35}},{"start":{"line":44,"column":39},"end":{"line":44,"column":62}}]},"9":{"line":48,"type":"if","locations":[{"start":{"line":48,"column":2},"end":{"line":48,"column":2}},{"start":{"line":48,"column":2},"end":{"line":48,"column":2}}]},"10":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":9},"end":{"line":53,"column":9}},{"start":{"line":53,"column":9},"end":{"line":53,"column":9}}]},"11":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":2},"end":{"line":65,"column":2}},{"start":{"line":65,"column":2},"end":{"line":65,"column":2}}]},"12":{"line":68,"type":"if","locations":[{"start":{"line":68,"column":9},"end":{"line":68,"column":9}},{"start":{"line":68,"column":9},"end":{"line":68,"column":9}}]},"13":{"line":69,"type":"cond-expr","locations":[{"start":{"line":69,"column":30},"end":{"line":69,"column":56}},{"start":{"line":69,"column":59},"end":{"line":69,"column":72}}]},"14":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":23},"end":{"line":75,"column":44}},{"start":{"line":75,"column":47},"end":{"line":75,"column":51}}]},"15":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":4},"end":{"line":83,"column":4}},{"start":{"line":83,"column":4},"end":{"line":83,"column":4}}]},"16":{"line":83,"type":"binary-expr","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":27}},{"start":{"line":83,"column":31},"end":{"line":83,"column":45}},{"start":{"line":84,"column":6},"end":{"line":84,"column":23}},{"start":{"line":84,"column":27},"end":{"line":84,"column":41}},{"start":{"line":85,"column":6},"end":{"line":85,"column":20}},{"start":{"line":85,"column":24},"end":{"line":85,"column":37}}]},"17":{"line":88,"type":"cond-expr","locations":[{"start":{"line":88,"column":27},"end":{"line":88,"column":49}},{"start":{"line":88,"column":52},"end":{"line":88,"column":61}}]},"18":{"line":94,"type":"if","locations":[{"start":{"line":94,"column":2},"end":{"line":94,"column":2}},{"start":{"line":94,"column":2},"end":{"line":94,"column":2}}]},"19":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":2},"end":{"line":95,"column":2}},{"start":{"line":95,"column":2},"end":{"line":95,"column":2}}]},"20":{"line":97,"type":"if","locations":[{"start":{"line":97,"column":2},"end":{"line":97,"column":2}},{"start":{"line":97,"column":2},"end":{"line":97,"column":2}}]},"21":{"line":100,"type":"if","locations":[{"start":{"line":100,"column":2},"end":{"line":100,"column":2}},{"start":{"line":100,"column":2},"end":{"line":100,"column":2}}]},"22":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":4},"end":{"line":101,"column":4}},{"start":{"line":101,"column":4},"end":{"line":101,"column":4}}]},"23":{"line":110,"type":"if","locations":[{"start":{"line":110,"column":2},"end":{"line":110,"column":2}},{"start":{"line":110,"column":2},"end":{"line":110,"column":2}}]},"24":{"line":118,"type":"cond-expr","locations":[{"start":{"line":118,"column":44},"end":{"line":118,"column":57}},{"start":{"line":118,"column":60},"end":{"line":118,"column":69}}]},"25":{"line":118,"type":"binary-expr","locations":[{"start":{"line":118,"column":18},"end":{"line":118,"column":27}},{"start":{"line":118,"column":31},"end":{"line":118,"column":40}}]},"26":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":2},"end":{"line":120,"column":2}},{"start":{"line":120,"column":2},"end":{"line":120,"column":2}}]},"27":{"line":124,"type":"if","locations":[{"start":{"line":124,"column":2},"end":{"line":124,"column":2}},{"start":{"line":124,"column":2},"end":{"line":124,"column":2}}]},"28":{"line":128,"type":"if","locations":[{"start":{"line":128,"column":2},"end":{"line":128,"column":2}},{"start":{"line":128,"column":2},"end":{"line":128,"column":2}}]},"29":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":4},"end":{"line":142,"column":4}},{"start":{"line":142,"column":4},"end":{"line":142,"column":4}}]},"30":{"line":142,"type":"binary-expr","locations":[{"start":{"line":142,"column":8},"end":{"line":142,"column":22}},{"start":{"line":142,"column":26},"end":{"line":142,"column":40}},{"start":{"line":142,"column":44},"end":{"line":142,"column":56}}]},"31":{"line":152,"type":"if","locations":[{"start":{"line":152,"column":4},"end":{"line":152,"column":4}},{"start":{"line":152,"column":4},"end":{"line":152,"column":4}}]},"32":{"line":153,"type":"if","locations":[{"start":{"line":153,"column":4},"end":{"line":153,"column":4}},{"start":{"line":153,"column":4},"end":{"line":153,"column":4}}]},"33":{"line":166,"type":"if","locations":[{"start":{"line":166,"column":4},"end":{"line":166,"column":4}},{"start":{"line":166,"column":4},"end":{"line":166,"column":4}}]},"34":{"line":169,"type":"if","locations":[{"start":{"line":169,"column":4},"end":{"line":169,"column":4}},{"start":{"line":169,"column":4},"end":{"line":169,"column":4}}]},"35":{"line":169,"type":"binary-expr","locations":[{"start":{"line":169,"column":8},"end":{"line":169,"column":12}},{"start":{"line":169,"column":16},"end":{"line":169,"column":34}}]}}},"/Users/contra/Projects/vinyl/lib/cloneBuffer.js":{"path":"/Users/contra/Projects/vinyl/lib/cloneBuffer.js","s":{"1":1,"2":1,"3":7,"4":7,"5":7},"b":{},"f":{"1":7},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":3,"column":0},"end":{"line":7,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":35}},"4":{"start":{"line":5,"column":2},"end":{"line":5,"column":16}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":13}}},"branchMap":{}},"/Users/contra/Projects/vinyl/lib/isBuffer.js":{"path":"/Users/contra/Projects/vinyl/lib/isBuffer.js","s":{"1":1,"2":1,"3":1,"4":108},"b":{"1":[108,107]},"f":{"1":108},"fnMap":{"1":{"name":"(anonymous_1)","line":5,"loc":{"start":{"line":5,"column":17},"end":{"line":5,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":24}},"3":{"start":{"line":5,"column":0},"end":{"line":7,"column":2}},"4":{"start":{"line":6,"column":2},"end":{"line":6,"column":54}}},"branchMap":{"1":{"line":6,"type":"binary-expr","locations":[{"start":{"line":6,"column":9},"end":{"line":6,"column":30}},{"start":{"line":6,"column":34},"end":{"line":6,"column":53}}]}}},"/Users/contra/Projects/vinyl/lib/isStream.js":{"path":"/Users/contra/Projects/vinyl/lib/isStream.js","s":{"1":1,"2":1,"3":99},"b":{"1":[99,40]},"f":{"1":99},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":36}}},"branchMap":{"1":{"line":4,"type":"binary-expr","locations":[{"start":{"line":4,"column":9},"end":{"line":4,"column":12}},{"start":{"line":4,"column":16},"end":{"line":4,"column":35}}]}}},"/Users/contra/Projects/vinyl/lib/isNull.js":{"path":"/Users/contra/Projects/vinyl/lib/isNull.js","s":{"1":1,"2":57},"b":{},"f":{"1":57},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":3,"column":2}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":20}}},"branchMap":{}},"/Users/contra/Projects/vinyl/lib/inspectStream.js":{"path":"/Users/contra/Projects/vinyl/lib/inspectStream.js","s":{"1":1,"2":1,"3":9,"4":2,"5":7,"6":7,"7":1,"8":7},"b":{"1":[2,7],"2":[1,6]},"f":{"1":9},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":34}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":37}},"2":{"start":{"line":3,"column":0},"end":{"line":11,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":32}},"4":{"start":{"line":4,"column":25},"end":{"line":4,"column":32}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":43}},"6":{"start":{"line":8,"column":2},"end":{"line":8,"column":47}},"7":{"start":{"line":8,"column":31},"end":{"line":8,"column":47}},"8":{"start":{"line":10,"column":2},"end":{"line":10,"column":34}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":4,"column":2}},{"start":{"line":4,"column":2},"end":{"line":4,"column":2}}]},"2":{"line":8,"type":"if","locations":[{"start":{"line":8,"column":2},"end":{"line":8,"column":2}},{"start":{"line":8,"column":2},"end":{"line":8,"column":2}}]}}}} \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html new file mode 100644 index 0000000..b875fbd --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html @@ -0,0 +1,363 @@ + + + + Code coverage report for All files + + + + + + + +
+

Code coverage report for All files

+

+ + Statements: 100% (111 / 111)      + + + Branches: 100% (84 / 84)      + + + Functions: 100% (20 / 20)      + + + Lines: 100% (102 / 102)      + + Ignored: none      +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
vinyl/100%(89 / 89)100%(76 / 76)100%(15 / 15)100%(82 / 82)
vinyl/lib/100%(22 / 22)100%(8 / 8)100%(5 / 5)100%(20 / 20)
+
+
+ + + + + + + + diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html new file mode 100644 index 0000000..ef3bcc4 --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html @@ -0,0 +1,350 @@ + + + + Code coverage report for vinyl/ + + + + + + + +
+

Code coverage report for vinyl/

+

+ + Statements: 100% (89 / 89)      + + + Branches: 100% (76 / 76)      + + + Functions: 100% (15 / 15)      + + + Lines: 100% (82 / 82)      + + Ignored: none      +

+
All files » vinyl/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js100%(89 / 89)100%(76 / 76)100%(15 / 15)100%(82 / 82)
+
+
+ + + + + + + + diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html new file mode 100644 index 0000000..36a4d76 --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html @@ -0,0 +1,847 @@ + + + + Code coverage report for vinyl/index.js + + + + + + + +
+

Code coverage report for vinyl/index.js

+

+ + Statements: 100% (89 / 89)      + + + Branches: 100% (76 / 76)      + + + Functions: 100% (15 / 15)      + + + Lines: 100% (82 / 82)      + + Ignored: none      +

+
All files » vinyl/ » index.js
+
+
+

+
+
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 +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 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +1761 +1 +1 +1 +1 +1 +1 +1 +1 +  +1 +73 +  +  +73 +73 +  +  +73 +73 +  +  +  +73 +  +  +73 +  +  +1 +26 +  +  +1 +29 +  +  +1 +6 +  +  +  +1 +3 +  +  +1 +14 +2 +  +  +  +12 +7 +  +  +  +  +5 +5 +  +  +  +14 +14 +1 +1 +13 +6 +  +  +14 +  +  +  +  +  +  +  +  +14 +  +75 +  +  +70 +  +5 +  +14 +  +  +1 +6 +6 +  +6 +2 +  +4 +2 +1 +  +1 +  +2 +  +  +  +2 +2 +  +  +1 +6 +  +  +6 +  +6 +4 +  +  +6 +3 +  +  +6 +1 +  +  +6 +  +  +  +  +1 +  +99 +  +  +78 +1 +  +77 +  +  +  +  +1 +  +7 +6 +5 +  +  +1 +  +  +  +1 +  +46 +  +  +9 +  +  +8 +5 +  +  +  +  +1 + 
var path = require('path');
+var clone = require('lodash').clone;
+var cloneStats = require('clone-stats');
+var cloneBuffer = require('./lib/cloneBuffer');
+var isBuffer = require('./lib/isBuffer');
+var isStream = require('./lib/isStream');
+var isNull = require('./lib/isNull');
+var inspectStream = require('./lib/inspectStream');
+var Stream = require('stream');
+ 
+function File(file) {
+  if (!file) file = {};
+ 
+  // record path change
+  var history = file.path ? [file.path] : file.history;
+  this.history = history || [];
+ 
+  // TODO: should this be moved to vinyl-fs?
+  this.cwd = file.cwd || process.cwd();
+  this.base = file.base || this.cwd;
+ 
+  // 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(opt) {
+  if (typeof opt === 'boolean') {
+    opt = {
+      deep: opt,
+      contents: true
+    };
+  } else if (!opt) {
+    opt = {
+      deep: false,
+      contents: true
+    };
+  } else {
+    opt.deep = opt.deep === true;
+    opt.contents = opt.contents !== false;
+  }
+ 
+  // clone our file contents
+  var contents;
+  if (this.isStream()) {
+    contents = this.contents.pipe(new Stream.PassThrough());
+    this.contents = this.contents.pipe(new Stream.PassThrough());
+  } else if (this.isBuffer()) {
+    contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
+  }
+ 
+  var file = new File({
+    cwd: this.cwd,
+    base: this.base,
+    stat: (this.stat ? cloneStats(this.stat) : null),
+    history: this.history.slice(),
+    contents: contents
+  });
+ 
+  // clone our custom properties
+  Object.keys(this).forEach(function(key) {
+    // ignore built-in fields
+    if (key === '_contents' || key === 'stat' ||
+      key === 'history' || key === 'path' ||
+      key === 'base' || key === 'cwd') {
+      return;
+    }
+    file[key] = opt.deep ? clone(this[key], true) : this[key];
+  }, this);
+  return file;
+};
+ 
+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;
+  }
+ 
+  // isNull
+  if (opt.end) stream.end();
+  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.');
+  }
+});
+ 
+Object.defineProperty(File.prototype, 'path', {
+  get: function() {
+    return this.history[this.history.length - 1];
+  },
+  set: function(path) {
+    if (typeof path !== 'string') throw new Error('path should be string');
+ 
+    // record history only when path changed
+    if (path && path !== this.path) {
+      this.history.push(path);
+    }
+  }
+});
+ 
+module.exports = File;
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html new file mode 100644 index 0000000..39ec92b --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html @@ -0,0 +1,343 @@ + + + + Code coverage report for vinyl/lib/cloneBuffer.js + + + + + + + +
+

Code coverage report for vinyl/lib/cloneBuffer.js

+

+ + Statements: 100% (5 / 5)      + + + Branches: 100% (0 / 0)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (5 / 5)      + + Ignored: none      +

+
All files » vinyl/lib/ » cloneBuffer.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +81 +  +1 +7 +7 +7 +  + 
var Buffer = require('buffer').Buffer;
+ 
+module.exports = function(buf) {
+  var out = new Buffer(buf.length);
+  buf.copy(out);
+  return out;
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html new file mode 100644 index 0000000..5288f5a --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html @@ -0,0 +1,402 @@ + + + + Code coverage report for vinyl/lib/ + + + + + + + +
+

Code coverage report for vinyl/lib/

+

+ + Statements: 100% (22 / 22)      + + + Branches: 100% (8 / 8)      + + + Functions: 100% (5 / 5)      + + + Lines: 100% (20 / 20)      + + Ignored: none      +

+
All files » vinyl/lib/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
cloneBuffer.js100%(5 / 5)100%(0 / 0)100%(1 / 1)100%(5 / 5)
inspectStream.js100%(8 / 8)100%(4 / 4)100%(1 / 1)100%(6 / 6)
isBuffer.js100%(4 / 4)100%(2 / 2)100%(1 / 1)100%(4 / 4)
isNull.js100%(2 / 2)100%(0 / 0)100%(1 / 1)100%(2 / 2)
isStream.js100%(3 / 3)100%(2 / 2)100%(1 / 1)100%(3 / 3)
+
+
+ + + + + + + + diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html new file mode 100644 index 0000000..e8e5b36 --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html @@ -0,0 +1,355 @@ + + + + Code coverage report for vinyl/lib/inspectStream.js + + + + + + + +
+

Code coverage report for vinyl/lib/inspectStream.js

+

+ + Statements: 100% (8 / 8)      + + + Branches: 100% (4 / 4)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (6 / 6)      + + Ignored: none      +

+
All files » vinyl/lib/ » inspectStream.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +121 +  +1 +9 +  +7 +  +7 +  +7 +  + 
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>';
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html new file mode 100644 index 0000000..a44efe4 --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html @@ -0,0 +1,340 @@ + + + + Code coverage report for vinyl/lib/isBuffer.js + + + + + + + +
+

Code coverage report for vinyl/lib/isBuffer.js

+

+ + Statements: 100% (4 / 4)      + + + Branches: 100% (2 / 2)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (4 / 4)      + + Ignored: none      +

+
All files » vinyl/lib/ » isBuffer.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +71 +1 +  +  +1 +108 + 
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;
+};
+ +
+ + + + + + + + diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html new file mode 100644 index 0000000..010d3e0 --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html @@ -0,0 +1,331 @@ + + + + Code coverage report for vinyl/lib/isNull.js + + + + + + + +
+

Code coverage report for vinyl/lib/isNull.js

+

+ + Statements: 100% (2 / 2)      + + + Branches: 100% (0 / 0)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (2 / 2)      + + Ignored: none      +

+
All files » vinyl/lib/ » isNull.js
+
+
+

+
+
1 +2 +3 +41 +57 +  + 
module.exports = function(v) {
+  return v === null;
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html new file mode 100644 index 0000000..511186f --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html @@ -0,0 +1,334 @@ + + + + Code coverage report for vinyl/lib/isStream.js + + + + + + + +
+

Code coverage report for vinyl/lib/isStream.js

+

+ + Statements: 100% (3 / 3)      + + + Branches: 100% (2 / 2)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (3 / 3)      + + Ignored: none      +

+
All files » vinyl/lib/ » isStream.js
+
+
+

+
+
1 +2 +3 +4 +51 +  +1 +99 + 
var Stream = require('stream').Stream;
+ 
+module.exports = function(o) {
+  return !!o && o instanceof Stream;
+};
+ +
+ + + + + + + + diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info new file mode 100644 index 0000000..bbebe38 --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info @@ -0,0 +1,280 @@ +TN: +SF:/Users/contra/Projects/vinyl/index.js +FN:11,File +FN:30,(anonymous_2) +FN:34,(anonymous_3) +FN:38,(anonymous_4) +FN:43,(anonymous_5) +FN:47,(anonymous_6) +FN:81,(anonymous_7) +FN:93,(anonymous_8) +FN:114,(anonymous_9) +FN:138,(anonymous_10) +FN:141,(anonymous_11) +FN:151,(anonymous_12) +FN:156,(anonymous_13) +FN:162,(anonymous_14) +FN:165,(anonymous_15) +FNF:15 +FNH:15 +FNDA:73,File +FNDA:26,(anonymous_2) +FNDA:29,(anonymous_3) +FNDA:6,(anonymous_4) +FNDA:3,(anonymous_5) +FNDA:14,(anonymous_6) +FNDA:75,(anonymous_7) +FNDA:6,(anonymous_8) +FNDA:6,(anonymous_9) +FNDA:99,(anonymous_10) +FNDA:78,(anonymous_11) +FNDA:7,(anonymous_12) +FNDA:1,(anonymous_13) +FNDA:46,(anonymous_14) +FNDA:9,(anonymous_15) +DA:1,1 +DA:2,1 +DA:3,1 +DA:4,1 +DA:5,1 +DA:6,1 +DA:7,1 +DA:8,1 +DA:9,1 +DA:11,1 +DA:12,73 +DA:15,73 +DA:16,73 +DA:19,73 +DA:20,73 +DA:24,73 +DA:27,73 +DA:30,1 +DA:31,26 +DA:34,1 +DA:35,29 +DA:38,1 +DA:39,6 +DA:43,1 +DA:44,3 +DA:47,1 +DA:48,14 +DA:49,2 +DA:53,12 +DA:54,7 +DA:59,5 +DA:60,5 +DA:64,14 +DA:65,14 +DA:66,1 +DA:67,1 +DA:68,13 +DA:69,6 +DA:72,14 +DA:81,14 +DA:83,75 +DA:86,70 +DA:88,5 +DA:90,14 +DA:93,1 +DA:94,6 +DA:95,6 +DA:97,6 +DA:98,2 +DA:100,4 +DA:101,2 +DA:102,1 +DA:104,1 +DA:106,2 +DA:110,2 +DA:111,2 +DA:114,1 +DA:115,6 +DA:118,6 +DA:120,6 +DA:121,4 +DA:124,6 +DA:125,3 +DA:128,6 +DA:129,1 +DA:132,6 +DA:137,1 +DA:139,99 +DA:142,78 +DA:143,1 +DA:145,77 +DA:150,1 +DA:152,7 +DA:153,6 +DA:154,5 +DA:157,1 +DA:161,1 +DA:163,46 +DA:166,9 +DA:169,8 +DA:170,5 +DA:175,1 +LF:82 +LH:82 +BRDA:12,1,0,14 +BRDA:12,1,1,59 +BRDA:15,2,0,25 +BRDA:15,2,1,48 +BRDA:16,3,0,73 +BRDA:16,3,1,33 +BRDA:19,4,0,73 +BRDA:19,4,1,32 +BRDA:20,5,0,73 +BRDA:20,5,1,39 +BRDA:24,6,0,73 +BRDA:24,6,1,65 +BRDA:27,7,0,73 +BRDA:27,7,1,44 +BRDA:44,8,0,3 +BRDA:44,8,1,1 +BRDA:44,8,2,1 +BRDA:48,9,0,2 +BRDA:48,9,1,12 +BRDA:53,10,0,7 +BRDA:53,10,1,5 +BRDA:65,11,0,1 +BRDA:65,11,1,13 +BRDA:68,12,0,6 +BRDA:68,12,1,7 +BRDA:69,13,0,5 +BRDA:69,13,1,1 +BRDA:75,14,0,2 +BRDA:75,14,1,12 +BRDA:83,15,0,70 +BRDA:83,15,1,5 +BRDA:83,16,0,75 +BRDA:83,16,1,61 +BRDA:83,16,2,47 +BRDA:83,16,3,33 +BRDA:83,16,4,33 +BRDA:83,16,5,19 +BRDA:88,17,0,2 +BRDA:88,17,1,3 +BRDA:94,18,0,3 +BRDA:94,18,1,3 +BRDA:95,19,0,3 +BRDA:95,19,1,3 +BRDA:97,20,0,2 +BRDA:97,20,1,4 +BRDA:100,21,0,2 +BRDA:100,21,1,2 +BRDA:101,22,0,1 +BRDA:101,22,1,1 +BRDA:110,23,0,1 +BRDA:110,23,1,1 +BRDA:118,24,0,3 +BRDA:118,24,1,3 +BRDA:118,25,0,6 +BRDA:118,25,1,5 +BRDA:120,26,0,4 +BRDA:120,26,1,2 +BRDA:124,27,0,3 +BRDA:124,27,1,3 +BRDA:128,28,0,1 +BRDA:128,28,1,5 +BRDA:142,29,0,1 +BRDA:142,29,1,77 +BRDA:142,30,0,78 +BRDA:142,30,1,57 +BRDA:142,30,2,46 +BRDA:152,31,0,1 +BRDA:152,31,1,6 +BRDA:153,32,0,1 +BRDA:153,32,1,5 +BRDA:166,33,0,1 +BRDA:166,33,1,8 +BRDA:169,34,0,5 +BRDA:169,34,1,3 +BRDA:169,35,0,8 +BRDA:169,35,1,7 +BRF:76 +BRH:76 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/cloneBuffer.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:7,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,7 +DA:5,7 +DA:6,7 +LF:5 +LH:5 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isBuffer.js +FN:5,(anonymous_1) +FNF:1 +FNH:1 +FNDA:108,(anonymous_1) +DA:1,1 +DA:2,1 +DA:5,1 +DA:6,108 +LF:4 +LH:4 +BRDA:6,1,0,108 +BRDA:6,1,1,107 +BRF:2 +BRH:2 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isStream.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:99,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,99 +LF:3 +LH:3 +BRDA:4,1,0,99 +BRDA:4,1,1,40 +BRF:2 +BRH:2 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isNull.js +FN:1,(anonymous_1) +FNF:1 +FNH:1 +FNDA:57,(anonymous_1) +DA:1,1 +DA:2,57 +LF:2 +LH:2 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/inspectStream.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:9,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,9 +DA:6,7 +DA:8,7 +DA:10,7 +LF:6 +LH:6 +BRDA:4,1,0,2 +BRDA:4,1,1,7 +BRDA:8,2,0,1 +BRDA:8,2,1,6 +BRF:4 +BRH:4 +end_of_record diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/index.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/index.js index 97f5c75..09913c3 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/index.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/index.js @@ -1,22 +1,24 @@ var path = require('path'); - +var clone = require('lodash').clone; var cloneStats = require('clone-stats'); - +var cloneBuffer = require('./lib/cloneBuffer'); 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'); +var Stream = require('stream'); function File(file) { if (!file) file = {}; + // record path change + var history = file.path ? [file.path] : file.history; + this.history = history || []; + // 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; @@ -42,17 +44,50 @@ 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; +File.prototype.clone = function(opt) { + if (typeof opt === 'boolean') { + opt = { + deep: opt, + contents: true + }; + } else if (!opt) { + opt = { + deep: false, + contents: true + }; + } else { + opt.deep = opt.deep === true; + opt.contents = opt.contents !== false; + } - return new File({ + // clone our file contents + var contents; + if (this.isStream()) { + contents = this.contents.pipe(new Stream.PassThrough()); + this.contents = this.contents.pipe(new Stream.PassThrough()); + } else if (this.isBuffer()) { + contents = opt.contents ? cloneBuffer(this.contents) : this.contents; + } + + var file = new File({ cwd: this.cwd, base: this.base, - path: this.path, - stat: clonedStat, - contents: clonedContents + stat: (this.stat ? cloneStats(this.stat) : null), + history: this.history.slice(), + contents: contents }); + + // clone our custom properties + Object.keys(this).forEach(function(key) { + // ignore built-in fields + if (key === '_contents' || key === 'stat' || + key === 'history' || key === 'path' || + key === 'base' || key === 'cwd') { + return; + } + file[key] = opt.deep ? clone(this[key], true) : this[key]; + }, this); + return file; }; File.prototype.pipe = function(stream, opt) { @@ -70,11 +105,9 @@ File.prototype.pipe = function(stream, opt) { } return stream; } - if (this.isNull()) { - if (opt.end) stream.end(); - return stream; - } + // isNull + if (opt.end) stream.end(); return stream; }; @@ -107,7 +140,7 @@ Object.defineProperty(File.prototype, '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."); + throw new Error('File.contents can only be a Buffer, a Stream, or null.'); } this._contents = val; } @@ -125,4 +158,18 @@ Object.defineProperty(File.prototype, 'relative', { } }); +Object.defineProperty(File.prototype, 'path', { + get: function() { + return this.history[this.history.length - 1]; + }, + set: function(path) { + if (typeof path !== 'string') throw new Error('path should be string'); + + // record history only when path changed + if (path && path !== this.path) { + this.history.push(path); + } + } +}); + module.exports = File; diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js index 3a861f2..89f09ed 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js @@ -4,4 +4,4 @@ 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-uglify/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js index 2c90678..d36df6f 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js @@ -1,12 +1,11 @@ -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-uglify/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js index 403bb30..7f22c63 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js @@ -1,3 +1,3 @@ module.exports = function(v) { return v === null; -}; \ No newline at end of file +}; diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json index 4967bde..e691165 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json @@ -39,7 +39,7 @@ "shasum": "b88f94a82cf38b8791d58046ea4029ad88ca99d1", "tarball": "http://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" }, - "_from": "clone-stats@~0.0.1", + "_from": "clone-stats@^0.0.1", "_npmVersion": "1.3.22", "_npmUser": { "name": "hughsk", diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/package.json index 631b245..2902031 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/package.json @@ -1,7 +1,7 @@ { "name": "vinyl", "description": "A virtual file format", - "version": "0.2.3", + "version": "0.4.3", "homepage": "http://github.com/wearefractal/vinyl", "repository": { "type": "git", @@ -14,22 +14,23 @@ }, "main": "./index.js", "dependencies": { - "clone-stats": "~0.0.1" + "clone-stats": "^0.0.1", + "lodash": "^2.4.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" + "mocha": "^1.17.0", + "should": "^4.0.4", + "mocha-lcov-reporter": "^0.0.1", + "coveralls": "^2.6.1", + "istanbul": "^0.3.0", + "rimraf": "^2.2.5", + "jshint": "^2.4.1", + "buffer-equal": "0.0.1", + "lodash.templatesettings": "^2.4.1", + "event-stream": "^3.1.0" }, "scripts": { - "test": "mocha --reporter spec && jshint", + "test": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter spec && jshint .", "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" }, "engines": { @@ -41,16 +42,14 @@ "url": "http://github.com/wearefractal/vinyl/raw/master/LICENSE" } ], + "gitHead": "6eae432519b007c313a8df83b093adfb97a2944c", "bugs": { "url": "https://github.com/wearefractal/vinyl/issues" }, - "_id": "vinyl@0.2.3", - "dist": { - "shasum": "bca938209582ec5a49ad538a00fa1f125e513252", - "tarball": "http://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz" - }, - "_from": "vinyl@^0.2.1", - "_npmVersion": "1.3.23", + "_id": "vinyl@0.4.3", + "_shasum": "19f61a1b28e72b4c50697889dbe91d7503943ecf", + "_from": "vinyl@^0.4.0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -61,8 +60,11 @@ "email": "contact@wearefractal.com" } ], + "dist": { + "shasum": "19f61a1b28e72b4c50697889dbe91d7503943ecf", + "tarball": "http://registry.npmjs.org/vinyl/-/vinyl-0.4.3.tgz" + }, "directories": {}, - "_shasum": "bca938209582ec5a49ad538a00fa1f125e513252", - "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz", + "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.3.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/perf/clone.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/perf/clone.js new file mode 100644 index 0000000..4df8578 --- /dev/null +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/perf/clone.js @@ -0,0 +1,59 @@ +var File = require('../'); + +var contents = new Buffer('blah blah blah'); + +var originalFile = new File({ + path: 'yo.coffee', + contents: contents +}); + +// simulate some history +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; + +originalFile.ast = { + a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { + + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +}; + +for (var i = 0; i < 10000; i++) { + originalFile.clone(true).ast; +} \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/File.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/File.js index 1f2a83a..419e7aa 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/File.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/File.js @@ -1,12 +1,13 @@ -var File = require('../'); var Stream = require('stream'); var fs = require('fs'); +var path = require('path'); +var es = require('event-stream'); +var File = require('../'); 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(); @@ -15,7 +16,7 @@ describe('File', function() { }); it('should default base to cwd', function(done) { - var cwd = "/"; + var cwd = '/'; var file = new File({cwd: cwd}); file.base.should.equal(cwd); done(); @@ -33,6 +34,12 @@ describe('File', function() { done(); }); + it('should default history to []', function(done) { + var file = new File(); + file.history.should.eql([]); + done(); + }); + it('should default stat to null', function(done) { var file = new File(); should.not.exist(file.stat); @@ -46,23 +53,32 @@ describe('File', function() { }); it('should set base to given value', function(done) { - var val = "/"; + 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 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 val = '/test.coffee'; var file = new File({path: val}); file.path.should.equal(val); + file.history.should.eql([val]); + done(); + }); + + it('should set history to given value', function(done) { + var val = '/test.coffee'; + var file = new File({history: [val]}); + file.path.should.equal(val); + file.history.should.eql([val]); done(); }); @@ -74,16 +90,16 @@ describe('File', function() { }); it('should set contents to given value', function(done) { - var val = new Buffer("test"); + 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 val = new Buffer('test'); var file = new File({contents: val}); file.isBuffer().should.equal(true); done(); @@ -105,7 +121,7 @@ describe('File', function() { describe('isStream()', function() { it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({contents: val}); file.isStream().should.equal(false); done(); @@ -127,7 +143,7 @@ describe('File', function() { describe('isNull()', function() { it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({contents: val}); file.isNull().should.equal(false); done(); @@ -155,7 +171,7 @@ describe('File', function() { }; it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({contents: val, stat: fakeStat}); file.isDirectory().should.equal(false); done(); @@ -178,10 +194,10 @@ describe('File', function() { 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") + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: new Buffer('test') }; var file = new File(options); var file2 = file.clone(); @@ -195,29 +211,65 @@ describe('File', function() { done(); }); + it('should copy buffer\'s reference with option contents: false', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.js', + contents: new Buffer('test') + }; + + var file = new File(options); + + var copy1 = file.clone({ contents: false }); + copy1.contents.should.equal(file.contents); + + var copy2 = file.clone({}); + copy2.contents.should.not.equal(file.contents); + + var copy3 = file.clone({ contents: 'any string' }); + copy3.contents.should.not.equal(file.contents); + + done(); + }); + it('should copy all attributes over with Stream', function(done) { + var contents = new Stream.PassThrough(); var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream() + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: contents }; var file = new File(options); var file2 = file.clone(); + contents.write(new Buffer('wa')); + + process.nextTick(function() { + contents.write(new Buffer('dup')); + contents.end(); + }); + 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'); + file2.contents.should.not.equal(file.contents, 'stream ref should not be the same'); + file.contents.pipe(es.wait(function(err, data) { + file2.contents.pipe(es.wait(function(err, data2) { + data2.should.not.equal(data, 'stream contents ref should not be the same'); + data2.should.eql(data, 'stream contents should be the same'); + })); + })); done(); }); it('should copy all attributes over with null', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: null }; var file = new File(options); @@ -233,20 +285,123 @@ describe('File', function() { it('should properly clone the `stat` property', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.js", - contents: new Buffer("test"), + 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; + copy.stat.isFile().should.equal(true); + copy.stat.isDirectory().should.equal(false); + should(file.stat instanceof fs.Stats).equal(true); + should(copy.stat instanceof fs.Stats).equal(true); + + done(); + }); + + it('should properly clone the `history` 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.history[0].should.equal(options.path); + copy.path = 'lol'; + file.path.should.not.equal(copy.path); + done(); + }); + + it('should copy custom properties', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.custom = { a: 'custom property' }; + + 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.custom.should.equal(file.custom); + file2.custom.a.should.equal(file.custom.a); + + done(); + }); + + it('should copy history', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.path = '/test/test.js'; + file.path = '/test/test-938di2s.js'; + var file2 = file.clone(); + + file2.history.should.eql([ + '/test/test.coffee', + '/test/test.js', + '/test/test-938di2s.js' + ]); + file2.history.should.not.equal([ + '/test/test.coffee', + '/test/test.js', + '/test/test-938di2s.js' + ]); + file2.path.should.eql('/test/test-938di2s.js'); + + done(); + }); + + it('should copy all attributes deeply', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.custom = { a: 'custom property' }; + + var file2 = file.clone(true); + file2.custom.should.eql(file.custom); + file2.custom.should.not.equal(file.custom); + file2.custom.a.should.equal(file.custom.a); + + var file3 = file.clone({ deep: true }); + file3.custom.should.eql(file.custom); + file3.custom.should.not.equal(file.custom); + file3.custom.a.should.equal(file.custom.a); + + var file4 = file.clone(false); + file4.custom.should.eql(file.custom); + file4.custom.should.equal(file.custom); + file4.custom.a.should.equal(file.custom.a); + + var file5 = file.clone({ deep: false }); + file5.custom.should.eql(file.custom); + file5.custom.should.equal(file.custom); + file5.custom.a.should.equal(file.custom.a); done(); }); @@ -255,10 +410,10 @@ describe('File', function() { 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") + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: new Buffer('test') }; var file = new File(options); var stream = new Stream.PassThrough(); @@ -267,7 +422,7 @@ describe('File', function() { (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) { + stream.on('end', function() { done(); }); var ret = file.pipe(stream); @@ -275,11 +430,11 @@ describe('File', function() { }); it('should pipe to stream with Stream', function(done) { - var testChunk = new Buffer("test"); + var testChunk = new Buffer('test'); var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: new Stream.PassThrough() }; var file = new File(options); @@ -298,15 +453,15 @@ describe('File', function() { it('should do nothing with null', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + 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('data', function() { + throw new Error('should not write'); }); stream.on('end', function() { done(); @@ -317,10 +472,10 @@ describe('File', function() { it('should write to stream with Buffer', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: new Buffer('test') }; var file = new File(options); var stream = new Stream.PassThrough(); @@ -330,19 +485,19 @@ describe('File', function() { chunk.toString('utf8').should.equal(options.contents.toString('utf8')); done(); }); - stream.on('end', function(chunk) { - throw new Error("should not end"); + stream.on('end', function() { + 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 testChunk = new Buffer('test'); var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: new Stream.PassThrough() }; var file = new File(options); @@ -353,8 +508,8 @@ describe('File', function() { chunk.toString('utf8').should.equal(testChunk.toString('utf8')); done(); }); - stream.on('end', function(chunk) { - throw new Error("should not end"); + stream.on('end', function() { + throw new Error('should not end'); }); var ret = file.pipe(stream, {end: false}); ret.should.equal(stream, 'should return the stream'); @@ -364,25 +519,25 @@ describe('File', function() { it('should do nothing with null', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + 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('data', function() { + throw new Error('should not write'); }); - stream.on('end', function(chunk) { - throw new Error("should not end"); + stream.on('end', function() { + 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(); @@ -391,7 +546,7 @@ describe('File', function() { }); it('should return correct format when Buffer and no path', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({ contents: val }); @@ -400,11 +555,11 @@ describe('File', function() { }); it('should return correct format when Buffer and relative path', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: val }); file.inspect().should.equal('>'); @@ -412,10 +567,10 @@ describe('File', function() { }); it('should return correct format when Buffer and only path and no base', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({ - cwd: "/", - path: "/test/test.coffee", + cwd: '/', + path: '/test/test.coffee', contents: val }); delete file.base; @@ -425,9 +580,9 @@ describe('File', function() { it('should return correct format when Stream and relative path', function(done) { var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: new Stream.PassThrough() }); file.inspect().should.equal('>'); @@ -436,19 +591,19 @@ describe('File', function() { it('should return correct format when null and relative path', function(done) { var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: null }); file.inspect().should.equal(''); done(); }); }); - + describe('contents get/set', function() { it('should work with Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File(); file.contents = val; file.contents.should.equal(val); @@ -472,7 +627,7 @@ describe('File', function() { }); it('should not work with string', function(done) { - var val = "test"; + var val = 'test'; var file = new File(); try { file.contents = val; @@ -487,7 +642,7 @@ describe('File', function() { it('should error on set', function(done) { var file = new File(); try { - file.relative = "test"; + file.relative = 'test'; } catch (err) { should.exist(err); done(); @@ -519,22 +674,80 @@ describe('File', function() { it('should return a relative path from base', function(done) { var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee" + cwd: '/', + base: '/test/', + path: '/test/test.coffee' }); - file.relative.should.equal("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" + cwd: '/', + path: '/test/test.coffee' }); - file.relative.should.equal("test/test.coffee"); + file.relative.should.equal(path.join('test','test.coffee')); done(); }); }); + describe('path get/set', function() { + + it('should record history when instantiation', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should record history when path change', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.js'; + file.path.should.eql('/test/test.js'); + file.history.should.eql(['/test/test.coffee', '/test/test.js']); + + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee', '/test/test.js', '/test/test.coffee']); + }); + + it('should not record history when set the same path', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.coffee'; + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + + // ignore when set empty string + file.path = ''; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should throw when set path null', function() { + var file = new File({ + cwd: '/', + path: null + }); + + should.not.exist(file.path); + file.history.should.eql([]); + + (function() { + file.path = null; + }).should.throw('path should be string'); + }); + }); }); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js index 7d28681..34b3e7c 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js @@ -1,5 +1,4 @@ var cloneBuffer = require('../lib/cloneBuffer'); -var Stream = require('stream'); var should = require('should'); require('mocha'); @@ -25,4 +24,4 @@ describe('cloneBuffer()', function() { testBuffer2.toString('utf8').should.equal('west', 'new buffer should be modified'); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js index 5bb1cb9..432ad2a 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js @@ -1,6 +1,6 @@ var isBuffer = require('../lib/isBuffer'); var Stream = require('stream'); -var should = require('should'); +require('should'); require('mocha'); describe('isBuffer()', function() { @@ -26,4 +26,4 @@ describe('isBuffer()', function() { isBuffer(testArray).should.equal(false); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isNull.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isNull.js index db70c01..356934a 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isNull.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isNull.js @@ -1,6 +1,5 @@ var isNull = require('../lib/isNull'); -var Stream = require('stream'); -var should = require('should'); +require('should'); require('mocha'); describe('isNull()', function() { @@ -17,7 +16,7 @@ describe('isNull()', function() { it('should return false on defined values', function(done) { isNull(1).should.equal(false); - isNull("test").should.equal(false); + isNull('test').should.equal(false); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isStream.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isStream.js index f22584c..5cc0e0b 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isStream.js +++ b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/vinyl/test/isStream.js @@ -1,6 +1,6 @@ var isStream = require('../lib/isStream'); var Stream = require('stream'); -var should = require('should'); +require('should'); require('mocha'); describe('isStream()', function() { @@ -26,4 +26,4 @@ describe('isStream()', function() { isStream(testArray).should.equal(false); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/package.json index 900cd5a..56bbcad 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/package.json +++ b/node_modules/gulp-uglify/node_modules/gulp-util/package.json @@ -1,7 +1,7 @@ { "name": "gulp-util", "description": "Utility functions for gulp plugins", - "version": "2.2.20", + "version": "3.0.1", "homepage": "http://github.com/wearefractal/gulp-util", "repository": { "type": "git", @@ -16,19 +16,20 @@ "dependencies": { "chalk": "^0.5.0", "dateformat": "^1.0.7-1.2.3", + "lodash": "^2.4.1", "lodash._reinterpolate": "^2.4.1", "lodash.template": "^2.4.1", - "minimist": "^0.2.0", + "minimist": "^1.1.0", "multipipe": "^0.1.0", - "through2": "^0.5.0", - "vinyl": "^0.2.1" + "through2": "^0.6.1", + "vinyl": "^0.4.0" }, "devDependencies": { "mocha": "^1.17.0", "should": "^4.0.0", "mocha-lcov-reporter": "^0.0.1", "coveralls": "^2.7.0", - "istanbul": "^0.2.3", + "istanbul": "^0.3.0", "rimraf": "^2.2.5", "jshint": "^2.4.1", "buffer-equal": "~0.0.1", @@ -48,14 +49,14 @@ "url": "http://github.com/wearefractal/gulp-util/raw/master/LICENSE" } ], - "gitHead": "a44e450cfbe65fa4902b198bead4c65722cced0a", + "gitHead": "f6336c8ac9f52930b36ad14002cf267c06f801df", "bugs": { "url": "https://github.com/wearefractal/gulp-util/issues" }, - "_id": "gulp-util@2.2.20", - "_shasum": "d7146e5728910bd8f047a6b0b1e549bc22dbd64c", - "_from": "gulp-util@~2.2.14", - "_npmVersion": "1.5.0-alpha-1", + "_id": "gulp-util@3.0.1", + "_shasum": "8214894d05c2bb6cc7f5544918a51ddf88180f00", + "_from": "gulp-util@>=3.0.0 <4.0.0-0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -67,10 +68,10 @@ } ], "dist": { - "shasum": "d7146e5728910bd8f047a6b0b1e549bc22dbd64c", - "tarball": "http://registry.npmjs.org/gulp-util/-/gulp-util-2.2.20.tgz" + "shasum": "8214894d05c2bb6cc7f5544918a51ddf88180f00", + "tarball": "http://registry.npmjs.org/gulp-util/-/gulp-util-3.0.1.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-2.2.20.tgz", + "_resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.1.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/through2/README.md b/node_modules/gulp-uglify/node_modules/through2/README.md index 33aa01e..ec74569 100644 --- a/node_modules/gulp-uglify/node_modules/through2/README.md +++ b/node_modules/gulp-uglify/node_modules/through2/README.md @@ -100,7 +100,9 @@ The `transformFunction` must have the following signature: `function (chunk, enc 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. +Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. + +If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. ### flushFunction diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js index 0ca7705..6307220 100644 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js @@ -240,7 +240,7 @@ function howMuchToRead(n, state) { if (state.objectMode) return n === 0 ? 0 : 1; - if (isNaN(n) || n === null) { + if (n === null || isNaN(n)) { // only flow one buffer at a time if (state.flowing && state.buffer.length) return state.buffer[0].length; @@ -275,6 +275,7 @@ Readable.prototype.read = function(n) { var state = this._readableState; state.calledRead = true; var nOrig = n; + var ret; if (typeof n !== 'number' || n > 0) state.emittedReadable = false; @@ -293,9 +294,28 @@ Readable.prototype.read = function(n) { // if we've ended, and we're now clear, then finish it up. if (n === 0 && state.ended) { + ret = null; + + // In cases where the decoder did not receive enough data + // to produce a full chunk, then immediately received an + // EOF, state.buffer will contain [, ]. + // howMuchToRead will see this and coerce the amount to + // read to zero (because it's looking at the length of the + // first in state.buffer), and we'll end up here. + // + // This can only happen via state.decoder -- no other venue + // exists for pushing a zero-length chunk into state.buffer + // and triggering this behavior. In this case, we return our + // remaining data and end the stream, if appropriate. + if (state.length > 0 && state.decoder) { + ret = fromList(n, state); + state.length -= ret.length; + } + if (state.length === 0) endReadable(this); - return null; + + return ret; } // All the actual chunk generation logic needs to be @@ -349,7 +369,6 @@ Readable.prototype.read = function(n) { if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - var ret; if (n > 0) ret = fromList(n, state); else @@ -382,8 +401,7 @@ function chunkInvalid(state, chunk) { 'string' !== typeof chunk && chunk !== null && chunk !== undefined && - !state.objectMode && - !er) { + !state.objectMode) { er = new TypeError('Invalid non-string/buffer chunk'); } return er; @@ -814,7 +832,12 @@ Readable.prototype.wrap = function(stream) { stream.on('data', function(chunk) { if (state.decoder) chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) + + // don't skip over falsy values in objectMode + //if (state.objectMode && util.isNullOrUndefined(chunk)) + if (state.objectMode && (chunk === null || chunk === undefined)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) return; var ret = self.push(chunk); diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js index d0254d5..4bdaa4f 100644 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js @@ -37,7 +37,6 @@ var util = require('core-util-is'); util.inherits = require('inherits'); /**/ - var Stream = require('stream'); util.inherits(Writable, Stream); diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js index 2e44a03..b00e54f 100644 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -36,6 +36,14 @@ function assertEncoding(encoding) { } } +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. var StringDecoder = exports.StringDecoder = function(encoding) { this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); assertEncoding(encoding); @@ -60,37 +68,50 @@ var StringDecoder = exports.StringDecoder = function(encoding) { return; } + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. this.charLength = 0; }; +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . 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; + var available = (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; + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; if (this.charReceived < this.charLength) { // still not enough chars in this buffer? wait for more ... return ''; } + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + // 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 + // CESU-8: 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; @@ -100,34 +121,33 @@ StringDecoder.prototype.write = function(buffer) { 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); + if (buffer.length === 0) { + return charStr; + } break; } - var lenIncomplete = this.detectIncompleteChar(buffer); + // determine and set charLength / charReceived + 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; + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } 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 + // CESU-8: 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); + buffer.copy(this.charBuffer, 0, 0, size); return charStr.substring(0, end); } @@ -135,6 +155,10 @@ StringDecoder.prototype.write = function(buffer) { return charStr; }; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. 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; @@ -164,8 +188,7 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { break; } } - - return i; + this.charReceived = i; }; StringDecoder.prototype.end = function(buffer) { @@ -188,13 +211,11 @@ function passThroughWrite(buffer) { } function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json index 7f5d001..a8c586b 100644 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,6 +1,6 @@ { "name": "string_decoder", - "version": "0.10.25-1", + "version": "0.10.31", "description": "The string_decoder module from Node core", "main": "index.js", "dependencies": {}, @@ -22,11 +22,33 @@ "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", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@~0.10.x", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/package.json index afdd6ef..15c84e6 100644 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/package.json +++ b/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.0.27-1", + "version": "1.0.31", "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", "main": "readable.js", "dependencies": { @@ -37,13 +37,10 @@ "url": "https://github.com/isaacs/readable-stream/issues" }, "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.27-1", - "dist": { - "shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz" - }, - "_from": "readable-stream@~1.0.17", - "_npmVersion": "1.4.3", + "_id": "readable-stream@1.0.31", + "_shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "_from": "readable-stream@>=1.0.27-1 <1.1.0-0", + "_npmVersion": "1.4.9", "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" @@ -62,8 +59,11 @@ "email": "rod@vagg.org" } ], + "dist": { + "shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz" + }, "directories": {}, - "_shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.jshintrc b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/.jshintrc similarity index 100% rename from node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.jshintrc rename to node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/.jshintrc diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/LICENCE index a23e08a..1a14b43 100644 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/LICENCE +++ b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/LICENCE @@ -1,4 +1,4 @@ -Copyright (c) 2012 Raynos. +Copyright (c) 2012-2014 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 @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 +THE SOFTWARE. diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/README.md index 389adae..093cb29 100644 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/README.md +++ b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/README.md @@ -2,23 +2,28 @@ [![browser support][3]][4] +[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + 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. +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 precedence. ## Examples ```js var extend = require("xtend") +// extend returns a new object. Does not mutate arguments var combination = extend({ - a: "a" + a: "a", + b: 'c' }, { b: "b" }) // { a: "a", b: "b" } ``` +## Stability status: Locked ## MIT Licenced diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/has-keys.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/has-keys.js deleted file mode 100644 index 62391e7..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/immutable.js similarity index 100% rename from node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js rename to node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/immutable.js diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/index.js deleted file mode 100644 index 20937d1..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/mutable.js index 17454ae..a34475e 100644 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/mutable.js +++ b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/mutable.js @@ -1,23 +1,13 @@ -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 i = 1; i < arguments.length; i++) { + var source = arguments[i] - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] + for (var key in source) { + if (source.hasOwnProperty(key)) { + target[key] = source[key] + } } } diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md deleted file mode 100644 index ab32d0a..0000000 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md +++ /dev/null @@ -1,39 +0,0 @@ -#object-keys [![Version Badge][2]][1] - -[![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-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js deleted file mode 100644 index db32d45..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js deleted file mode 100644 index f5b24b6..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js deleted file mode 100644 index 74a0989..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json deleted file mode 100644 index d27bf8d..0000000 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json +++ /dev/null @@ -1,72 +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" - ] - }, - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "_id": "object-keys@0.4.0", - "dist": { - "shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336", - "tarball": "http://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" - }, - "_from": "object-keys@~0.4.0", - "_npmVersion": "1.3.5", - "_npmUser": { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - "maintainers": [ - { - "name": "ljharb", - "email": "ljharb@gmail.com" - } - ], - "directories": {}, - "deprecated": "", - "_shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336", - "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" -} diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js deleted file mode 100644 index b88421b..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js deleted file mode 100644 index f29f065..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js deleted file mode 100644 index 8b77b1f..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js deleted file mode 100644 index 62a07c2..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js deleted file mode 100644 index 9d93271..0000000 --- a/node_modules/gulp-uglify/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-uglify/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/package.json index 9ba90e8..d90698e 100644 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/package.json +++ b/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/package.json @@ -1,6 +1,6 @@ { "name": "xtend", - "version": "2.1.2", + "version": "4.0.0", "description": "extend like a boss", "keywords": [ "extend", @@ -18,13 +18,11 @@ "type": "git", "url": "git://github.com/Raynos/xtend.git" }, - "main": "index", + "main": "immutable", "scripts": { "test": "node test" }, - "dependencies": { - "object-keys": "~0.4.0" - }, + "dependencies": {}, "devDependencies": { "tape": "~1.1.0" }, @@ -65,13 +63,11 @@ "engines": { "node": ">=0.4" }, - "_id": "xtend@2.1.2", - "dist": { - "shasum": "6efecc2a4dad8e6962c4901b337ce7ba87b5d28b", - "tarball": "http://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz" - }, - "_from": "xtend@~2.1.1", - "_npmVersion": "1.3.14", + "gitHead": "94a95d76154103290533b2c55ffa0fe4be16bfef", + "_id": "xtend@4.0.0", + "_shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", + "_from": "xtend@>=4.0.0 <4.1.0-0", + "_npmVersion": "1.4.15", "_npmUser": { "name": "raynos", "email": "raynos2@gmail.com" @@ -82,7 +78,11 @@ "email": "raynos2@gmail.com" } ], + "dist": { + "shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", + "tarball": "http://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz" + }, "directories": {}, - "_shasum": "6efecc2a4dad8e6962c4901b337ce7ba87b5d28b", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz" + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/through2/package.json b/node_modules/gulp-uglify/node_modules/through2/package.json index d269ce5..1ea67ed 100644 --- a/node_modules/gulp-uglify/node_modules/through2/package.json +++ b/node_modules/gulp-uglify/node_modules/through2/package.json @@ -1,6 +1,6 @@ { "name": "through2", - "version": "0.4.2", + "version": "0.6.1", "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", "main": "through2.js", "scripts": { @@ -24,26 +24,23 @@ }, "license": "MIT", "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" + "readable-stream": ">=1.0.27-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" }, "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" + "bl": ">=0.9.0 <0.10.0-0", + "stream-spigot": ">=3.0.4 <3.1.0-0", + "tape": ">=2.14.0 <2.15.0-0" }, + "gitHead": "f66daaa2cb5d37b56c401f3b5a4962f709893267", "bugs": { "url": "https://github.com/rvagg/through2/issues" }, "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.4.2", - "dist": { - "shasum": "dbf5866031151ec8352bb6c4db64a2292a840b9b", - "tarball": "http://registry.npmjs.org/through2/-/through2-0.4.2.tgz" - }, - "_from": "through2@~0.4.0", - "_npmVersion": "1.4.3", + "_id": "through2@0.6.1", + "_shasum": "f742b32893e8bd26146e789e4fd2ccb2c07a717e", + "_from": "through2@>=0.6.1 <1.0.0-0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" @@ -58,7 +55,11 @@ "email": "bryce@ravenwall.com" } ], + "dist": { + "shasum": "f742b32893e8bd26146e789e4fd2ccb2c07a717e", + "tarball": "http://registry.npmjs.org/through2/-/through2-0.6.1.tgz" + }, "directories": {}, - "_shasum": "dbf5866031151ec8352bb6c4db64a2292a840b9b", - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz" + "_resolved": "https://registry.npmjs.org/through2/-/through2-0.6.1.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/through2/through2.js b/node_modules/gulp-uglify/node_modules/through2/through2.js index c110484..5b7a880 100644 --- a/node_modules/gulp-uglify/node_modules/through2/through2.js +++ b/node_modules/gulp-uglify/node_modules/through2/through2.js @@ -2,6 +2,24 @@ var Transform = require('readable-stream/transform') , inherits = require('util').inherits , xtend = require('xtend') +function DestroyableTransform(opts) { + Transform.call(this, opts) + this._destroyed = false +} + +inherits(DestroyableTransform, Transform) + +DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) return + this._destroyed = true + + var self = this + process.nextTick(function() { + if (err) + self.emit('error', err) + self.emit('close') + }) +} // a noop _transform function function noop (chunk, enc, callback) { @@ -32,7 +50,7 @@ function through2 (construct) { // main export, just make me a transform stream! module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) + var t2 = new DestroyableTransform(options) t2._transform = transform @@ -52,10 +70,10 @@ module.exports.ctor = through2(function (options, transform, flush) { this.options = xtend(options, override) - Transform.call(this, this.options) + DestroyableTransform.call(this, this.options) } - inherits(Through2, Transform) + inherits(Through2, DestroyableTransform) Through2.prototype._transform = transform @@ -67,7 +85,7 @@ module.exports.ctor = through2(function (options, transform, flush) { module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true }, options)) + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) t2._transform = transform diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/.travis.yml b/node_modules/gulp-uglify/node_modules/uglify-js/.travis.yml index b0243cf..d959127 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/.travis.yml +++ b/node_modules/gulp-uglify/node_modules/uglify-js/.travis.yml @@ -1,5 +1,7 @@ language: node_js node_js: + - "0.4" + - "0.6" - "0.8" - "0.10" - "0.11" diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/README.md b/node_modules/gulp-uglify/node_modules/uglify-js/README.md index 27d06cd..f2f2f21 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/README.md +++ b/node_modules/gulp-uglify/node_modules/uglify-js/README.md @@ -54,10 +54,6 @@ The available options are: --source-map-url The path to the source map to be added in //# sourceMappingURL. Defaults to the value passed with --source-map. [string] - --source-map-include-sources - Pass this flag if you want to include the content of - source files in the source map as sourcesContent - property. [boolean] --in-source-map Input source map, useful if you're compressing JS that was generated from some other original code. --screw-ie8 Pass this flag if you don't care about full compliance @@ -173,7 +169,7 @@ To enable the mangler you need to pass `--mangle` (`-m`). The following - `toplevel` — mangle names declared in the toplevel scope (disabled by default). -- `eval` — mangle names visible in scopes where `eval` or `with` are used +- `eval` — mangle names visible in scopes where `eval` or `when` are used (disabled by default). When mangling is enabled but you want to prevent certain names from being @@ -253,9 +249,6 @@ to set `true`; it's effectively a shortcut for `foo=true`). statement would get discarded. The current implementation adds some overhead (compression will be slower). -- `drop_console` -- default `false`. Pass `true` to discard calls to - `console.*` functions. - ### The `unsafe` option It enables some transformations that *might* break code logic in certain @@ -509,7 +502,7 @@ something like this: ```javascript var toplevel = null; files.forEach(function(file){ - var code = fs.readFileSync(file, "utf8"); + var code = fs.readFileSync(file); toplevel = UglifyJS.parse(code, { filename: file, toplevel: toplevel diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/bin/uglifyjs b/node_modules/gulp-uglify/node_modules/uglify-js/bin/uglifyjs index 3a3318b..9e8573e 100755 --- a/node_modules/gulp-uglify/node_modules/uglify-js/bin/uglifyjs +++ b/node_modules/gulp-uglify/node_modules/uglify-js/bin/uglifyjs @@ -22,7 +22,6 @@ mangling you need to use `-c` and `-m`.\ .describe("source-map", "Specify an output file where to generate source map.") .describe("source-map-root", "The path to the original source to be included in the source map.") .describe("source-map-url", "The path to the source map to be added in //# sourceMappingURL. Defaults to the value passed with --source-map.") - .describe("source-map-include-sources", "Pass this flag if you want to include the content of source files in the source map as sourcesContent property.") .describe("in-source-map", "Input source map, useful if you're compressing JS that was generated from some other original code.") .describe("screw-ie8", "Pass this flag if you don't care about full compliance with Internet Explorer 6-8 quirks (by default UglifyJS will try to be IE-proof).") .describe("expr", "Parse a single expression, rather than a program (for parsing JSON)") @@ -89,7 +88,6 @@ You need to pass an argument to this option to specify the name that your module .string("p") .boolean("expr") - .boolean("source-map-include-sources") .boolean("screw-ie8") .boolean("export-all") .boolean("self") @@ -220,7 +218,6 @@ var STATS = {}; var OUTPUT_FILE = ARGS.o; var TOPLEVEL = null; var P_RELATIVE = ARGS.p && ARGS.p == "relative"; -var SOURCES_CONTENT = {}; var SOURCE_MAP = ARGS.source_map ? UglifyJS.SourceMap({ file: P_RELATIVE ? path.relative(path.dirname(ARGS.source_map), OUTPUT_FILE) : OUTPUT_FILE, @@ -258,7 +255,6 @@ async.eachLimit(files, 1, function (file, cb) { } } } - SOURCES_CONTENT[file] = code; time_it("parse", function(){ if (ARGS.spidermonkey) { var program = JSON.parse(code); @@ -341,15 +337,6 @@ async.eachLimit(files, 1, function (file, cb) { if (MANGLE) time_it("mangle", function(){ TOPLEVEL.mangle_names(MANGLE); }); - - if (ARGS.source_map_include_sources) { - for (var file in SOURCES_CONTENT) { - if (SOURCES_CONTENT.hasOwnProperty(file)) { - SOURCE_MAP.get().setSourceContent(file, SOURCES_CONTENT[file]); - } - } - } - time_it("generate", function(){ TOPLEVEL.print(output); }); @@ -370,6 +357,7 @@ async.eachLimit(files, 1, function (file, cb) { fs.writeFileSync(OUTPUT_FILE, output, "utf8"); } else { sys.print(output); + sys.error("\n"); } if (ARGS.stats) { diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/lib/ast.js b/node_modules/gulp-uglify/node_modules/uglify-js/lib/ast.js index 051cd2f..1a291e3 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/lib/ast.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/lib/ast.js @@ -295,10 +295,10 @@ var AST_Toplevel = DEFNODE("Toplevel", "globals", { var parameters = []; arg_parameter_pairs.forEach(function(pair) { - var splitAt = pair.lastIndexOf(":"); + var split = pair.split(":"); - args.push(pair.substr(0, splitAt)); - parameters.push(pair.substr(splitAt + 1)); + args.push(split[0]); + parameters.push(split[1]); }); var wrapped_tl = "(function(" + parameters.join(",") + "){ '$ORIG'; })(" + args.join(",") + ")"; @@ -509,7 +509,7 @@ var AST_Catch = DEFNODE("Catch", "argname", { walk_body(this, visitor); }); } -}, AST_Block); +}, AST_Scope); var AST_Finally = DEFNODE("Finally", null, { $documentation: "A `finally` node; only makes sense as part of a `try` statement" diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/lib/compress.js b/node_modules/gulp-uglify/node_modules/uglify-js/lib/compress.js index fd3f7a2..95dd64d 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/lib/compress.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/lib/compress.js @@ -61,7 +61,6 @@ function Compressor(options, false_by_default) { loops : !false_by_default, unused : !false_by_default, hoist_funs : !false_by_default, - keep_fargs : false, hoist_vars : false, if_return : !false_by_default, join_vars : !false_by_default, @@ -71,8 +70,6 @@ function Compressor(options, false_by_default) { pure_funcs : null, negate_iife : !false_by_default, screw_ie8 : false, - drop_console : false, - angular : false, warnings : true, global_defs : {} @@ -200,9 +197,6 @@ merge(Compressor.prototype, { var CHANGED; do { CHANGED = false; - if (compressor.option("angular")) { - statements = process_for_angular(statements); - } statements = eliminate_spurious_blocks(statements); if (compressor.option("dead_code")) { statements = eliminate_dead_code(statements, compressor); @@ -224,50 +218,6 @@ merge(Compressor.prototype, { return statements; - function process_for_angular(statements) { - function make_injector(func, name) { - return make_node(AST_SimpleStatement, func, { - body: make_node(AST_Assign, func, { - operator: "=", - left: make_node(AST_Dot, name, { - expression: make_node(AST_SymbolRef, name, name), - property: "$inject" - }), - right: make_node(AST_Array, func, { - elements: func.argnames.map(function(sym){ - return make_node(AST_String, sym, { value: sym.name }); - }) - }) - }) - }); - } - return statements.reduce(function(a, stat){ - a.push(stat); - var token = stat.start; - var comments = token.comments_before; - if (comments && comments.length > 0) { - var last = comments.pop(); - if (/@ngInject/.test(last.value)) { - // case 1: defun - if (stat instanceof AST_Defun) { - a.push(make_injector(stat, stat.name)); - } - else if (stat instanceof AST_Definitions) { - stat.definitions.forEach(function(def){ - if (def.value && def.value instanceof AST_Lambda) { - a.push(make_injector(def.value, def.name)); - } - }); - } - else { - compressor.warn("Unknown statement marked with @ngInject [{file}:{line},{col}]", token); - } - } - } - return a; - }, []); - } - function eliminate_spurious_blocks(statements) { var seen_dirs = []; return statements.reduce(function(a, stat){ @@ -377,7 +327,7 @@ merge(Compressor.prototype, { stat = stat.clone(); stat.condition = stat.condition.negate(compressor); stat.body = make_node(AST_BlockStatement, stat, { - body: as_statement_array(stat.alternative).concat(ret) + body: ret }); stat.alternative = make_node(AST_BlockStatement, stat, { body: body @@ -775,14 +725,6 @@ merge(Compressor.prototype, { if (d && d.constant && d.init) return ev(d.init, compressor); throw def; }); - def(AST_Dot, function(compressor){ - if (compressor.option("unsafe") && this.property == "length") { - var str = ev(this.expression, compressor); - if (typeof str == "string") - return str.length; - } - throw def; - }); })(function(node, func){ node.DEFMETHOD("_eval", func); }); @@ -1053,20 +995,18 @@ merge(Compressor.prototype, { var tt = new TreeTransformer( function before(node, descend, in_list) { if (node instanceof AST_Lambda && !(node instanceof AST_Accessor)) { - if (!compressor.option("keep_fargs")) { - for (var a = node.argnames, i = a.length; --i >= 0;) { - var sym = a[i]; - if (sym.unreferenced()) { - a.pop(); - compressor.warn("Dropping unused function argument {name} [{file}:{line},{col}]", { - name : sym.name, - file : sym.start.file, - line : sym.start.line, - col : sym.start.col - }); - } - else break; + for (var a = node.argnames, i = a.length; --i >= 0;) { + var sym = a[i]; + if (sym.unreferenced()) { + a.pop(); + compressor.warn("Dropping unused function argument {name} [{file}:{line},{col}]", { + name : sym.name, + file : sym.start.file, + line : sym.start.line, + col : sym.start.col + }); } + else break; } } if (node instanceof AST_Defun && node !== self) { @@ -1833,14 +1773,6 @@ merge(Compressor.prototype, { return make_node(AST_Undefined, self).transform(compressor); } } - if (compressor.option("drop_console")) { - if (self.expression instanceof AST_PropAccess && - self.expression.expression instanceof AST_SymbolRef && - self.expression.expression.name == "console" && - self.expression.expression.undeclared()) { - return make_node(AST_Undefined, self).transform(compressor); - } - } return self.evaluate(compressor)[0]; }); @@ -1879,15 +1811,9 @@ merge(Compressor.prototype, { } if (compressor.option("cascade")) { if (self.car instanceof AST_Assign - && !self.car.left.has_side_effects(compressor)) { - if (self.car.left.equivalent_to(self.cdr)) { - return self.car; - } - if (self.cdr instanceof AST_Call - && self.cdr.expression.equivalent_to(self.car.left)) { - self.cdr.expression = self.car; - return self.cdr; - } + && !self.car.left.has_side_effects(compressor) + && self.car.left.equivalent_to(self.cdr)) { + return self.car; } if (!self.car.has_side_effects(compressor) && !self.cdr.has_side_effects(compressor) @@ -1895,18 +1821,6 @@ merge(Compressor.prototype, { return self.car; } } - if (self.cdr instanceof AST_UnaryPrefix - && self.cdr.operator == "void" - && !self.cdr.expression.has_side_effects(compressor)) { - self.cdr.operator = self.car; - return self.cdr; - } - if (self.cdr instanceof AST_Undefined) { - return make_node(AST_UnaryPrefix, self, { - operator : "void", - expression : self.car - }); - } return self; }); @@ -2278,7 +2192,7 @@ merge(Compressor.prototype, { * ==> * exp = foo ? something : something_else; */ - return make_node(AST_Assign, self, { + self = make_node(AST_Assign, self, { operator: consequent.operator, left: consequent.left, right: make_node(AST_Conditional, self, { @@ -2288,38 +2202,6 @@ merge(Compressor.prototype, { }) }); } - if (consequent instanceof AST_Call - && alternative.TYPE === consequent.TYPE - && consequent.args.length == alternative.args.length - && consequent.expression.equivalent_to(alternative.expression)) { - if (consequent.args.length == 0) { - return make_node(AST_Seq, self, { - car: self.condition, - cdr: consequent - }); - } - if (consequent.args.length == 1) { - consequent.args[0] = make_node(AST_Conditional, self, { - condition: self.condition, - consequent: consequent.args[0], - alternative: alternative.args[0] - }); - return consequent; - } - } - // x?y?z:a:a --> x&&y?z:a - if (consequent instanceof AST_Conditional - && consequent.alternative.equivalent_to(alternative)) { - return make_node(AST_Conditional, self, { - condition: make_node(AST_Binary, self, { - left: self.condition, - operator: "&&", - right: consequent.condition - }), - consequent: consequent.consequent, - alternative: alternative - }); - } return self; }); @@ -2357,22 +2239,12 @@ merge(Compressor.prototype, { return make_node(AST_Dot, self, { expression : self.expression, property : prop - }).optimize(compressor); - } - var v = parseFloat(prop); - if (!isNaN(v) && v.toString() == prop) { - self.property = make_node(AST_Number, self.property, { - value: v }); } } return self; }); - OPT(AST_Dot, function(self, compressor){ - return self.evaluate(compressor)[0]; - }); - function literals_in_boolean_context(self, compressor) { if (compressor.option("booleans") && compressor.in_boolean_context()) { return make_node(AST_True, self); diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/lib/mozilla-ast.js b/node_modules/gulp-uglify/node_modules/uglify-js/lib/mozilla-ast.js index bc24dfd..d795094 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/lib/mozilla-ast.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/lib/mozilla-ast.js @@ -51,7 +51,7 @@ start : my_start_token(M), end : my_end_token(M), body : from_moz(M.block).body, - bcatch : from_moz(M.handlers ? M.handlers[0] : M.handler), + bcatch : from_moz(M.handlers[0]), bfinally : M.finalizer ? new AST_Finally(from_moz(M.finalizer)) : null }); }, diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/lib/output.js b/node_modules/gulp-uglify/node_modules/uglify-js/lib/output.js index 6c8f15a..37e30c0 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/lib/output.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/lib/output.js @@ -46,23 +46,22 @@ function OutputStream(options) { options = defaults(options, { - indent_start : 0, - indent_level : 4, - quote_keys : false, - space_colon : true, - ascii_only : false, - unescape_regexps : false, - inline_script : false, - width : 80, - max_line_len : 32000, - beautify : false, - source_map : null, - bracketize : false, - semicolons : true, - comments : false, - preserve_line : false, - screw_ie8 : false, - preamble : null, + indent_start : 0, + indent_level : 4, + quote_keys : false, + space_colon : true, + ascii_only : false, + inline_script : false, + width : 80, + max_line_len : 32000, + beautify : false, + source_map : null, + bracketize : false, + semicolons : true, + comments : false, + preserve_line : false, + screw_ie8 : false, + preamble : null, }, true); var indentation = 0; @@ -387,20 +386,13 @@ function OutputStream(options) { var comments = start.comments_before || []; // XXX: ugly fix for https://github.com/mishoo/UglifyJS2/issues/112 - // and https://github.com/mishoo/UglifyJS2/issues/372 - if (self instanceof AST_Exit && self.value) { - self.value.walk(new TreeWalker(function(node){ - if (node.start && node.start.comments_before) { - comments = comments.concat(node.start.comments_before); - node.start.comments_before = []; - } - if (node instanceof AST_Function || - node instanceof AST_Array || - node instanceof AST_Object) - { - return true; // don't go inside. - } - })); + // if this node is `return` or `throw`, we cannot allow comments before + // the returned or thrown value. + if (self instanceof AST_Exit && self.value + && self.value.start.comments_before + && self.value.start.comments_before.length > 0) { + comments = comments.concat(self.value.start.comments_before); + self.value.start.comments_before = []; } if (c.test) { @@ -464,7 +456,7 @@ function OutputStream(options) { || p instanceof AST_Unary // !(foo, bar, baz) || p instanceof AST_Binary // 1 + (2, 3) + 4 ==> 8 || p instanceof AST_VarDef // var a = (1, 2), b = a + a; ==> b == 4 - || p instanceof AST_PropAccess // (1, {foo:2}).foo or (1, {foo:2})["foo"] ==> 2 + || p instanceof AST_Dot // (1, {foo:2}).foo ==> 2 || p instanceof AST_Array // [ 1, (2, 3), 4 ] ==> [ 1, 3, 4 ] || p instanceof AST_ObjectProperty // { foo: (1, 2) }.foo ==> 2 || p instanceof AST_Conditional /* (false, true) ? (a = 10, b = 20) : (c = 30) @@ -656,7 +648,7 @@ function OutputStream(options) { output.print("for"); output.space(); output.with_parens(function(){ - if (self.init && !(self.init instanceof AST_EmptyStatement)) { + if (self.init) { if (self.init instanceof AST_Definitions) { self.init.print(output); } else { @@ -996,12 +988,8 @@ function OutputStream(options) { DEFPRINT(AST_UnaryPrefix, function(self, output){ var op = self.operator; output.print(op); - if (/^[a-z]/i.test(op) - || (/[+-]$/.test(op) - && self.expression instanceof AST_UnaryPrefix - && /^[+-]/.test(self.expression.operator))) { + if (/^[a-z]/i.test(op)) output.space(); - } self.expression.print(output); }); DEFPRINT(AST_UnaryPostfix, function(self, output){ @@ -1123,47 +1111,10 @@ function OutputStream(options) { DEFPRINT(AST_Number, function(self, output){ output.print(make_num(self.getValue())); }); - - function regexp_safe_literal(code) { - return [ - 0x5c , // \ - 0x2f , // / - 0x2e , // . - 0x2b , // + - 0x2a , // * - 0x3f , // ? - 0x28 , // ( - 0x29 , // ) - 0x5b , // [ - 0x5d , // ] - 0x7b , // { - 0x7d , // } - 0x24 , // $ - 0x5e , // ^ - 0x3a , // : - 0x7c , // | - 0x21 , // ! - 0x0a , // \n - 0x0d , // \r - 0x00 , // \0 - 0xfeff , // Unicode BOM - 0x2028 , // unicode "line separator" - 0x2029 , // unicode "paragraph separator" - ].indexOf(code) < 0; - }; - DEFPRINT(AST_RegExp, function(self, output){ var str = self.getValue().toString(); - if (output.option("ascii_only")) { + if (output.option("ascii_only")) str = output.to_ascii(str); - } else if (output.option("unescape_regexps")) { - str = str.split("\\\\").map(function(str){ - return str.replace(/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}/g, function(s){ - var code = parseInt(s.substr(2), 16); - return regexp_safe_literal(code) ? String.fromCharCode(code) : s; - }); - }).join("\\\\"); - } output.print(str); var p = output.parent(); if (p instanceof AST_Binary && /^in/.test(p.operator) && p.left === self) diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/lib/parse.js b/node_modules/gulp-uglify/node_modules/uglify-js/lib/parse.js index de982b1..4933649 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/lib/parse.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/lib/parse.js @@ -46,7 +46,7 @@ var KEYWORDS = 'break case catch const continue debugger default delete do else finally for function if in instanceof new return switch throw try typeof var void while with'; var KEYWORDS_ATOM = 'false null true'; -var RESERVED_WORDS = 'abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile yield' +var RESERVED_WORDS = 'abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile' + " " + KEYWORDS_ATOM + " " + KEYWORDS; var KEYWORDS_BEFORE_EXPRESSION = 'return new delete throw else case'; @@ -168,7 +168,14 @@ function is_identifier_char(ch) { }; function is_identifier_string(str){ - return /^[a-z_$][a-z0-9_$]*$/i.test(str); + var i = str.length; + if (i == 0) return false; + if (!is_identifier_start(str.charCodeAt(0))) return false; + while (--i >= 0) { + if (!is_identifier_char(str.charAt(i))) + return false; + } + return true; }; function parse_js_number(num) { @@ -1374,7 +1381,7 @@ function parse($TEXT, options) { condition : expr, consequent : yes, alternative : expression(false, no_in), - end : prev() + end : peek() }); } return expr; diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/lib/scope.js b/node_modules/gulp-uglify/node_modules/uglify-js/lib/scope.js index 1ce17fa..ed189d4 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/lib/scope.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/lib/scope.js @@ -82,20 +82,14 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){ var defun = null; var nesting = 0; var tw = new TreeWalker(function(node, descend){ - if (options.screw_ie8 && node instanceof AST_Catch) { - var save_scope = scope; - scope = new AST_Scope(node); - scope.init_scope_vars(nesting); - scope.parent_scope = save_scope; - descend(); - scope = save_scope; - return true; - } if (node instanceof AST_Scope) { node.init_scope_vars(nesting); var save_scope = node.parent_scope = scope; var save_defun = defun; - defun = scope = node; + if (!(node instanceof AST_Catch)) { + defun = node; + } + scope = node; ++nesting; descend(); --nesting; scope = save_scope; defun = save_defun; @@ -246,11 +240,6 @@ AST_Scope.DEFMETHOD("next_mangled", function(options){ out: while (true) { var m = base54(++this.cname); if (!is_identifier(m)) continue; // skip over "do" - - // https://github.com/mishoo/UglifyJS2/issues/242 -- do not - // shadow a name excepted from mangling. - if (options.except.indexOf(m) >= 0) continue; - // we must ensure that the mangled name does not shadow a name // from some parent scope that is referenced in this or in // inner scopes. @@ -365,10 +354,6 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options){ node.mangled_name = name; return true; } - if (options.screw_ie8 && node instanceof AST_SymbolCatch) { - to_mangle.push(node.definition()); - return; - } }); this.walk(tw); to_mangle.forEach(function(def){ def.mangle(options) }); diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/lib/sourcemap.js b/node_modules/gulp-uglify/node_modules/uglify-js/lib/sourcemap.js index 663ef12..3429908 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/lib/sourcemap.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/lib/sourcemap.js @@ -49,9 +49,6 @@ function SourceMap(options) { file : null, root : null, orig : null, - - orig_line_diff : 0, - dest_line_diff : 0, }); var generator = new MOZ_SourceMap.SourceMapGenerator({ file : options.file, @@ -64,17 +61,14 @@ function SourceMap(options) { line: orig_line, column: orig_col }); - if (info.source === null) { - return; - } source = info.source; orig_line = info.line; orig_col = info.column; name = info.name; } generator.addMapping({ - generated : { line: gen_line + options.dest_line_diff, column: gen_col }, - original : { line: orig_line + options.orig_line_diff, column: orig_col }, + generated : { line: gen_line, column: gen_col }, + original : { line: orig_line, column: orig_col }, source : source, name : name }); diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/lib/utils.js b/node_modules/gulp-uglify/node_modules/uglify-js/lib/utils.js index 7c6a156..fa24663 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/lib/utils.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/lib/utils.js @@ -82,12 +82,9 @@ function repeat_string(str, i) { }; function DefaultsError(msg, defs) { - Error.call(this, msg); this.msg = msg; this.defs = defs; }; -DefaultsError.prototype = Object.create(Error.prototype); -DefaultsError.prototype.constructor = DefaultsError; DefaultsError.croak = function(msg, defs) { throw new DefaultsError(msg, defs); diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/.tern-port b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/.tern-port index 79d76a0..7fe6b60 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/.tern-port +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/.tern-port @@ -1 +1 @@ -55494 \ No newline at end of file +53900 \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md index 240d54a..85d6d8e 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md @@ -1,5 +1,32 @@ # Change Log +## 0.1.38 + +* Fix a bug where finding relative paths from an empty path were creating + absolute paths. See issue #129. + +## 0.1.37 + +* Fix a bug where if the source root was an empty string, relative source paths + would turn into absolute source paths. Issue #124. + +## 0.1.36 + +* Allow the `names` mapping property to be an empty string. Issue #121. + +## 0.1.35 + +* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` + to specify a path that relative sources in the second parameter should be + relative to. Issue #105. + +* If no file property is given to a `SourceMapGenerator`, then the resulting + source map will no longer have a `null` file property. The property will + simply not exist. Issue #104. + +* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. Issue + #116. + ## 0.1.34 * Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/README.md b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/README.md index b00e970..1a1c7d8 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/README.md +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/README.md @@ -332,7 +332,7 @@ use before outputting the generated JS and source map. * `name`: Optional. The original identifier. -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer) +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) Creates a SourceNode from generated code and a SourceMapConsumer. @@ -340,6 +340,9 @@ Creates a SourceNode from generated code and a SourceMapConsumer. * `sourceMapConsumer` The SourceMap for the generated code +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + #### SourceNode.prototype.add(chunk) Add a chunk of generated JS to this source node. @@ -399,7 +402,7 @@ for trimming whitespace from the end of a source node, etc. 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]) +#### 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 diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js index 5214d5e..eec18bd 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js @@ -116,7 +116,7 @@ define(function (require, exports, module) { Object.defineProperty(SourceMapConsumer.prototype, 'sources', { get: function () { return this._sources.toArray().map(function (s) { - return this.sourceRoot ? util.join(this.sourceRoot, s) : s; + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; }, this); } }); @@ -315,7 +315,7 @@ define(function (require, exports, module) { if (mapping && mapping.generatedLine === needle.generatedLine) { var source = util.getArg(mapping, 'source', null); - if (source && this.sourceRoot) { + if (source != null && this.sourceRoot != null) { source = util.join(this.sourceRoot, source); } return { @@ -345,7 +345,7 @@ define(function (require, exports, module) { return null; } - if (this.sourceRoot) { + if (this.sourceRoot != null) { aSource = util.relative(this.sourceRoot, aSource); } @@ -354,7 +354,7 @@ define(function (require, exports, module) { } var url; - if (this.sourceRoot + if (this.sourceRoot != null && (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 @@ -397,7 +397,7 @@ define(function (require, exports, module) { originalColumn: util.getArg(aArgs, 'column') }; - if (this.sourceRoot) { + if (this.sourceRoot != null) { needle.source = util.relative(this.sourceRoot, needle.source); } @@ -459,7 +459,7 @@ define(function (require, exports, module) { var sourceRoot = this.sourceRoot; mappings.map(function (mapping) { var source = mapping.source; - if (source && sourceRoot) { + if (source != null && sourceRoot != null) { source = util.join(sourceRoot, source); } return { diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js index fb6d6c3..db506eb 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js @@ -55,9 +55,9 @@ define(function (require, exports, module) { } }; - if (mapping.source) { + if (mapping.source != null) { newMapping.source = mapping.source; - if (sourceRoot) { + if (sourceRoot != null) { newMapping.source = util.relative(sourceRoot, newMapping.source); } @@ -66,7 +66,7 @@ define(function (require, exports, module) { column: mapping.originalColumn }; - if (mapping.name) { + if (mapping.name != null) { newMapping.name = mapping.name; } } @@ -75,7 +75,7 @@ define(function (require, exports, module) { }); aSourceMapConsumer.sources.forEach(function (sourceFile) { var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { + if (content != null) { generator.setSourceContent(sourceFile, content); } }); @@ -101,11 +101,11 @@ define(function (require, exports, module) { this._validateMapping(generated, original, source, name); - if (source && !this._sources.has(source)) { + if (source != null && !this._sources.has(source)) { this._sources.add(source); } - if (name && !this._names.has(name)) { + if (name != null && !this._names.has(name)) { this._names.add(name); } @@ -125,11 +125,11 @@ define(function (require, exports, module) { SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { var source = aSourceFile; - if (this._sourceRoot) { + if (this._sourceRoot != null) { source = util.relative(this._sourceRoot, source); } - if (aSourceContent !== null) { + if (aSourceContent != null) { // Add the source content to the _sourcesContents map. // Create a new _sourcesContents map if the property is null. if (!this._sourcesContents) { @@ -164,46 +164,47 @@ define(function (require, exports, module) { */ SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; // If aSourceFile is omitted, we will use the file property of the SourceMap - if (!aSourceFile) { - if (!aSourceMapConsumer.file) { + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { 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; + sourceFile = aSourceMapConsumer.file; } var sourceRoot = this._sourceRoot; - // Make "aSourceFile" relative if an absolute Url is passed. - if (sourceRoot) { - aSourceFile = util.relative(sourceRoot, aSourceFile); + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); } // 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" + // Find mappings for the "sourceFile" this._mappings.forEach(function (mapping) { - if (mapping.source === aSourceFile && mapping.originalLine) { + if (mapping.source === sourceFile && mapping.originalLine != null) { // 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) { + if (original.source != null) { // Copy mapping mapping.source = original.source; - if (aSourceMapPath) { + if (aSourceMapPath != null) { mapping.source = util.join(aSourceMapPath, mapping.source) } - if (sourceRoot) { + if (sourceRoot != null) { mapping.source = util.relative(sourceRoot, mapping.source); } mapping.originalLine = original.line; mapping.originalColumn = original.column; - if (original.name !== null && mapping.name !== null) { + if (original.name != null && mapping.name != null) { // Only use the identifier name if it's an identifier // in both SourceMaps mapping.name = original.name; @@ -212,12 +213,12 @@ define(function (require, exports, module) { } var source = mapping.source; - if (source && !newSources.has(source)) { + if (source != null && !newSources.has(source)) { newSources.add(source); } var name = mapping.name; - if (name && !newNames.has(name)) { + if (name != null && !newNames.has(name)) { newNames.add(name); } @@ -228,11 +229,11 @@ define(function (require, exports, module) { // Copy sourcesContents of applied map. aSourceMapConsumer.sources.forEach(function (sourceFile) { var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - if (aSourceMapPath) { + if (content != null) { + if (aSourceMapPath != null) { sourceFile = util.join(aSourceMapPath, sourceFile); } - if (sourceRoot) { + if (sourceRoot != null) { sourceFile = util.relative(sourceRoot, sourceFile); } this.setSourceContent(sourceFile, content); @@ -323,7 +324,7 @@ define(function (require, exports, module) { - previousGeneratedColumn); previousGeneratedColumn = mapping.generatedColumn; - if (mapping.source) { + if (mapping.source != null) { result += base64VLQ.encode(this._sources.indexOf(mapping.source) - previousSource); previousSource = this._sources.indexOf(mapping.source); @@ -337,7 +338,7 @@ define(function (require, exports, module) { - previousOriginalColumn); previousOriginalColumn = mapping.originalColumn; - if (mapping.name) { + if (mapping.name != null) { result += base64VLQ.encode(this._names.indexOf(mapping.name) - previousName); previousName = this._names.indexOf(mapping.name); @@ -354,7 +355,7 @@ define(function (require, exports, module) { if (!this._sourcesContents) { return null; } - if (aSourceRoot) { + if (aSourceRoot != null) { source = util.relative(aSourceRoot, source); } var key = util.toSetString(source); @@ -372,12 +373,14 @@ define(function (require, exports, module) { 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) { + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { map.sourceRoot = this._sourceRoot; } if (this._sourcesContents) { diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js index 66a2ebc..baa5f40 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js @@ -14,7 +14,7 @@ define(function (require, exports, module) { // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/g; + var REGEX_NEWLINE = /(\r?\n)/; // Matches a Windows-style newline, or any character. var REGEX_CHARACTER = /\r\n|[\s\S]/g; @@ -34,10 +34,10 @@ define(function (require, exports, module) { 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; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; if (aChunks != null) this.add(aChunks); } @@ -46,9 +46,11 @@ define(function (require, exports, module) { * * @param aGeneratedCode The generated code * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. */ SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer) { + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { // The SourceNode we want to fill with the generated code // and the SourceMap var node = new SourceNode(); @@ -128,7 +130,10 @@ define(function (require, exports, module) { // Copy sourcesContent into SourceNode aSourceMapConsumer.sources.forEach(function (sourceFile) { var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } node.setSourceContent(sourceFile, content); } }); @@ -139,9 +144,12 @@ define(function (require, exports, module) { if (mapping === null || mapping.source === undefined) { node.add(code); } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, - mapping.source, + source, code, mapping.name)); } diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js index 4316445..976f6ca 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js @@ -143,6 +143,12 @@ define(function (require, exports, module) { * - Joining for example 'http://' and 'www.example.com' is also supported. */ function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } var aPathUrl = urlParse(aPath); var aRootUrl = urlParse(aRoot); if (aRootUrl) { @@ -179,6 +185,31 @@ define(function (require, exports, module) { } exports.join = join; + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // XXX: It is possible to remove this block, and the tests still pass! + 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; + /** * Because behavior goes wacky when you set `__proto__` on objects, we * have to prefix all the strings in our set with an arbitrary character. @@ -198,20 +229,6 @@ define(function (require, exports, module) { } 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 || ""; diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json index 8caf15c..bca411d 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json @@ -32,5 +32,6 @@ "url": "https://github.com/jrburke/amdefine/issues" }, "_id": "amdefine@0.1.0", - "_from": "amdefine@>=0.0.4" + "_from": "amdefine@>=0.0.4", + "scripts": {} } diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/package.json b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/package.json index 86a92a9..7ce5930 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/package.json +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/package.json @@ -1,7 +1,7 @@ { "name": "source-map", "description": "Generates and consumes source maps", - "version": "0.1.34", + "version": "0.1.38", "homepage": "https://github.com/mozilla/source-map", "author": { "name": "Nick Fitzgerald", @@ -91,6 +91,18 @@ { "name": "Michael Z Goddard", "email": "mzgoddard@gmail.com" + }, + { + "name": "azu", + "email": "azu@users.noreply.github.com" + }, + { + "name": "John Gozde", + "email": "john@gozde.ca" + }, + { + "name": "Adam Kirkton", + "email": "akirkton@truefitinnovation.com" } ], "repository": { @@ -123,9 +135,9 @@ "bugs": { "url": "https://github.com/mozilla/source-map/issues" }, - "_id": "source-map@0.1.34", - "_shasum": "a7cfe89aec7b1682c3b198d0acfb47d7d090566b", - "_from": "source-map@0.1.34", + "_id": "source-map@0.1.38", + "_shasum": "f93a6f9d96a5b9cf5494c043497d9542f9fa6b33", + "_from": "source-map@~0.1.7", "_npmVersion": "1.4.9", "_npmUser": { "name": "nickfitzgerald", @@ -146,9 +158,9 @@ } ], "dist": { - "shasum": "a7cfe89aec7b1682c3b198d0acfb47d7d090566b", - "tarball": "http://registry.npmjs.org/source-map/-/source-map-0.1.34.tgz" + "shasum": "f93a6f9d96a5b9cf5494c043497d9542f9fa6b33", + "tarball": "http://registry.npmjs.org/source-map/-/source-map-0.1.38.tgz" }, - "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.34.tgz", + "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.38.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js index acd24d5..a4c6659 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js @@ -22,18 +22,34 @@ define(function (require, exports, module) { }; exports['test that the `sources` field has the original sources'] = function (assert, util) { - var map = new SourceMapConsumer(util.testMap); - var sources = map.sources; + var map; + var sources; + map = new SourceMapConsumer(util.testMap); + sources = map.sources; assert.equal(sources[0], '/the/root/one.js'); assert.equal(sources[1], '/the/root/two.js'); assert.equal(sources.length, 2); + + map = new SourceMapConsumer(util.testMapNoSourceRoot); + sources = map.sources; + assert.equal(sources[0], 'one.js'); + assert.equal(sources[1], 'two.js'); + assert.equal(sources.length, 2); + + map = new SourceMapConsumer(util.testMapEmptySourceRoot); + sources = map.sources; + assert.equal(sources[0], 'one.js'); + assert.equal(sources[1], '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 map; var mapping; + map = new SourceMapConsumer(util.testMap); + mapping = map.originalPositionFor({ line: 2, column: 1 @@ -45,6 +61,36 @@ define(function (require, exports, module) { column: 1 }); assert.equal(mapping.source, '/the/root/one.js'); + + + map = new SourceMapConsumer(util.testMapNoSourceRoot); + + mapping = map.originalPositionFor({ + line: 2, + column: 1 + }); + assert.equal(mapping.source, 'two.js'); + + mapping = map.originalPositionFor({ + line: 1, + column: 1 + }); + assert.equal(mapping.source, 'one.js'); + + + map = new SourceMapConsumer(util.testMapEmptySourceRoot); + + mapping = map.originalPositionFor({ + line: 2, + column: 1 + }); + assert.equal(mapping.source, 'two.js'); + + mapping = map.originalPositionFor({ + line: 1, + column: 1 + }); + assert.equal(mapping.source, 'one.js'); }; exports['test mapping tokens back exactly'] = function (assert, util) { @@ -111,15 +157,15 @@ define(function (require, exports, module) { }; exports['test eachMapping'] = function (assert, util) { - var map = new SourceMapConsumer(util.testMap); + var map; + + 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); - } + assert.ok(mapping.source === '/the/root/one.js' || mapping.source === '/the/root/two.js'); if (mapping.generatedLine === previousLine) { assert.ok(mapping.generatedColumn >= previousColumn); @@ -130,6 +176,16 @@ define(function (require, exports, module) { previousColumn = -Infinity; } }); + + map = new SourceMapConsumer(util.testMapNoSourceRoot); + map.eachMapping(function (mapping) { + assert.ok(mapping.source === 'one.js' || mapping.source === 'two.js'); + }); + + map = new SourceMapConsumer(util.testMapEmptySourceRoot); + map.eachMapping(function (mapping) { + assert.ok(mapping.source === 'one.js' || mapping.source === 'two.js'); + }); }; exports['test iterating over mappings in a different order'] = function (assert, util) { diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js index 227140f..b2aaa53 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js @@ -21,8 +21,9 @@ define(function (require, exports, module) { }); assert.ok(true); - var map = new SourceMapGenerator(); - assert.ok(true); + var map = new SourceMapGenerator().toJSON(); + assert.ok(!('file' in map)); + assert.ok(!('sourceRoot' in map)); }; exports['test JSON serialization'] = function (assert, util) { @@ -180,6 +181,24 @@ define(function (require, exports, module) { util.assertEqualMaps(assert, map, util.testMap); }; + exports['test that adding a mapping with an empty string name does not break generation'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated-foo.js', + sourceRoot: '.' + }); + + map.addMapping({ + generated: { line: 1, column: 1 }, + source: 'bar.js', + original: { line: 1, column: 1 }, + name: '' + }); + + assert.doesNotThrow(function () { + JSON.parse(map.toString()); + }); + }; + exports['test that source content can be set'] = function (assert, util) { var map = new SourceMapGenerator({ file: 'min.js', @@ -292,8 +311,8 @@ define(function (require, exports, module) { // foo.coffee // temp/ // bundle.js - // temp_maps/ - // bundle.js.map + // temp_maps/ + // bundle.js.map // public/ // bundle.min.js // bundle.min.js.map @@ -307,9 +326,9 @@ define(function (require, exports, module) { bundleMap.addMapping({ generated: { line: 3, column: 3 }, original: { line: 2, column: 2 }, - source: '../coffee/foo.coffee' + source: '../../coffee/foo.coffee' }); - bundleMap.setSourceContent('../coffee/foo.coffee', 'foo coffee'); + bundleMap.setSourceContent('../../coffee/foo.coffee', 'foo coffee'); bundleMap.addMapping({ generated: { line: 13, column: 13 }, original: { line: 12, column: 12 }, @@ -382,23 +401,50 @@ define(function (require, exports, module) { return map.toJSON(); } - util.assertEqualMaps(assert, actualMap('../temp_maps'), expectedMap([ + util.assertEqualMaps(assert, actualMap('../temp/temp_maps'), expectedMap([ 'coffee/foo.coffee', '/bar.coffee', 'http://www.example.com/baz.coffee' ])); - util.assertEqualMaps(assert, actualMap('/app/temp_maps'), expectedMap([ + util.assertEqualMaps(assert, actualMap('/app/temp/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([ + util.assertEqualMaps(assert, actualMap('http://foo.org/app/temp/temp_maps'), expectedMap([ 'http://foo.org/app/coffee/foo.coffee', 'http://foo.org/bar.coffee', 'http://www.example.com/baz.coffee' ])); + + // If the third parameter is omitted or set to the current working + // directory we get incorrect source paths: + + util.assertEqualMaps(assert, actualMap(), expectedMap([ + '../coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + + util.assertEqualMaps(assert, actualMap(''), expectedMap([ + '../coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + + util.assertEqualMaps(assert, actualMap('.'), expectedMap([ + '../coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + + util.assertEqualMaps(assert, actualMap('./'), expectedMap([ + '../coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); }; exports['test sorting with duplicate generated mappings'] = function (assert, util) { diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js index d186521..139af4e 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js @@ -159,6 +159,7 @@ define(function (require, exports, module) { assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); assert.ok(mapWithoutOptions instanceof SourceMapGenerator, 'mapWithoutOptions instanceof SourceMapGenerator'); + assert.ok(!('file' in mapWithoutOptions)); mapWithoutOptions._file = 'foo.js'; util.assertEqualMaps(assert, map.toJSON(), mapWithoutOptions.toJSON()); @@ -276,6 +277,94 @@ define(function (require, exports, module) { util.assertEqualMaps(assert, map, inputMap); }); + exports['test .fromStringWithSourceMap() third argument'] = function (assert, util) { + // Assume the following directory structure: + // + // http://foo.org/ + // bar.coffee + // app/ + // coffee/ + // foo.coffee + // coffeeBundle.js # Made from {foo,bar,baz}.coffee + // maps/ + // coffeeBundle.js.map + // js/ + // foo.js + // public/ + // app.js # Made from {foo,coffeeBundle}.js + // app.js.map + // + // http://www.example.com/ + // baz.coffee + + var coffeeBundle = new SourceNode(1, 0, 'foo.coffee', 'foo(coffee);\n'); + coffeeBundle.setSourceContent('foo.coffee', 'foo coffee'); + coffeeBundle.add(new SourceNode(2, 0, '/bar.coffee', 'bar(coffee);\n')); + coffeeBundle.add(new SourceNode(3, 0, 'http://www.example.com/baz.coffee', 'baz(coffee);')); + coffeeBundle = coffeeBundle.toStringWithSourceMap({ + file: 'foo.js', + sourceRoot: '..' + }); + + var foo = new SourceNode(1, 0, 'foo.js', 'foo(js);'); + + var test = function(relativePath, expectedSources) { + var app = new SourceNode(); + app.add(SourceNode.fromStringWithSourceMap( + coffeeBundle.code, + new SourceMapConsumer(coffeeBundle.map.toString()), + relativePath)); + app.add(foo); + var i = 0; + app.walk(function (chunk, loc) { + assert.equal(loc.source, expectedSources[i]); + i++; + }); + app.walkSourceContents(function (sourceFile, sourceContent) { + assert.equal(sourceFile, expectedSources[0]); + assert.equal(sourceContent, 'foo coffee'); + }) + }; + + test('../coffee/maps', [ + '../coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee', + 'foo.js' + ]); + + // If the third parameter is omitted or set to the current working + // directory we get incorrect source paths: + + test(undefined, [ + '../foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee', + 'foo.js' + ]); + + test('', [ + '../foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee', + 'foo.js' + ]); + + test('.', [ + '../foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee', + 'foo.js' + ]); + + test('./', [ + '../foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee', + 'foo.js' + ]); + }; + exports['test .toStringWithSourceMap() merging duplicate mappings'] = forEachNewline(function (assert, util, nl) { var input = new SourceNode(null, null, null, [ new SourceNode(1, 0, "a.js", "(function"), @@ -441,6 +530,42 @@ define(function (require, exports, module) { assert.equal(result.code, ''); }; + exports['test .toStringWithSourceMap() with consecutive newlines'] = forEachNewline(function (assert, util, nl) { + var input = new SourceNode(null, null, null, [ + "/***/" + nl + nl, + new SourceNode(1, 0, "a.js", "'use strict';" + nl), + new SourceNode(2, 0, "a.js", "a();"), + ]); + input = input.toStringWithSourceMap({ + file: 'foo.js' + }); + + assert.equal(input.code, [ + "/***/", + "", + "'use strict';", + "a();", + ].join(nl)); + + var correctMap = new SourceMapGenerator({ + file: 'foo.js' + }); + correctMap.addMapping({ + generated: { line: 3, column: 0 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 4, column: 0 }, + source: 'a.js', + original: { line: 2, column: 0 } + }); + + 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'); diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-util.js b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-util.js index 22e9a9e..997d1a2 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-util.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-util.js @@ -28,7 +28,14 @@ define(function (require, exports, module) { assertUrl('//www.example.com'); assertUrl('file:///www.example.com'); + assert.equal(libUtil.urlParse(''), null); + assert.equal(libUtil.urlParse('.'), null); + assert.equal(libUtil.urlParse('..'), null); + assert.equal(libUtil.urlParse('a'), null); + assert.equal(libUtil.urlParse('a/b'), null); assert.equal(libUtil.urlParse('a//b'), null); + assert.equal(libUtil.urlParse('/a'), null); + assert.equal(libUtil.urlParse('data:foo,bar'), null); }; exports['test normalize()'] = function (assert, util) { @@ -50,6 +57,7 @@ define(function (require, exports, module) { 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('./'), '.'); assert.equal(libUtil.normalize('././a'), 'a'); @@ -88,6 +96,73 @@ define(function (require, exports, module) { assert.equal(libUtil.join('a', 'data:foo,bar'), 'data:foo,bar'); + assert.equal(libUtil.join('', 'b'), 'b'); + assert.equal(libUtil.join('.', 'b'), 'b'); + assert.equal(libUtil.join('', 'b/'), 'b/'); + assert.equal(libUtil.join('.', 'b/'), 'b/'); + assert.equal(libUtil.join('', 'b//'), 'b/'); + assert.equal(libUtil.join('.', 'b//'), 'b/'); + + assert.equal(libUtil.join('', '..'), '..'); + assert.equal(libUtil.join('.', '..'), '..'); + assert.equal(libUtil.join('', '../b'), '../b'); + assert.equal(libUtil.join('.', '../b'), '../b'); + + assert.equal(libUtil.join('', '.'), '.'); + assert.equal(libUtil.join('.', '.'), '.'); + assert.equal(libUtil.join('', './b'), 'b'); + assert.equal(libUtil.join('.', './b'), 'b'); + + assert.equal(libUtil.join('', 'http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('.', 'http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('', 'data:foo,bar'), 'data:foo,bar'); + assert.equal(libUtil.join('.', 'data:foo,bar'), 'data:foo,bar'); + + + assert.equal(libUtil.join('..', 'b'), '../b'); + assert.equal(libUtil.join('..', 'b/'), '../b/'); + assert.equal(libUtil.join('..', 'b//'), '../b/'); + + assert.equal(libUtil.join('..', '..'), '../..'); + assert.equal(libUtil.join('..', '../b'), '../../b'); + + assert.equal(libUtil.join('..', '.'), '..'); + assert.equal(libUtil.join('..', './b'), '../b'); + + assert.equal(libUtil.join('..', 'http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('..', 'data:foo,bar'), 'data:foo,bar'); + + + assert.equal(libUtil.join('a', ''), 'a'); + assert.equal(libUtil.join('a', '.'), 'a'); + assert.equal(libUtil.join('a/', ''), 'a'); + assert.equal(libUtil.join('a/', '.'), 'a'); + assert.equal(libUtil.join('a//', ''), 'a'); + assert.equal(libUtil.join('a//', '.'), 'a'); + assert.equal(libUtil.join('/a', ''), '/a'); + assert.equal(libUtil.join('/a', '.'), '/a'); + assert.equal(libUtil.join('', ''), '.'); + assert.equal(libUtil.join('.', ''), '.'); + assert.equal(libUtil.join('.', ''), '.'); + assert.equal(libUtil.join('.', '.'), '.'); + assert.equal(libUtil.join('..', ''), '..'); + assert.equal(libUtil.join('..', '.'), '..'); + 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://foo.org', ''), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org', '.'), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org/', ''), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org/', '.'), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org//', ''), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org//', '.'), 'http://foo.org/'); + assert.equal(libUtil.join('//www.example.com', ''), '//www.example.com/'); + assert.equal(libUtil.join('//www.example.com', '.'), '//www.example.com/'); + + 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'); @@ -124,4 +199,18 @@ define(function (require, exports, module) { assert.equal(libUtil.join('//www.example.com', '//foo.org/bar'), '//foo.org/bar'); }; + // TODO Issue #128: Define and test this function properly. + exports['test relative()'] = function (assert, util) { + assert.equal(libUtil.relative('/the/root', '/the/root/one.js'), 'one.js'); + assert.equal(libUtil.relative('/the/root', '/the/rootone.js'), '/the/rootone.js'); + + assert.equal(libUtil.relative('', '/the/root/one.js'), '/the/root/one.js'); + assert.equal(libUtil.relative('.', '/the/root/one.js'), '/the/root/one.js'); + assert.equal(libUtil.relative('', 'the/root/one.js'), 'the/root/one.js'); + assert.equal(libUtil.relative('.', 'the/root/one.js'), 'the/root/one.js'); + + assert.equal(libUtil.relative('/', '/the/root/one.js'), 'the/root/one.js'); + assert.equal(libUtil.relative('/', 'the/root/one.js'), 'the/root/one.js'); + }; + }); diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js index 288046b..fa213ce 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js @@ -40,6 +40,21 @@ define(function (require, exports, module) { sourceRoot: '/the/root', mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' }; + exports.testMapNoSourceRoot = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' + }; + exports.testMapEmptySourceRoot = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: '', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' + }; exports.testMapWithSourcesContent = { version: 3, file: 'min.js', diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/package.json b/node_modules/gulp-uglify/node_modules/uglify-js/package.json index 0b4308b..275759c 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/package.json +++ b/node_modules/gulp-uglify/node_modules/uglify-js/package.json @@ -3,7 +3,7 @@ "description": "JavaScript parser, mangler/compressor and beautifier toolkit", "homepage": "http://lisperator.net/uglifyjs", "main": "tools/node.js", - "version": "2.4.15", + "version": "2.4.6", "engines": { "node": ">=0.4.0" }, @@ -27,7 +27,7 @@ }, "dependencies": { "async": "~0.2.6", - "source-map": "0.1.34", + "source-map": "~0.1.7", "optimist": "~0.3.5", "uglify-to-browserify": "~1.0.0" }, @@ -42,22 +42,22 @@ "scripts": { "test": "node test/run-tests.js" }, - "gitHead": "83e0939088a26ad8c28bd2c1719f92bdcf17d045", "bugs": { "url": "https://github.com/mishoo/UglifyJS2/issues" }, - "_id": "uglify-js@2.4.15", - "_shasum": "12bc6d84345fbc306e13f7075d6437a8bf64d7e3", - "_from": "uglify-js@~2.4.6", - "_npmVersion": "1.4.14", + "_id": "uglify-js@2.4.6", + "dist": { + "shasum": "31766a4d822babf5f32c14096251ed9259298ad3", + "tarball": "http://registry.npmjs.org/uglify-js/-/uglify-js-2.4.6.tgz" + }, + "_from": "uglify-js@2.4.6", + "_npmVersion": "1.3.14", "_npmUser": { "name": "mishoo", "email": "mihai.bazon@gmail.com" }, - "dist": { - "shasum": "12bc6d84345fbc306e13f7075d6437a8bf64d7e3", - "tarball": "http://registry.npmjs.org/uglify-js/-/uglify-js-2.4.15.tgz" - }, "directories": {}, - "_resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.4.15.tgz" + "_shasum": "31766a4d822babf5f32c14096251ed9259298ad3", + "_resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.4.6.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/conditionals.js b/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/conditionals.js index 213b246..dc2bb67 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/conditionals.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/conditionals.js @@ -141,94 +141,3 @@ ifs_6: { x = foo || bar || baz || boo ? 20 : 10; } } - -cond_1: { - options = { - conditionals: true - }; - input: { - if (some_condition()) { - do_something(x); - } else { - do_something(y); - } - } - expect: { - do_something(some_condition() ? x : y); - } -} - -cond_2: { - options = { - conditionals: true - }; - input: { - if (some_condition()) { - x = new FooBar(1); - } else { - x = new FooBar(2); - } - } - expect: { - x = new FooBar(some_condition() ? 1 : 2); - } -} - -cond_3: { - options = { - conditionals: true - }; - input: { - if (some_condition()) { - new FooBar(1); - } else { - FooBar(2); - } - } - expect: { - some_condition() ? new FooBar(1) : FooBar(2); - } -} - -cond_4: { - options = { - conditionals: true - }; - input: { - if (some_condition()) { - do_something(); - } else { - do_something(); - } - } - expect: { - some_condition(), do_something(); - } -} - -cond_5: { - options = { - conditionals: true - }; - input: { - if (some_condition()) { - if (some_other_condition()) { - do_something(); - } else { - alternate(); - } - } else { - alternate(); - } - - if (some_condition()) { - if (some_other_condition()) { - do_something(); - } - } - } - expect: { - some_condition() && some_other_condition() ? do_something() : alternate(); - some_condition() && some_other_condition() && do_something(); - } -} diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/drop-unused.js b/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/drop-unused.js index 89bf008..406ce9e 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/drop-unused.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/drop-unused.js @@ -119,47 +119,3 @@ unused_keep_setter_arg: { } } } - -unused_var_in_catch: { - options = { unused: true }; - input: { - function foo() { - try { - foo(); - } catch(ex) { - var x = 10; - } - } - } - expect: { - function foo() { - try { - foo(); - } catch(ex) {} - } - } -} - -used_var_in_catch: { - options = { unused: true }; - input: { - function foo() { - try { - foo(); - } catch(ex) { - var x = 10; - } - return x; - } - } - expect: { - function foo() { - try { - foo(); - } catch(ex) { - var x = 10; - } - return x; - } - } -} diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/negate-iife.js b/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/negate-iife.js index 89c3f06..0362ffc 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/negate-iife.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/negate-iife.js @@ -60,16 +60,16 @@ negate_iife_4: { }; input: { if ((function(){ return true })()) { - foo(true); + console.log(true); } else { - bar(false); + console.log(false); } (function(){ console.log("something"); })(); } expect: { - !function(){ return true }() ? bar(false) : foo(true), function(){ + !function(){ return true }() ? console.log(false) : console.log(true), function(){ console.log("something"); }(); } diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/properties.js b/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/properties.js index 3947073..8504596 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/properties.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/test/compress/properties.js @@ -26,7 +26,7 @@ dot_properties: { a.foo = "bar"; a["if"] = "if"; a["*"] = "asterisk"; - a["\u0EB3"] = "unicode"; + a.\u0EB3 = "unicode"; a[""] = "whitespace"; a["1_1"] = "foo"; } @@ -48,27 +48,7 @@ dot_properties_es5: { a.foo = "bar"; a.if = "if"; a["*"] = "asterisk"; - a["\u0EB3"] = "unicode"; + a.\u0EB3 = "unicode"; a[""] = "whitespace"; } } - -evaluate_length: { - options = { - properties: true, - unsafe: true, - evaluate: true - }; - input: { - a = "foo".length; - a = ("foo" + "bar")["len" + "gth"]; - a = b.length; - a = ("foo" + b).length; - } - expect: { - a = 3; - a = 6; - a = b.length; - a = ("foo" + b).length; - } -} diff --git a/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js b/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js index 084998d..614e083 100644 --- a/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js +++ b/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js @@ -51,7 +51,6 @@ for (var i in UglifyJS) { exports.minify = function(files, options) { options = UglifyJS.defaults(options, { - spidermonkey : false, outSourceMap : null, sourceRoot : null, inSourceMap : null, @@ -61,28 +60,22 @@ exports.minify = function(files, options) { output : null, compress : {} }); + if (typeof files == "string") + files = [ files ]; + UglifyJS.base54.reset(); // 1. parse - var toplevel = null, - sourcesContent = {}; - - if (options.spidermonkey) { - toplevel = UglifyJS.AST_Node.from_mozilla_ast(files); - } else { - if (typeof files == "string") - files = [ files ]; - files.forEach(function(file){ - var code = options.fromString - ? file - : fs.readFileSync(file, "utf8"); - sourcesContent[file] = code; - toplevel = UglifyJS.parse(code, { - filename: options.fromString ? "?" : file, - toplevel: toplevel - }); + var toplevel = null; + files.forEach(function(file){ + var code = options.fromString + ? file + : fs.readFileSync(file, "utf8"); + toplevel = UglifyJS.parse(code, { + filename: options.fromString ? "?" : file, + toplevel: toplevel }); - } + }); // 2. compress if (options.compress) { @@ -112,25 +105,12 @@ exports.minify = function(files, options) { orig: inMap, root: options.sourceRoot }); - if (options.sourceMapIncludeSources) { - for (var file in sourcesContent) { - if (sourcesContent.hasOwnProperty(file)) { - output.source_map.get().setSourceContent(file, sourcesContent[file]); - } - } - } - } if (options.output) { UglifyJS.merge(output, options.output); } var stream = UglifyJS.OutputStream(output); toplevel.print(stream); - - if(options.outSourceMap){ - stream += "\n//# sourceMappingURL=" + options.outSourceMap; - } - return { code : stream + "", map : output.source_map + "" diff --git a/node_modules/gulp-uglify/package.json b/node_modules/gulp-uglify/package.json index 66833b7..4bc0095 100644 --- a/node_modules/gulp-uglify/package.json +++ b/node_modules/gulp-uglify/package.json @@ -1,7 +1,7 @@ { "name": "gulp-uglify", "description": "Minify files with UglifyJS.", - "version": "0.3.1", + "version": "0.3.2", "author": { "name": "Terin Stock", "email": "terinjokes@gmail.com" @@ -10,19 +10,19 @@ "url": "https://github.com/terinjokes/gulp-uglify/issues" }, "dependencies": { - "deepmerge": "~0.2.7", - "gulp-util": "~2.2.14", - "through2": "~0.4.0", - "uglify-js": "~2.4.6" + "deepmerge": ">=0.2.7 <0.3.0-0", + "gulp-util": ">=3.0.0 <4.0.0-0", + "through2": ">=0.6.1 <1.0.0-0", + "uglify-js": "2.4.6" }, "devDependencies": { "argg": "0.0.1", "codeclimate-test-reporter": "0.0.3", - "inline-source-map": "^0.3.0", - "istanbul": "^0.2.8", - "rimraf": "^2.2.8", - "tape": "^2.12.3", - "vinyl": "~0.2.3" + "inline-source-map": ">=0.3.0 <0.4.0-0", + "istanbul": ">=0.3.0 <0.4.0-0", + "rimraf": ">=2.2.8 <3.0.0-0", + "tape": ">=2.12.3 <3.0.0-0", + "vinyl": ">=0.3.2 <0.4.0-0" }, "engines": { "node": ">= 0.9" @@ -44,11 +44,11 @@ "test": "npm run coverage && npm run rm", "test-report": "npm run coverage && npm run codeclimate && npm run rm" }, - "gitHead": "942a0fb5e544e176eb8d44d5e82fc675033491c4", - "_id": "gulp-uglify@0.3.1", - "_shasum": "bcc5fe5413e301dabe45cd35b43ed50c45a9a678", - "_from": "gulp-uglify@", - "_npmVersion": "1.4.13", + "gitHead": "fad7e9e55bf8ac30c32265a417e0a541a07e951c", + "_id": "gulp-uglify@0.3.2", + "_shasum": "fa37bf6d4ad9a29a349c6cba862abb22eba67aac", + "_from": "gulp-uglify@0.3.2", + "_npmVersion": "2.0.0-beta.0", "_npmUser": { "name": "terinjokes", "email": "terinjokes@gmail.com" @@ -60,9 +60,10 @@ } ], "dist": { - "shasum": "bcc5fe5413e301dabe45cd35b43ed50c45a9a678", - "tarball": "http://registry.npmjs.org/gulp-uglify/-/gulp-uglify-0.3.1.tgz" + "shasum": "fa37bf6d4ad9a29a349c6cba862abb22eba67aac", + "tarball": "http://registry.npmjs.org/gulp-uglify/-/gulp-uglify-0.3.2.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-0.3.1.tgz" + "_resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-0.3.2.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-uglify/test/err.js b/node_modules/gulp-uglify/test/err.js index ebafa43..b4219ac 100644 --- a/node_modules/gulp-uglify/test/err.js +++ b/node_modules/gulp-uglify/test/err.js @@ -31,4 +31,5 @@ test('should report files in error', function(t) { }); stream.write(testFile1); + stream.end(); }); diff --git a/node_modules/gulp-uglify/test/minify.js b/node_modules/gulp-uglify/test/minify.js index 6a57246..a0b0f22 100644 --- a/node_modules/gulp-uglify/test/minify.js +++ b/node_modules/gulp-uglify/test/minify.js @@ -32,4 +32,5 @@ test('should minify files', function(t) { }); stream.write(testFile1); + stream.end(); }); diff --git a/node_modules/gulp-uglify/test/null.js b/node_modules/gulp-uglify/test/null.js index 6b7d415..b4710b4 100644 --- a/node_modules/gulp-uglify/test/null.js +++ b/node_modules/gulp-uglify/test/null.js @@ -27,4 +27,5 @@ test('should leave null files as is', function(t) { }); stream.write(testFile1); + stream.end(); }); diff --git a/node_modules/gulp-uglify/test/sourcemap.js b/node_modules/gulp-uglify/test/sourcemap.js index 57a3c42..c53fd68 100644 --- a/node_modules/gulp-uglify/test/sourcemap.js +++ b/node_modules/gulp-uglify/test/sourcemap.js @@ -51,6 +51,7 @@ function testWithFile(t, file) { }); stream.write(file); + stream.end(); } test('should minify files', function(t) { diff --git a/node_modules/gulp-uglify/test/streams.js b/node_modules/gulp-uglify/test/streams.js index 4dfa954..51b304a 100644 --- a/node_modules/gulp-uglify/test/streams.js +++ b/node_modules/gulp-uglify/test/streams.js @@ -29,11 +29,13 @@ test('should emit error for stream files', function(t) { t.ok(e instanceof PluginError, 'error is a PluginError'); t.equal(e.plugin, 'gulp-uglify', 'error is from gulp-uglify'); t.equal(e.fileName, testFile1.path, 'error reports the correct file'); - t.ok(e.stack, 'error has a stack'); + // t.ok(e.stack, 'error has a stack'); + t.skip('error should have a stack'); t.false(e.showStack, 'error is configured to not print stack'); }); stream.write(testFile1); + stream.end(); }); function stringStream() { diff --git a/node_modules/gulp-watch/README.md b/node_modules/gulp-watch/README.md index 64ed4d4..6762dd0 100644 --- a/node_modules/gulp-watch/README.md +++ b/node_modules/gulp-watch/README.md @@ -3,7 +3,7 @@ This is implementation of [`gulp.watch`](https://github.com/gulpjs/gulp/blob/master/docs/API.md#gulpwatchglob--opts-cb) with endless stream approach. If `gulp.watch` is working for you - stick with it, otherwise you can try `gulp-watch` plugin. -Main reasons of `gulp-watch` existance is that it can easly (with a little help of [`gulp-plumber`](https://github.com/floatdrop/gulp-plumber) achieve per-file rebuilding on file change: +The main reason for `gulp-watch`'s existence is that it can easly (with a little help of [`gulp-plumber`](https://github.com/floatdrop/gulp-plumber) achieve per-file rebuilding on file change: ![Awesome demonstration](https://github.com/floatdrop/gulp-watch/raw/master/img/2014-01-09.gif) @@ -26,7 +26,7 @@ gulp.task('default', function () { }); ``` -To watch entire glob of files and directories you should use `glob` option. In this case gulp-watch will pipe files matching glob downstream, and begin watching them. Moreover, any newly created files that match glob will also be piped downstream, and be watched for changes. +To watch entire glob of files and directories you should use `glob` option. In this case gulp-watch will pipe files matching glob downstream and begin watching them. Moreover, any newly created files that match glob will also be piped downstream and watched for changes. ```js var gulp = require('gulp'), @@ -42,12 +42,12 @@ gulp.task('default', function () { ### Continuous stream of events -This is usefull, when you want blazingly fast rebuilding per-file. +This is useful when you want blazingly fast rebuilding per-file. -__Be aware:__ `end` event is never happens in this mode, so plugins dependent on it will never print or do whatever they should do on `end` task. +__Be aware:__ `end` event never happens in this mode, so plugins dependent on it will never print or do whatever they should do on `end` task. ```js -// npm i gulp gulp-watch gulp-sass +// run before: `npm install gulp gulp-watch gulp-sass` var gulp = require('gulp'), watch = require('gulp-watch'), @@ -57,7 +57,7 @@ var gulp = require('gulp'), gulp.task('default', function () { gulp.src('scss/**', { read: false }) .pipe(watch()) - .pipe(plumber()) // This will keeps pipes working after error event + .pipe(plumber()) // This will keep pipes working after error event .pipe(sass()) .pipe(gulp.dest('./dist/')); }); @@ -83,13 +83,13 @@ var grep = require('gulp-grep-stream'); var mocha = require('gulp-mocha'); var plumber = require('gulp-plumber'); -gulp.task('default', function() { +gulp.task('default', function () { gulp.src(['lib/**', 'test/**'], { read: false }) - .pipe(watch({ emit: 'all' }, function(files) { + .pipe(watch({ emit: 'all' }, function (files) { files .pipe(grep('*/test/*.js')) .pipe(mocha({ reporter: 'spec' })) - .on('error', function() { + .on('error', function (err) { if (!/tests? failed/.test(err.stack)) { console.log(err.stack); } @@ -141,7 +141,7 @@ This function have three different modes, based on `callback` argument: This object passed to [`gaze` options](https://github.com/shama/gaze#properties) directly, so see documentation there. For __batched__ mode we are using [`gulp-batch`](https://github.com/floatdrop/gulp-batch#api), so options from there are available. And of course options for [`gulp.src`](https://github.com/gulpjs/gulp#gulpsrcglobs-options) used too. If you do not want content from watch, then add `read: false` to options object. #### options.emit -Type: `String` +Type: `String` Default: `one` This options defines emit strategy: @@ -162,7 +162,7 @@ Default: `undefined` If you want to detect new files, then you have to use this option. When `gulp-watch` gets files from `gulp.src` it looses the information about pattern of matching - therefore it can not detect new files, but with passed pattern in this option, `gulp-watch` will watch all files, that matched pattern and any new files, that was created after watch started and match `glob` pattern. #### options.gaze -Type: `Object` +Type: `Object` Default: `undefined` Contains options, that will be passed to Gaze instance. Full list can be found in [gaze readme](https://github.com/shama/gaze#properties). @@ -230,7 +230,7 @@ Stream, that handles `gulp.src` piping. # License -MIT (c) 2013 Vsevolod Strukchinsky (floatdrop@gmail.com) +MIT (c) 2014 Vsevolod Strukchinsky (floatdrop@gmail.com) [npm-url]: https://npmjs.org/package/gulp-watch [npm-image]: http://img.shields.io/npm/v/gulp-watch.svg diff --git a/node_modules/gulp-watch/index.js b/node_modules/gulp-watch/index.js index 915d93a..3e82052 100644 --- a/node_modules/gulp-watch/index.js +++ b/node_modules/gulp-watch/index.js @@ -18,7 +18,7 @@ module.exports = function (opts, cb) { if (Array.isArray(cb)) { var tasks = cb; var gulp = require('gulp'); - cb = function() { + cb = function () { gulp.start.apply(gulp, tasks); }.bind(gulp); } @@ -115,7 +115,7 @@ module.exports = function (opts, cb) { }; function logEvent(event, filepath, opts) { - var msg = [gutil.colors.magenta(path.basename(filepath)), 'was', event]; + var msg = [gutil.colors.magenta(path.relative(__dirname, filepath)), 'was', event]; if (opts.name) { msg.unshift(gutil.colors.cyan(opts.name) + ' saw'); } gutil.log.apply(gutil, msg); } diff --git a/node_modules/gulp-watch/node_modules/gaze/node_modules/globule/node_modules/glob/node_modules/inherits/package.json b/node_modules/gulp-watch/node_modules/gaze/node_modules/globule/node_modules/glob/node_modules/inherits/package.json index 5ac5551..2930a14 100644 --- a/node_modules/gulp-watch/node_modules/gaze/node_modules/globule/node_modules/glob/node_modules/inherits/package.json +++ b/node_modules/gulp-watch/node_modules/gaze/node_modules/globule/node_modules/glob/node_modules/inherits/package.json @@ -41,5 +41,6 @@ "url": "https://github.com/isaacs/inherits/issues" }, "readme": "ERROR: No README data found!", - "homepage": "https://github.com/isaacs/inherits" + "homepage": "https://github.com/isaacs/inherits", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/gaze/node_modules/globule/node_modules/lodash/package.json b/node_modules/gulp-watch/node_modules/gaze/node_modules/globule/node_modules/lodash/package.json index 6bb82cb..f10f333 100644 --- a/node_modules/gulp-watch/node_modules/gaze/node_modules/globule/node_modules/lodash/package.json +++ b/node_modules/gulp-watch/node_modules/gaze/node_modules/globule/node_modules/lodash/package.json @@ -75,5 +75,6 @@ "directories": {}, "_shasum": "57945732498d92310e5bd4b1ff4f273a79e6c9fc", "_resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.1.tgz", - "readme": "ERROR: No README data found!" + "readme": "ERROR: No README data found!", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/glob/LICENSE b/node_modules/gulp-watch/node_modules/glob/LICENSE index 0c44ae7..19129e3 100644 --- a/node_modules/gulp-watch/node_modules/glob/LICENSE +++ b/node_modules/gulp-watch/node_modules/glob/LICENSE @@ -1,27 +1,15 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. +The ISC License -The BSD License +Copyright (c) Isaac Z. Schlueter and Contributors -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: +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. -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. +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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/.npmignore similarity index 100% rename from node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore rename to node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/.npmignore diff --git a/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/.travis.yml b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/.travis.yml new file mode 100644 index 0000000..fca8ef0 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.10 + - 0.11 diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/LICENSE b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/LICENSE similarity index 57% rename from node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/LICENSE rename to node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/LICENSE index f6a0029..05a4010 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/LICENSE +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/LICENSE @@ -1,8 +1,6 @@ -Copyright 2013, Rod Vagg (the "Original Author") +Copyright 2009, 2010, 2011 Isaac Z. Schlueter. 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 @@ -15,15 +13,6 @@ 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 @@ -32,8 +21,3 @@ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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-watch/node_modules/glob/node_modules/minimatch/README.md b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/README.md new file mode 100644 index 0000000..5b3967e --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/README.md @@ -0,0 +1,218 @@ +# 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 if this option is set. When not 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-watch/node_modules/glob/node_modules/minimatch/minimatch.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/minimatch.js new file mode 100644 index 0000000..4761786 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/minimatch.js @@ -0,0 +1,1073 @@ +;(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 pad(n, width, z) { + z = z || '0'; + n = n + ''; + return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; +} + +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] + , needPadding = numset[1][0] === '0' + , startWidth = numset[1].length + , padded + , end = +numset[2] + , inc = start > end ? -1 : 1 + , set = [] + + for (var i = start; i != (end + inc); i += inc) { + padded = needPadding ? pad(i, startWidth) : i + '' + // append all the suffixes + for (var ii = 0, ll = suf.length; ii < ll; ii ++) { + set.push(padded + 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) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.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) + + // Find the basename of the path by looking for the last non-empty segment + var filename; + for (var i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (var i = 0, l = set.length; i < l; i ++) { + var pattern = set[i], file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + 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-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore @@ -0,0 +1 @@ +/node_modules diff --git a/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS new file mode 100644 index 0000000..4a0bc50 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS @@ -0,0 +1,14 @@ +# 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-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE new file mode 100644 index 0000000..05a4010 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE @@ -0,0 +1,23 @@ +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-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md new file mode 100644 index 0000000..03ee0f9 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md @@ -0,0 +1,97 @@ +# 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-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js new file mode 100644 index 0000000..d1d1381 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js @@ -0,0 +1,252 @@ +;(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-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json new file mode 100644 index 0000000..4472725 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json @@ -0,0 +1,33 @@ +{ + "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-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js new file mode 100644 index 0000000..f72697c --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js @@ -0,0 +1,369 @@ +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-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js new file mode 100644 index 0000000..eefb80d --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js @@ -0,0 +1,52 @@ +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-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js new file mode 100644 index 0000000..7af45b0 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js @@ -0,0 +1,50 @@ +#!/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-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE similarity index 100% rename from node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE rename to node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE diff --git a/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md new file mode 100644 index 0000000..7e36512 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md @@ -0,0 +1,53 @@ +# 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-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js new file mode 100644 index 0000000..5acfd6d --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js @@ -0,0 +1,283 @@ +// 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-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json new file mode 100644 index 0000000..cb7e2bd --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json @@ -0,0 +1,42 @@ +{ + "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-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js new file mode 100644 index 0000000..82c7ab8 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js @@ -0,0 +1,39 @@ +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-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js new file mode 100644 index 0000000..50c53a1 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js @@ -0,0 +1,24 @@ +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-watch/node_modules/glob/node_modules/minimatch/package.json b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/package.json new file mode 100644 index 0000000..156c5c3 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/package.json @@ -0,0 +1,58 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "1.0.0", + "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" + }, + "gitHead": "b374a643976eb55cdc19c60b6dd51ebe9bcc607a", + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "homepage": "https://github.com/isaacs/minimatch", + "_id": "minimatch@1.0.0", + "_shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d", + "_from": "minimatch@^1.0.0", + "_npmVersion": "1.4.21", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/basic.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/basic.js new file mode 100644 index 0000000..ae7ac73 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/basic.js @@ -0,0 +1,399 @@ +// 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-watch/node_modules/glob/node_modules/minimatch/test/brace-expand.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/brace-expand.js new file mode 100644 index 0000000..e63d3f6 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/brace-expand.js @@ -0,0 +1,40 @@ +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"] ] + , [ "a{00..05}b" + , ["a00b" + ,"a01b" + ,"a02b" + ,"a03b" + ,"a04b" + ,"a05b" ] ] + ].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-watch/node_modules/glob/node_modules/minimatch/test/caching.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/caching.js new file mode 100644 index 0000000..0fec4b0 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/caching.js @@ -0,0 +1,14 @@ +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-watch/node_modules/glob/node_modules/minimatch/test/defaults.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/defaults.js new file mode 100644 index 0000000..75e0571 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/defaults.js @@ -0,0 +1,274 @@ +// 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-watch/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js new file mode 100644 index 0000000..6676e26 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js @@ -0,0 +1,8 @@ +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-watch/node_modules/glob/package.json b/node_modules/gulp-watch/node_modules/glob/package.json index 4954f29..dd806a1 100644 --- a/node_modules/gulp-watch/node_modules/glob/package.json +++ b/node_modules/gulp-watch/node_modules/glob/package.json @@ -6,7 +6,7 @@ }, "name": "glob", "description": "a little globber", - "version": "4.0.4", + "version": "4.0.5", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" @@ -20,7 +20,7 @@ }, "dependencies": { "inherits": "2", - "minimatch": "^0.3.0", + "minimatch": "^1.0.0", "once": "^1.3.0", "graceful-fs": "^3.0.2" }, @@ -33,16 +33,16 @@ "test": "tap test/*.js", "test-regen": "TEST_REGEN=1 node test/00-setup.js" }, - "license": "BSD", - "gitHead": "b7c1296f7fad4eac9fa560058cb6f737ef99d267", + "license": "ISC", + "gitHead": "a7d85acf4e89fa26d17396ab022ef98fbe1f8a4b", "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, "homepage": "https://github.com/isaacs/node-glob", - "_id": "glob@4.0.4", - "_shasum": "730ce0190d87eca7812398018e21be712b4d69d2", + "_id": "glob@4.0.5", + "_shasum": "95e42c9efdb3ab1f4788fd7793dfded4a3378063", "_from": "glob@^4.0.2", - "_npmVersion": "1.5.0-alpha-1", + "_npmVersion": "1.4.21", "_npmUser": { "name": "isaacs", "email": "i@izs.me" @@ -54,10 +54,10 @@ } ], "dist": { - "shasum": "730ce0190d87eca7812398018e21be712b4d69d2", - "tarball": "http://registry.npmjs.org/glob/-/glob-4.0.4.tgz" + "shasum": "95e42c9efdb3ab1f4788fd7793dfded4a3378063", + "tarball": "http://registry.npmjs.org/glob/-/glob-4.0.5.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/glob/-/glob-4.0.4.tgz", + "_resolved": "https://registry.npmjs.org/glob/-/glob-4.0.5.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/glob2base/.editorconfig b/node_modules/gulp-watch/node_modules/glob2base/.editorconfig new file mode 100644 index 0000000..6c5424e --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob2base/.editorconfig @@ -0,0 +1,10 @@ +# editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/node_modules/gulp-watch/node_modules/glob2base/.jshintrc b/node_modules/gulp-watch/node_modules/glob2base/.jshintrc new file mode 100644 index 0000000..af7124e --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob2base/.jshintrc @@ -0,0 +1,19 @@ +{ + "camelcase": true, + "curly": true, + "eqeqeq": true, + "freeze": true, + "indent": 2, + "newcap": false, + "quotmark": "single", + "maxdepth": 3, + "maxstatements": 50, + "maxlen": 80, + "eqnull": true, + "funcscope": true, + "strict": true, + "undef": true, + "unused": true, + "node": true, + "mocha": true +} \ No newline at end of file diff --git a/node_modules/gulp-watch/node_modules/glob2base/.npmignore b/node_modules/gulp-watch/node_modules/glob2base/.npmignore index b5ef13a..d9689e3 100644 --- a/node_modules/gulp-watch/node_modules/glob2base/.npmignore +++ b/node_modules/gulp-watch/node_modules/glob2base/.npmignore @@ -3,4 +3,7 @@ node_modules build *.node -components \ No newline at end of file +coverage +*.orig +.idea +sandbox \ No newline at end of file diff --git a/node_modules/gulp-watch/node_modules/glob2base/.travis.yml b/node_modules/gulp-watch/node_modules/glob2base/.travis.yml index 468a53d..dfec605 100644 --- a/node_modules/gulp-watch/node_modules/glob2base/.travis.yml +++ b/node_modules/gulp-watch/node_modules/glob2base/.travis.yml @@ -1,7 +1,6 @@ language: node_js node_js: - - 0.7 - - 0.8 - - 0.9 - - 0.10 - - 0.11 + - "0.10" + - "0.11" +after_script: + - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp-watch/node_modules/glob2base/LICENSE b/node_modules/gulp-watch/node_modules/glob2base/LICENSE index 4f482f9..7cbe012 100755 --- a/node_modules/gulp-watch/node_modules/glob2base/LICENSE +++ b/node_modules/gulp-watch/node_modules/glob2base/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013 Fractal +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 diff --git a/node_modules/gulp-watch/node_modules/glob2base/README.md b/node_modules/gulp-watch/node_modules/glob2base/README.md index 35ce170..c14fa38 100644 --- a/node_modules/gulp-watch/node_modules/glob2base/README.md +++ b/node_modules/gulp-watch/node_modules/glob2base/README.md @@ -1,11 +1,10 @@ -[![Build Status](https://travis-ci.org/wearefractal/glob2base.png?branch=master)](https://travis-ci.org/wearefractal/glob2base) +# glob2base [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Support us][gittip-image]][gittip-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] -[![NPM version](https://badge.fury.io/js/glob2base.png)](http://badge.fury.io/js/glob2base) ## Information - + @@ -14,43 +13,39 @@ - +
Packageglob2base
Node Version>= 0.4>= 0.10
-Extracts a base path from a glob object. - ## Usage +The module is a function that takes in a node-glob instance and returns a string. Basically it just gives you everything before any globbing/matching happens. + ```javascript var glob2base = require('glob2base'); var glob = require('glob'); -var globber = new glob.Glob("js/**/*.js"); -var basePath = glob2base(globber); -``` +// js/ +glob2base(new glob.Glob('js/**/*.js')); + +// css/test/ +glob2base(new glob.Glob('css/test/{a,b}/*.css')); -## LICENSE +// pages/whatever/ +glob2base(new glob.Glob('pages/whatever/index.html')); +``` -(MIT License) +## Like what we do? -Copyright (c) 2013 Fractal +[gittip-url]: https://www.gittip.com/WeAreFractal/ +[gittip-image]: http://img.shields.io/gittip/WeAreFractal.svg -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +[downloads-image]: http://img.shields.io/npm/dm/glob2base.svg +[npm-url]: https://npmjs.org/package/glob2base +[npm-image]: http://img.shields.io/npm/v/glob2base.svg -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +[travis-url]: https://travis-ci.org/wearefractal/glob2base +[travis-image]: http://img.shields.io/travis/wearefractal/glob2base.svg -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +[coveralls-url]: https://coveralls.io/r/wearefractal/glob2base +[coveralls-image]: http://img.shields.io/coveralls/wearefractal/glob2base/master.svg diff --git a/node_modules/gulp-watch/node_modules/glob2base/index.js b/node_modules/gulp-watch/node_modules/glob2base/index.js index b48de29..502578b 100644 --- a/node_modules/gulp-watch/node_modules/glob2base/index.js +++ b/node_modules/gulp-watch/node_modules/glob2base/index.js @@ -1,5 +1,8 @@ +'use strict'; + var path = require('path'); -var findIndex = require('lodash.findindex'); +var _ = require('lodash'); +var findIndex = _.findIndex; var flattenGlob = function(arr){ var out = []; @@ -11,7 +14,12 @@ var flattenGlob = function(arr){ } out.push(arr[i]); } - if (flat) out.pop(); // last one is a file or specific dir + + // last one is a file or specific dir + // so we pop it off + if (flat) { + out.pop(); + } return out; }; @@ -21,12 +29,12 @@ var flattenExpansion = function(set) { // find index where the diff is var idx = findIndex(first, function(v, idx){ - if (typeof v !== 'string') return true; + if (typeof v !== 'string') { + return true; + } var matched = toCompare.every(function(arr){ - var v2 = arr[idx]; - if (typeof v2 !== 'string') return false; - return v === v2; + return v === arr[idx]; }); return !matched; @@ -45,7 +53,6 @@ var setToBase = function(set) { }; module.exports = function(glob) { - var cwd = (glob.options && glob.options.cwd) ? glob.options.cwd : process.cwd(); var set = glob.minimatch.set; var baseParts = setToBase(set); var basePath = path.normalize(baseParts.join(path.sep))+path.sep; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/README.md deleted file mode 100644 index 4c505ba..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.findindex v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.findIndex`](http://lodash.com/docs#findIndex) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/index.js deleted file mode 100644 index 2f76582..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/index.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var createCallback = require('lodash.createcallback'); - -/** - * This method is like `_.find` except that it returns the index of the first - * element that passes the callback check, instead of the element itself. - * - * If a property name is provided for `callback` the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is provided for `callback` the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to search. - * @param {Function|Object|string} [callback=identity] The function called - * per iteration. If a property name or object is provided it will be used - * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {*} [thisArg] The `this` binding of `callback`. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var characters = [ - * { 'name': 'barney', 'age': 36, 'blocked': false }, - * { 'name': 'fred', 'age': 40, 'blocked': true }, - * { 'name': 'pebbles', 'age': 1, 'blocked': false } - * ]; - * - * _.findIndex(characters, function(chr) { - * return chr.age < 20; - * }); - * // => 2 - * - * // using "_.where" callback shorthand - * _.findIndex(characters, { 'age': 36 }); - * // => 0 - * - * // using "_.pluck" callback shorthand - * _.findIndex(characters, 'blocked'); - * // => 1 - */ -function findIndex(array, callback, thisArg) { - var index = -1, - length = array ? array.length : 0; - - callback = createCallback(callback, thisArg, 3); - while (++index < length) { - if (callback(array[index], index, array)) { - return index; - } - } - return -1; -} - -module.exports = findIndex; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/README.md deleted file mode 100644 index 72045f2..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.createcallback v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.createCallback`](http://lodash.com/docs#createCallback) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/index.js deleted file mode 100644 index 850a887..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/index.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseCreateCallback = require('lodash._basecreatecallback'), - baseIsEqual = require('lodash._baseisequal'), - isObject = require('lodash.isobject'), - keys = require('lodash.keys'), - property = require('lodash.property'); - -/** - * Produces a callback bound to an optional `thisArg`. If `func` is a property - * name the created callback will return the property value for a given element. - * If `func` is an object the created callback will return `true` for elements - * that contain the equivalent object properties, otherwise it will return `false`. - * - * @static - * @memberOf _ - * @category Utilities - * @param {*} [func=identity] The value to convert to a callback. - * @param {*} [thisArg] The `this` binding of the created callback. - * @param {number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. - * @example - * - * var characters = [ - * { 'name': 'barney', 'age': 36 }, - * { 'name': 'fred', 'age': 40 } - * ]; - * - * // wrap to create custom callback shorthands - * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { - * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); - * return !match ? func(callback, thisArg) : function(object) { - * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; - * }; - * }); - * - * _.filter(characters, 'age__gt38'); - * // => [{ 'name': 'fred', 'age': 40 }] - */ -function createCallback(func, thisArg, argCount) { - var type = typeof func; - if (func == null || type == 'function') { - return baseCreateCallback(func, thisArg, argCount); - } - // handle "_.pluck" style callback shorthands - if (type != 'object') { - return property(func); - } - var props = keys(func), - key = props[0], - a = func[key]; - - // handle "_.where" style callback shorthands - if (props.length == 1 && a === a && !isObject(a)) { - // fast path the common case of providing an object with a single - // property containing a primitive value - return function(object) { - var b = object[key]; - return a === b && (a !== 0 || (1 / a == 1 / b)); - }; - } - return function(object) { - var length = props.length, - result = false; - - while (length--) { - if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) { - break; - } - } - return result; - }; -} - -module.exports = createCallback; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/README.md deleted file mode 100644 index aa4a6e9..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._basecreatecallback v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseCreateCallback` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/index.js deleted file mode 100644 index 381aefe..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/index.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var bind = require('lodash.bind'), - identity = require('lodash.identity'), - setBindData = require('lodash._setbinddata'), - support = require('lodash.support'); - -/** Used to detected named functions */ -var reFuncName = /^\s*function[ \n\r\t]+\w/; - -/** Used to detect functions containing a `this` reference */ -var reThis = /\bthis\b/; - -/** Native method shortcuts */ -var fnToString = Function.prototype.toString; - -/** - * The base implementation of `_.createCallback` without support for creating - * "_.pluck" or "_.where" style callbacks. - * - * @private - * @param {*} [func=identity] The value to convert to a callback. - * @param {*} [thisArg] The `this` binding of the created callback. - * @param {number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. - */ -function baseCreateCallback(func, thisArg, argCount) { - if (typeof func != 'function') { - return identity; - } - // exit early for no `thisArg` or already bound by `Function#bind` - if (typeof thisArg == 'undefined' || !('prototype' in func)) { - return func; - } - var bindData = func.__bindData__; - if (typeof bindData == 'undefined') { - if (support.funcNames) { - bindData = !func.name; - } - bindData = bindData || !support.funcDecomp; - if (!bindData) { - var source = fnToString.call(func); - if (!support.funcNames) { - bindData = !reFuncName.test(source); - } - if (!bindData) { - // checks if `func` references the `this` keyword and stores the result - bindData = reThis.test(source); - setBindData(func, bindData); - } - } - } - // exit early if there are no `this` references or `func` is bound - if (bindData === false || (bindData !== true && bindData[1] & 1)) { - return func; - } - switch (argCount) { - case 1: return function(value) { - return func.call(thisArg, value); - }; - case 2: return function(a, b) { - return func.call(thisArg, a, b); - }; - case 3: return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(thisArg, accumulator, value, index, collection); - }; - } - return bind(func, thisArg); -} - -module.exports = baseCreateCallback; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/README.md deleted file mode 100644 index 430c783..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._setbinddata v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `setBindData` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/index.js deleted file mode 100644 index 79efad2..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/index.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isNative = require('lodash._isnative'), - noop = require('lodash.noop'); - -/** Used as the property descriptor for `__bindData__` */ -var descriptor = { - 'configurable': false, - 'enumerable': false, - 'value': null, - 'writable': false -}; - -/** Used to set meta data on functions */ -var defineProperty = (function() { - // IE 8 only accepts DOM elements - try { - var o = {}, - func = isNative(func = Object.defineProperty) && func, - result = func(o, o, o) && func; - } catch(e) { } - return result; -}()); - -/** - * Sets `this` binding data on a given function. - * - * @private - * @param {Function} func The function to set data on. - * @param {Array} value The data array to set. - */ -var setBindData = !defineProperty ? noop : function(func, value) { - descriptor.value = value; - defineProperty(func, '__bindData__', descriptor); -}; - -module.exports = setBindData; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/README.md deleted file mode 100644 index 39fab6a..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.noop v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/index.js deleted file mode 100644 index 61b6162..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * A no-operation function. - * - * @static - * @memberOf _ - * @category Utilities - * @example - * - * var object = { 'name': 'fred' }; - * _.noop(object) === undefined; - * // => true - */ -function noop() { - // no operation performed -} - -module.exports = noop; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/package.json deleted file mode 100644 index cb388d0..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "lodash.noop", - "version": "2.4.1", - "description": "The Lo-Dash function `_.noop` 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" - }, - "readme": "# lodash.noop v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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.noop@2.4.1", - "dist": { - "shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "tarball": "http://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz" - }, - "_from": "lodash.noop@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "_resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/package.json deleted file mode 100644 index 1ccabad..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "lodash._setbinddata", - "version": "2.4.1", - "description": "The internal Lo-Dash function `setBindData` 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._isnative": "~2.4.1", - "lodash.noop": "~2.4.1" - }, - "readme": "# lodash._setbinddata v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `setBindData` 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._setbinddata@2.4.1", - "dist": { - "shasum": "f7c200cd1b92ef236b399eecf73c648d17aa94d2", - "tarball": "http://registry.npmjs.org/lodash._setbinddata/-/lodash._setbinddata-2.4.1.tgz" - }, - "_from": "lodash._setbinddata@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "f7c200cd1b92ef236b399eecf73c648d17aa94d2", - "_resolved": "https://registry.npmjs.org/lodash._setbinddata/-/lodash._setbinddata-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/README.md deleted file mode 100644 index 3a32fbe..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.bind v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.bind`](http://lodash.com/docs#bind) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/index.js deleted file mode 100644 index fa76328..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var createWrapper = require('lodash._createwrapper'), - slice = require('lodash._slice'); - -/** - * Creates a function that, when called, invokes `func` with the `this` - * binding of `thisArg` and prepends any additional `bind` arguments to those - * provided to the bound function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to bind. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {...*} [arg] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var func = function(greeting) { - * return greeting + ' ' + this.name; - * }; - * - * func = _.bind(func, { 'name': 'fred' }, 'hi'); - * func(); - * // => 'hi fred' - */ -function bind(func, thisArg) { - return arguments.length > 2 - ? createWrapper(func, 17, slice(arguments, 2), null, thisArg) - : createWrapper(func, 1, null, null, thisArg); -} - -module.exports = bind; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/README.md deleted file mode 100644 index b89f6e2..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._createwrapper v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `createWrapper` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/index.js deleted file mode 100644 index 02abfad..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/index.js +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseBind = require('lodash._basebind'), - baseCreateWrapper = require('lodash._basecreatewrapper'), - isFunction = require('lodash.isfunction'), - slice = require('lodash._slice'); - -/** - * Used for `Array` method references. - * - * Normally `Array.prototype` would suffice, however, using an array literal - * avoids issues in Narwhal. - */ -var arrayRef = []; - -/** Native method shortcuts */ -var push = arrayRef.push, - unshift = arrayRef.unshift; - -/** - * Creates a function that, when called, either curries or invokes `func` - * with an optional `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to reference. - * @param {number} bitmask The bitmask of method flags to compose. - * The bitmask may be composed of the following flags: - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` - * 8 - `_.curry` (bound) - * 16 - `_.partial` - * 32 - `_.partialRight` - * @param {Array} [partialArgs] An array of arguments to prepend to those - * provided to the new function. - * @param {Array} [partialRightArgs] An array of arguments to append to those - * provided to the new function. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new function. - */ -function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { - var isBind = bitmask & 1, - isBindKey = bitmask & 2, - isCurry = bitmask & 4, - isCurryBound = bitmask & 8, - isPartial = bitmask & 16, - isPartialRight = bitmask & 32; - - if (!isBindKey && !isFunction(func)) { - throw new TypeError; - } - if (isPartial && !partialArgs.length) { - bitmask &= ~16; - isPartial = partialArgs = false; - } - if (isPartialRight && !partialRightArgs.length) { - bitmask &= ~32; - isPartialRight = partialRightArgs = false; - } - var bindData = func && func.__bindData__; - if (bindData && bindData !== true) { - // clone `bindData` - bindData = slice(bindData); - if (bindData[2]) { - bindData[2] = slice(bindData[2]); - } - if (bindData[3]) { - bindData[3] = slice(bindData[3]); - } - // set `thisBinding` is not previously bound - if (isBind && !(bindData[1] & 1)) { - bindData[4] = thisArg; - } - // set if previously bound but not currently (subsequent curried functions) - if (!isBind && bindData[1] & 1) { - bitmask |= 8; - } - // set curried arity if not yet set - if (isCurry && !(bindData[1] & 4)) { - bindData[5] = arity; - } - // append partial left arguments - if (isPartial) { - push.apply(bindData[2] || (bindData[2] = []), partialArgs); - } - // append partial right arguments - if (isPartialRight) { - unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs); - } - // merge flags - bindData[1] |= bitmask; - return createWrapper.apply(null, bindData); - } - // fast path for `_.bind` - var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper; - return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]); -} - -module.exports = createWrapper; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/README.md deleted file mode 100644 index 28c0806..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._basebind v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseBind` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/index.js deleted file mode 100644 index cbd8a50..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseCreate = require('lodash._basecreate'), - isObject = require('lodash.isobject'), - setBindData = require('lodash._setbinddata'), - slice = require('lodash._slice'); - -/** - * Used for `Array` method references. - * - * Normally `Array.prototype` would suffice, however, using an array literal - * avoids issues in Narwhal. - */ -var arrayRef = []; - -/** Native method shortcuts */ -var push = arrayRef.push; - -/** - * The base implementation of `_.bind` that creates the bound function and - * sets its meta data. - * - * @private - * @param {Array} bindData The bind data array. - * @returns {Function} Returns the new bound function. - */ -function baseBind(bindData) { - var func = bindData[0], - partialArgs = bindData[2], - thisArg = bindData[4]; - - function bound() { - // `Function#bind` spec - // http://es5.github.io/#x15.3.4.5 - if (partialArgs) { - // avoid `arguments` object deoptimizations by using `slice` instead - // of `Array.prototype.slice.call` and not assigning `arguments` to a - // variable as a ternary expression - var args = slice(partialArgs); - push.apply(args, arguments); - } - // mimic the constructor's `return` behavior - // http://es5.github.io/#x13.2.2 - if (this instanceof bound) { - // ensure `new bound` is an instance of `func` - var thisBinding = baseCreate(func.prototype), - result = func.apply(thisBinding, args || arguments); - return isObject(result) ? result : thisBinding; - } - return func.apply(thisArg, args || arguments); - } - setBindData(bound, bindData); - return bound; -} - -module.exports = baseBind; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/README.md deleted file mode 100644 index a2733dd..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._basecreate v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseCreate` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/index.js deleted file mode 100644 index 1daf7f6..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/index.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isNative = require('lodash._isnative'), - isObject = require('lodash.isobject'), - noop = require('lodash.noop'); - -/* Native method shortcuts for methods with the same name as other `lodash` methods */ -var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate; - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ -function baseCreate(prototype, properties) { - return isObject(prototype) ? nativeCreate(prototype) : {}; -} -// fallback for browsers without `Object.create` -if (!nativeCreate) { - baseCreate = (function() { - function Object() {} - return function(prototype) { - if (isObject(prototype)) { - Object.prototype = prototype; - var result = new Object; - Object.prototype = null; - } - return result || global.Object(); - }; - }()); -} - -module.exports = baseCreate; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md deleted file mode 100644 index 39fab6a..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.noop v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js deleted file mode 100644 index 61b6162..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * A no-operation function. - * - * @static - * @memberOf _ - * @category Utilities - * @example - * - * var object = { 'name': 'fred' }; - * _.noop(object) === undefined; - * // => true - */ -function noop() { - // no operation performed -} - -module.exports = noop; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json deleted file mode 100644 index cb388d0..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "lodash.noop", - "version": "2.4.1", - "description": "The Lo-Dash function `_.noop` 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" - }, - "readme": "# lodash.noop v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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.noop@2.4.1", - "dist": { - "shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "tarball": "http://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz" - }, - "_from": "lodash.noop@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "_resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/package.json deleted file mode 100644 index 420ef89..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "lodash._basecreate", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseCreate` 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._isnative": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash.noop": "~2.4.1" - }, - "readme": "# lodash._basecreate v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseCreate` 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._basecreate@2.4.1", - "dist": { - "shasum": "f8e6f5b578a9e34e541179b56b8eeebf4a287e08", - "tarball": "http://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz" - }, - "_from": "lodash._basecreate@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "f8e6f5b578a9e34e541179b56b8eeebf4a287e08", - "_resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/package.json deleted file mode 100644 index 7c51c23..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "lodash._basebind", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseBind` 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._basecreate": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash._setbinddata": "~2.4.1", - "lodash._slice": "~2.4.1" - }, - "readme": "# lodash._basebind v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseBind` 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._basebind@2.4.1", - "dist": { - "shasum": "e940b9ebdd27c327e0a8dab1b55916c5341e9575", - "tarball": "http://registry.npmjs.org/lodash._basebind/-/lodash._basebind-2.4.1.tgz" - }, - "_from": "lodash._basebind@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "e940b9ebdd27c327e0a8dab1b55916c5341e9575", - "_resolved": "https://registry.npmjs.org/lodash._basebind/-/lodash._basebind-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/README.md deleted file mode 100644 index aba5586..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._basecreatewrapper v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseCreateWrapper` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/index.js deleted file mode 100644 index 68ed252..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/index.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseCreate = require('lodash._basecreate'), - isObject = require('lodash.isobject'), - setBindData = require('lodash._setbinddata'), - slice = require('lodash._slice'); - -/** - * Used for `Array` method references. - * - * Normally `Array.prototype` would suffice, however, using an array literal - * avoids issues in Narwhal. - */ -var arrayRef = []; - -/** Native method shortcuts */ -var push = arrayRef.push; - -/** - * The base implementation of `createWrapper` that creates the wrapper and - * sets its meta data. - * - * @private - * @param {Array} bindData The bind data array. - * @returns {Function} Returns the new function. - */ -function baseCreateWrapper(bindData) { - var func = bindData[0], - bitmask = bindData[1], - partialArgs = bindData[2], - partialRightArgs = bindData[3], - thisArg = bindData[4], - arity = bindData[5]; - - var isBind = bitmask & 1, - isBindKey = bitmask & 2, - isCurry = bitmask & 4, - isCurryBound = bitmask & 8, - key = func; - - function bound() { - var thisBinding = isBind ? thisArg : this; - if (partialArgs) { - var args = slice(partialArgs); - push.apply(args, arguments); - } - if (partialRightArgs || isCurry) { - args || (args = slice(arguments)); - if (partialRightArgs) { - push.apply(args, partialRightArgs); - } - if (isCurry && args.length < arity) { - bitmask |= 16 & ~32; - return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]); - } - } - args || (args = arguments); - if (isBindKey) { - func = thisBinding[key]; - } - if (this instanceof bound) { - thisBinding = baseCreate(func.prototype); - var result = func.apply(thisBinding, args); - return isObject(result) ? result : thisBinding; - } - return func.apply(thisBinding, args); - } - setBindData(bound, bindData); - return bound; -} - -module.exports = baseCreateWrapper; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/README.md deleted file mode 100644 index a2733dd..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._basecreate v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseCreate` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/index.js deleted file mode 100644 index 1daf7f6..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/index.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isNative = require('lodash._isnative'), - isObject = require('lodash.isobject'), - noop = require('lodash.noop'); - -/* Native method shortcuts for methods with the same name as other `lodash` methods */ -var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate; - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ -function baseCreate(prototype, properties) { - return isObject(prototype) ? nativeCreate(prototype) : {}; -} -// fallback for browsers without `Object.create` -if (!nativeCreate) { - baseCreate = (function() { - function Object() {} - return function(prototype) { - if (isObject(prototype)) { - Object.prototype = prototype; - var result = new Object; - Object.prototype = null; - } - return result || global.Object(); - }; - }()); -} - -module.exports = baseCreate; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md deleted file mode 100644 index 39fab6a..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.noop v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js deleted file mode 100644 index 61b6162..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * A no-operation function. - * - * @static - * @memberOf _ - * @category Utilities - * @example - * - * var object = { 'name': 'fred' }; - * _.noop(object) === undefined; - * // => true - */ -function noop() { - // no operation performed -} - -module.exports = noop; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json deleted file mode 100644 index cb388d0..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "lodash.noop", - "version": "2.4.1", - "description": "The Lo-Dash function `_.noop` 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" - }, - "readme": "# lodash.noop v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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.noop@2.4.1", - "dist": { - "shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "tarball": "http://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz" - }, - "_from": "lodash.noop@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "_resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/package.json deleted file mode 100644 index 420ef89..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "lodash._basecreate", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseCreate` 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._isnative": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash.noop": "~2.4.1" - }, - "readme": "# lodash._basecreate v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseCreate` 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._basecreate@2.4.1", - "dist": { - "shasum": "f8e6f5b578a9e34e541179b56b8eeebf4a287e08", - "tarball": "http://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz" - }, - "_from": "lodash._basecreate@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "f8e6f5b578a9e34e541179b56b8eeebf4a287e08", - "_resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/package.json deleted file mode 100644 index a992899..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "lodash._basecreatewrapper", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseCreateWrapper` 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._basecreate": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash._setbinddata": "~2.4.1", - "lodash._slice": "~2.4.1" - }, - "readme": "# lodash._basecreatewrapper v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseCreateWrapper` 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._basecreatewrapper@2.4.1", - "dist": { - "shasum": "4d31f2e7de7e134fbf2803762b8150b32519666f", - "tarball": "http://registry.npmjs.org/lodash._basecreatewrapper/-/lodash._basecreatewrapper-2.4.1.tgz" - }, - "_from": "lodash._basecreatewrapper@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "4d31f2e7de7e134fbf2803762b8150b32519666f", - "_resolved": "https://registry.npmjs.org/lodash._basecreatewrapper/-/lodash._basecreatewrapper-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/README.md deleted file mode 100644 index 2831b7f..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.isfunction v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.isFunction`](http://lodash.com/docs#isFunction) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/index.js deleted file mode 100644 index ad4b451..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/index.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Checks if `value` is a function. - * - * @static - * @memberOf _ - * @category Objects - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - */ -function isFunction(value) { - return typeof value == 'function'; -} - -module.exports = isFunction; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/package.json deleted file mode 100644 index ddd5d59..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "lodash.isfunction", - "version": "2.4.1", - "description": "The Lo-Dash function `_.isFunction` 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" - }, - "readme": "# lodash.isfunction v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.isFunction`](http://lodash.com/docs#isFunction) 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.isfunction@2.4.1", - "_from": "lodash.isfunction@~2.4.1", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/package.json deleted file mode 100644 index 19cc563..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "lodash._createwrapper", - "version": "2.4.1", - "description": "The internal Lo-Dash function `createWrapper` 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._basebind": "~2.4.1", - "lodash._basecreatewrapper": "~2.4.1", - "lodash.isfunction": "~2.4.1", - "lodash._slice": "~2.4.1" - }, - "readme": "# lodash._createwrapper v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `createWrapper` 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._createwrapper@2.4.1", - "dist": { - "shasum": "51d6957973da4ed556e37290d8c1a18c53de1607", - "tarball": "http://registry.npmjs.org/lodash._createwrapper/-/lodash._createwrapper-2.4.1.tgz" - }, - "_from": "lodash._createwrapper@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "51d6957973da4ed556e37290d8c1a18c53de1607", - "_resolved": "https://registry.npmjs.org/lodash._createwrapper/-/lodash._createwrapper-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/README.md deleted file mode 100644 index d824980..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._slice v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `slice` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/index.js deleted file mode 100644 index 9c471c8..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Slices the `collection` from the `start` index up to, but not including, - * the `end` index. - * - * Note: This function is used instead of `Array#slice` to support node lists - * in IE < 9 and to ensure dense arrays are returned. - * - * @private - * @param {Array|Object|string} collection The collection to slice. - * @param {number} start The start index. - * @param {number} end The end index. - * @returns {Array} Returns the new array. - */ -function slice(array, start, end) { - start || (start = 0); - if (typeof end == 'undefined') { - end = array ? array.length : 0; - } - var index = -1, - length = end - start || 0, - result = Array(length < 0 ? 0 : length); - - while (++index < length) { - result[index] = array[start + index]; - } - return result; -} - -module.exports = slice; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/package.json deleted file mode 100644 index 078475c..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "lodash._slice", - "version": "2.4.1", - "description": "The internal Lo-Dash function `slice` 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._slice v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `slice` 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._slice@2.4.1", - "dist": { - "shasum": "745cf41a53597b18f688898544405efa2b06d90f", - "tarball": "http://registry.npmjs.org/lodash._slice/-/lodash._slice-2.4.1.tgz" - }, - "_from": "lodash._slice@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "745cf41a53597b18f688898544405efa2b06d90f", - "_resolved": "https://registry.npmjs.org/lodash._slice/-/lodash._slice-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/package.json deleted file mode 100644 index 00ad79a..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "lodash.bind", - "version": "2.4.1", - "description": "The Lo-Dash function `_.bind` 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._createwrapper": "~2.4.1", - "lodash._slice": "~2.4.1" - }, - "readme": "# lodash.bind v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.bind`](http://lodash.com/docs#bind) 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.bind@2.4.1", - "dist": { - "shasum": "5d19fa005c8c4d236faf4742c7b7a1fcabe29267", - "tarball": "http://registry.npmjs.org/lodash.bind/-/lodash.bind-2.4.1.tgz" - }, - "_from": "lodash.bind@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "5d19fa005c8c4d236faf4742c7b7a1fcabe29267", - "_resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/README.md deleted file mode 100644 index ad7738a..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.identity v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.identity`](http://lodash.com/docs#identity) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/index.js deleted file mode 100644 index dc9c92a..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/index.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * This method returns the first argument provided to it. - * - * @static - * @memberOf _ - * @category Utilities - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'name': 'fred' }; - * _.identity(object) === object; - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/package.json deleted file mode 100644 index c0174d3..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "lodash.identity", - "version": "2.4.1", - "description": "The Lo-Dash function `_.identity` 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" - }, - "readme": "# lodash.identity v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.identity`](http://lodash.com/docs#identity) 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.identity@2.4.1", - "dist": { - "shasum": "6694cffa65fef931f7c31ce86c74597cf560f4f1", - "tarball": "http://registry.npmjs.org/lodash.identity/-/lodash.identity-2.4.1.tgz" - }, - "_from": "lodash.identity@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "6694cffa65fef931f7c31ce86c74597cf560f4f1", - "_resolved": "https://registry.npmjs.org/lodash.identity/-/lodash.identity-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/README.md deleted file mode 100644 index eecd6cd..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.support v2.4.1 - -The [Lo-Dash](http://lodash.com/) object [`_.support`](http://lodash.com/docs#support) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/index.js deleted file mode 100644 index 5dd3e3d..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isNative = require('lodash._isnative'); - -/** Used to detect functions containing a `this` reference */ -var reThis = /\bthis\b/; - -/** - * An object used to flag environments features. - * - * @static - * @memberOf _ - * @type Object - */ -var support = {}; - -/** - * Detect if functions can be decompiled by `Function#toString` - * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). - * - * @memberOf _.support - * @type boolean - */ -support.funcDecomp = !isNative(global.WinRTError) && reThis.test(function() { return this; }); - -/** - * Detect if `Function#name` is supported (all but IE). - * - * @memberOf _.support - * @type boolean - */ -support.funcNames = typeof Function.name == 'string'; - -module.exports = support; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/package.json deleted file mode 100644 index 1dc272e..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "lodash.support", - "version": "2.4.1", - "description": "The Lo-Dash object `_.support` 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" - }, - "readme": "# lodash.support v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) object [`_.support`](http://lodash.com/docs#support) 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.support@2.4.1", - "dist": { - "shasum": "320e0b67031673c28d7a2bb5d9e0331a45240515", - "tarball": "http://registry.npmjs.org/lodash.support/-/lodash.support-2.4.1.tgz" - }, - "_from": "lodash.support@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "320e0b67031673c28d7a2bb5d9e0331a45240515", - "_resolved": "https://registry.npmjs.org/lodash.support/-/lodash.support-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/package.json deleted file mode 100644 index dbb0383..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "lodash._basecreatecallback", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseCreateCallback` 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.bind": "~2.4.1", - "lodash.identity": "~2.4.1", - "lodash._setbinddata": "~2.4.1", - "lodash.support": "~2.4.1" - }, - "readme": "# lodash._basecreatecallback v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseCreateCallback` 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._basecreatecallback@2.4.1", - "dist": { - "shasum": "7d0b267649cb29e7a139d0103b7c11fae84e4851", - "tarball": "http://registry.npmjs.org/lodash._basecreatecallback/-/lodash._basecreatecallback-2.4.1.tgz" - }, - "_from": "lodash._basecreatecallback@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "7d0b267649cb29e7a139d0103b7c11fae84e4851", - "_resolved": "https://registry.npmjs.org/lodash._basecreatecallback/-/lodash._basecreatecallback-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/README.md deleted file mode 100644 index cc0b123..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._baseisequal v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseIsEqual` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/index.js deleted file mode 100644 index 36917c8..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/index.js +++ /dev/null @@ -1,209 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var forIn = require('lodash.forin'), - getArray = require('lodash._getarray'), - isFunction = require('lodash.isfunction'), - objectTypes = require('lodash._objecttypes'), - releaseArray = require('lodash._releasearray'); - -/** `Object#toString` result shortcuts */ -var argsClass = '[object Arguments]', - arrayClass = '[object Array]', - boolClass = '[object Boolean]', - dateClass = '[object Date]', - numberClass = '[object Number]', - objectClass = '[object Object]', - regexpClass = '[object RegExp]', - stringClass = '[object String]'; - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Used to resolve the internal [[Class]] of values */ -var toString = objectProto.toString; - -/** Native method shortcuts */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.isEqual`, without support for `thisArg` binding, - * that allows partial "_.where" style comparisons. - * - * @private - * @param {*} a The value to compare. - * @param {*} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `a` objects. - * @param {Array} [stackB=[]] Tracks traversed `b` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { - // used to indicate that when comparing objects, `a` has at least the properties of `b` - if (callback) { - var result = callback(a, b); - if (typeof result != 'undefined') { - return !!result; - } - } - // exit early for identical values - if (a === b) { - // treat `+0` vs. `-0` as not equal - return a !== 0 || (1 / a == 1 / b); - } - var type = typeof a, - otherType = typeof b; - - // exit early for unlike primitive values - if (a === a && - !(a && objectTypes[type]) && - !(b && objectTypes[otherType])) { - return false; - } - // exit early for `null` and `undefined` avoiding ES3's Function#call behavior - // http://es5.github.io/#x15.3.4.4 - if (a == null || b == null) { - return a === b; - } - // compare [[Class]] names - var className = toString.call(a), - otherClass = toString.call(b); - - if (className == argsClass) { - className = objectClass; - } - if (otherClass == argsClass) { - otherClass = objectClass; - } - if (className != otherClass) { - return false; - } - switch (className) { - case boolClass: - case dateClass: - // coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0` treating invalid dates coerced to `NaN` as not equal - return +a == +b; - - case numberClass: - // treat `NaN` vs. `NaN` as equal - return (a != +a) - ? b != +b - // but treat `+0` vs. `-0` as not equal - : (a == 0 ? (1 / a == 1 / b) : a == +b); - - case regexpClass: - case stringClass: - // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) - // treat string primitives and their corresponding object instances as equal - return a == String(b); - } - var isArr = className == arrayClass; - if (!isArr) { - // unwrap any `lodash` wrapped values - var aWrapped = hasOwnProperty.call(a, '__wrapped__'), - bWrapped = hasOwnProperty.call(b, '__wrapped__'); - - if (aWrapped || bWrapped) { - return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB); - } - // exit for functions and DOM nodes - if (className != objectClass) { - return false; - } - // in older versions of Opera, `arguments` objects have `Array` constructors - var ctorA = a.constructor, - ctorB = b.constructor; - - // non `Object` object instances with different constructors are not equal - if (ctorA != ctorB && - !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && - ('constructor' in a && 'constructor' in b) - ) { - return false; - } - } - // assume cyclic structures are equal - // the algorithm for detecting cyclic structures is adapted from ES 5.1 - // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) - var initedStack = !stackA; - stackA || (stackA = getArray()); - stackB || (stackB = getArray()); - - var length = stackA.length; - while (length--) { - if (stackA[length] == a) { - return stackB[length] == b; - } - } - var size = 0; - result = true; - - // add `a` and `b` to the stack of traversed objects - stackA.push(a); - stackB.push(b); - - // recursively compare objects and arrays (susceptible to call stack limits) - if (isArr) { - // compare lengths to determine if a deep comparison is necessary - length = a.length; - size = b.length; - result = size == length; - - if (result || isWhere) { - // deep compare the contents, ignoring non-numeric properties - while (size--) { - var index = length, - value = b[size]; - - if (isWhere) { - while (index--) { - if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) { - break; - } - } - } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) { - break; - } - } - } - } - else { - // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` - // which, in this case, is more costly - forIn(b, function(value, key, b) { - if (hasOwnProperty.call(b, key)) { - // count the number of properties. - size++; - // deep compare each property value. - return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB)); - } - }); - - if (result && !isWhere) { - // ensure both objects have the same number of properties - forIn(a, function(value, key, a) { - if (hasOwnProperty.call(a, key)) { - // `size` will be `-1` if `a` has more properties than `b` - return (result = --size > -1); - } - }); - } - } - stackA.pop(); - stackB.pop(); - - if (initedStack) { - releaseArray(stackA); - releaseArray(stackB); - } - return result; -} - -module.exports = baseIsEqual; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/README.md deleted file mode 100644 index 0709725..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._getarray v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `getArray` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/index.js deleted file mode 100644 index 0ef2497..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/index.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var arrayPool = require('lodash._arraypool'); - -/** - * Gets an array from the array pool or creates a new one if the pool is empty. - * - * @private - * @returns {Array} The array from the pool. - */ -function getArray() { - return arrayPool.pop() || []; -} - -module.exports = getArray; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/README.md deleted file mode 100644 index 752bdff..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._arraypool v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `arrayPool` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/index.js deleted file mode 100644 index bb76cda..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to pool arrays and objects used internally */ -var arrayPool = []; - -module.exports = arrayPool; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/package.json deleted file mode 100644 index 93f0da5..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "lodash._arraypool", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `arrayPool` 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._arraypool v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `arrayPool` 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._arraypool@2.4.1", - "dist": { - "shasum": "e88eecb92e2bb84c9065612fd958a0719cd47f94", - "tarball": "http://registry.npmjs.org/lodash._arraypool/-/lodash._arraypool-2.4.1.tgz" - }, - "_from": "lodash._arraypool@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "e88eecb92e2bb84c9065612fd958a0719cd47f94", - "_resolved": "https://registry.npmjs.org/lodash._arraypool/-/lodash._arraypool-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/package.json deleted file mode 100644 index cfbcb4b..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "lodash._getarray", - "version": "2.4.1", - "description": "The internal Lo-Dash function `getArray` 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._arraypool": "~2.4.1" - }, - "readme": "# lodash._getarray v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `getArray` 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._getarray@2.4.1", - "dist": { - "shasum": "faf1f7f810fa985a251c2187404481094839e5ee", - "tarball": "http://registry.npmjs.org/lodash._getarray/-/lodash._getarray-2.4.1.tgz" - }, - "_from": "lodash._getarray@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "faf1f7f810fa985a251c2187404481094839e5ee", - "_resolved": "https://registry.npmjs.org/lodash._getarray/-/lodash._getarray-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de730..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6c..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd8..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/README.md deleted file mode 100644 index be058e0..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._releasearray v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `releaseArray` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/index.js deleted file mode 100644 index 958c3ee..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var arrayPool = require('lodash._arraypool'), - maxPoolSize = require('lodash._maxpoolsize'); - -/** - * Releases the given array back to the array pool. - * - * @private - * @param {Array} [array] The array to release. - */ -function releaseArray(array) { - array.length = 0; - if (arrayPool.length < maxPoolSize) { - arrayPool.push(array); - } -} - -module.exports = releaseArray; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/README.md deleted file mode 100644 index 752bdff..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._arraypool v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `arrayPool` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/index.js deleted file mode 100644 index bb76cda..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to pool arrays and objects used internally */ -var arrayPool = []; - -module.exports = arrayPool; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/package.json deleted file mode 100644 index 93f0da5..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "lodash._arraypool", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `arrayPool` 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._arraypool v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `arrayPool` 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._arraypool@2.4.1", - "dist": { - "shasum": "e88eecb92e2bb84c9065612fd958a0719cd47f94", - "tarball": "http://registry.npmjs.org/lodash._arraypool/-/lodash._arraypool-2.4.1.tgz" - }, - "_from": "lodash._arraypool@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "e88eecb92e2bb84c9065612fd958a0719cd47f94", - "_resolved": "https://registry.npmjs.org/lodash._arraypool/-/lodash._arraypool-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/README.md deleted file mode 100644 index 6004448..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._maxpoolsize v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `maxPoolSize` 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/index.js deleted file mode 100644 index 4cd1e8b..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used as the max size of the `arrayPool` and `objectPool` */ -var maxPoolSize = 40; - -module.exports = maxPoolSize; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/package.json deleted file mode 100644 index 503b92a..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "lodash._maxpoolsize", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `maxPoolSize` 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._maxpoolsize v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `maxPoolSize` 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._maxpoolsize@2.4.1", - "dist": { - "shasum": "9d482f463b8e66afbe59c2c14edb117060172334", - "tarball": "http://registry.npmjs.org/lodash._maxpoolsize/-/lodash._maxpoolsize-2.4.1.tgz" - }, - "_from": "lodash._maxpoolsize@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "9d482f463b8e66afbe59c2c14edb117060172334", - "_resolved": "https://registry.npmjs.org/lodash._maxpoolsize/-/lodash._maxpoolsize-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/package.json deleted file mode 100644 index 8b7a6c6..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "lodash._releasearray", - "version": "2.4.1", - "description": "The internal Lo-Dash function `releaseArray` 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._arraypool": "~2.4.1", - "lodash._maxpoolsize": "~2.4.1" - }, - "readme": "# lodash._releasearray v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `releaseArray` 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._releasearray@2.4.1", - "dist": { - "shasum": "a6139630d76d1536b07ddc80962889b082f6a641", - "tarball": "http://registry.npmjs.org/lodash._releasearray/-/lodash._releasearray-2.4.1.tgz" - }, - "_from": "lodash._releasearray@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "a6139630d76d1536b07ddc80962889b082f6a641", - "_resolved": "https://registry.npmjs.org/lodash._releasearray/-/lodash._releasearray-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/README.md deleted file mode 100644 index 1999513..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.forin v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.forIn`](http://lodash.com/docs#forIn) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/index.js deleted file mode 100644 index 0dfad07..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseCreateCallback = require('lodash._basecreatecallback'), - objectTypes = require('lodash._objecttypes'); - -/** - * Iterates over own and inherited enumerable properties of an object, - * executing the callback for each property. The callback is bound to `thisArg` - * and invoked with three arguments; (value, key, object). Callbacks may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {*} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * Shape.prototype.move = function(x, y) { - * this.x += x; - * this.y += y; - * }; - * - * _.forIn(new Shape, function(value, key) { - * console.log(key); - * }); - * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) - */ -var forIn = function(collection, callback, thisArg) { - var index, iterable = collection, result = iterable; - if (!iterable) return result; - if (!objectTypes[typeof iterable]) return result; - callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); - for (index in iterable) { - if (callback(iterable[index], index, collection) === false) return result; - } - return result -}; - -module.exports = forIn; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/package.json deleted file mode 100644 index f7a8189..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "lodash.forin", - "version": "2.4.1", - "description": "The Lo-Dash function `_.forIn` 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._basecreatecallback": "~2.4.1", - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash.forin v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.forIn`](http://lodash.com/docs#forIn) 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.forin@2.4.1", - "dist": { - "shasum": "8089eaed7d25b08672b7c66fd07ac55d062320eb", - "tarball": "http://registry.npmjs.org/lodash.forin/-/lodash.forin-2.4.1.tgz" - }, - "_from": "lodash.forin@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "8089eaed7d25b08672b7c66fd07ac55d062320eb", - "_resolved": "https://registry.npmjs.org/lodash.forin/-/lodash.forin-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/README.md deleted file mode 100644 index 2831b7f..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.isfunction v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.isFunction`](http://lodash.com/docs#isFunction) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/index.js deleted file mode 100644 index ad4b451..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/index.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Checks if `value` is a function. - * - * @static - * @memberOf _ - * @category Objects - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - */ -function isFunction(value) { - return typeof value == 'function'; -} - -module.exports = isFunction; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/package.json deleted file mode 100644 index ddd5d59..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "lodash.isfunction", - "version": "2.4.1", - "description": "The Lo-Dash function `_.isFunction` 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" - }, - "readme": "# lodash.isfunction v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.isFunction`](http://lodash.com/docs#isFunction) 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.isfunction@2.4.1", - "_from": "lodash.isfunction@~2.4.1", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/package.json deleted file mode 100644 index 749f435..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "lodash._baseisequal", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseIsEqual` 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.forin": "~2.4.1", - "lodash._getarray": "~2.4.1", - "lodash.isfunction": "~2.4.1", - "lodash._objecttypes": "~2.4.1", - "lodash._releasearray": "~2.4.1" - }, - "readme": "# lodash._baseisequal v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseIsEqual` 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._baseisequal@2.4.1", - "dist": { - "shasum": "6b1e62e587c5523111f6f228553dab19e445fc03", - "tarball": "http://registry.npmjs.org/lodash._baseisequal/-/lodash._baseisequal-2.4.1.tgz" - }, - "_from": "lodash._baseisequal@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "6b1e62e587c5523111f6f228553dab19e445fc03", - "_resolved": "https://registry.npmjs.org/lodash._baseisequal/-/lodash._baseisequal-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/README.md deleted file mode 100644 index eeb0a78..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/index.js deleted file mode 100644 index 3596ac3..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de730..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6c..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd8..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/package.json deleted file mode 100644 index adfee42..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/package.json +++ /dev/null @@ -1,56 +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", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/README.md deleted file mode 100644 index bee29a8..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/index.js deleted file mode 100644 index 139568a..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md deleted file mode 100644 index 23f3000..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js deleted file mode 100644 index 12be0bf..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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 -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de730..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6c..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd8..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json deleted file mode 100644 index f962e0e..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json +++ /dev/null @@ -1,79 +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", - "tarball": "http://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz" - }, - "_from": "lodash._shimkeys@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "6e9cc9666ff081f0b5a6c978b83e242e6949d203", - "_resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/package.json deleted file mode 100644 index 99d6b91..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/package.json +++ /dev/null @@ -1,88 +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", - "tarball": "http://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz" - }, - "_from": "lodash.keys@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "48dea46df8ff7632b10d706b8acb26591e2b3727", - "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/README.md deleted file mode 100644 index f7c10c5..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.property v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.property`](http://lodash.com/docs#property) 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-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/index.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/index.js deleted file mode 100644 index 1f71481..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Creates a "_.pluck" style function, which returns the `key` value of a - * given object. - * - * @static - * @memberOf _ - * @category Utilities - * @param {string} key The name of the property to retrieve. - * @returns {Function} Returns the new function. - * @example - * - * var characters = [ - * { 'name': 'fred', 'age': 40 }, - * { 'name': 'barney', 'age': 36 } - * ]; - * - * var getName = _.property('name'); - * - * _.map(characters, getName); - * // => ['barney', 'fred'] - * - * _.sortBy(characters, getName); - * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] - */ -function property(key) { - return function(object) { - return object[key]; - }; -} - -module.exports = property; diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/package.json deleted file mode 100644 index 990aa7b..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "lodash.property", - "version": "2.4.1", - "description": "The Lo-Dash function `_.property` 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" - }, - "readme": "# lodash.property v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.property`](http://lodash.com/docs#property) 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.property@2.4.1", - "dist": { - "shasum": "4049c0549daf5a7102bc5e93eeaebb379deb132f", - "tarball": "http://registry.npmjs.org/lodash.property/-/lodash.property-2.4.1.tgz" - }, - "_from": "lodash.property@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "4049c0549daf5a7102bc5e93eeaebb379deb132f", - "_resolved": "https://registry.npmjs.org/lodash.property/-/lodash.property-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/package.json deleted file mode 100644 index 66f92cf..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name": "lodash.createcallback", - "version": "2.4.1", - "description": "The Lo-Dash function `_.createCallback` 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._basecreatecallback": "~2.4.1", - "lodash._baseisequal": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash.keys": "~2.4.1", - "lodash.property": "~2.4.1" - }, - "readme": "# lodash.createcallback v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.createCallback`](http://lodash.com/docs#createCallback) 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.createcallback@2.4.1", - "dist": { - "shasum": "c81645ac3a1d7f9dc6b36b8bc0d84c013c98ea95", - "tarball": "http://registry.npmjs.org/lodash.createcallback/-/lodash.createcallback-2.4.1.tgz" - }, - "_from": "lodash.createcallback@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "c81645ac3a1d7f9dc6b36b8bc0d84c013c98ea95", - "_resolved": "https://registry.npmjs.org/lodash.createcallback/-/lodash.createcallback-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/package.json b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/package.json deleted file mode 100644 index 98664ee..0000000 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "lodash.findindex", - "version": "2.4.1", - "description": "The Lo-Dash function `_.findIndex` 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.createcallback": "~2.4.1" - }, - "readme": "# lodash.findindex v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.findIndex`](http://lodash.com/docs#findIndex) 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.findindex@2.4.1", - "dist": { - "shasum": "738d108641cf2ef087207f35f2c6a5eacf807caa", - "tarball": "http://registry.npmjs.org/lodash.findindex/-/lodash.findindex-2.4.1.tgz" - }, - "_from": "lodash.findindex@^2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "738d108641cf2ef087207f35f2c6a5eacf807caa", - "_resolved": "https://registry.npmjs.org/lodash.findindex/-/lodash.findindex-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/LICENSE.txt b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/LICENSE.txt similarity index 100% rename from node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/LICENSE.txt rename to node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/LICENSE.txt diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/README.md b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/README.md new file mode 100644 index 0000000..6f9598e --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/README.md @@ -0,0 +1,163 @@ +# Lo-Dash v2.4.1 +A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features). + +## Download + +Check out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences]) for details over the differences between builds. + +* Modern builds perfect for newer browsers/environments:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.min.js) + +* Compatibility builds for older environment support too:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.min.js) + +* Underscore builds to use as a drop-in replacement:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.min.js) + +CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed. + +Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method. + +## Dive in + +There’s plenty of **[documentation](http://lodash.com/docs)**, [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).
+Check out DevDocs as a fast, organized, & searchable interface for our documentation. + +The full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).
+A list of upcoming features is available on our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap). + +## Features *not* in Underscore + + * AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.) + * [_(…)](http://lodash.com/docs#_) supports intuitive chaining + * [_.at](http://lodash.com/docs#at) for cherry-picking collection values + * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.constant](http://lodash.com/docs#constant) & [_.property](http://lodash.com/docs#property) function generators for composing functions + * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` + * [_.create](http://lodash.com/docs#create) for easier object inheritance + * [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins + * [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions + * [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control + * [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys + * [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early + * [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties + * [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties + * [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object` + * [_.mapValues](http://lodash.com/docs#mapValues) for [mapping](http://lodash.com/docs#map) values to an object + * [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions + * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend) + * [_.noop](http://lodash.com/docs#noop) for function placeholders + * [_.now](http://lodash.com/docs#now) as a cross-browser `Date.now` alternative + * [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior + * [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays + * [_.random](http://lodash.com/docs#random) supports returning floating-point numbers + * [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking + * [_.sortBy](http://lodash.com/docs#sortBy) supports sorting by multiple properties + * [_.support](http://lodash.com/docs#support) for flagging environment features + * [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals) + * [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects + * [_.where](http://lodash.com/docs#where) supports deep object comparisons + * [_.xor](http://lodash.com/docs#xor) as a companion to [_.difference](http://lodash.com/docs#difference), [_.intersection](http://lodash.com/docs#intersection), & [_.union](http://lodash.com/docs#union) + * [_.zip](http://lodash.com/docs#zip) is capable of unzipping values + * [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), & + [more](http://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks + * [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), & + [more](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings + * [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), & + [more](http://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands + * [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), & + [more](http://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight") right-associative methods + +## Resources + + * Podcasts + - [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/) + + * Posts + - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/) + - [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/) + + * Videos + - [Introduction](https://vimeo.com/44154599) + - [Origins](https://vimeo.com/44154600) + - [Optimizations & builds](https://vimeo.com/44154601) + - [Native method use](https://vimeo.com/48576012) + - [Testing](https://vimeo.com/45865290) + - [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk) + + A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources). + +## Support + +Tested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.21~0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
+Automated browser test results [are available](https://saucelabs.com/u/lodash) as well as [Travis CI](https://travis-ci.org/) builds for [lodash](https://travis-ci.org/lodash/lodash/), [lodash-cli](https://travis-ci.org/lodash/lodash-cli/), [lodash-amd](https://travis-ci.org/lodash/lodash-amd/), [lodash-node](https://travis-ci.org/lodash/lodash-node/), & [grunt-lodash](https://travis-ci.org/lodash/grunt-lodash). + +Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
+[![Sauce Labs](http://lodash.com/_img/sauce.png)](https://saucelabs.com/ "Sauce Labs: Selenium Testing & More") + +## Installation & usage + +In browsers: + +```html + +``` + +Using [`npm`](http://npmjs.org/): + +```bash +npm i --save lodash + +{sudo} npm i -g lodash +npm ln lodash +``` + +In [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/): + +```js +var _ = require('lodash'); +// or as Underscore +var _ = require('lodash/dist/lodash.underscore'); +``` + +**Notes:** + * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL + * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it + +In [Rhino](http://www.mozilla.org/rhino/): + +```js +load('lodash.js'); +``` + +In an AMD loader: + +```js +require({ + 'packages': [ + { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' } + ] +}, +['lodash'], function(_) { + console.log(_.VERSION); +}); +``` + +## 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/) | + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/dist/lodash.compat.js b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/dist/lodash.compat.js new file mode 100644 index 0000000..23798ba --- /dev/null +++ b/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash/dist/lodash.compat.js @@ -0,0 +1,7157 @@ +/** + * @license + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash -o ./dist/lodash.compat.js` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre ES5 environments */ + var undefined; + + /** Used to pool arrays and objects used internally */ + var arrayPool = [], + objectPool = []; + + /** Used to generate unique IDs */ + var idCounter = 0; + + /** Used internally to indicate various things */ + var indicatorObject = {}; + + /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */ + var keyPrefix = +new Date + ''; + + /** Used as the size when optimizations are enabled for large arrays */ + var largeArraySize = 75; + + /** Used as the max size of the `arrayPool` and `objectPool` */ + var maxPoolSize = 40; + + /** Used to detect and test whitespace */ + var whitespace = ( + // whitespace + ' \t\x0B\f\xA0\ufeff' + + + // line terminators + '\n\r\u2028\u2029' + + + // unicode category "Zs" space separators + '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' + ); + + /** 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 match regexp flags from their coerced string values */ + var reFlags = /\w*$/; + + /** Used to detected named functions */ + var reFuncName = /^\s*function[ \n\r\t]+\w/; + + /** Used to match "interpolate" template delimiters */ + var reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match leading whitespace and zeros to be removed */ + var reLeadingSpacesAndZeros = RegExp('^[' + whitespace + ']*0+(?=.$)'); + + /** Used to ensure capturing order of template delimiters */ + var reNoMatch = /($^)/; + + /** Used to detect functions containing a `this` reference */ + var reThis = /\bthis\b/; + + /** Used to match unescaped characters in compiled string literals */ + var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; + + /** Used to assign default `context` object properties */ + var contextProps = [ + 'Array', 'Boolean', 'Date', 'Error', 'Function', 'Math', 'Number', 'Object', + 'RegExp', 'String', '_', 'attachEvent', 'clearTimeout', 'isFinite', 'isNaN', + 'parseInt', 'setTimeout' + ]; + + /** Used to fix the JScript [[DontEnum]] bug */ + var shadowedProps = [ + 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', + 'toLocaleString', 'toString', 'valueOf' + ]; + + /** Used to make template sourceURLs easier to identify */ + var templateCounter = 0; + + /** `Object#toString` result shortcuts */ + var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + boolClass = '[object Boolean]', + dateClass = '[object Date]', + errorClass = '[object Error]', + funcClass = '[object Function]', + numberClass = '[object Number]', + objectClass = '[object Object]', + regexpClass = '[object RegExp]', + stringClass = '[object String]'; + + /** Used to identify object classifications that `_.clone` supports */ + var cloneableClasses = {}; + cloneableClasses[funcClass] = false; + cloneableClasses[argsClass] = cloneableClasses[arrayClass] = + cloneableClasses[boolClass] = cloneableClasses[dateClass] = + cloneableClasses[numberClass] = cloneableClasses[objectClass] = + cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true; + + /** Used as an internal `_.debounce` options object */ + var debounceOptions = { + 'leading': false, + 'maxWait': 0, + 'trailing': false + }; + + /** Used as the property descriptor for `__bindData__` */ + var descriptor = { + 'configurable': false, + 'enumerable': false, + 'value': null, + 'writable': false + }; + + /** Used as the data object for `iteratorTemplate` */ + var iteratorData = { + 'args': '', + 'array': null, + 'bottom': '', + 'firstArg': '', + 'init': '', + 'keys': null, + 'loop': '', + 'shadowedProps': null, + 'support': null, + 'top': '', + 'useHas': false + }; + + /** 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 + }; + + /** Used to escape characters for inclusion in compiled string literals */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\t': 't', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Used as a reference to the global object */ + var root = (objectTypes[typeof window] && window) || this; + + /** Detect free variable `exports` */ + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports` */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + + /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ + var freeGlobal = objectTypes[typeof global] && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.indexOf` without support for binary searches + * or `fromIndex` constraints. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * An implementation of `_.contains` for cache objects that mimics the return + * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var type = typeof value; + cache = cache.cache; + + if (type == 'boolean' || value == null) { + return cache[value] ? 0 : -1; + } + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value; + cache = (cache = cache[type]) && cache[key]; + + return type == 'object' + ? (cache && baseIndexOf(cache, value) > -1 ? 0 : -1) + : (cache ? 0 : -1); + } + + /** + * Adds a given value to the corresponding cache object. + * + * @private + * @param {*} value The value to add to the cache. + */ + function cachePush(value) { + var cache = this.cache, + type = typeof value; + + if (type == 'boolean' || value == null) { + cache[value] = true; + } else { + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value, + typeCache = cache[type] || (cache[type] = {}); + + if (type == 'object') { + (typeCache[key] || (typeCache[key] = [])).push(value); + } else { + typeCache[key] = true; + } + } + } + + /** + * Used by `_.max` and `_.min` as the default callback when a given + * collection is a string value. + * + * @private + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. + */ + function charAtCallback(value) { + return value.charCodeAt(0); + } + + /** + * Used by `sortBy` to compare transformed `collection` elements, stable sorting + * them in ascending order. + * + * @private + * @param {Object} a The object to compare to `b`. + * @param {Object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. + */ + function compareAscending(a, b) { + var ac = a.criteria, + bc = b.criteria, + index = -1, + length = ac.length; + + while (++index < length) { + var value = ac[index], + other = bc[index]; + + if (value !== other) { + if (value > other || typeof value == 'undefined') { + return 1; + } + if (value < other || typeof other == 'undefined') { + return -1; + } + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to return the same value for + // `a` and `b`. See https://github.com/jashkenas/underscore/pull/1247 + // + // This also ensures a stable sort in V8 and other engines. + // See http://code.google.com/p/v8/issues/detail?id=90 + return a.index - b.index; + } + + /** + * Creates a cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [array=[]] The array to search. + * @returns {null|Object} Returns the cache object or `null` if caching should not be used. + */ + function createCache(array) { + var index = -1, + length = array.length, + first = array[0], + mid = array[(length / 2) | 0], + last = array[length - 1]; + + if (first && typeof first == 'object' && + mid && typeof mid == 'object' && last && typeof last == 'object') { + return false; + } + var cache = getObject(); + cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false; + + var result = getObject(); + result.array = array; + result.cache = cache; + result.push = cachePush; + + while (++index < length) { + result.push(array[index]); + } + return result; + } + + /** + * 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]; + } + + /** + * Gets an array from the array pool or creates a new one if the pool is empty. + * + * @private + * @returns {Array} The array from the pool. + */ + function getArray() { + return arrayPool.pop() || []; + } + + /** + * Gets an object from the object pool or creates a new one if the pool is empty. + * + * @private + * @returns {Object} The object from the pool. + */ + function getObject() { + return objectPool.pop() || { + 'array': null, + 'cache': null, + 'criteria': null, + 'false': false, + 'index': 0, + 'null': false, + 'number': null, + 'object': null, + 'push': null, + 'string': null, + 'true': false, + 'undefined': false, + 'value': null + }; + } + + /** + * Checks if `value` is a DOM node in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM node, else `false`. + */ + function isNode(value) { + // IE < 9 presents DOM nodes as `Object` objects except they have `toString` + // methods that are `typeof` "string" and still can coerce nodes to strings + return typeof value.toString != 'function' && typeof (value + '') == 'string'; + } + + /** + * Releases the given array back to the array pool. + * + * @private + * @param {Array} [array] The array to release. + */ + function releaseArray(array) { + array.length = 0; + if (arrayPool.length < maxPoolSize) { + arrayPool.push(array); + } + } + + /** + * Releases the given object back to the object pool. + * + * @private + * @param {Object} [object] The object to release. + */ + function releaseObject(object) { + var cache = object.cache; + if (cache) { + releaseObject(cache); + } + object.array = object.cache = object.criteria = object.object = object.number = object.string = object.value = null; + if (objectPool.length < maxPoolSize) { + objectPool.push(object); + } + } + + /** + * Slices the `collection` from the `start` index up to, but not including, + * the `end` index. + * + * Note: This function is used instead of `Array#slice` to support node lists + * in IE < 9 and to ensure dense arrays are returned. + * + * @private + * @param {Array|Object|string} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {Array} Returns the new array. + */ + function slice(array, start, end) { + start || (start = 0); + if (typeof end == 'undefined') { + end = array ? array.length : 0; + } + var index = -1, + length = end - start || 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = array[start + index]; + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new `lodash` function using the given context object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} [context=root] The context object. + * @returns {Function} Returns the `lodash` function. + */ + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See http://es5.github.io/#x11.1.5. + context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; + + /** Native constructor references */ + var Array = context.Array, + Boolean = context.Boolean, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ + var arrayRef = []; + + /** Used for native method references */ + var errorProto = Error.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + + /** Used to restore the original `_` reference in `noConflict` */ + var oldDash = context._; + + /** 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, '.*?') + '$' + ); + + /** Native method shortcuts */ + var ceil = Math.ceil, + clearTimeout = context.clearTimeout, + floor = Math.floor, + fnToString = Function.prototype.toString, + getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf, + hasOwnProperty = objectProto.hasOwnProperty, + push = arrayRef.push, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + setTimeout = context.setTimeout, + splice = arrayRef.splice, + unshift = arrayRef.unshift; + + /** Used to set meta data on functions */ + var defineProperty = (function() { + // IE 8 only accepts DOM elements + try { + var o = {}, + func = isNative(func = Object.defineProperty) && func, + result = func(o, o, o) && func; + } catch(e) { } + return result; + }()); + + /* Native method shortcuts for methods with the same name as other `lodash` methods */ + var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate, + nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray, + nativeIsFinite = context.isFinite, + nativeIsNaN = context.isNaN, + nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys, + nativeMax = Math.max, + nativeMin = Math.min, + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + + /** Used to lookup a built-in constructor by [[Class]] */ + var ctorByClass = {}; + ctorByClass[arrayClass] = Array; + ctorByClass[boolClass] = Boolean; + ctorByClass[dateClass] = Date; + ctorByClass[funcClass] = Function; + ctorByClass[objectClass] = Object; + ctorByClass[numberClass] = Number; + ctorByClass[regexpClass] = RegExp; + ctorByClass[stringClass] = String; + + /** Used to avoid iterating non-enumerable properties in IE < 9 */ + var nonEnumProps = {}; + nonEnumProps[arrayClass] = nonEnumProps[dateClass] = nonEnumProps[numberClass] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; + nonEnumProps[boolClass] = nonEnumProps[stringClass] = { 'constructor': true, 'toString': true, 'valueOf': true }; + nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true }; + nonEnumProps[objectClass] = { 'constructor': true }; + + (function() { + var length = shadowedProps.length; + while (length--) { + var key = shadowedProps[length]; + for (var className in nonEnumProps) { + if (hasOwnProperty.call(nonEnumProps, className) && !hasOwnProperty.call(nonEnumProps[className], key)) { + nonEnumProps[className][key] = false; + } + } + } + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps the given value to enable intuitive + * method chaining. + * + * In addition to Lo-Dash methods, wrappers also have the following `Array` methods: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, + * and `unshift` + * + * Chaining is supported in custom builds as long as the `value` method is + * implicitly or explicitly included in the build. + * + * The chainable wrapper functions are: + * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, + * `compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`, + * `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, + * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`, + * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, + * `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, + * `union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, + * and `zip` + * + * The non-chainable wrapper functions are: + * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`, + * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, + * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, + * `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, + * `template`, `unescape`, `uniqueId`, and `value` + * + * The wrapper functions `first` and `last` return wrapped values when `n` is + * provided, otherwise they return unwrapped values. + * + * Explicit chaining can be enabled by using the `_.chain` method. + * + * @name _ + * @constructor + * @category Chaining + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(num) { + * return num * num; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + // don't wrap if already wrapped, even if wrapped by a different `lodash` constructor + return (value && typeof value == 'object' && !isArray(value) && hasOwnProperty.call(value, '__wrapped__')) + ? value + : new lodashWrapper(value); + } + + /** + * A fast path for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {Object} Returns a `lodash` instance. + */ + function lodashWrapper(value, chainAll) { + this.__chain__ = !!chainAll; + this.__wrapped__ = value; + } + // ensure `new lodashWrapper` is an instance of `lodash` + lodashWrapper.prototype = lodash.prototype; + + /** + * An object used to flag environments features. + * + * @static + * @memberOf _ + * @type Object + */ + var support = lodash.support = {}; + + (function() { + var ctor = function() { this.x = 1; }, + object = { '0': 1, 'length': 1 }, + props = []; + + ctor.prototype = { 'valueOf': 1, 'y': 1 }; + for (var key in new ctor) { props.push(key); } + for (key in arguments) { } + + /** + * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.argsClass = toString.call(arguments) == argsClass; + + /** + * Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5). + * + * @memberOf _.support + * @type boolean + */ + support.argsObject = arguments.constructor == Object && !(arguments instanceof Array); + + /** + * Detect if `name` or `message` properties of `Error.prototype` are + * enumerable by default. (IE < 9, Safari < 5.1) + * + * @memberOf _.support + * @type boolean + */ + support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); + + /** + * Detect if `prototype` properties are enumerable by default. + * + * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 + * (if the prototype or a property on the prototype has been set) + * incorrectly sets a function's `prototype` property [[Enumerable]] + * value to `true`. + * + * @memberOf _.support + * @type boolean + */ + support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); + + /** + * Detect if functions can be decompiled by `Function#toString` + * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). + * + * @memberOf _.support + * @type boolean + */ + support.funcDecomp = !isNative(context.WinRTError) && reThis.test(runInContext); + + /** + * Detect if `Function#name` is supported (all but IE). + * + * @memberOf _.support + * @type boolean + */ + support.funcNames = typeof Function.name == 'string'; + + /** + * Detect if `arguments` object indexes are non-enumerable + * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumArgs = key != 0; + + /** + * Detect if properties shadowing those on `Object.prototype` are non-enumerable. + * + * In IE < 9 an objects own properties, shadowing non-enumerable ones, are + * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumShadows = !/valueOf/.test(props); + + /** + * Detect if own properties are iterated after inherited properties (all but IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.ownLast = props[0] != 'x'; + + /** + * Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. + * + * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` + * and `splice()` functions that fail to remove the last element, `value[0]`, + * of array-like objects even though the `length` property is set to `0`. + * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` + * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. + * + * @memberOf _.support + * @type boolean + */ + support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); + + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index and IE 8 can only access + * characters by index on string literals. + * + * @memberOf _.support + * @type boolean + */ + support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; + + /** + * Detect if a DOM node's [[Class]] is resolvable (all but IE < 9) + * and that the JS engine errors when attempting to coerce an object to + * a string without a `toString` function. + * + * @memberOf _.support + * @type boolean + */ + try { + support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); + } catch(e) { + support.nodeClass = true; + } + }(1)); + + /** + * 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 + */ + lodash.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 + */ + '_': lodash + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The template used to create iterator functions. + * + * @private + * @param {Object} data The data object used to populate the text. + * @returns {string} Returns the interpolated text. + */ + var iteratorTemplate = function(obj) { + + var __p = 'var index, iterable = ' + + (obj.firstArg) + + ', result = ' + + (obj.init) + + ';\nif (!iterable) return result;\n' + + (obj.top) + + ';'; + if (obj.array) { + __p += '\nvar length = iterable.length; index = -1;\nif (' + + (obj.array) + + ') { '; + if (support.unindexedChars) { + __p += '\n if (isString(iterable)) {\n iterable = iterable.split(\'\')\n } '; + } + __p += '\n while (++index < length) {\n ' + + (obj.loop) + + ';\n }\n}\nelse { '; + } else if (support.nonEnumArgs) { + __p += '\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += \'\';\n ' + + (obj.loop) + + ';\n }\n } else { '; + } + + if (support.enumPrototypes) { + __p += '\n var skipProto = typeof iterable == \'function\';\n '; + } + + if (support.enumErrorProps) { + __p += '\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n '; + } + + var conditions = []; if (support.enumPrototypes) { conditions.push('!(skipProto && index == "prototype")'); } if (support.enumErrorProps) { conditions.push('!(skipErrorProps && (index == "message" || index == "name"))'); } + + if (obj.useHas && obj.keys) { + __p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n'; + if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + } else { + __p += '\n for (index in iterable) {\n'; + if (obj.useHas) { conditions.push("hasOwnProperty.call(iterable, index)"); } if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + if (support.nonEnumShadows) { + __p += '\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n '; + for (k = 0; k < 7; k++) { + __p += '\n index = \'' + + (obj.shadowedProps[k]) + + '\';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))'; + if (!obj.useHas) { + __p += ' || (!nonEnum[index] && iterable[index] !== objectProto[index])'; + } + __p += ') {\n ' + + (obj.loop) + + ';\n } '; + } + __p += '\n } '; + } + + } + + if (obj.array || support.nonEnumArgs) { + __p += '\n}'; + } + __p += + (obj.bottom) + + ';\nreturn result'; + + return __p + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.bind` that creates the bound function and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new bound function. + */ + function baseBind(bindData) { + var func = bindData[0], + partialArgs = bindData[2], + thisArg = bindData[4]; + + function bound() { + // `Function#bind` spec + // http://es5.github.io/#x15.3.4.5 + if (partialArgs) { + // avoid `arguments` object deoptimizations by using `slice` instead + // of `Array.prototype.slice.call` and not assigning `arguments` to a + // variable as a ternary expression + var args = slice(partialArgs); + push.apply(args, arguments); + } + // mimic the constructor's `return` behavior + // http://es5.github.io/#x13.2.2 + if (this instanceof bound) { + // ensure `new bound` is an instance of `func` + var thisBinding = baseCreate(func.prototype), + result = func.apply(thisBinding, args || arguments); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisArg, args || arguments); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.clone` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, callback, stackA, stackB) { + if (callback) { + var result = callback(value); + if (typeof result != 'undefined') { + return result; + } + } + // inspect [[Class]] + var isObj = isObject(value); + if (isObj) { + var className = toString.call(value); + if (!cloneableClasses[className] || (!support.nodeClass && isNode(value))) { + return value; + } + var ctor = ctorByClass[className]; + switch (className) { + case boolClass: + case dateClass: + return new ctor(+value); + + case numberClass: + case stringClass: + return new ctor(value); + + case regexpClass: + result = ctor(value.source, reFlags.exec(value)); + result.lastIndex = value.lastIndex; + return result; + } + } else { + return value; + } + var isArr = isArray(value); + if (isDeep) { + // check for circular references and return corresponding clone + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + result = isArr ? ctor(value.length) : {}; + } + else { + result = isArr ? slice(value) : assign({}, value); + } + // add array properties assigned by `RegExp#exec` + if (isArr) { + if (hasOwnProperty.call(value, 'index')) { + result.index = value.index; + } + if (hasOwnProperty.call(value, 'input')) { + result.input = value.input; + } + } + // exit for shallow clone + if (!isDeep) { + return result; + } + // add the source value to the stack of traversed objects + // and associate it with its clone + stackA.push(value); + stackB.push(result); + + // recursively populate clone (susceptible to call stack limits) + (isArr ? baseEach : forOwn)(value, function(objValue, key) { + result[key] = baseClone(objValue, isDeep, callback, stackA, stackB); + }); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + function baseCreate(prototype, properties) { + return isObject(prototype) ? nativeCreate(prototype) : {}; + } + // fallback for browsers without `Object.create` + if (!nativeCreate) { + baseCreate = (function() { + function Object() {} + return function(prototype) { + if (isObject(prototype)) { + Object.prototype = prototype; + var result = new Object; + Object.prototype = null; + } + return result || context.Object(); + }; + }()); + } + + /** + * The base implementation of `_.createCallback` without support for creating + * "_.pluck" or "_.where" style callbacks. + * + * @private + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + */ + function baseCreateCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + // exit early for no `thisArg` or already bound by `Function#bind` + if (typeof thisArg == 'undefined' || !('prototype' in func)) { + return func; + } + var bindData = func.__bindData__; + if (typeof bindData == 'undefined') { + if (support.funcNames) { + bindData = !func.name; + } + bindData = bindData || !support.funcDecomp; + if (!bindData) { + var source = fnToString.call(func); + if (!support.funcNames) { + bindData = !reFuncName.test(source); + } + if (!bindData) { + // checks if `func` references the `this` keyword and stores the result + bindData = reThis.test(source); + setBindData(func, bindData); + } + } + } + // exit early if there are no `this` references or `func` is bound + if (bindData === false || (bindData !== true && bindData[1] & 1)) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 2: return function(a, b) { + return func.call(thisArg, a, b); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + } + return bind(func, thisArg); + } + + /** + * The base implementation of `createWrapper` that creates the wrapper and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new function. + */ + function baseCreateWrapper(bindData) { + var func = bindData[0], + bitmask = bindData[1], + partialArgs = bindData[2], + partialRightArgs = bindData[3], + thisArg = bindData[4], + arity = bindData[5]; + + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + key = func; + + function bound() { + var thisBinding = isBind ? thisArg : this; + if (partialArgs) { + var args = slice(partialArgs); + push.apply(args, arguments); + } + if (partialRightArgs || isCurry) { + args || (args = slice(arguments)); + if (partialRightArgs) { + push.apply(args, partialRightArgs); + } + if (isCurry && args.length < arity) { + bitmask |= 16 & ~32; + return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]); + } + } + args || (args = arguments); + if (isBindKey) { + func = thisBinding[key]; + } + if (this instanceof bound) { + thisBinding = baseCreate(func.prototype); + var result = func.apply(thisBinding, args); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisBinding, args); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.difference` that accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to process. + * @param {Array} [values] The array of values to exclude. + * @returns {Array} Returns a new array of filtered values. + */ + function baseDifference(array, values) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + isLarge = length >= largeArraySize && indexOf === baseIndexOf, + result = []; + + if (isLarge) { + var cache = createCache(values); + if (cache) { + indexOf = cacheIndexOf; + values = cache; + } else { + isLarge = false; + } + } + while (++index < length) { + var value = array[index]; + if (indexOf(values, value) < 0) { + result.push(value); + } + } + if (isLarge) { + releaseObject(values); + } + return result; + } + + /** + * The base implementation of `_.flatten` without support for callback + * shorthands or `thisArg` binding. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isStrict=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {Array} Returns a new flattened array. + */ + function baseFlatten(array, isShallow, isStrict, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (value && typeof value == 'object' && typeof value.length == 'number' + && (isArray(value) || isArguments(value))) { + // recursively flatten arrays (susceptible to call stack limits) + if (!isShallow) { + value = baseFlatten(value, isShallow, isStrict); + } + var valIndex = -1, + valLength = value.length, + resIndex = result.length; + + result.length += valLength; + while (++valIndex < valLength) { + result[resIndex++] = value[valIndex]; + } + } else if (!isStrict) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.isEqual`, without support for `thisArg` binding, + * that allows partial "_.where" style comparisons. + * + * @private + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `a` objects. + * @param {Array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { + // used to indicate that when comparing objects, `a` has at least the properties of `b` + if (callback) { + var result = callback(a, b); + if (typeof result != 'undefined') { + return !!result; + } + } + // exit early for identical values + if (a === b) { + // treat `+0` vs. `-0` as not equal + return a !== 0 || (1 / a == 1 / b); + } + var type = typeof a, + otherType = typeof b; + + // exit early for unlike primitive values + if (a === a && + !(a && objectTypes[type]) && + !(b && objectTypes[otherType])) { + return false; + } + // exit early for `null` and `undefined` avoiding ES3's Function#call behavior + // http://es5.github.io/#x15.3.4.4 + if (a == null || b == null) { + return a === b; + } + // compare [[Class]] names + var className = toString.call(a), + otherClass = toString.call(b); + + if (className == argsClass) { + className = objectClass; + } + if (otherClass == argsClass) { + otherClass = objectClass; + } + if (className != otherClass) { + return false; + } + switch (className) { + case boolClass: + case dateClass: + // coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal + return +a == +b; + + case numberClass: + // treat `NaN` vs. `NaN` as equal + return (a != +a) + ? b != +b + // but treat `+0` vs. `-0` as not equal + : (a == 0 ? (1 / a == 1 / b) : a == +b); + + case regexpClass: + case stringClass: + // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) + // treat string primitives and their corresponding object instances as equal + return a == String(b); + } + var isArr = className == arrayClass; + if (!isArr) { + // unwrap any `lodash` wrapped values + var aWrapped = hasOwnProperty.call(a, '__wrapped__'), + bWrapped = hasOwnProperty.call(b, '__wrapped__'); + + if (aWrapped || bWrapped) { + return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB); + } + // exit for functions and DOM nodes + if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) { + return false; + } + // in older versions of Opera, `arguments` objects have `Array` constructors + var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor, + ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor; + + // non `Object` object instances with different constructors are not equal + if (ctorA != ctorB && + !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && + ('constructor' in a && 'constructor' in b) + ) { + return false; + } + } + // assume cyclic structures are equal + // the algorithm for detecting cyclic structures is adapted from ES 5.1 + // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == a) { + return stackB[length] == b; + } + } + var size = 0; + result = true; + + // add `a` and `b` to the stack of traversed objects + stackA.push(a); + stackB.push(b); + + // recursively compare objects and arrays (susceptible to call stack limits) + if (isArr) { + // compare lengths to determine if a deep comparison is necessary + length = a.length; + size = b.length; + result = size == length; + + if (result || isWhere) { + // deep compare the contents, ignoring non-numeric properties + while (size--) { + var index = length, + value = b[size]; + + if (isWhere) { + while (index--) { + if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } + } + else { + // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` + // which, in this case, is more costly + forIn(b, function(value, key, b) { + if (hasOwnProperty.call(b, key)) { + // count the number of properties. + size++; + // deep compare each property value. + return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB)); + } + }); + + if (result && !isWhere) { + // ensure both objects have the same number of properties + forIn(a, function(value, key, a) { + if (hasOwnProperty.call(a, key)) { + // `size` will be `-1` if `a` has more properties than `b` + return (result = --size > -1); + } + }); + } + } + stackA.pop(); + stackB.pop(); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.merge` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [callback] The function to customize merging properties. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + */ + function baseMerge(object, source, callback, stackA, stackB) { + (isArray(source) ? forEach : forOwn)(source, function(source, key) { + var found, + isArr, + result = source, + value = object[key]; + + if (source && ((isArr = isArray(source)) || isPlainObject(source))) { + // avoid merging previously merged cyclic sources + var stackLength = stackA.length; + while (stackLength--) { + if ((found = stackA[stackLength] == source)) { + value = stackB[stackLength]; + break; + } + } + if (!found) { + var isShallow; + if (callback) { + result = callback(value, source); + if ((isShallow = typeof result != 'undefined')) { + value = result; + } + } + if (!isShallow) { + value = isArr + ? (isArray(value) ? value : []) + : (isPlainObject(value) ? value : {}); + } + // add `source` and associated `value` to the stack of traversed objects + stackA.push(source); + stackB.push(value); + + // recursively merge objects and arrays (susceptible to call stack limits) + if (!isShallow) { + baseMerge(value, source, callback, stackA, stackB); + } + } + } + else { + if (callback) { + result = callback(value, source); + if (typeof result == 'undefined') { + result = source; + } + } + if (typeof result != 'undefined') { + value = result; + } + } + object[key] = value; + }); + } + + /** + * The base implementation of `_.random` without argument juggling or support + * for returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns a random number. + */ + function baseRandom(min, max) { + return min + floor(nativeRandom() * (max - min + 1)); + } + + /** + * The base implementation of `_.uniq` without support for callback shorthands + * or `thisArg` binding. + * + * @private + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. + */ + function baseUniq(array, isSorted, callback) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + result = []; + + var isLarge = !isSorted && length >= largeArraySize && indexOf === baseIndexOf, + seen = (callback || isLarge) ? getArray() : result; + + if (isLarge) { + var cache = createCache(seen); + indexOf = cacheIndexOf; + seen = cache; + } + while (++index < length) { + var value = array[index], + computed = callback ? callback(value, index, array) : value; + + if (isSorted + ? !index || seen[seen.length - 1] !== computed + : indexOf(seen, computed) < 0 + ) { + if (callback || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + if (isLarge) { + releaseArray(seen.array); + releaseObject(seen); + } else if (callback) { + releaseArray(seen); + } + return result; + } + + /** + * Creates a function that aggregates a collection, creating an object composed + * of keys generated from the results of running each element of the collection + * through a callback. The given `setter` function sets the keys and values + * of the composed object. + * + * @private + * @param {Function} setter The setter function. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter) { + return function(collection, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, callback(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, callback(value, key, collection), collection); + }); + } + return result; + }; + } + + /** + * Creates a function that, when called, either curries or invokes `func` + * with an optional `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` + * 8 - `_.curry` (bound) + * 16 - `_.partial` + * 32 - `_.partialRight` + * @param {Array} [partialArgs] An array of arguments to prepend to those + * provided to the new function. + * @param {Array} [partialRightArgs] An array of arguments to append to those + * provided to the new function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new function. + */ + function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + isPartial = bitmask & 16, + isPartialRight = bitmask & 32; + + if (!isBindKey && !isFunction(func)) { + throw new TypeError; + } + if (isPartial && !partialArgs.length) { + bitmask &= ~16; + isPartial = partialArgs = false; + } + if (isPartialRight && !partialRightArgs.length) { + bitmask &= ~32; + isPartialRight = partialRightArgs = false; + } + var bindData = func && func.__bindData__; + if (bindData && bindData !== true) { + // clone `bindData` + bindData = slice(bindData); + if (bindData[2]) { + bindData[2] = slice(bindData[2]); + } + if (bindData[3]) { + bindData[3] = slice(bindData[3]); + } + // set `thisBinding` is not previously bound + if (isBind && !(bindData[1] & 1)) { + bindData[4] = thisArg; + } + // set if previously bound but not currently (subsequent curried functions) + if (!isBind && bindData[1] & 1) { + bitmask |= 8; + } + // set curried arity if not yet set + if (isCurry && !(bindData[1] & 4)) { + bindData[5] = arity; + } + // append partial left arguments + if (isPartial) { + push.apply(bindData[2] || (bindData[2] = []), partialArgs); + } + // append partial right arguments + if (isPartialRight) { + unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs); + } + // merge flags + bindData[1] |= bitmask; + return createWrapper.apply(null, bindData); + } + // fast path for `_.bind` + var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper; + return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]); + } + + /** + * Creates compiled iteration functions. + * + * @private + * @param {...Object} [options] The compile options object(s). + * @param {string} [options.array] Code to determine if the iterable is an array or array-like. + * @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop. + * @param {Function} [options.keys] A reference to `_.keys` for use in own property iteration. + * @param {string} [options.args] A comma separated string of iteration function arguments. + * @param {string} [options.top] Code to execute before the iteration branches. + * @param {string} [options.loop] Code to execute in the object loop. + * @param {string} [options.bottom] Code to execute after the iteration branches. + * @returns {Function} Returns the compiled function. + */ + function createIterator() { + // data properties + iteratorData.shadowedProps = shadowedProps; + + // iterator options + iteratorData.array = iteratorData.bottom = iteratorData.loop = iteratorData.top = ''; + iteratorData.init = 'iterable'; + iteratorData.useHas = true; + + // merge options into a template data object + for (var object, index = 0; object = arguments[index]; index++) { + for (var key in object) { + iteratorData[key] = object[key]; + } + } + var args = iteratorData.args; + iteratorData.firstArg = /^[^,]+/.exec(args)[0]; + + // create the function factory + var factory = Function( + 'baseCreateCallback, errorClass, errorProto, hasOwnProperty, ' + + 'indicatorObject, isArguments, isArray, isString, keys, objectProto, ' + + 'objectTypes, nonEnumProps, stringClass, stringProto, toString', + 'return function(' + args + ') {\n' + iteratorTemplate(iteratorData) + '\n}' + ); + + // return the compiled function + return factory( + baseCreateCallback, errorClass, errorProto, hasOwnProperty, + indicatorObject, isArguments, isArray, isString, iteratorData.keys, objectProto, + objectTypes, nonEnumProps, stringClass, stringProto, toString + ); + } + + /** + * 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]; + } + + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized, this method returns the custom method, otherwise it returns + * the `baseIndexOf` function. + * + * @private + * @returns {Function} Returns the "indexOf" function. + */ + function getIndexOf() { + var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result; + return result; + } + + /** + * 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); + } + + /** + * Sets `this` binding data on a given function. + * + * @private + * @param {Function} func The function to set data on. + * @param {Array} value The data array to set. + */ + var setBindData = !defineProperty ? noop : function(func, value) { + descriptor.value = value; + defineProperty(func, '__bindData__', descriptor); + }; + + /** + * A fallback implementation of `isPlainObject` which checks if a given value + * is an object created by the `Object` constructor, assuming objects created + * by the `Object` constructor have no inherited enumerable properties and that + * there are no `Object.prototype` extensions. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + */ + function shimIsPlainObject(value) { + var ctor, + result; + + // avoid non Object objects, `arguments` objects, and DOM elements + if (!(value && toString.call(value) == objectClass) || + (ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor)) || + (!support.argsClass && isArguments(value)) || + (!support.nodeClass && isNode(value))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + if (support.ownLast) { + forIn(value, function(value, key, object) { + result = hasOwnProperty.call(object, key); + return false; + }); + return result !== false; + } + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + forIn(value, function(value, key) { + result = key; + }); + return typeof result == 'undefined' || hasOwnProperty.call(value, result); + } + + /** + * Used by `unescape` to convert HTML entities to characters. + * + * @private + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + function unescapeHtmlChar(match) { + return htmlUnescapes[match]; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Checks if `value` is an `arguments` object. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @example + * + * (function() { return _.isArguments(arguments); })(1, 2, 3); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == argsClass || false; + } + // fallback for browsers that can't detect `arguments` objects by [[Class]] + if (!support.argsClass) { + isArguments = function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee') || false; + }; + } + + /** + * Checks if `value` is an array. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. + * @example + * + * (function() { return _.isArray(arguments); })(); + * // => false + * + * _.isArray([1, 2, 3]); + * // => true + */ + var isArray = nativeIsArray || function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == arrayClass || false; + }; + + /** + * 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 = createIterator({ + 'args': 'object', + 'init': '[]', + 'top': 'if (!(objectTypes[typeof object])) return result', + 'loop': 'result.push(index)' + }); + + /** + * 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 []; + } + if ((support.enumPrototypes && typeof object == 'function') || + (support.nonEnumArgs && object.length && isArguments(object))) { + return shimKeys(object); + } + return nativeKeys(object); + }; + + /** Reusable iterator options shared by `each`, `forIn`, and `forOwn` */ + var eachIteratorOptions = { + 'args': 'collection, callback, thisArg', + 'top': "callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)", + 'array': "typeof length == 'number'", + 'keys': keys, + 'loop': 'if (callback(iterable[index], index, collection) === false) return result' + }; + + /** Reusable iterator options for `assign` and `defaults` */ + var defaultsIteratorOptions = { + 'args': 'object, source, guard', + 'top': + 'var args = arguments,\n' + + ' argsIndex = 0,\n' + + " argsLength = typeof guard == 'number' ? 2 : args.length;\n" + + 'while (++argsIndex < argsLength) {\n' + + ' iterable = args[argsIndex];\n' + + ' if (iterable && objectTypes[typeof iterable]) {', + 'keys': keys, + 'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]", + 'bottom': ' }\n}' + }; + + /** Reusable iterator options for `forIn` and `forOwn` */ + var forOwnIteratorOptions = { + 'top': 'if (!objectTypes[typeof iterable]) return result;\n' + eachIteratorOptions.top, + 'array': false + }; + + /** + * 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 = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to convert HTML entities to characters */ + var htmlUnescapes = invert(htmlEscapes); + + /** Used to match HTML entities and HTML characters */ + var reEscapedHtml = RegExp('(' + keys(htmlUnescapes).join('|') + ')', 'g'), + reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); + + /** + * A function compiled to iterate `arguments` objects, arrays, objects, and + * strings consistenly across environments, executing the callback for each + * element in the collection. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index|key, collection). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @private + * @type Function + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEach = createIterator(eachIteratorOptions); + + /*--------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources will overwrite property assignments of previous + * sources. If a callback is provided it will be executed to produce the + * assigned values. The callback is bound to `thisArg` and invoked with two + * arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @type Function + * @alias extend + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * _.assign({ 'name': 'fred' }, { 'employer': 'slate' }); + * // => { 'name': 'fred', 'employer': 'slate' } + * + * var defaults = _.partialRight(_.assign, function(a, b) { + * return typeof a == 'undefined' ? b : a; + * }); + * + * var object = { 'name': 'barney' }; + * defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ + var assign = createIterator(defaultsIteratorOptions, { + 'top': + defaultsIteratorOptions.top.replace(';', + ';\n' + + "if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n" + + ' var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n' + + "} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n" + + ' callback = args[--argsLength];\n' + + '}' + ), + 'loop': 'result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]' + }); + + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects will also + * be cloned, otherwise they will be assigned by reference. If a callback + * is provided it will be executed to produce the cloned values. If the + * callback returns `undefined` cloning will be handled by the method instead. + * The callback is bound to `thisArg` and invoked with one argument; (value). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var shallow = _.clone(characters); + * shallow[0] === characters[0]; + * // => true + * + * var deep = _.clone(characters, true); + * deep[0] === characters[0]; + * // => false + * + * _.mixin({ + * 'clone': _.partialRight(_.clone, function(value) { + * return _.isElement(value) ? value.cloneNode(false) : undefined; + * }) + * }); + * + * var clone = _.clone(document.body); + * clone.childNodes.length; + * // => 0 + */ + function clone(value, isDeep, callback, thisArg) { + // allows working with "Collections" methods without using their `index` + // and `collection` arguments for `isDeep` and `callback` + if (typeof isDeep != 'boolean' && isDeep != null) { + thisArg = callback; + callback = isDeep; + isDeep = false; + } + return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates a deep clone of `value`. If a callback is provided it will be + * executed to produce the cloned values. If the callback returns `undefined` + * cloning will be handled by the method instead. The callback is bound to + * `thisArg` and invoked with one argument; (value). + * + * Note: This method is loosely based on the structured clone algorithm. Functions + * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and + * objects created by constructors other than `Object` are cloned to plain `Object` objects. + * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var deep = _.cloneDeep(characters); + * deep[0] === characters[0]; + * // => false + * + * var view = { + * 'label': 'docs', + * 'node': element + * }; + * + * var clone = _.cloneDeep(view, function(value) { + * return _.isElement(value) ? value.cloneNode(true) : undefined; + * }); + * + * clone.node == view.node; + * // => false + */ + function cloneDeep(value, callback, thisArg) { + return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { 'constructor': Circle }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties ? assign(result, properties) : result; + } + + /** + * 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 = createIterator(defaultsIteratorOptions); + + /** + * This method is like `_.findIndex` except that it returns the key of the + * first element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': false }, + * 'fred': { 'age': 40, 'blocked': true }, + * 'pebbles': { 'age': 1, 'blocked': false } + * }; + * + * _.findKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (property order is not guaranteed across environments) + * + * // using "_.where" callback shorthand + * _.findKey(characters, { 'age': 1 }); + * // => 'pebbles' + * + * // using "_.pluck" callback shorthand + * _.findKey(characters, 'blocked'); + * // => 'fred' + */ + function findKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwn(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * This method is like `_.findKey` except that it iterates over elements + * of a `collection` in the opposite order. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': true }, + * 'fred': { 'age': 40, 'blocked': false }, + * 'pebbles': { 'age': 1, 'blocked': true } + * }; + * + * _.findLastKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles`, assuming `_.findKey` returns `barney` + * + * // using "_.where" callback shorthand + * _.findLastKey(characters, { 'age': 40 }); + * // => 'fred' + * + * // using "_.pluck" callback shorthand + * _.findLastKey(characters, 'blocked'); + * // => 'pebbles' + */ + function findLastKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwnRight(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * Iterates over own and inherited enumerable properties of an object, + * executing the callback for each property. The callback is bound to `thisArg` + * and invoked with three arguments; (value, key, object). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forIn(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) + */ + var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, { + 'useHas': false + }); + + /** + * This method is like `_.forIn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forInRight(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'move', 'y', and 'x' assuming `_.forIn ` logs 'x', 'y', and 'move' + */ + function forInRight(object, callback, thisArg) { + var pairs = []; + + forIn(object, function(value, key) { + pairs.push(key, value); + }); + + var length = pairs.length; + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + if (callback(pairs[length--], pairs[length], object) === false) { + break; + } + } + return object; + } + + /** + * Iterates over own enumerable properties of an object, executing the callback + * for each property. The callback is bound to `thisArg` and invoked with three + * arguments; (value, key, object). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs '0', '1', and 'length' (property order is not guaranteed across environments) + */ + var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions); + + /** + * This method is like `_.forOwn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs 'length', '1', and '0' assuming `_.forOwn` logs '0', '1', and 'length' + */ + function forOwnRight(object, callback, thisArg) { + var props = keys(object), + length = props.length; + + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + var key = props[length]; + if (callback(object[key], key, object) === false) { + break; + } + } + return object; + } + + /** + * Creates a sorted array of property names of all enumerable properties, + * own and inherited, of `object` that have function values. + * + * @static + * @memberOf _ + * @alias methods + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names that have function values. + * @example + * + * _.functions(_); + * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] + */ + function functions(object) { + var result = []; + forIn(object, function(value, key) { + if (isFunction(value)) { + result.push(key); + } + }); + return result.sort(); + } + + /** + * Checks if the specified property name exists as a direct property of `object`, + * instead of an inherited property. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to check. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. + * @example + * + * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + * // => true + */ + function has(object, key) { + return object ? hasOwnProperty.call(object, key) : false; + } + + /** + * Creates an object composed of the inverted keys and values of the given object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to invert. + * @returns {Object} Returns the created inverted object. + * @example + * + * _.invert({ 'first': 'fred', 'second': 'barney' }); + * // => { 'fred': 'first', 'barney': 'second' } + */ + function invert(object) { + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + result[object[key]] = key; + } + return result; + } + + /** + * Checks if `value` is a boolean value. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @example + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + value && typeof value == 'object' && toString.call(value) == boolClass || false; + } + + /** + * Checks if `value` is a date. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + */ + function isDate(value) { + return value && typeof value == 'object' && toString.call(value) == dateClass || false; + } + + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + */ + function isElement(value) { + return value && value.nodeType === 1 || false; + } + + /** + * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a + * length of `0` and objects with no own enumerable properties are considered + * "empty". + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. + * @example + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({}); + * // => true + * + * _.isEmpty(''); + * // => true + */ + function isEmpty(value) { + var result = true; + if (!value) { + return result; + } + var className = toString.call(value), + length = value.length; + + if ((className == arrayClass || className == stringClass || + (support.argsClass ? className == argsClass : isArguments(value))) || + (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { + return !length; + } + forOwn(value, function() { + return (result = false); + }); + return result; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent to each other. If a callback is provided it will be executed + * to compare values. If the callback returns `undefined` comparisons will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (a, b). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'name': 'fred' }; + * var copy = { 'name': 'fred' }; + * + * object == copy; + * // => false + * + * _.isEqual(object, copy); + * // => true + * + * var words = ['hello', 'goodbye']; + * var otherWords = ['hi', 'goodbye']; + * + * _.isEqual(words, otherWords, function(a, b) { + * var reGreet = /^(?:hello|hi)$/i, + * aGreet = _.isString(a) && reGreet.test(a), + * bGreet = _.isString(b) && reGreet.test(b); + * + * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; + * }); + * // => true + */ + function isEqual(a, b, callback, thisArg) { + return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2)); + } + + /** + * Checks if `value` is, or can be coerced to, a finite number. + * + * Note: This is not the same as native `isFinite` which will return true for + * booleans and empty strings. See http://es5.github.io/#x15.1.2.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. + * @example + * + * _.isFinite(-101); + * // => true + * + * _.isFinite('10'); + * // => true + * + * _.isFinite(true); + * // => false + * + * _.isFinite(''); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + function isFinite(value) { + return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); + } + + /** + * Checks if `value` is a function. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + */ + function isFunction(value) { + return typeof value == 'function'; + } + // fallback for older versions of Chrome and Safari + if (isFunction(/x/)) { + isFunction = function(value) { + return typeof value == 'function' && toString.call(value) == funcClass; + }; + } + + /** + * 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]); + } + + /** + * Checks if `value` is `NaN`. + * + * Note: This is not the same as native `isNaN` which will return `true` for + * `undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // `NaN` as a primitive is the only value that is not equal to itself + // (perform the [[Class]] check first to avoid errors with some host objects in IE) + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(undefined); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is a number. + * + * Note: `NaN` is considered a number. See http://es5.github.io/#x8.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. + * @example + * + * _.isNumber(8.4 * 5); + * // => true + */ + function isNumber(value) { + return typeof value == 'number' || + value && typeof value == 'object' && toString.call(value) == numberClass || false; + } + + /** + * Checks if `value` is an object created by the `Object` constructor. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * _.isPlainObject(new Shape); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + */ + var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { + if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) { + return false; + } + var valueOf = value.valueOf, + objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); + + return objProto + ? (value == objProto || getPrototypeOf(value) == objProto) + : shimIsPlainObject(value); + }; + + /** + * Checks if `value` is a regular expression. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @example + * + * _.isRegExp(/fred/); + * // => true + */ + function isRegExp(value) { + return value && objectTypes[typeof value] && toString.call(value) == regexpClass || false; + } + + /** + * Checks if `value` is a string. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. + * @example + * + * _.isString('fred'); + * // => true + */ + function isString(value) { + return typeof value == 'string' || + value && typeof value == 'object' && toString.call(value) == stringClass || false; + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + */ + function isUndefined(value) { + return typeof value == 'undefined'; + } + + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new object with values of the results of each `callback` execution. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + * + * var characters = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // using "_.pluck" callback shorthand + * _.mapValues(characters, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } + */ + function mapValues(object, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + forOwn(object, function(value, key, object) { + result[key] = callback(value, key, object); + }); + return result; + } + + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * will overwrite property assignments of previous sources. If a callback is + * provided it will be executed to produce the merged values of the destination + * and source properties. If the callback returns `undefined` merging will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * var names = { + * 'characters': [ + * { 'name': 'barney' }, + * { 'name': 'fred' } + * ] + * }; + * + * var ages = { + * 'characters': [ + * { 'age': 36 }, + * { 'age': 40 } + * ] + * }; + * + * _.merge(names, ages); + * // => { 'characters': [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] } + * + * var food = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var otherFood = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(food, otherFood, function(a, b) { + * return _.isArray(a) ? a.concat(b) : undefined; + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } + */ + function merge(object) { + var args = arguments, + length = 2; + + if (!isObject(object)) { + return object; + } + // allows working with `_.reduce` and `_.reduceRight` without using + // their `index` and `collection` arguments + if (typeof args[2] != 'number') { + length = args.length; + } + if (length > 3 && typeof args[length - 2] == 'function') { + var callback = baseCreateCallback(args[--length - 1], args[length--], 2); + } else if (length > 2 && typeof args[length - 1] == 'function') { + callback = args[--length]; + } + var sources = slice(arguments, 1, length), + index = -1, + stackA = getArray(), + stackB = getArray(); + + while (++index < length) { + baseMerge(object, sources[index], callback, stackA, stackB); + } + releaseArray(stackA); + releaseArray(stackB); + return object; + } + + /** + * Creates a shallow clone of `object` excluding the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` omitting the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object without the omitted properties. + * @example + * + * _.omit({ 'name': 'fred', 'age': 40 }, 'age'); + * // => { 'name': 'fred' } + * + * _.omit({ 'name': 'fred', 'age': 40 }, function(value) { + * return typeof value == 'number'; + * }); + * // => { 'name': 'fred' } + */ + function omit(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var props = []; + forIn(object, function(value, key) { + props.push(key); + }); + props = baseDifference(props, baseFlatten(arguments, true, false, 1)); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + result[key] = object[key]; + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (!callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * Creates a two dimensional array of an object's key-value pairs, + * i.e. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments) + */ + function pairs(object) { + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; + } + + /** + * Creates a shallow clone of `object` composed of the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` picking the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object composed of the picked properties. + * @example + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, 'name'); + * // => { 'name': 'fred' } + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) { + * return key.charAt(0) != '_'; + * }); + * // => { 'name': 'fred' } + */ + function pick(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var index = -1, + props = baseFlatten(arguments, true, false, 1), + length = isObject(object) ? props.length : 0; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * An alternative to `_.reduce` this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable properties through a callback, with each callback execution + * potentially mutating the `accumulator` object. The callback is bound to + * `thisArg` and invoked with four arguments; (accumulator, value, key, object). + * Callbacks may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { + * num *= num; + * if (num % 2) { + * return result.push(num) < 3; + * } + * }); + * // => [1, 9, 25] + * + * var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function transform(object, callback, accumulator, thisArg) { + var isArr = isArray(object); + if (accumulator == null) { + if (isArr) { + accumulator = []; + } else { + var ctor = object && object.constructor, + proto = ctor && ctor.prototype; + + accumulator = baseCreate(proto); + } + } + if (callback) { + callback = lodash.createCallback(callback, thisArg, 4); + (isArr ? baseEach : forOwn)(object, function(value, index, object) { + return callback(accumulator, value, index, object); + }); + } + return accumulator; + } + + /** + * 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; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array of elements from the specified indexes, or keys, of the + * `collection`. Indexes may be specified as individual arguments or as arrays + * of indexes. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` + * to retrieve, specified as individual indexes or arrays of indexes. + * @returns {Array} Returns a new array of elements corresponding to the + * provided indexes. + * @example + * + * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); + * // => ['a', 'c', 'e'] + * + * _.at(['fred', 'barney', 'pebbles'], 0, 2); + * // => ['fred', 'pebbles'] + */ + function at(collection) { + var args = arguments, + index = -1, + props = baseFlatten(args, true, false, 1), + length = (args[2] && args[2][args[1]] === collection) ? 1 : props.length, + result = Array(length); + + if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + while(++index < length) { + result[index] = collection[props[index]]; + } + return result; + } + + /** + * Checks if a given value is present in a collection using strict equality + * for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the + * offset from the end of the collection. + * + * @static + * @memberOf _ + * @alias include + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. + * @example + * + * _.contains([1, 2, 3], 1); + * // => true + * + * _.contains([1, 2, 3], 1, 2); + * // => false + * + * _.contains({ 'name': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.contains('pebbles', 'eb'); + * // => true + */ + function contains(collection, target, fromIndex) { + var index = -1, + indexOf = getIndexOf(), + length = collection ? collection.length : 0, + result = false; + + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; + if (isArray(collection)) { + result = indexOf(collection, target, fromIndex) > -1; + } else if (typeof length == 'number') { + result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1; + } else { + baseEach(collection, function(value) { + if (++index >= fromIndex) { + return !(result = value === target); + } + }); + } + return result; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through the callback. The corresponding value + * of each key is the number of times the key was returned by the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1); + }); + + /** + * Checks if the given callback returns truey value for **all** elements of + * a collection. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes']); + * // => false + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.every(characters, 'age'); + * // => true + * + * // using "_.where" callback shorthand + * _.every(characters, { 'age': 36 }); + * // => false + */ + function every(collection, callback, thisArg) { + var result = true; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (!(result = !!callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return (result = !!callback(value, index, collection)); + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning an array of all elements + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that passed the callback check. + * @example + * + * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [2, 4, 6] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.filter(characters, 'blocked'); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + * + * // using "_.where" callback shorthand + * _.filter(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + */ + function filter(collection, callback, thisArg) { + var result = []; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + result.push(value); + } + } + } else { + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result.push(value); + } + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning the first element that + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias detect, findWhere + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.find(characters, function(chr) { + * return chr.age < 40; + * }); + * // => { 'name': 'barney', 'age': 36, 'blocked': false } + * + * // using "_.where" callback shorthand + * _.find(characters, { 'age': 1 }); + * // => { 'name': 'pebbles', 'age': 1, 'blocked': false } + * + * // using "_.pluck" callback shorthand + * _.find(characters, 'blocked'); + * // => { 'name': 'fred', 'age': 40, 'blocked': true } + */ + function find(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + return value; + } + } + } else { + var result; + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + } + + /** + * This method is like `_.find` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(num) { + * return num % 2 == 1; + * }); + * // => 3 + */ + function findLast(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forEachRight(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + + /** + * Iterates over elements of a collection, executing the callback for each + * element. The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * Note: As with other "Collections" methods, objects with a `length` property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); + * // => logs each number and returns '1,2,3' + * + * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); }); + * // => logs each number and returns the object (property order is not guaranteed across environments) + */ + function forEach(collection, callback, thisArg) { + if (callback && typeof thisArg == 'undefined' && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (callback(collection[index], index, collection) === false) { + break; + } + } + } else { + baseEach(collection, callback, thisArg); + } + return collection; + } + + /** + * This method is like `_.forEach` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); + * // => logs each number from right to left and returns '3,2,1' + */ + function forEachRight(collection, callback, thisArg) { + var iterable = collection, + length = collection ? collection.length : 0; + + callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (length--) { + if (callback(collection[length], length, collection) === false) { + break; + } + } + } else { + if (typeof length != 'number') { + var props = keys(collection); + length = props.length; + } else if (support.unindexedChars && isString(collection)) { + iterable = collection.split(''); + } + baseEach(collection, function(value, key, collection) { + key = props ? props[--length] : --length; + return callback(iterable[key], key, collection); + }); + } + return collection; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of a collection through the callback. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false` + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using "_.pluck" callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value); + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of the collection through the given callback. The corresponding + * value of each key is the last element responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keys = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keys, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keys, function(key) { return String.fromCharCode(key.code); }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + + /** + * Invokes the method named by `methodName` on each element in the `collection` + * returning an array of the results of each invoked method. Additional arguments + * will be provided to each invoked method. If `methodName` is a function it + * will be invoked for, and `this` bound to, each element in the `collection`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|string} methodName The name of the method to invoke or + * the function invoked per iteration. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {Array} Returns a new array of the results of each invoked method. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + function invoke(collection, methodName) { + var args = slice(arguments, 2), + index = -1, + isFunc = typeof methodName == 'function', + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args); + }); + return result; + } + + /** + * Creates an array of values by running each element in the collection + * through the callback. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias collect + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of the results of each `callback` execution. + * @example + * + * _.map([1, 2, 3], function(num) { return num * 3; }); + * // => [3, 6, 9] + * + * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); + * // => [3, 6, 9] (property order is not guaranteed across environments) + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(characters, 'name'); + * // => ['barney', 'fred'] + */ + function map(collection, callback, thisArg) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + callback = lodash.createCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (++index < length) { + result[index] = callback(collection[index], index, collection); + } + } else { + baseEach(collection, function(value, key, collection) { + result[++index] = callback(value, key, collection); + }); + } + return result; + } + + /** + * Retrieves the maximum value of a collection. If the collection is empty or + * falsey `-Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.max(characters, function(chr) { return chr.age; }); + * // => { 'name': 'fred', 'age': 40 }; + * + * // using "_.pluck" callback shorthand + * _.max(characters, 'age'); + * // => { 'name': 'fred', 'age': 40 }; + */ + function max(collection, callback, thisArg) { + var computed = -Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value > result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current > computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the minimum value of a collection. If the collection is empty or + * falsey `Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.min(characters, function(chr) { return chr.age; }); + * // => { 'name': 'barney', 'age': 36 }; + * + * // using "_.pluck" callback shorthand + * _.min(characters, 'age'); + * // => { 'name': 'barney', 'age': 36 }; + */ + function min(collection, callback, thisArg) { + var computed = Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value < result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current < computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the value of a specified property from all elements in the collection. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {string} property The name of the property to pluck. + * @returns {Array} Returns a new array of property values. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.pluck(characters, 'name'); + * // => ['barney', 'fred'] + */ + var pluck = map; + + /** + * Reduces a collection to a value which is the accumulated result of running + * each element in the collection through the callback, where each successive + * callback execution consumes the return value of the previous execution. If + * `accumulator` is not provided the first element of the collection will be + * used as the initial `accumulator` value. The callback is bound to `thisArg` + * and invoked with four arguments; (accumulator, value, index|key, collection). + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var sum = _.reduce([1, 2, 3], function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function reduce(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + if (noaccum) { + accumulator = collection[++index]; + } + while (++index < length) { + accumulator = callback(accumulator, collection[index], index, collection); + } + } else { + baseEach(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection) + }); + } + return accumulator; + } + + /** + * This method is like `_.reduce` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var list = [[0, 1], [2, 3], [4, 5]]; + * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + forEachRight(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The opposite of `_.filter` this method returns the elements of a + * collection that the callback does **not** return truey for. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that failed the callback check. + * @example + * + * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [1, 3, 5] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.reject(characters, 'blocked'); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + * + * // using "_.where" callback shorthand + * _.reject(characters, { 'age': 36 }); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + */ + function reject(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + return filter(collection, function(value, index, collection) { + return !callback(value, index, collection); + }); + } + + /** + * Retrieves a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Allows working with functions like `_.map` + * without using their `index` arguments as `n`. + * @returns {Array} Returns the random sample(s) of `collection`. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + function sample(collection, n, guard) { + if (collection && typeof collection.length != 'number') { + collection = values(collection); + } else if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + if (n == null || guard) { + return collection ? collection[baseRandom(0, collection.length - 1)] : undefined; + } + var result = shuffle(collection); + result.length = nativeMin(nativeMax(0, n), result.length); + return result; + } + + /** + * Creates an array of shuffled values, using a version of the Fisher-Yates + * shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns a new shuffled collection. + * @example + * + * _.shuffle([1, 2, 3, 4, 5, 6]); + * // => [4, 1, 6, 3, 5, 2] + */ + function shuffle(collection) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + var rand = baseRandom(0, ++index); + result[index] = result[rand]; + result[rand] = value; + }); + return result; + } + + /** + * Gets the size of the `collection` by returning `collection.length` for arrays + * and array-like objects or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. + * @example + * + * _.size([1, 2]); + * // => 2 + * + * _.size({ 'one': 1, 'two': 2, 'three': 3 }); + * // => 3 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + var length = collection ? collection.length : 0; + return typeof length == 'number' ? length : keys(collection).length; + } + + /** + * Checks if the callback returns a truey value for **any** element of a + * collection. The function returns as soon as it finds a passing value and + * does not iterate over the entire collection. The callback is bound to + * `thisArg` and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.some(characters, 'blocked'); + * // => true + * + * // using "_.where" callback shorthand + * _.some(characters, { 'age': 1 }); + * // => false + */ + function some(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if ((result = callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return !(result = callback(value, index, collection)); + }); + } + return !!result; + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through the callback. This method + * performs a stable sort, that is, it will preserve the original sort order + * of equal elements. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an array of property names is provided for `callback` the collection + * will be sorted by each property value. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of sorted elements. + * @example + * + * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); + * // => [3, 1, 2] + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 26 }, + * { 'name': 'fred', 'age': 30 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(_.sortBy(characters, 'age'), _.values); + * // => [['barney', 26], ['fred', 30], ['barney', 36], ['fred', 40]] + * + * // sorting by multiple properties + * _.map(_.sortBy(characters, ['name', 'age']), _.values); + * // = > [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]] + */ + function sortBy(collection, callback, thisArg) { + var index = -1, + isArr = isArray(callback), + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + if (!isArr) { + callback = lodash.createCallback(callback, thisArg, 3); + } + forEach(collection, function(value, key, collection) { + var object = result[++index] = getObject(); + if (isArr) { + object.criteria = map(callback, function(key) { return value[key]; }); + } else { + (object.criteria = getArray())[0] = callback(value, key, collection); + } + object.index = index; + object.value = value; + }); + + length = result.length; + result.sort(compareAscending); + while (length--) { + var object = result[length]; + result[length] = object.value; + if (!isArr) { + releaseArray(object.criteria); + } + releaseObject(object); + } + return result; + } + + /** + * Converts the `collection` to an array. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to convert. + * @returns {Array} Returns the new converted array. + * @example + * + * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); + * // => [2, 3, 4] + */ + function toArray(collection) { + if (collection && typeof collection.length == 'number') { + return (support.unindexedChars && isString(collection)) + ? collection.split('') + : slice(collection); + } + return values(collection); + } + + /** + * Performs a deep comparison of each element in a `collection` to the given + * `properties` object, returning an array of all elements that have equivalent + * property values. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Object} props The object of property values to filter by. + * @returns {Array} Returns a new array of elements that have the given properties. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.where(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }] + * + * _.where(characters, { 'pets': ['dino'] }); + * // => [{ 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] }] + */ + var where = filter; + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are all falsey. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to compact. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result.push(value); + } + } + return result; + } + + /** + * Creates an array excluding all values of the provided arrays using strict + * equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to process. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); + * // => [1, 3, 4] + */ + function difference(array) { + return baseDifference(array, baseFlatten(arguments, true, true, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.findIndex(characters, function(chr) { + * return chr.age < 20; + * }); + * // => 2 + * + * // using "_.where" callback shorthand + * _.findIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findIndex(characters, 'blocked'); + * // => 1 + */ + function findIndex(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + if (callback(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of a `collection` from right to left. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': true }, + * { 'name': 'fred', 'age': 40, 'blocked': false }, + * { 'name': 'pebbles', 'age': 1, 'blocked': true } + * ]; + * + * _.findLastIndex(characters, function(chr) { + * return chr.age > 30; + * }); + * // => 1 + * + * // using "_.where" callback shorthand + * _.findLastIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findLastIndex(characters, 'blocked'); + * // => 2 + */ + function findLastIndex(array, callback, thisArg) { + var length = array ? array.length : 0; + callback = lodash.createCallback(callback, thisArg, 3); + while (length--) { + if (callback(array[length], length, array)) { + return length; + } + } + return -1; + } + + /** + * Gets the first element or first `n` elements of an array. If a callback + * is provided elements at the beginning of the array are returned as long + * as the callback returns truey. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias head, take + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([1, 2, 3], 2); + * // => [1, 2] + * + * _.first([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [1, 2] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.first(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': true, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.first(characters, { 'employer': 'slate' }), 'name'); + * // => ['barney', 'fred'] + */ + function first(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = -1; + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[0] : undefined; + } + } + return slice(array, 0, nativeMin(nativeMax(0, n), length)); + } + + /** + * Flattens a nested array (the nesting can be to any depth). If `isShallow` + * is truey, the array will only be flattened a single level. If a callback + * is provided each element of the array is passed through the callback before + * flattening. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new flattened array. + * @example + * + * _.flatten([1, [2], [3, [[4]]]]); + * // => [1, 2, 3, 4]; + * + * _.flatten([1, [2], [3, [[4]]]], true); + * // => [1, 2, 3, [[4]]]; + * + * var characters = [ + * { 'name': 'barney', 'age': 30, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * // using "_.pluck" callback shorthand + * _.flatten(characters, 'pets'); + * // => ['hoppy', 'baby puss', 'dino'] + */ + function flatten(array, isShallow, callback, thisArg) { + // juggle arguments + if (typeof isShallow != 'boolean' && isShallow != null) { + thisArg = callback; + callback = (typeof isShallow != 'function' && thisArg && thisArg[isShallow] === array) ? null : isShallow; + isShallow = false; + } + if (callback != null) { + array = map(array, callback, thisArg); + } + return baseFlatten(array, isShallow); + } + + /** + * Gets the index at which the first occurrence of `value` is found using + * strict equality for comparisons, i.e. `===`. If the array is already sorted + * providing `true` for `fromIndex` will run a faster binary search. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2); + * // => 1 + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 4 + * + * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); + * // => 2 + */ + function indexOf(array, value, fromIndex) { + if (typeof fromIndex == 'number') { + var length = array ? array.length : 0; + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0); + } else if (fromIndex) { + var index = sortedIndex(array, value); + return array[index] === value ? index : -1; + } + return baseIndexOf(array, value, fromIndex); + } + + /** + * Gets all but the last element or last `n` elements of an array. If a + * callback is provided elements at the end of the array are excluded from + * the result as long as the callback returns truey. The callback is bound + * to `thisArg` and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + * + * _.initial([1, 2, 3], 2); + * // => [1] + * + * _.initial([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [1] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.initial(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': false, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.initial(characters, { 'employer': 'na' }), 'name'); + * // => ['barney', 'fred'] + */ + function initial(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : callback || n; + } + return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); + } + + /** + * Creates an array of unique values present in all provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of shared values. + * @example + * + * _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2] + */ + function intersection() { + var args = [], + argsIndex = -1, + argsLength = arguments.length, + caches = getArray(), + indexOf = getIndexOf(), + trustIndexOf = indexOf === baseIndexOf, + seen = getArray(); + + while (++argsIndex < argsLength) { + var value = arguments[argsIndex]; + if (isArray(value) || isArguments(value)) { + args.push(value); + caches.push(trustIndexOf && value.length >= largeArraySize && + createCache(argsIndex ? args[argsIndex] : seen)); + } + } + var array = args[0], + index = -1, + length = array ? array.length : 0, + result = []; + + outer: + while (++index < length) { + var cache = caches[0]; + value = array[index]; + + if ((cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0) { + argsIndex = argsLength; + (cache || seen).push(value); + while (--argsIndex) { + cache = caches[argsIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) { + continue outer; + } + } + result.push(value); + } + } + while (argsLength--) { + cache = caches[argsLength]; + if (cache) { + releaseObject(cache); + } + } + releaseArray(caches); + releaseArray(seen); + return result; + } + + /** + * Gets the last element or last `n` elements of an array. If a callback is + * provided elements at the end of the array are returned as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + * + * _.last([1, 2, 3], 2); + * // => [2, 3] + * + * _.last([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [2, 3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.last(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.last(characters, { 'employer': 'na' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function last(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[length - 1] : undefined; + } + } + return slice(array, nativeMax(0, length - n)); + } + + /** + * Gets the index at which the last occurrence of `value` is found using strict + * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used + * as the offset from the end of the collection. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); + * // => 4 + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var index = array ? array.length : 0; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * Removes all provided values from the given array using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + function pull(array) { + var args = arguments, + argsIndex = 0, + argsLength = args.length, + length = array ? array.length : 0; + + while (++argsIndex < argsLength) { + var index = -1, + value = args[argsIndex]; + while (++index < length) { + if (array[index] === value) { + splice.call(array, index--, 1); + length--; + } + } + } + return array; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to but not including `end`. If `start` is less than `stop` a + * zero-length range is created unless a negative `step` is specified. + * + * @static + * @memberOf _ + * @category Arrays + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns a new range array. + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + function range(start, end, step) { + start = +start || 0; + step = typeof step == 'number' ? step : (+step || 1); + + if (end == null) { + end = start; + start = 0; + } + // use `Array(length)` so engines like Chakra and V8 avoid slower modes + // http://youtu.be/XAqIpGU8ZZk#t=17m25s + var index = -1, + length = nativeMax(0, ceil((end - start) / (step || 1))), + result = Array(length); + + while (++index < length) { + result[index] = start; + start += step; + } + return result; + } + + /** + * Removes all elements from an array that the callback returns truey for + * and returns an array of removed elements. The callback is bound to `thisArg` + * and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4, 5, 6]; + * var evens = _.remove(array, function(num) { return num % 2 == 0; }); + * + * console.log(array); + * // => [1, 3, 5] + * + * console.log(evens); + * // => [2, 4, 6] + */ + function remove(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0, + result = []; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (callback(value, index, array)) { + result.push(value); + splice.call(array, index--, 1); + length--; + } + } + return result; + } + + /** + * The opposite of `_.initial` this method gets all but the first element or + * first `n` elements of an array. If a callback function is provided elements + * at the beginning of the array are excluded from the result as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias drop, tail + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + * + * _.rest([1, 2, 3], 2); + * // => [3] + * + * _.rest([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.rest(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.rest(characters, { 'employer': 'slate' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function rest(array, callback, thisArg) { + if (typeof callback != 'number' && callback != null) { + var n = 0, + index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : nativeMax(0, callback); + } + return slice(array, n); + } + + /** + * Uses a binary search to determine the smallest index at which a value + * should be inserted into a given sorted array in order to maintain the sort + * order of the array. If a callback is provided it will be executed for + * `value` and each element of `array` to compute their sort ranking. The + * callback is bound to `thisArg` and invoked with one argument; (value). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([20, 30, 50], 40); + * // => 2 + * + * // using "_.pluck" callback shorthand + * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 2 + * + * var dict = { + * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } + * }; + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return dict.wordToNumber[word]; + * }); + * // => 2 + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return this.wordToNumber[word]; + * }, dict); + * // => 2 + */ + function sortedIndex(array, value, callback, thisArg) { + var low = 0, + high = array ? array.length : low; + + // explicitly reference `identity` for better inlining in Firefox + callback = callback ? lodash.createCallback(callback, thisArg, 1) : identity; + value = callback(value); + + while (low < high) { + var mid = (low + high) >>> 1; + (callback(array[mid]) < value) + ? low = mid + 1 + : high = mid; + } + return low; + } + + /** + * Creates an array of unique values, in order, of the provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of combined values. + * @example + * + * _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2, 3, 5, 4] + */ + function union() { + return baseUniq(baseFlatten(arguments, true, true)); + } + + /** + * Creates a duplicate-value-free version of an array using strict equality + * for comparisons, i.e. `===`. If the array is sorted, providing + * `true` for `isSorted` will use a faster algorithm. If a callback is provided + * each element of `array` is passed through the callback before uniqueness + * is computed. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Arrays + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a duplicate-value-free array. + * @example + * + * _.uniq([1, 2, 1, 3, 1]); + * // => [1, 2, 3] + * + * _.uniq([1, 1, 2, 2, 3], true); + * // => [1, 2, 3] + * + * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); }); + * // => ['A', 'b', 'C'] + * + * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math); + * // => [1, 2.5, 3] + * + * // using "_.pluck" callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniq(array, isSorted, callback, thisArg) { + // juggle arguments + if (typeof isSorted != 'boolean' && isSorted != null) { + thisArg = callback; + callback = (typeof isSorted != 'function' && thisArg && thisArg[isSorted] === array) ? null : isSorted; + isSorted = false; + } + if (callback != null) { + callback = lodash.createCallback(callback, thisArg, 3); + } + return baseUniq(array, isSorted, callback); + } + + /** + * Creates an array excluding all provided values using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); + * // => [2, 3, 4] + */ + function without(array) { + return baseDifference(array, slice(arguments, 1)); + } + + /** + * Creates an array that is the symmetric difference of the provided arrays. + * See http://en.wikipedia.org/wiki/Symmetric_difference. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of values. + * @example + * + * _.xor([1, 2, 3], [5, 2, 1, 4]); + * // => [3, 5, 4] + * + * _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); + * // => [1, 4, 5] + */ + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArray(array) || isArguments(array)) { + var result = result + ? baseUniq(baseDifference(result, array).concat(baseDifference(array, result))) + : array; + } + } + return result || []; + } + + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second + * elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @alias unzip + * @category Arrays + * @param {...Array} [array] Arrays to process. + * @returns {Array} Returns a new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + function zip() { + var array = arguments.length > 1 ? arguments : arguments[0], + index = -1, + length = array ? max(pluck(array, 'length')) : 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = pluck(array, index); + } + return result; + } + + /** + * Creates an object composed from arrays of `keys` and `values`. Provide + * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` + * or two arrays, one of `keys` and one of corresponding `values`. + * + * @static + * @memberOf _ + * @alias object + * @category Arrays + * @param {Array} keys The array of keys. + * @param {Array} [values=[]] The array of values. + * @returns {Object} Returns an object composed of the given keys and + * corresponding values. + * @example + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + function zipObject(keys, values) { + var index = -1, + length = keys ? keys.length : 0, + result = {}; + + if (!values && length && !isArray(keys[0])) { + values = []; + } + while (++index < length) { + var key = keys[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that executes `func`, with the `this` binding and + * arguments of the created function, only after being called `n` times. + * + * @static + * @memberOf _ + * @category Functions + * @param {number} n The number of times the function must be called before + * `func` is executed. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('Done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'Done saving!', after all saves have completed + */ + function after(n, func) { + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that, when called, invokes `func` with the `this` + * binding of `thisArg` and prepends any additional `bind` arguments to those + * provided to the bound function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var func = function(greeting) { + * return greeting + ' ' + this.name; + * }; + * + * func = _.bind(func, { 'name': 'fred' }, 'hi'); + * func(); + * // => 'hi fred' + */ + function bind(func, thisArg) { + return arguments.length > 2 + ? createWrapper(func, 17, slice(arguments, 2), null, thisArg) + : createWrapper(func, 1, null, null, thisArg); + } + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all the function properties + * of `object` will be bound. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to + * bind, specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { console.log('clicked ' + this.label); } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs', when the button is clicked + */ + function bindAll(object) { + var funcs = arguments.length > 1 ? baseFlatten(arguments, true, false, 1) : functions(object), + index = -1, + length = funcs.length; + + while (++index < length) { + var key = funcs[index]; + object[key] = createWrapper(object[key], 1, null, null, object); + } + return object; + } + + /** + * Creates a function that, when called, invokes the method at `object[key]` + * and prepends any additional `bindKey` arguments to those provided to the bound + * function. This method differs from `_.bind` by allowing bound functions to + * reference methods that will be redefined or don't yet exist. + * See http://michaux.ca/articles/lazy-function-definition-pattern. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'name': 'fred', + * 'greet': function(greeting) { + * return greeting + ' ' + this.name; + * } + * }; + * + * var func = _.bindKey(object, 'greet', 'hi'); + * func(); + * // => 'hi fred' + * + * object.greet = function(greeting) { + * return greeting + 'ya ' + this.name + '!'; + * }; + * + * func(); + * // => 'hiya fred!' + */ + function bindKey(object, key) { + return arguments.length > 2 + ? createWrapper(key, 19, slice(arguments, 2), null, object) + : createWrapper(key, 3, null, null, object); + } + + /** + * Creates a function that is the composition of the provided functions, + * where each function consumes the return value of the function that follows. + * For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + * Each function is executed with the `this` binding of the composed function. + * + * @static + * @memberOf _ + * @category Functions + * @param {...Function} [func] Functions to compose. + * @returns {Function} Returns the new composed function. + * @example + * + * var realNameMap = { + * 'pebbles': 'penelope' + * }; + * + * var format = function(name) { + * name = realNameMap[name.toLowerCase()] || name; + * return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase(); + * }; + * + * var greet = function(formatted) { + * return 'Hiya ' + formatted + '!'; + * }; + * + * var welcome = _.compose(greet, format); + * welcome('pebbles'); + * // => 'Hiya Penelope!' + */ + function compose() { + var funcs = arguments, + length = funcs.length; + + while (length--) { + if (!isFunction(funcs[length])) { + throw new TypeError; + } + } + return function() { + var args = arguments, + length = funcs.length; + + while (length--) { + args = [funcs[length].apply(this, args)]; + } + return args[0]; + }; + } + + /** + * Creates a function which accepts one or more arguments of `func` that when + * invoked either executes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` can be specified + * if `func.length` is not sufficient. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {Function} Returns the new curried function. + * @example + * + * var curried = _.curry(function(a, b, c) { + * console.log(a + b + c); + * }); + * + * curried(1)(2)(3); + * // => 6 + * + * curried(1, 2)(3); + * // => 6 + * + * curried(1, 2, 3); + * // => 6 + */ + function curry(func, arity) { + arity = typeof arity == 'number' ? arity : (+arity || func.length); + return createWrapper(func, 4, null, null, null, arity); + } + + /** + * Creates a function that will delay the execution of `func` until after + * `wait` milliseconds have elapsed since the last time it was invoked. + * Provide an options object to indicate that `func` should be invoked on + * the leading and/or trailing edge of the `wait` timeout. Subsequent calls + * to the debounced function will return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * var lazyLayout = _.debounce(calculateLayout, 150); + * jQuery(window).on('resize', lazyLayout); + * + * // execute `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * }); + * + * // ensure `batchLog` is executed once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * source.addEventListener('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * }, false); + */ + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + wait = nativeMax(0, wait) || 0; + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = options.leading; + maxWait = 'maxWait' in options && (nativeMax(wait, options.maxWait) || 0); + trailing = 'trailing' in options ? options.trailing : trailing; + } + var delayed = function() { + var remaining = wait - (now() - stamp); + if (remaining <= 0) { + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + var isCalled = trailingCall; + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + } else { + timeoutId = setTimeout(delayed, remaining); + } + }; + + var maxDelayed = function() { + if (timeoutId) { + clearTimeout(timeoutId); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (trailing || (maxWait !== wait)) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + }; + + return function() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + return result; + }; + } + + /** + * Defers executing the `func` function until the current call stack has cleared. + * Additional arguments will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { console.log(text); }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + function defer(func) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 1); + return setTimeout(function() { func.apply(undefined, args); }, 1); + } + + /** + * Executes the `func` function after `wait` milliseconds. Additional arguments + * will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { console.log(text); }, 1000, 'later'); + * // => logs 'later' after one second + */ + function delay(func, wait) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 2); + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it will be used to determine the cache key for storing the result + * based on the arguments provided to the memoized function. By default, the + * first argument provided to the memoized function is used as the cache key. + * The `func` is executed with the `this` binding of the memoized function. + * The result cache is exposed as the `cache` property on the memoized function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] A function used to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var fibonacci = _.memoize(function(n) { + * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); + * }); + * + * fibonacci(9) + * // => 34 + * + * var data = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // modifying the result cache + * var get = _.memoize(function(name) { return data[name]; }, _.identity); + * get('pebbles'); + * // => { 'name': 'pebbles', 'age': 1 } + * + * get.cache.pebbles.name = 'penelope'; + * get('pebbles'); + * // => { 'name': 'penelope', 'age': 1 } + */ + function memoize(func, resolver) { + if (!isFunction(func)) { + throw new TypeError; + } + var memoized = function() { + var cache = memoized.cache, + key = resolver ? resolver.apply(this, arguments) : keyPrefix + arguments[0]; + + return hasOwnProperty.call(cache, key) + ? cache[key] + : (cache[key] = func.apply(this, arguments)); + } + memoized.cache = {}; + return memoized; + } + + /** + * Creates a function that is restricted to execute `func` once. Repeat calls to + * the function will return the value of the first call. The `func` is executed + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` executes `createApplication` once + */ + function once(func) { + var ran, + result; + + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (ran) { + return result; + } + ran = true; + result = func.apply(this, arguments); + + // clear the `func` variable so the function may be garbage collected + func = null; + return result; + }; + } + + /** + * Creates a function that, when called, invokes `func` with any additional + * `partial` arguments prepended to those provided to the new function. This + * method is similar to `_.bind` except it does **not** alter the `this` binding. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { return greeting + ' ' + name; }; + * var hi = _.partial(greet, 'hi'); + * hi('fred'); + * // => 'hi fred' + */ + function partial(func) { + return createWrapper(func, 16, slice(arguments, 1)); + } + + /** + * This method is like `_.partial` except that `partial` arguments are + * appended to those provided to the new function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var defaultsDeep = _.partialRight(_.merge, _.defaults); + * + * var options = { + * 'variable': 'data', + * 'imports': { 'jq': $ } + * }; + * + * defaultsDeep(options, _.templateSettings); + * + * options.variable + * // => 'data' + * + * options.imports + * // => { '_': _, 'jq': $ } + */ + function partialRight(func) { + return createWrapper(func, 32, null, slice(arguments, 1)); + } + + /** + * Creates a function that, when executed, will only call the `func` function + * at most once per every `wait` milliseconds. Provide an options object to + * indicate that `func` should be invoked on the leading and/or trailing edge + * of the `wait` timeout. Subsequent calls to the throttled function will + * return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * var throttled = _.throttle(updatePosition, 100); + * jQuery(window).on('scroll', throttled); + * + * // execute `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? options.leading : leading; + trailing = 'trailing' in options ? options.trailing : trailing; + } + debounceOptions.leading = leading; + debounceOptions.maxWait = wait; + debounceOptions.trailing = trailing; + + return debounce(func, wait, debounceOptions); + } + + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Additional arguments provided to the function are appended + * to those provided to the wrapper function. The wrapper is executed with + * the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('Fred, Wilma, & Pebbles'); + * // => '

Fred, Wilma, & Pebbles

' + */ + function wrap(value, wrapper) { + return createWrapper(wrapper, 16, [value]); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'name': 'fred' }; + * var getter = _.constant(object); + * getter() === object; + * // => true + */ + function constant(value) { + return function() { + return value; + }; + } + + /** + * Produces a callback bound to an optional `thisArg`. If `func` is a property + * name the created callback will return the property value for a given element. + * If `func` is an object the created callback will return `true` for elements + * that contain the equivalent object properties, otherwise it will return `false`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // wrap to create custom callback shorthands + * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { + * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); + * return !match ? func(callback, thisArg) : function(object) { + * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; + * }; + * }); + * + * _.filter(characters, 'age__gt38'); + * // => [{ 'name': 'fred', 'age': 40 }] + */ + function createCallback(func, thisArg, argCount) { + var type = typeof func; + if (func == null || type == 'function') { + return baseCreateCallback(func, thisArg, argCount); + } + // handle "_.pluck" style callback shorthands + if (type != 'object') { + return property(func); + } + var props = keys(func), + key = props[0], + a = func[key]; + + // handle "_.where" style callback shorthands + if (props.length == 1 && a === a && !isObject(a)) { + // fast path the common case of providing an object with a single + // property containing a primitive value + return function(object) { + var b = object[key]; + return a === b && (a !== 0 || (1 / a == 1 / b)); + }; + } + return function(object) { + var length = props.length, + result = false; + + while (length--) { + if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) { + break; + } + } + return result; + }; + } + + /** + * 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); + } + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'name': 'fred' }; + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + /** + * Adds function properties of a source object to the destination object. + * If `object` is a function methods will be added to its prototype as well. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Function|Object} [object=lodash] object The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options] The options object. + * @param {boolean} [options.chain=true] Specify whether the functions added are chainable. + * @example + * + * function capitalize(string) { + * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); + * } + * + * _.mixin({ 'capitalize': capitalize }); + * _.capitalize('fred'); + * // => 'Fred' + * + * _('fred').capitalize().value(); + * // => 'Fred' + * + * _.mixin({ 'capitalize': capitalize }, { 'chain': false }); + * _('fred').capitalize(); + * // => 'Fred' + */ + function mixin(object, source, options) { + var chain = true, + methodNames = source && functions(source); + + if (!source || (!options && !methodNames.length)) { + if (options == null) { + options = source; + } + ctor = lodashWrapper; + source = object; + object = lodash; + methodNames = functions(source); + } + if (options === false) { + chain = false; + } else if (isObject(options) && 'chain' in options) { + chain = options.chain; + } + var ctor = object, + isFunc = isFunction(ctor); + + forEach(methodNames, function(methodName) { + var func = object[methodName] = source[methodName]; + if (isFunc) { + ctor.prototype[methodName] = function() { + var chainAll = this.__chain__, + value = this.__wrapped__, + args = [value]; + + push.apply(args, arguments); + var result = func.apply(object, args); + if (chain || chainAll) { + if (value === result && isObject(result)) { + return this; + } + result = new ctor(result); + result.__chain__ = chainAll; + } + return result; + }; + } + }); + } + + /** + * Reverts the '_' variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @memberOf _ + * @category Utilities + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + context._ = oldDash; + return this; + } + + /** + * A no-operation function. + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var object = { 'name': 'fred' }; + * _.noop(object) === undefined; + * // => true + */ + function noop() { + // no operation performed + } + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var stamp = _.now(); + * _.defer(function() { console.log(_.now() - stamp); }); + * // => logs the number of milliseconds it took for the deferred function to be called + */ + var now = isNative(now = Date.now) && now || function() { + return new Date().getTime(); + }; + + /** + * Converts the given value into an integer of the specified radix. + * If `radix` is `undefined` or `0` a `radix` of `10` is used unless the + * `value` is a hexadecimal, in which case a `radix` of `16` is used. + * + * Note: This method avoids differences in native ES3 and ES5 `parseInt` + * implementations. See http://es5.github.io/#E. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. + * @example + * + * _.parseInt('08'); + * // => 8 + */ + var parseInt = nativeParseInt(whitespace + '08') == 8 ? nativeParseInt : function(value, radix) { + // Firefox < 21 and Opera < 15 follow the ES3 specified implementation of `parseInt` + return nativeParseInt(isString(value) ? value.replace(reLeadingSpacesAndZeros, '') : value, radix || 0); + }; + + /** + * Creates a "_.pluck" style function, which returns the `key` value of a + * given object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} key The name of the property to retrieve. + * @returns {Function} Returns the new function. + * @example + * + * var characters = [ + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 36 } + * ]; + * + * var getName = _.property('name'); + * + * _.map(characters, getName); + * // => ['barney', 'fred'] + * + * _.sortBy(characters, getName); + * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] + */ + function property(key) { + return function(object) { + return object[key]; + }; + } + + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number will be + * returned. If `floating` is truey or either `min` or `max` are floats a + * floating-point number will be returned instead of an integer. + * + * @static + * @memberOf _ + * @category Utilities + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating=false] Specify returning a floating-point number. + * @returns {number} Returns a random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(min, max, floating) { + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (typeof min == 'boolean' && noMax) { + floating = min; + min = 1; + } + else if (!noMax && typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand +'').length - 1)))), max); + } + return baseRandom(min, max); + } + + /** + * Resolves the value of property `key` on `object`. If `key` is a function + * it will be invoked with the `this` binding of `object` and its result returned, + * else the property value is returned. If `object` is falsey then `undefined` + * is returned. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to resolve. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { + * 'cheese': 'crumpets', + * 'stuff': function() { + * return 'nonsense'; + * } + * }; + * + * _.result(object, 'cheese'); + * // => 'crumpets' + * + * _.result(object, 'stuff'); + * // => 'nonsense' + */ + function result(object, key) { + if (object) { + var value = object[key]; + return isFunction(value) ? object[key]() : value; + } + } + + /** + * 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('<%- value %>', { 'value': '\n```\n\nUsing [`npm`](http://npmjs.org/):\n\n```bash\nnpm i --save lodash\n\n{sudo} npm i -g lodash\nnpm ln lodash\n```\n\nIn [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/):\n\n```js\nvar _ = require('lodash');\n// or as Underscore\nvar _ = require('lodash/dist/lodash.underscore');\n```\n\n**Notes:**\n * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL\n * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('lodash.js');\n```\n\nIn an AMD loader:\n\n```js\nrequire({\n 'packages': [\n { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }\n ]\n},\n['lodash'], function(_) {\n console.log(_.VERSION);\n});\n```\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\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", + "readmeFilename": "README.md", + "_id": "lodash@2.4.1", + "_from": "lodash@^2.4.1", + "scripts": {} +} diff --git a/node_modules/gulp-watch/node_modules/glob2base/package.json b/node_modules/gulp-watch/node_modules/glob2base/package.json index 68f6ecf..7892ea9 100644 --- a/node_modules/gulp-watch/node_modules/glob2base/package.json +++ b/node_modules/gulp-watch/node_modules/glob2base/package.json @@ -1,7 +1,7 @@ { "name": "glob2base", "description": "Extracts a base path from a node-glob instance", - "version": "0.0.9", + "version": "0.0.11", "homepage": "http://github.com/wearefractal/glob2base", "repository": { "type": "git", @@ -14,18 +14,25 @@ }, "main": "./index.js", "dependencies": { - "lodash.findindex": "^2.4.1" + "lodash": "^2.4.1" }, "devDependencies": { - "mocha": "^1.17.1", - "should": "^4.0.0", - "glob": "^4.0.0" + "coveralls": "^2.6.1", + "istanbul": "^0.2.3", + "jshint": "^2.4.1", + "jshint-stylish": "^0.2.0", + "mocha": "^1.17.0", + "mocha-lcov-reporter": "^0.0.1", + "glob": "^4.0.0", + "should": "^4.0.0" }, "scripts": { - "test": "mocha" + "lint": "jshint index.js --reporter node_modules/jshint-stylish/stylish.js --exclude node_modules", + "test": "npm run-script lint && mocha --reporter spec", + "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" }, "engines": { - "node": ">= 0.4.0" + "node": ">= 0.10" }, "licenses": [ { @@ -33,14 +40,14 @@ "url": "http://github.com/wearefractal/glob2base/raw/master/LICENSE" } ], - "gitHead": "96122493b535a221ee2e8b833d971b21fddd88db", + "gitHead": "ad402068aa76041bd7ced8144969e544c2ba6dec", "bugs": { "url": "https://github.com/wearefractal/glob2base/issues" }, - "_id": "glob2base@0.0.9", - "_shasum": "50a7bb1fc1260e1eb5ba1b136003569a1fe57f98", + "_id": "glob2base@0.0.11", + "_shasum": "e56904ae5292c2d9cefbc5b97f419614fb56b660", "_from": "glob2base@~0.0.8", - "_npmVersion": "1.4.13", + "_npmVersion": "1.5.0-alpha-1", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -52,10 +59,10 @@ } ], "dist": { - "shasum": "50a7bb1fc1260e1eb5ba1b136003569a1fe57f98", - "tarball": "http://registry.npmjs.org/glob2base/-/glob2base-0.0.9.tgz" + "shasum": "e56904ae5292c2d9cefbc5b97f419614fb56b660", + "tarball": "http://registry.npmjs.org/glob2base/-/glob2base-0.0.11.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.9.tgz", + "_resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.11.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/from/package.json b/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/from/package.json index b2f62ee..e11626a 100644 --- a/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/from/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/from/package.json @@ -48,5 +48,9 @@ ], "directories": {}, "_shasum": "ef63ac2062ac32acf7862e0d40b44b896f22f3bc", - "_resolved": "https://registry.npmjs.org/from/-/from-0.1.3.tgz" + "_resolved": "https://registry.npmjs.org/from/-/from-0.1.3.tgz", + "bugs": { + "url": "https://github.com/dominictarr/from/issues" + }, + "homepage": "https://github.com/dominictarr/from" } diff --git a/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/pause-stream/package.json b/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/pause-stream/package.json index 0199333..6f27cd7 100644 --- a/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/pause-stream/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/pause-stream/package.json @@ -59,5 +59,6 @@ } ], "_shasum": "fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445", - "_resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz" + "_resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "homepage": "https://github.com/dominictarr/pause-stream" } diff --git a/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/split/package.json b/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/split/package.json index 78f8e19..02464ee 100644 --- a/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/split/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/split/package.json @@ -51,5 +51,6 @@ ], "directories": {}, "_shasum": "67097c601d697ce1368f418f06cd201cf0521a57", - "_resolved": "https://registry.npmjs.org/split/-/split-0.2.10.tgz" + "_resolved": "https://registry.npmjs.org/split/-/split-0.2.10.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/stream-combiner/package.json b/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/stream-combiner/package.json index 584c45d..9bb32e7 100644 --- a/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/stream-combiner/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/node_modules/stream-combiner/package.json @@ -45,5 +45,6 @@ ], "directories": {}, "_shasum": "4d5e433c185261dde623ca3f44c586bcf5c4ad14", - "_resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz" + "_resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/package.json b/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/package.json index a885e70..9ff0f72 100644 --- a/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-batch/node_modules/event-stream/package.json @@ -75,5 +75,6 @@ "tarball": "http://registry.npmjs.org/event-stream/-/event-stream-3.1.7.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.1.7.tgz" + "_resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.1.7.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/README.md b/node_modules/gulp-watch/node_modules/gulp-util/README.md index a8d9b19..bc57626 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/README.md +++ b/node_modules/gulp-watch/node_modules/gulp-util/README.md @@ -64,9 +64,9 @@ This is just [vinyl](https://github.com/wearefractal/vinyl) ```javascript var file = new gutil.File({ - base: join(__dirname, './fixtures/'), + base: path.join(__dirname, './fixtures/'), cwd: __dirname, - path: join(__dirname, './fixtures/test.coffee') + path: path.join(__dirname, './fixtures/test.coffee') }); ``` @@ -109,6 +109,7 @@ gulp.src('stuff/*.js') - 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. - Note that if you pass in a custom stack string you need to include the message along with that. +- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options. These are all acceptable forms of instantiation: diff --git a/node_modules/gulp-watch/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-watch/node_modules/gulp-util/lib/PluginError.js index 6640346..0cdabd3 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/lib/PluginError.js +++ b/node_modules/gulp-watch/node_modules/gulp-util/lib/PluginError.js @@ -1,21 +1,31 @@ var util = require('util'); var colors = require('./colors'); +var _ = require('lodash'); + +var nonEnumberableProperties = ['name', 'message', 'stack']; +var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']); // 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.error = message; - opt.plugin = plugin; - } else if (typeof message === 'object') { - opt = message; - opt.plugin = plugin; - } else if (typeof opt === 'object') { + } else { + if (message instanceof Error) { + opt.error = message; + } else if (typeof message === 'object') { + opt = message; + } else { + opt.message = message; + } opt.plugin = plugin; - opt.message = message; } + + _.defaults(opt, { + showStack: false, + showProperties: true + }) + return opt; }; @@ -26,18 +36,17 @@ function PluginError(plugin, message, opt) { var options = parseOptions(plugin, message, opt); - this.plugin = options.plugin; - this.showStack = options.showStack === true; - - var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack']; - // if options has an error, grab details from it if (options.error) { - properties.forEach(function(prop) { - if (prop in options.error) this[prop] = options.error[prop]; - }, this); + // These properties are not enumerable, so we have to add them explicitly. + _.uniq(Object.keys(options.error).concat(nonEnumberableProperties)) + .forEach(function(prop) { + this[prop] = options.error[prop]; + }, this); } + var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin']; + // options object can override properties.forEach(function(prop) { if (prop in options) this[prop] = options[prop]; @@ -46,8 +55,18 @@ function PluginError(plugin, message, opt) { // 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.stack) { + // Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to. + // Since we are using our own toString method which controls when to display the stack trace if we don't go through this + // safety object, then we'll get stack overflow problems. + var safety = { + toString: function() { + return this._messageWithDetails() + '\nStack:'; + }.bind(this) + }; + Error.captureStackTrace(safety, arguments.callee || this.constructor); + this.__safety = safety; + } if (!this.plugin) throw new Error('Missing plugin name'); if (!this.message) throw new Error('Missing error message'); @@ -55,9 +74,46 @@ function PluginError(plugin, message, opt) { util.inherits(PluginError, Error); +PluginError.prototype._messageWithDetails = function() { + var messageWithDetails = 'Message:\n ' + this.message; + var details = this._messageDetails(); + + if (details !== '') { + messageWithDetails += '\n' + details; + } + + return messageWithDetails; +}; + +PluginError.prototype._messageDetails = function() { + var properties; + if (this.showProperties) { + var properties = _(Object.keys(this)) + .filter(function(prop) { return propertiesNotToDisplay.indexOf(prop) === -1; }) + .map(function(prop) { return '\n ' + prop + ': ' + this[prop]; }, this) + .reduce(function(properties, next) { return properties + next; }); + } + return properties === undefined ? '' : ('Details:' + properties) +}; + PluginError.prototype.toString = function () { - var sig = this.name+' in plugin \''+colors.cyan(this.plugin)+'\''; - var msg = this.showStack ? (this._stack || this.stack) : this.message; + var sig = colors.red(this.name) + ' in plugin \'' + colors.cyan(this.plugin) + '\''; + var detailsWithStack = function(stack) { + return this._messageWithDetails() + '\nStack:\n' + stack; + }.bind(this); + + if (this.showStack) { + if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor + msg = this.__safety.stack; + } else if (this._stack) { + msg = detailsWithStack(this._stack); + } else { // Stack from wrapped error + msg = detailsWithStack(this.stack); + } + } else { + msg = this._messageWithDetails(); + } + return sig+'\n'+msg; }; diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/dateformat/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/dateformat/package.json index e5a5076..cba6827 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/dateformat/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/dateformat/package.json @@ -56,5 +56,6 @@ "directories": {}, "_shasum": "5d60c5d574dc778a7f98139156c6cfc9d851d1e7", "_resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.8-1.2.3.tgz", - "readme": "ERROR: No README data found!" + "readme": "ERROR: No README data found!", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json index 0836ea4..7e5167c 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "4f1227aa5a8711fc632f5b07a1f4607aab8b3222", - "_resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json index 3710c16..e1ed1c6 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "ecfe22618a2ade50bfeea43937e51df66f0edb72", - "_resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/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-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json index e35b071..70fc63a 100644 --- a/node_modules/gulp-watch/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-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb", - "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json index f61df3b..20a946e 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json @@ -74,5 +74,6 @@ ], "directories": {}, "_shasum": "df67c3bb6b7e8e1e831ab48bfa0795b92afe899d", - "_resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/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-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json index e35b071..70fc63a 100644 --- a/node_modules/gulp-watch/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-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb", - "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json index a0ddcbf..f1d77c5 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json @@ -75,5 +75,6 @@ ], "directories": {}, "_shasum": "747c4fc40103eb3bb8a0976e571f7a2659e93ba7", - "_resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json index a88e9fb..5c9869f 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json @@ -83,5 +83,6 @@ ], "directories": {}, "_shasum": "2ce12c5e084db0a57dda5e5d1eeeb9f5d175a3b4", - "_resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json index b954830..0dadd03 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json @@ -41,6 +41,6 @@ "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", + "_from": "lodash._isnative@~2.4.1", "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json index 2741238..639cba4 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json @@ -82,5 +82,6 @@ ], "directories": {}, "_shasum": "ea76c75d11eb86d4dbe89a83893bb861929ac699", - "_resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json index 679515e..620268c 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json @@ -81,5 +81,6 @@ ], "directories": {}, "_shasum": "abf514436b3cb705001627978cbcf30b1280eea4", - "_resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/package.json index f2a918e..6c1728e 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash.template/package.json @@ -87,5 +87,6 @@ ], "directories": {}, "_shasum": "9e611007edf629129a974ab3c48b817b3e1cf20d", - "_resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/LICENSE.txt b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/LICENSE.txt similarity index 100% rename from node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/LICENSE.txt rename to node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/LICENSE.txt diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/README.md b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/README.md new file mode 100644 index 0000000..6f9598e --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/README.md @@ -0,0 +1,163 @@ +# Lo-Dash v2.4.1 +A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features). + +## Download + +Check out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences]) for details over the differences between builds. + +* Modern builds perfect for newer browsers/environments:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.min.js) + +* Compatibility builds for older environment support too:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.min.js) + +* Underscore builds to use as a drop-in replacement:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.min.js) + +CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed. + +Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method. + +## Dive in + +There’s plenty of **[documentation](http://lodash.com/docs)**, [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).
+Check out DevDocs as a fast, organized, & searchable interface for our documentation. + +The full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).
+A list of upcoming features is available on our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap). + +## Features *not* in Underscore + + * AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.) + * [_(…)](http://lodash.com/docs#_) supports intuitive chaining + * [_.at](http://lodash.com/docs#at) for cherry-picking collection values + * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.constant](http://lodash.com/docs#constant) & [_.property](http://lodash.com/docs#property) function generators for composing functions + * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` + * [_.create](http://lodash.com/docs#create) for easier object inheritance + * [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins + * [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions + * [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control + * [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys + * [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early + * [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties + * [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties + * [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object` + * [_.mapValues](http://lodash.com/docs#mapValues) for [mapping](http://lodash.com/docs#map) values to an object + * [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions + * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend) + * [_.noop](http://lodash.com/docs#noop) for function placeholders + * [_.now](http://lodash.com/docs#now) as a cross-browser `Date.now` alternative + * [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior + * [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays + * [_.random](http://lodash.com/docs#random) supports returning floating-point numbers + * [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking + * [_.sortBy](http://lodash.com/docs#sortBy) supports sorting by multiple properties + * [_.support](http://lodash.com/docs#support) for flagging environment features + * [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals) + * [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects + * [_.where](http://lodash.com/docs#where) supports deep object comparisons + * [_.xor](http://lodash.com/docs#xor) as a companion to [_.difference](http://lodash.com/docs#difference), [_.intersection](http://lodash.com/docs#intersection), & [_.union](http://lodash.com/docs#union) + * [_.zip](http://lodash.com/docs#zip) is capable of unzipping values + * [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), & + [more](http://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks + * [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), & + [more](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings + * [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), & + [more](http://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands + * [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), & + [more](http://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight") right-associative methods + +## Resources + + * Podcasts + - [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/) + + * Posts + - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/) + - [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/) + + * Videos + - [Introduction](https://vimeo.com/44154599) + - [Origins](https://vimeo.com/44154600) + - [Optimizations & builds](https://vimeo.com/44154601) + - [Native method use](https://vimeo.com/48576012) + - [Testing](https://vimeo.com/45865290) + - [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk) + + A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources). + +## Support + +Tested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.21~0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
+Automated browser test results [are available](https://saucelabs.com/u/lodash) as well as [Travis CI](https://travis-ci.org/) builds for [lodash](https://travis-ci.org/lodash/lodash/), [lodash-cli](https://travis-ci.org/lodash/lodash-cli/), [lodash-amd](https://travis-ci.org/lodash/lodash-amd/), [lodash-node](https://travis-ci.org/lodash/lodash-node/), & [grunt-lodash](https://travis-ci.org/lodash/grunt-lodash). + +Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
+[![Sauce Labs](http://lodash.com/_img/sauce.png)](https://saucelabs.com/ "Sauce Labs: Selenium Testing & More") + +## Installation & usage + +In browsers: + +```html + +``` + +Using [`npm`](http://npmjs.org/): + +```bash +npm i --save lodash + +{sudo} npm i -g lodash +npm ln lodash +``` + +In [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/): + +```js +var _ = require('lodash'); +// or as Underscore +var _ = require('lodash/dist/lodash.underscore'); +``` + +**Notes:** + * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL + * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it + +In [Rhino](http://www.mozilla.org/rhino/): + +```js +load('lodash.js'); +``` + +In an AMD loader: + +```js +require({ + 'packages': [ + { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' } + ] +}, +['lodash'], function(_) { + console.log(_.VERSION); +}); +``` + +## 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/) | + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js new file mode 100644 index 0000000..23798ba --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js @@ -0,0 +1,7157 @@ +/** + * @license + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash -o ./dist/lodash.compat.js` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre ES5 environments */ + var undefined; + + /** Used to pool arrays and objects used internally */ + var arrayPool = [], + objectPool = []; + + /** Used to generate unique IDs */ + var idCounter = 0; + + /** Used internally to indicate various things */ + var indicatorObject = {}; + + /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */ + var keyPrefix = +new Date + ''; + + /** Used as the size when optimizations are enabled for large arrays */ + var largeArraySize = 75; + + /** Used as the max size of the `arrayPool` and `objectPool` */ + var maxPoolSize = 40; + + /** Used to detect and test whitespace */ + var whitespace = ( + // whitespace + ' \t\x0B\f\xA0\ufeff' + + + // line terminators + '\n\r\u2028\u2029' + + + // unicode category "Zs" space separators + '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' + ); + + /** 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 match regexp flags from their coerced string values */ + var reFlags = /\w*$/; + + /** Used to detected named functions */ + var reFuncName = /^\s*function[ \n\r\t]+\w/; + + /** Used to match "interpolate" template delimiters */ + var reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match leading whitespace and zeros to be removed */ + var reLeadingSpacesAndZeros = RegExp('^[' + whitespace + ']*0+(?=.$)'); + + /** Used to ensure capturing order of template delimiters */ + var reNoMatch = /($^)/; + + /** Used to detect functions containing a `this` reference */ + var reThis = /\bthis\b/; + + /** Used to match unescaped characters in compiled string literals */ + var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; + + /** Used to assign default `context` object properties */ + var contextProps = [ + 'Array', 'Boolean', 'Date', 'Error', 'Function', 'Math', 'Number', 'Object', + 'RegExp', 'String', '_', 'attachEvent', 'clearTimeout', 'isFinite', 'isNaN', + 'parseInt', 'setTimeout' + ]; + + /** Used to fix the JScript [[DontEnum]] bug */ + var shadowedProps = [ + 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', + 'toLocaleString', 'toString', 'valueOf' + ]; + + /** Used to make template sourceURLs easier to identify */ + var templateCounter = 0; + + /** `Object#toString` result shortcuts */ + var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + boolClass = '[object Boolean]', + dateClass = '[object Date]', + errorClass = '[object Error]', + funcClass = '[object Function]', + numberClass = '[object Number]', + objectClass = '[object Object]', + regexpClass = '[object RegExp]', + stringClass = '[object String]'; + + /** Used to identify object classifications that `_.clone` supports */ + var cloneableClasses = {}; + cloneableClasses[funcClass] = false; + cloneableClasses[argsClass] = cloneableClasses[arrayClass] = + cloneableClasses[boolClass] = cloneableClasses[dateClass] = + cloneableClasses[numberClass] = cloneableClasses[objectClass] = + cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true; + + /** Used as an internal `_.debounce` options object */ + var debounceOptions = { + 'leading': false, + 'maxWait': 0, + 'trailing': false + }; + + /** Used as the property descriptor for `__bindData__` */ + var descriptor = { + 'configurable': false, + 'enumerable': false, + 'value': null, + 'writable': false + }; + + /** Used as the data object for `iteratorTemplate` */ + var iteratorData = { + 'args': '', + 'array': null, + 'bottom': '', + 'firstArg': '', + 'init': '', + 'keys': null, + 'loop': '', + 'shadowedProps': null, + 'support': null, + 'top': '', + 'useHas': false + }; + + /** 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 + }; + + /** Used to escape characters for inclusion in compiled string literals */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\t': 't', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Used as a reference to the global object */ + var root = (objectTypes[typeof window] && window) || this; + + /** Detect free variable `exports` */ + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports` */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + + /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ + var freeGlobal = objectTypes[typeof global] && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.indexOf` without support for binary searches + * or `fromIndex` constraints. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * An implementation of `_.contains` for cache objects that mimics the return + * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var type = typeof value; + cache = cache.cache; + + if (type == 'boolean' || value == null) { + return cache[value] ? 0 : -1; + } + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value; + cache = (cache = cache[type]) && cache[key]; + + return type == 'object' + ? (cache && baseIndexOf(cache, value) > -1 ? 0 : -1) + : (cache ? 0 : -1); + } + + /** + * Adds a given value to the corresponding cache object. + * + * @private + * @param {*} value The value to add to the cache. + */ + function cachePush(value) { + var cache = this.cache, + type = typeof value; + + if (type == 'boolean' || value == null) { + cache[value] = true; + } else { + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value, + typeCache = cache[type] || (cache[type] = {}); + + if (type == 'object') { + (typeCache[key] || (typeCache[key] = [])).push(value); + } else { + typeCache[key] = true; + } + } + } + + /** + * Used by `_.max` and `_.min` as the default callback when a given + * collection is a string value. + * + * @private + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. + */ + function charAtCallback(value) { + return value.charCodeAt(0); + } + + /** + * Used by `sortBy` to compare transformed `collection` elements, stable sorting + * them in ascending order. + * + * @private + * @param {Object} a The object to compare to `b`. + * @param {Object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. + */ + function compareAscending(a, b) { + var ac = a.criteria, + bc = b.criteria, + index = -1, + length = ac.length; + + while (++index < length) { + var value = ac[index], + other = bc[index]; + + if (value !== other) { + if (value > other || typeof value == 'undefined') { + return 1; + } + if (value < other || typeof other == 'undefined') { + return -1; + } + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to return the same value for + // `a` and `b`. See https://github.com/jashkenas/underscore/pull/1247 + // + // This also ensures a stable sort in V8 and other engines. + // See http://code.google.com/p/v8/issues/detail?id=90 + return a.index - b.index; + } + + /** + * Creates a cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [array=[]] The array to search. + * @returns {null|Object} Returns the cache object or `null` if caching should not be used. + */ + function createCache(array) { + var index = -1, + length = array.length, + first = array[0], + mid = array[(length / 2) | 0], + last = array[length - 1]; + + if (first && typeof first == 'object' && + mid && typeof mid == 'object' && last && typeof last == 'object') { + return false; + } + var cache = getObject(); + cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false; + + var result = getObject(); + result.array = array; + result.cache = cache; + result.push = cachePush; + + while (++index < length) { + result.push(array[index]); + } + return result; + } + + /** + * 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]; + } + + /** + * Gets an array from the array pool or creates a new one if the pool is empty. + * + * @private + * @returns {Array} The array from the pool. + */ + function getArray() { + return arrayPool.pop() || []; + } + + /** + * Gets an object from the object pool or creates a new one if the pool is empty. + * + * @private + * @returns {Object} The object from the pool. + */ + function getObject() { + return objectPool.pop() || { + 'array': null, + 'cache': null, + 'criteria': null, + 'false': false, + 'index': 0, + 'null': false, + 'number': null, + 'object': null, + 'push': null, + 'string': null, + 'true': false, + 'undefined': false, + 'value': null + }; + } + + /** + * Checks if `value` is a DOM node in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM node, else `false`. + */ + function isNode(value) { + // IE < 9 presents DOM nodes as `Object` objects except they have `toString` + // methods that are `typeof` "string" and still can coerce nodes to strings + return typeof value.toString != 'function' && typeof (value + '') == 'string'; + } + + /** + * Releases the given array back to the array pool. + * + * @private + * @param {Array} [array] The array to release. + */ + function releaseArray(array) { + array.length = 0; + if (arrayPool.length < maxPoolSize) { + arrayPool.push(array); + } + } + + /** + * Releases the given object back to the object pool. + * + * @private + * @param {Object} [object] The object to release. + */ + function releaseObject(object) { + var cache = object.cache; + if (cache) { + releaseObject(cache); + } + object.array = object.cache = object.criteria = object.object = object.number = object.string = object.value = null; + if (objectPool.length < maxPoolSize) { + objectPool.push(object); + } + } + + /** + * Slices the `collection` from the `start` index up to, but not including, + * the `end` index. + * + * Note: This function is used instead of `Array#slice` to support node lists + * in IE < 9 and to ensure dense arrays are returned. + * + * @private + * @param {Array|Object|string} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {Array} Returns the new array. + */ + function slice(array, start, end) { + start || (start = 0); + if (typeof end == 'undefined') { + end = array ? array.length : 0; + } + var index = -1, + length = end - start || 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = array[start + index]; + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new `lodash` function using the given context object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} [context=root] The context object. + * @returns {Function} Returns the `lodash` function. + */ + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See http://es5.github.io/#x11.1.5. + context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; + + /** Native constructor references */ + var Array = context.Array, + Boolean = context.Boolean, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ + var arrayRef = []; + + /** Used for native method references */ + var errorProto = Error.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + + /** Used to restore the original `_` reference in `noConflict` */ + var oldDash = context._; + + /** 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, '.*?') + '$' + ); + + /** Native method shortcuts */ + var ceil = Math.ceil, + clearTimeout = context.clearTimeout, + floor = Math.floor, + fnToString = Function.prototype.toString, + getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf, + hasOwnProperty = objectProto.hasOwnProperty, + push = arrayRef.push, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + setTimeout = context.setTimeout, + splice = arrayRef.splice, + unshift = arrayRef.unshift; + + /** Used to set meta data on functions */ + var defineProperty = (function() { + // IE 8 only accepts DOM elements + try { + var o = {}, + func = isNative(func = Object.defineProperty) && func, + result = func(o, o, o) && func; + } catch(e) { } + return result; + }()); + + /* Native method shortcuts for methods with the same name as other `lodash` methods */ + var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate, + nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray, + nativeIsFinite = context.isFinite, + nativeIsNaN = context.isNaN, + nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys, + nativeMax = Math.max, + nativeMin = Math.min, + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + + /** Used to lookup a built-in constructor by [[Class]] */ + var ctorByClass = {}; + ctorByClass[arrayClass] = Array; + ctorByClass[boolClass] = Boolean; + ctorByClass[dateClass] = Date; + ctorByClass[funcClass] = Function; + ctorByClass[objectClass] = Object; + ctorByClass[numberClass] = Number; + ctorByClass[regexpClass] = RegExp; + ctorByClass[stringClass] = String; + + /** Used to avoid iterating non-enumerable properties in IE < 9 */ + var nonEnumProps = {}; + nonEnumProps[arrayClass] = nonEnumProps[dateClass] = nonEnumProps[numberClass] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; + nonEnumProps[boolClass] = nonEnumProps[stringClass] = { 'constructor': true, 'toString': true, 'valueOf': true }; + nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true }; + nonEnumProps[objectClass] = { 'constructor': true }; + + (function() { + var length = shadowedProps.length; + while (length--) { + var key = shadowedProps[length]; + for (var className in nonEnumProps) { + if (hasOwnProperty.call(nonEnumProps, className) && !hasOwnProperty.call(nonEnumProps[className], key)) { + nonEnumProps[className][key] = false; + } + } + } + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps the given value to enable intuitive + * method chaining. + * + * In addition to Lo-Dash methods, wrappers also have the following `Array` methods: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, + * and `unshift` + * + * Chaining is supported in custom builds as long as the `value` method is + * implicitly or explicitly included in the build. + * + * The chainable wrapper functions are: + * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, + * `compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`, + * `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, + * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`, + * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, + * `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, + * `union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, + * and `zip` + * + * The non-chainable wrapper functions are: + * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`, + * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, + * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, + * `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, + * `template`, `unescape`, `uniqueId`, and `value` + * + * The wrapper functions `first` and `last` return wrapped values when `n` is + * provided, otherwise they return unwrapped values. + * + * Explicit chaining can be enabled by using the `_.chain` method. + * + * @name _ + * @constructor + * @category Chaining + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(num) { + * return num * num; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + // don't wrap if already wrapped, even if wrapped by a different `lodash` constructor + return (value && typeof value == 'object' && !isArray(value) && hasOwnProperty.call(value, '__wrapped__')) + ? value + : new lodashWrapper(value); + } + + /** + * A fast path for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {Object} Returns a `lodash` instance. + */ + function lodashWrapper(value, chainAll) { + this.__chain__ = !!chainAll; + this.__wrapped__ = value; + } + // ensure `new lodashWrapper` is an instance of `lodash` + lodashWrapper.prototype = lodash.prototype; + + /** + * An object used to flag environments features. + * + * @static + * @memberOf _ + * @type Object + */ + var support = lodash.support = {}; + + (function() { + var ctor = function() { this.x = 1; }, + object = { '0': 1, 'length': 1 }, + props = []; + + ctor.prototype = { 'valueOf': 1, 'y': 1 }; + for (var key in new ctor) { props.push(key); } + for (key in arguments) { } + + /** + * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.argsClass = toString.call(arguments) == argsClass; + + /** + * Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5). + * + * @memberOf _.support + * @type boolean + */ + support.argsObject = arguments.constructor == Object && !(arguments instanceof Array); + + /** + * Detect if `name` or `message` properties of `Error.prototype` are + * enumerable by default. (IE < 9, Safari < 5.1) + * + * @memberOf _.support + * @type boolean + */ + support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); + + /** + * Detect if `prototype` properties are enumerable by default. + * + * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 + * (if the prototype or a property on the prototype has been set) + * incorrectly sets a function's `prototype` property [[Enumerable]] + * value to `true`. + * + * @memberOf _.support + * @type boolean + */ + support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); + + /** + * Detect if functions can be decompiled by `Function#toString` + * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). + * + * @memberOf _.support + * @type boolean + */ + support.funcDecomp = !isNative(context.WinRTError) && reThis.test(runInContext); + + /** + * Detect if `Function#name` is supported (all but IE). + * + * @memberOf _.support + * @type boolean + */ + support.funcNames = typeof Function.name == 'string'; + + /** + * Detect if `arguments` object indexes are non-enumerable + * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumArgs = key != 0; + + /** + * Detect if properties shadowing those on `Object.prototype` are non-enumerable. + * + * In IE < 9 an objects own properties, shadowing non-enumerable ones, are + * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumShadows = !/valueOf/.test(props); + + /** + * Detect if own properties are iterated after inherited properties (all but IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.ownLast = props[0] != 'x'; + + /** + * Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. + * + * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` + * and `splice()` functions that fail to remove the last element, `value[0]`, + * of array-like objects even though the `length` property is set to `0`. + * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` + * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. + * + * @memberOf _.support + * @type boolean + */ + support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); + + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index and IE 8 can only access + * characters by index on string literals. + * + * @memberOf _.support + * @type boolean + */ + support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; + + /** + * Detect if a DOM node's [[Class]] is resolvable (all but IE < 9) + * and that the JS engine errors when attempting to coerce an object to + * a string without a `toString` function. + * + * @memberOf _.support + * @type boolean + */ + try { + support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); + } catch(e) { + support.nodeClass = true; + } + }(1)); + + /** + * 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 + */ + lodash.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 + */ + '_': lodash + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The template used to create iterator functions. + * + * @private + * @param {Object} data The data object used to populate the text. + * @returns {string} Returns the interpolated text. + */ + var iteratorTemplate = function(obj) { + + var __p = 'var index, iterable = ' + + (obj.firstArg) + + ', result = ' + + (obj.init) + + ';\nif (!iterable) return result;\n' + + (obj.top) + + ';'; + if (obj.array) { + __p += '\nvar length = iterable.length; index = -1;\nif (' + + (obj.array) + + ') { '; + if (support.unindexedChars) { + __p += '\n if (isString(iterable)) {\n iterable = iterable.split(\'\')\n } '; + } + __p += '\n while (++index < length) {\n ' + + (obj.loop) + + ';\n }\n}\nelse { '; + } else if (support.nonEnumArgs) { + __p += '\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += \'\';\n ' + + (obj.loop) + + ';\n }\n } else { '; + } + + if (support.enumPrototypes) { + __p += '\n var skipProto = typeof iterable == \'function\';\n '; + } + + if (support.enumErrorProps) { + __p += '\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n '; + } + + var conditions = []; if (support.enumPrototypes) { conditions.push('!(skipProto && index == "prototype")'); } if (support.enumErrorProps) { conditions.push('!(skipErrorProps && (index == "message" || index == "name"))'); } + + if (obj.useHas && obj.keys) { + __p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n'; + if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + } else { + __p += '\n for (index in iterable) {\n'; + if (obj.useHas) { conditions.push("hasOwnProperty.call(iterable, index)"); } if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + if (support.nonEnumShadows) { + __p += '\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n '; + for (k = 0; k < 7; k++) { + __p += '\n index = \'' + + (obj.shadowedProps[k]) + + '\';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))'; + if (!obj.useHas) { + __p += ' || (!nonEnum[index] && iterable[index] !== objectProto[index])'; + } + __p += ') {\n ' + + (obj.loop) + + ';\n } '; + } + __p += '\n } '; + } + + } + + if (obj.array || support.nonEnumArgs) { + __p += '\n}'; + } + __p += + (obj.bottom) + + ';\nreturn result'; + + return __p + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.bind` that creates the bound function and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new bound function. + */ + function baseBind(bindData) { + var func = bindData[0], + partialArgs = bindData[2], + thisArg = bindData[4]; + + function bound() { + // `Function#bind` spec + // http://es5.github.io/#x15.3.4.5 + if (partialArgs) { + // avoid `arguments` object deoptimizations by using `slice` instead + // of `Array.prototype.slice.call` and not assigning `arguments` to a + // variable as a ternary expression + var args = slice(partialArgs); + push.apply(args, arguments); + } + // mimic the constructor's `return` behavior + // http://es5.github.io/#x13.2.2 + if (this instanceof bound) { + // ensure `new bound` is an instance of `func` + var thisBinding = baseCreate(func.prototype), + result = func.apply(thisBinding, args || arguments); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisArg, args || arguments); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.clone` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, callback, stackA, stackB) { + if (callback) { + var result = callback(value); + if (typeof result != 'undefined') { + return result; + } + } + // inspect [[Class]] + var isObj = isObject(value); + if (isObj) { + var className = toString.call(value); + if (!cloneableClasses[className] || (!support.nodeClass && isNode(value))) { + return value; + } + var ctor = ctorByClass[className]; + switch (className) { + case boolClass: + case dateClass: + return new ctor(+value); + + case numberClass: + case stringClass: + return new ctor(value); + + case regexpClass: + result = ctor(value.source, reFlags.exec(value)); + result.lastIndex = value.lastIndex; + return result; + } + } else { + return value; + } + var isArr = isArray(value); + if (isDeep) { + // check for circular references and return corresponding clone + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + result = isArr ? ctor(value.length) : {}; + } + else { + result = isArr ? slice(value) : assign({}, value); + } + // add array properties assigned by `RegExp#exec` + if (isArr) { + if (hasOwnProperty.call(value, 'index')) { + result.index = value.index; + } + if (hasOwnProperty.call(value, 'input')) { + result.input = value.input; + } + } + // exit for shallow clone + if (!isDeep) { + return result; + } + // add the source value to the stack of traversed objects + // and associate it with its clone + stackA.push(value); + stackB.push(result); + + // recursively populate clone (susceptible to call stack limits) + (isArr ? baseEach : forOwn)(value, function(objValue, key) { + result[key] = baseClone(objValue, isDeep, callback, stackA, stackB); + }); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + function baseCreate(prototype, properties) { + return isObject(prototype) ? nativeCreate(prototype) : {}; + } + // fallback for browsers without `Object.create` + if (!nativeCreate) { + baseCreate = (function() { + function Object() {} + return function(prototype) { + if (isObject(prototype)) { + Object.prototype = prototype; + var result = new Object; + Object.prototype = null; + } + return result || context.Object(); + }; + }()); + } + + /** + * The base implementation of `_.createCallback` without support for creating + * "_.pluck" or "_.where" style callbacks. + * + * @private + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + */ + function baseCreateCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + // exit early for no `thisArg` or already bound by `Function#bind` + if (typeof thisArg == 'undefined' || !('prototype' in func)) { + return func; + } + var bindData = func.__bindData__; + if (typeof bindData == 'undefined') { + if (support.funcNames) { + bindData = !func.name; + } + bindData = bindData || !support.funcDecomp; + if (!bindData) { + var source = fnToString.call(func); + if (!support.funcNames) { + bindData = !reFuncName.test(source); + } + if (!bindData) { + // checks if `func` references the `this` keyword and stores the result + bindData = reThis.test(source); + setBindData(func, bindData); + } + } + } + // exit early if there are no `this` references or `func` is bound + if (bindData === false || (bindData !== true && bindData[1] & 1)) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 2: return function(a, b) { + return func.call(thisArg, a, b); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + } + return bind(func, thisArg); + } + + /** + * The base implementation of `createWrapper` that creates the wrapper and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new function. + */ + function baseCreateWrapper(bindData) { + var func = bindData[0], + bitmask = bindData[1], + partialArgs = bindData[2], + partialRightArgs = bindData[3], + thisArg = bindData[4], + arity = bindData[5]; + + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + key = func; + + function bound() { + var thisBinding = isBind ? thisArg : this; + if (partialArgs) { + var args = slice(partialArgs); + push.apply(args, arguments); + } + if (partialRightArgs || isCurry) { + args || (args = slice(arguments)); + if (partialRightArgs) { + push.apply(args, partialRightArgs); + } + if (isCurry && args.length < arity) { + bitmask |= 16 & ~32; + return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]); + } + } + args || (args = arguments); + if (isBindKey) { + func = thisBinding[key]; + } + if (this instanceof bound) { + thisBinding = baseCreate(func.prototype); + var result = func.apply(thisBinding, args); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisBinding, args); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.difference` that accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to process. + * @param {Array} [values] The array of values to exclude. + * @returns {Array} Returns a new array of filtered values. + */ + function baseDifference(array, values) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + isLarge = length >= largeArraySize && indexOf === baseIndexOf, + result = []; + + if (isLarge) { + var cache = createCache(values); + if (cache) { + indexOf = cacheIndexOf; + values = cache; + } else { + isLarge = false; + } + } + while (++index < length) { + var value = array[index]; + if (indexOf(values, value) < 0) { + result.push(value); + } + } + if (isLarge) { + releaseObject(values); + } + return result; + } + + /** + * The base implementation of `_.flatten` without support for callback + * shorthands or `thisArg` binding. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isStrict=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {Array} Returns a new flattened array. + */ + function baseFlatten(array, isShallow, isStrict, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (value && typeof value == 'object' && typeof value.length == 'number' + && (isArray(value) || isArguments(value))) { + // recursively flatten arrays (susceptible to call stack limits) + if (!isShallow) { + value = baseFlatten(value, isShallow, isStrict); + } + var valIndex = -1, + valLength = value.length, + resIndex = result.length; + + result.length += valLength; + while (++valIndex < valLength) { + result[resIndex++] = value[valIndex]; + } + } else if (!isStrict) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.isEqual`, without support for `thisArg` binding, + * that allows partial "_.where" style comparisons. + * + * @private + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `a` objects. + * @param {Array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { + // used to indicate that when comparing objects, `a` has at least the properties of `b` + if (callback) { + var result = callback(a, b); + if (typeof result != 'undefined') { + return !!result; + } + } + // exit early for identical values + if (a === b) { + // treat `+0` vs. `-0` as not equal + return a !== 0 || (1 / a == 1 / b); + } + var type = typeof a, + otherType = typeof b; + + // exit early for unlike primitive values + if (a === a && + !(a && objectTypes[type]) && + !(b && objectTypes[otherType])) { + return false; + } + // exit early for `null` and `undefined` avoiding ES3's Function#call behavior + // http://es5.github.io/#x15.3.4.4 + if (a == null || b == null) { + return a === b; + } + // compare [[Class]] names + var className = toString.call(a), + otherClass = toString.call(b); + + if (className == argsClass) { + className = objectClass; + } + if (otherClass == argsClass) { + otherClass = objectClass; + } + if (className != otherClass) { + return false; + } + switch (className) { + case boolClass: + case dateClass: + // coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal + return +a == +b; + + case numberClass: + // treat `NaN` vs. `NaN` as equal + return (a != +a) + ? b != +b + // but treat `+0` vs. `-0` as not equal + : (a == 0 ? (1 / a == 1 / b) : a == +b); + + case regexpClass: + case stringClass: + // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) + // treat string primitives and their corresponding object instances as equal + return a == String(b); + } + var isArr = className == arrayClass; + if (!isArr) { + // unwrap any `lodash` wrapped values + var aWrapped = hasOwnProperty.call(a, '__wrapped__'), + bWrapped = hasOwnProperty.call(b, '__wrapped__'); + + if (aWrapped || bWrapped) { + return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB); + } + // exit for functions and DOM nodes + if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) { + return false; + } + // in older versions of Opera, `arguments` objects have `Array` constructors + var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor, + ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor; + + // non `Object` object instances with different constructors are not equal + if (ctorA != ctorB && + !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && + ('constructor' in a && 'constructor' in b) + ) { + return false; + } + } + // assume cyclic structures are equal + // the algorithm for detecting cyclic structures is adapted from ES 5.1 + // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == a) { + return stackB[length] == b; + } + } + var size = 0; + result = true; + + // add `a` and `b` to the stack of traversed objects + stackA.push(a); + stackB.push(b); + + // recursively compare objects and arrays (susceptible to call stack limits) + if (isArr) { + // compare lengths to determine if a deep comparison is necessary + length = a.length; + size = b.length; + result = size == length; + + if (result || isWhere) { + // deep compare the contents, ignoring non-numeric properties + while (size--) { + var index = length, + value = b[size]; + + if (isWhere) { + while (index--) { + if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } + } + else { + // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` + // which, in this case, is more costly + forIn(b, function(value, key, b) { + if (hasOwnProperty.call(b, key)) { + // count the number of properties. + size++; + // deep compare each property value. + return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB)); + } + }); + + if (result && !isWhere) { + // ensure both objects have the same number of properties + forIn(a, function(value, key, a) { + if (hasOwnProperty.call(a, key)) { + // `size` will be `-1` if `a` has more properties than `b` + return (result = --size > -1); + } + }); + } + } + stackA.pop(); + stackB.pop(); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.merge` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [callback] The function to customize merging properties. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + */ + function baseMerge(object, source, callback, stackA, stackB) { + (isArray(source) ? forEach : forOwn)(source, function(source, key) { + var found, + isArr, + result = source, + value = object[key]; + + if (source && ((isArr = isArray(source)) || isPlainObject(source))) { + // avoid merging previously merged cyclic sources + var stackLength = stackA.length; + while (stackLength--) { + if ((found = stackA[stackLength] == source)) { + value = stackB[stackLength]; + break; + } + } + if (!found) { + var isShallow; + if (callback) { + result = callback(value, source); + if ((isShallow = typeof result != 'undefined')) { + value = result; + } + } + if (!isShallow) { + value = isArr + ? (isArray(value) ? value : []) + : (isPlainObject(value) ? value : {}); + } + // add `source` and associated `value` to the stack of traversed objects + stackA.push(source); + stackB.push(value); + + // recursively merge objects and arrays (susceptible to call stack limits) + if (!isShallow) { + baseMerge(value, source, callback, stackA, stackB); + } + } + } + else { + if (callback) { + result = callback(value, source); + if (typeof result == 'undefined') { + result = source; + } + } + if (typeof result != 'undefined') { + value = result; + } + } + object[key] = value; + }); + } + + /** + * The base implementation of `_.random` without argument juggling or support + * for returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns a random number. + */ + function baseRandom(min, max) { + return min + floor(nativeRandom() * (max - min + 1)); + } + + /** + * The base implementation of `_.uniq` without support for callback shorthands + * or `thisArg` binding. + * + * @private + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. + */ + function baseUniq(array, isSorted, callback) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + result = []; + + var isLarge = !isSorted && length >= largeArraySize && indexOf === baseIndexOf, + seen = (callback || isLarge) ? getArray() : result; + + if (isLarge) { + var cache = createCache(seen); + indexOf = cacheIndexOf; + seen = cache; + } + while (++index < length) { + var value = array[index], + computed = callback ? callback(value, index, array) : value; + + if (isSorted + ? !index || seen[seen.length - 1] !== computed + : indexOf(seen, computed) < 0 + ) { + if (callback || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + if (isLarge) { + releaseArray(seen.array); + releaseObject(seen); + } else if (callback) { + releaseArray(seen); + } + return result; + } + + /** + * Creates a function that aggregates a collection, creating an object composed + * of keys generated from the results of running each element of the collection + * through a callback. The given `setter` function sets the keys and values + * of the composed object. + * + * @private + * @param {Function} setter The setter function. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter) { + return function(collection, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, callback(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, callback(value, key, collection), collection); + }); + } + return result; + }; + } + + /** + * Creates a function that, when called, either curries or invokes `func` + * with an optional `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` + * 8 - `_.curry` (bound) + * 16 - `_.partial` + * 32 - `_.partialRight` + * @param {Array} [partialArgs] An array of arguments to prepend to those + * provided to the new function. + * @param {Array} [partialRightArgs] An array of arguments to append to those + * provided to the new function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new function. + */ + function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + isPartial = bitmask & 16, + isPartialRight = bitmask & 32; + + if (!isBindKey && !isFunction(func)) { + throw new TypeError; + } + if (isPartial && !partialArgs.length) { + bitmask &= ~16; + isPartial = partialArgs = false; + } + if (isPartialRight && !partialRightArgs.length) { + bitmask &= ~32; + isPartialRight = partialRightArgs = false; + } + var bindData = func && func.__bindData__; + if (bindData && bindData !== true) { + // clone `bindData` + bindData = slice(bindData); + if (bindData[2]) { + bindData[2] = slice(bindData[2]); + } + if (bindData[3]) { + bindData[3] = slice(bindData[3]); + } + // set `thisBinding` is not previously bound + if (isBind && !(bindData[1] & 1)) { + bindData[4] = thisArg; + } + // set if previously bound but not currently (subsequent curried functions) + if (!isBind && bindData[1] & 1) { + bitmask |= 8; + } + // set curried arity if not yet set + if (isCurry && !(bindData[1] & 4)) { + bindData[5] = arity; + } + // append partial left arguments + if (isPartial) { + push.apply(bindData[2] || (bindData[2] = []), partialArgs); + } + // append partial right arguments + if (isPartialRight) { + unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs); + } + // merge flags + bindData[1] |= bitmask; + return createWrapper.apply(null, bindData); + } + // fast path for `_.bind` + var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper; + return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]); + } + + /** + * Creates compiled iteration functions. + * + * @private + * @param {...Object} [options] The compile options object(s). + * @param {string} [options.array] Code to determine if the iterable is an array or array-like. + * @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop. + * @param {Function} [options.keys] A reference to `_.keys` for use in own property iteration. + * @param {string} [options.args] A comma separated string of iteration function arguments. + * @param {string} [options.top] Code to execute before the iteration branches. + * @param {string} [options.loop] Code to execute in the object loop. + * @param {string} [options.bottom] Code to execute after the iteration branches. + * @returns {Function} Returns the compiled function. + */ + function createIterator() { + // data properties + iteratorData.shadowedProps = shadowedProps; + + // iterator options + iteratorData.array = iteratorData.bottom = iteratorData.loop = iteratorData.top = ''; + iteratorData.init = 'iterable'; + iteratorData.useHas = true; + + // merge options into a template data object + for (var object, index = 0; object = arguments[index]; index++) { + for (var key in object) { + iteratorData[key] = object[key]; + } + } + var args = iteratorData.args; + iteratorData.firstArg = /^[^,]+/.exec(args)[0]; + + // create the function factory + var factory = Function( + 'baseCreateCallback, errorClass, errorProto, hasOwnProperty, ' + + 'indicatorObject, isArguments, isArray, isString, keys, objectProto, ' + + 'objectTypes, nonEnumProps, stringClass, stringProto, toString', + 'return function(' + args + ') {\n' + iteratorTemplate(iteratorData) + '\n}' + ); + + // return the compiled function + return factory( + baseCreateCallback, errorClass, errorProto, hasOwnProperty, + indicatorObject, isArguments, isArray, isString, iteratorData.keys, objectProto, + objectTypes, nonEnumProps, stringClass, stringProto, toString + ); + } + + /** + * 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]; + } + + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized, this method returns the custom method, otherwise it returns + * the `baseIndexOf` function. + * + * @private + * @returns {Function} Returns the "indexOf" function. + */ + function getIndexOf() { + var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result; + return result; + } + + /** + * 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); + } + + /** + * Sets `this` binding data on a given function. + * + * @private + * @param {Function} func The function to set data on. + * @param {Array} value The data array to set. + */ + var setBindData = !defineProperty ? noop : function(func, value) { + descriptor.value = value; + defineProperty(func, '__bindData__', descriptor); + }; + + /** + * A fallback implementation of `isPlainObject` which checks if a given value + * is an object created by the `Object` constructor, assuming objects created + * by the `Object` constructor have no inherited enumerable properties and that + * there are no `Object.prototype` extensions. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + */ + function shimIsPlainObject(value) { + var ctor, + result; + + // avoid non Object objects, `arguments` objects, and DOM elements + if (!(value && toString.call(value) == objectClass) || + (ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor)) || + (!support.argsClass && isArguments(value)) || + (!support.nodeClass && isNode(value))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + if (support.ownLast) { + forIn(value, function(value, key, object) { + result = hasOwnProperty.call(object, key); + return false; + }); + return result !== false; + } + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + forIn(value, function(value, key) { + result = key; + }); + return typeof result == 'undefined' || hasOwnProperty.call(value, result); + } + + /** + * Used by `unescape` to convert HTML entities to characters. + * + * @private + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + function unescapeHtmlChar(match) { + return htmlUnescapes[match]; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Checks if `value` is an `arguments` object. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @example + * + * (function() { return _.isArguments(arguments); })(1, 2, 3); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == argsClass || false; + } + // fallback for browsers that can't detect `arguments` objects by [[Class]] + if (!support.argsClass) { + isArguments = function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee') || false; + }; + } + + /** + * Checks if `value` is an array. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. + * @example + * + * (function() { return _.isArray(arguments); })(); + * // => false + * + * _.isArray([1, 2, 3]); + * // => true + */ + var isArray = nativeIsArray || function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == arrayClass || false; + }; + + /** + * 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 = createIterator({ + 'args': 'object', + 'init': '[]', + 'top': 'if (!(objectTypes[typeof object])) return result', + 'loop': 'result.push(index)' + }); + + /** + * 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 []; + } + if ((support.enumPrototypes && typeof object == 'function') || + (support.nonEnumArgs && object.length && isArguments(object))) { + return shimKeys(object); + } + return nativeKeys(object); + }; + + /** Reusable iterator options shared by `each`, `forIn`, and `forOwn` */ + var eachIteratorOptions = { + 'args': 'collection, callback, thisArg', + 'top': "callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)", + 'array': "typeof length == 'number'", + 'keys': keys, + 'loop': 'if (callback(iterable[index], index, collection) === false) return result' + }; + + /** Reusable iterator options for `assign` and `defaults` */ + var defaultsIteratorOptions = { + 'args': 'object, source, guard', + 'top': + 'var args = arguments,\n' + + ' argsIndex = 0,\n' + + " argsLength = typeof guard == 'number' ? 2 : args.length;\n" + + 'while (++argsIndex < argsLength) {\n' + + ' iterable = args[argsIndex];\n' + + ' if (iterable && objectTypes[typeof iterable]) {', + 'keys': keys, + 'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]", + 'bottom': ' }\n}' + }; + + /** Reusable iterator options for `forIn` and `forOwn` */ + var forOwnIteratorOptions = { + 'top': 'if (!objectTypes[typeof iterable]) return result;\n' + eachIteratorOptions.top, + 'array': false + }; + + /** + * 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 = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to convert HTML entities to characters */ + var htmlUnescapes = invert(htmlEscapes); + + /** Used to match HTML entities and HTML characters */ + var reEscapedHtml = RegExp('(' + keys(htmlUnescapes).join('|') + ')', 'g'), + reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); + + /** + * A function compiled to iterate `arguments` objects, arrays, objects, and + * strings consistenly across environments, executing the callback for each + * element in the collection. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index|key, collection). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @private + * @type Function + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEach = createIterator(eachIteratorOptions); + + /*--------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources will overwrite property assignments of previous + * sources. If a callback is provided it will be executed to produce the + * assigned values. The callback is bound to `thisArg` and invoked with two + * arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @type Function + * @alias extend + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * _.assign({ 'name': 'fred' }, { 'employer': 'slate' }); + * // => { 'name': 'fred', 'employer': 'slate' } + * + * var defaults = _.partialRight(_.assign, function(a, b) { + * return typeof a == 'undefined' ? b : a; + * }); + * + * var object = { 'name': 'barney' }; + * defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ + var assign = createIterator(defaultsIteratorOptions, { + 'top': + defaultsIteratorOptions.top.replace(';', + ';\n' + + "if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n" + + ' var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n' + + "} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n" + + ' callback = args[--argsLength];\n' + + '}' + ), + 'loop': 'result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]' + }); + + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects will also + * be cloned, otherwise they will be assigned by reference. If a callback + * is provided it will be executed to produce the cloned values. If the + * callback returns `undefined` cloning will be handled by the method instead. + * The callback is bound to `thisArg` and invoked with one argument; (value). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var shallow = _.clone(characters); + * shallow[0] === characters[0]; + * // => true + * + * var deep = _.clone(characters, true); + * deep[0] === characters[0]; + * // => false + * + * _.mixin({ + * 'clone': _.partialRight(_.clone, function(value) { + * return _.isElement(value) ? value.cloneNode(false) : undefined; + * }) + * }); + * + * var clone = _.clone(document.body); + * clone.childNodes.length; + * // => 0 + */ + function clone(value, isDeep, callback, thisArg) { + // allows working with "Collections" methods without using their `index` + // and `collection` arguments for `isDeep` and `callback` + if (typeof isDeep != 'boolean' && isDeep != null) { + thisArg = callback; + callback = isDeep; + isDeep = false; + } + return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates a deep clone of `value`. If a callback is provided it will be + * executed to produce the cloned values. If the callback returns `undefined` + * cloning will be handled by the method instead. The callback is bound to + * `thisArg` and invoked with one argument; (value). + * + * Note: This method is loosely based on the structured clone algorithm. Functions + * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and + * objects created by constructors other than `Object` are cloned to plain `Object` objects. + * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var deep = _.cloneDeep(characters); + * deep[0] === characters[0]; + * // => false + * + * var view = { + * 'label': 'docs', + * 'node': element + * }; + * + * var clone = _.cloneDeep(view, function(value) { + * return _.isElement(value) ? value.cloneNode(true) : undefined; + * }); + * + * clone.node == view.node; + * // => false + */ + function cloneDeep(value, callback, thisArg) { + return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { 'constructor': Circle }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties ? assign(result, properties) : result; + } + + /** + * 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 = createIterator(defaultsIteratorOptions); + + /** + * This method is like `_.findIndex` except that it returns the key of the + * first element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': false }, + * 'fred': { 'age': 40, 'blocked': true }, + * 'pebbles': { 'age': 1, 'blocked': false } + * }; + * + * _.findKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (property order is not guaranteed across environments) + * + * // using "_.where" callback shorthand + * _.findKey(characters, { 'age': 1 }); + * // => 'pebbles' + * + * // using "_.pluck" callback shorthand + * _.findKey(characters, 'blocked'); + * // => 'fred' + */ + function findKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwn(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * This method is like `_.findKey` except that it iterates over elements + * of a `collection` in the opposite order. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': true }, + * 'fred': { 'age': 40, 'blocked': false }, + * 'pebbles': { 'age': 1, 'blocked': true } + * }; + * + * _.findLastKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles`, assuming `_.findKey` returns `barney` + * + * // using "_.where" callback shorthand + * _.findLastKey(characters, { 'age': 40 }); + * // => 'fred' + * + * // using "_.pluck" callback shorthand + * _.findLastKey(characters, 'blocked'); + * // => 'pebbles' + */ + function findLastKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwnRight(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * Iterates over own and inherited enumerable properties of an object, + * executing the callback for each property. The callback is bound to `thisArg` + * and invoked with three arguments; (value, key, object). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forIn(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) + */ + var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, { + 'useHas': false + }); + + /** + * This method is like `_.forIn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forInRight(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'move', 'y', and 'x' assuming `_.forIn ` logs 'x', 'y', and 'move' + */ + function forInRight(object, callback, thisArg) { + var pairs = []; + + forIn(object, function(value, key) { + pairs.push(key, value); + }); + + var length = pairs.length; + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + if (callback(pairs[length--], pairs[length], object) === false) { + break; + } + } + return object; + } + + /** + * Iterates over own enumerable properties of an object, executing the callback + * for each property. The callback is bound to `thisArg` and invoked with three + * arguments; (value, key, object). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs '0', '1', and 'length' (property order is not guaranteed across environments) + */ + var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions); + + /** + * This method is like `_.forOwn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs 'length', '1', and '0' assuming `_.forOwn` logs '0', '1', and 'length' + */ + function forOwnRight(object, callback, thisArg) { + var props = keys(object), + length = props.length; + + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + var key = props[length]; + if (callback(object[key], key, object) === false) { + break; + } + } + return object; + } + + /** + * Creates a sorted array of property names of all enumerable properties, + * own and inherited, of `object` that have function values. + * + * @static + * @memberOf _ + * @alias methods + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names that have function values. + * @example + * + * _.functions(_); + * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] + */ + function functions(object) { + var result = []; + forIn(object, function(value, key) { + if (isFunction(value)) { + result.push(key); + } + }); + return result.sort(); + } + + /** + * Checks if the specified property name exists as a direct property of `object`, + * instead of an inherited property. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to check. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. + * @example + * + * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + * // => true + */ + function has(object, key) { + return object ? hasOwnProperty.call(object, key) : false; + } + + /** + * Creates an object composed of the inverted keys and values of the given object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to invert. + * @returns {Object} Returns the created inverted object. + * @example + * + * _.invert({ 'first': 'fred', 'second': 'barney' }); + * // => { 'fred': 'first', 'barney': 'second' } + */ + function invert(object) { + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + result[object[key]] = key; + } + return result; + } + + /** + * Checks if `value` is a boolean value. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @example + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + value && typeof value == 'object' && toString.call(value) == boolClass || false; + } + + /** + * Checks if `value` is a date. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + */ + function isDate(value) { + return value && typeof value == 'object' && toString.call(value) == dateClass || false; + } + + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + */ + function isElement(value) { + return value && value.nodeType === 1 || false; + } + + /** + * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a + * length of `0` and objects with no own enumerable properties are considered + * "empty". + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. + * @example + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({}); + * // => true + * + * _.isEmpty(''); + * // => true + */ + function isEmpty(value) { + var result = true; + if (!value) { + return result; + } + var className = toString.call(value), + length = value.length; + + if ((className == arrayClass || className == stringClass || + (support.argsClass ? className == argsClass : isArguments(value))) || + (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { + return !length; + } + forOwn(value, function() { + return (result = false); + }); + return result; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent to each other. If a callback is provided it will be executed + * to compare values. If the callback returns `undefined` comparisons will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (a, b). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'name': 'fred' }; + * var copy = { 'name': 'fred' }; + * + * object == copy; + * // => false + * + * _.isEqual(object, copy); + * // => true + * + * var words = ['hello', 'goodbye']; + * var otherWords = ['hi', 'goodbye']; + * + * _.isEqual(words, otherWords, function(a, b) { + * var reGreet = /^(?:hello|hi)$/i, + * aGreet = _.isString(a) && reGreet.test(a), + * bGreet = _.isString(b) && reGreet.test(b); + * + * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; + * }); + * // => true + */ + function isEqual(a, b, callback, thisArg) { + return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2)); + } + + /** + * Checks if `value` is, or can be coerced to, a finite number. + * + * Note: This is not the same as native `isFinite` which will return true for + * booleans and empty strings. See http://es5.github.io/#x15.1.2.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. + * @example + * + * _.isFinite(-101); + * // => true + * + * _.isFinite('10'); + * // => true + * + * _.isFinite(true); + * // => false + * + * _.isFinite(''); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + function isFinite(value) { + return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); + } + + /** + * Checks if `value` is a function. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + */ + function isFunction(value) { + return typeof value == 'function'; + } + // fallback for older versions of Chrome and Safari + if (isFunction(/x/)) { + isFunction = function(value) { + return typeof value == 'function' && toString.call(value) == funcClass; + }; + } + + /** + * 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]); + } + + /** + * Checks if `value` is `NaN`. + * + * Note: This is not the same as native `isNaN` which will return `true` for + * `undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // `NaN` as a primitive is the only value that is not equal to itself + // (perform the [[Class]] check first to avoid errors with some host objects in IE) + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(undefined); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is a number. + * + * Note: `NaN` is considered a number. See http://es5.github.io/#x8.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. + * @example + * + * _.isNumber(8.4 * 5); + * // => true + */ + function isNumber(value) { + return typeof value == 'number' || + value && typeof value == 'object' && toString.call(value) == numberClass || false; + } + + /** + * Checks if `value` is an object created by the `Object` constructor. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * _.isPlainObject(new Shape); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + */ + var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { + if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) { + return false; + } + var valueOf = value.valueOf, + objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); + + return objProto + ? (value == objProto || getPrototypeOf(value) == objProto) + : shimIsPlainObject(value); + }; + + /** + * Checks if `value` is a regular expression. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @example + * + * _.isRegExp(/fred/); + * // => true + */ + function isRegExp(value) { + return value && objectTypes[typeof value] && toString.call(value) == regexpClass || false; + } + + /** + * Checks if `value` is a string. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. + * @example + * + * _.isString('fred'); + * // => true + */ + function isString(value) { + return typeof value == 'string' || + value && typeof value == 'object' && toString.call(value) == stringClass || false; + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + */ + function isUndefined(value) { + return typeof value == 'undefined'; + } + + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new object with values of the results of each `callback` execution. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + * + * var characters = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // using "_.pluck" callback shorthand + * _.mapValues(characters, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } + */ + function mapValues(object, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + forOwn(object, function(value, key, object) { + result[key] = callback(value, key, object); + }); + return result; + } + + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * will overwrite property assignments of previous sources. If a callback is + * provided it will be executed to produce the merged values of the destination + * and source properties. If the callback returns `undefined` merging will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * var names = { + * 'characters': [ + * { 'name': 'barney' }, + * { 'name': 'fred' } + * ] + * }; + * + * var ages = { + * 'characters': [ + * { 'age': 36 }, + * { 'age': 40 } + * ] + * }; + * + * _.merge(names, ages); + * // => { 'characters': [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] } + * + * var food = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var otherFood = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(food, otherFood, function(a, b) { + * return _.isArray(a) ? a.concat(b) : undefined; + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } + */ + function merge(object) { + var args = arguments, + length = 2; + + if (!isObject(object)) { + return object; + } + // allows working with `_.reduce` and `_.reduceRight` without using + // their `index` and `collection` arguments + if (typeof args[2] != 'number') { + length = args.length; + } + if (length > 3 && typeof args[length - 2] == 'function') { + var callback = baseCreateCallback(args[--length - 1], args[length--], 2); + } else if (length > 2 && typeof args[length - 1] == 'function') { + callback = args[--length]; + } + var sources = slice(arguments, 1, length), + index = -1, + stackA = getArray(), + stackB = getArray(); + + while (++index < length) { + baseMerge(object, sources[index], callback, stackA, stackB); + } + releaseArray(stackA); + releaseArray(stackB); + return object; + } + + /** + * Creates a shallow clone of `object` excluding the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` omitting the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object without the omitted properties. + * @example + * + * _.omit({ 'name': 'fred', 'age': 40 }, 'age'); + * // => { 'name': 'fred' } + * + * _.omit({ 'name': 'fred', 'age': 40 }, function(value) { + * return typeof value == 'number'; + * }); + * // => { 'name': 'fred' } + */ + function omit(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var props = []; + forIn(object, function(value, key) { + props.push(key); + }); + props = baseDifference(props, baseFlatten(arguments, true, false, 1)); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + result[key] = object[key]; + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (!callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * Creates a two dimensional array of an object's key-value pairs, + * i.e. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments) + */ + function pairs(object) { + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; + } + + /** + * Creates a shallow clone of `object` composed of the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` picking the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object composed of the picked properties. + * @example + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, 'name'); + * // => { 'name': 'fred' } + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) { + * return key.charAt(0) != '_'; + * }); + * // => { 'name': 'fred' } + */ + function pick(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var index = -1, + props = baseFlatten(arguments, true, false, 1), + length = isObject(object) ? props.length : 0; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * An alternative to `_.reduce` this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable properties through a callback, with each callback execution + * potentially mutating the `accumulator` object. The callback is bound to + * `thisArg` and invoked with four arguments; (accumulator, value, key, object). + * Callbacks may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { + * num *= num; + * if (num % 2) { + * return result.push(num) < 3; + * } + * }); + * // => [1, 9, 25] + * + * var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function transform(object, callback, accumulator, thisArg) { + var isArr = isArray(object); + if (accumulator == null) { + if (isArr) { + accumulator = []; + } else { + var ctor = object && object.constructor, + proto = ctor && ctor.prototype; + + accumulator = baseCreate(proto); + } + } + if (callback) { + callback = lodash.createCallback(callback, thisArg, 4); + (isArr ? baseEach : forOwn)(object, function(value, index, object) { + return callback(accumulator, value, index, object); + }); + } + return accumulator; + } + + /** + * 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; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array of elements from the specified indexes, or keys, of the + * `collection`. Indexes may be specified as individual arguments or as arrays + * of indexes. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` + * to retrieve, specified as individual indexes or arrays of indexes. + * @returns {Array} Returns a new array of elements corresponding to the + * provided indexes. + * @example + * + * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); + * // => ['a', 'c', 'e'] + * + * _.at(['fred', 'barney', 'pebbles'], 0, 2); + * // => ['fred', 'pebbles'] + */ + function at(collection) { + var args = arguments, + index = -1, + props = baseFlatten(args, true, false, 1), + length = (args[2] && args[2][args[1]] === collection) ? 1 : props.length, + result = Array(length); + + if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + while(++index < length) { + result[index] = collection[props[index]]; + } + return result; + } + + /** + * Checks if a given value is present in a collection using strict equality + * for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the + * offset from the end of the collection. + * + * @static + * @memberOf _ + * @alias include + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. + * @example + * + * _.contains([1, 2, 3], 1); + * // => true + * + * _.contains([1, 2, 3], 1, 2); + * // => false + * + * _.contains({ 'name': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.contains('pebbles', 'eb'); + * // => true + */ + function contains(collection, target, fromIndex) { + var index = -1, + indexOf = getIndexOf(), + length = collection ? collection.length : 0, + result = false; + + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; + if (isArray(collection)) { + result = indexOf(collection, target, fromIndex) > -1; + } else if (typeof length == 'number') { + result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1; + } else { + baseEach(collection, function(value) { + if (++index >= fromIndex) { + return !(result = value === target); + } + }); + } + return result; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through the callback. The corresponding value + * of each key is the number of times the key was returned by the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1); + }); + + /** + * Checks if the given callback returns truey value for **all** elements of + * a collection. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes']); + * // => false + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.every(characters, 'age'); + * // => true + * + * // using "_.where" callback shorthand + * _.every(characters, { 'age': 36 }); + * // => false + */ + function every(collection, callback, thisArg) { + var result = true; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (!(result = !!callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return (result = !!callback(value, index, collection)); + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning an array of all elements + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that passed the callback check. + * @example + * + * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [2, 4, 6] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.filter(characters, 'blocked'); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + * + * // using "_.where" callback shorthand + * _.filter(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + */ + function filter(collection, callback, thisArg) { + var result = []; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + result.push(value); + } + } + } else { + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result.push(value); + } + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning the first element that + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias detect, findWhere + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.find(characters, function(chr) { + * return chr.age < 40; + * }); + * // => { 'name': 'barney', 'age': 36, 'blocked': false } + * + * // using "_.where" callback shorthand + * _.find(characters, { 'age': 1 }); + * // => { 'name': 'pebbles', 'age': 1, 'blocked': false } + * + * // using "_.pluck" callback shorthand + * _.find(characters, 'blocked'); + * // => { 'name': 'fred', 'age': 40, 'blocked': true } + */ + function find(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + return value; + } + } + } else { + var result; + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + } + + /** + * This method is like `_.find` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(num) { + * return num % 2 == 1; + * }); + * // => 3 + */ + function findLast(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forEachRight(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + + /** + * Iterates over elements of a collection, executing the callback for each + * element. The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * Note: As with other "Collections" methods, objects with a `length` property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); + * // => logs each number and returns '1,2,3' + * + * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); }); + * // => logs each number and returns the object (property order is not guaranteed across environments) + */ + function forEach(collection, callback, thisArg) { + if (callback && typeof thisArg == 'undefined' && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (callback(collection[index], index, collection) === false) { + break; + } + } + } else { + baseEach(collection, callback, thisArg); + } + return collection; + } + + /** + * This method is like `_.forEach` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); + * // => logs each number from right to left and returns '3,2,1' + */ + function forEachRight(collection, callback, thisArg) { + var iterable = collection, + length = collection ? collection.length : 0; + + callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (length--) { + if (callback(collection[length], length, collection) === false) { + break; + } + } + } else { + if (typeof length != 'number') { + var props = keys(collection); + length = props.length; + } else if (support.unindexedChars && isString(collection)) { + iterable = collection.split(''); + } + baseEach(collection, function(value, key, collection) { + key = props ? props[--length] : --length; + return callback(iterable[key], key, collection); + }); + } + return collection; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of a collection through the callback. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false` + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using "_.pluck" callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value); + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of the collection through the given callback. The corresponding + * value of each key is the last element responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keys = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keys, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keys, function(key) { return String.fromCharCode(key.code); }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + + /** + * Invokes the method named by `methodName` on each element in the `collection` + * returning an array of the results of each invoked method. Additional arguments + * will be provided to each invoked method. If `methodName` is a function it + * will be invoked for, and `this` bound to, each element in the `collection`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|string} methodName The name of the method to invoke or + * the function invoked per iteration. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {Array} Returns a new array of the results of each invoked method. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + function invoke(collection, methodName) { + var args = slice(arguments, 2), + index = -1, + isFunc = typeof methodName == 'function', + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args); + }); + return result; + } + + /** + * Creates an array of values by running each element in the collection + * through the callback. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias collect + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of the results of each `callback` execution. + * @example + * + * _.map([1, 2, 3], function(num) { return num * 3; }); + * // => [3, 6, 9] + * + * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); + * // => [3, 6, 9] (property order is not guaranteed across environments) + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(characters, 'name'); + * // => ['barney', 'fred'] + */ + function map(collection, callback, thisArg) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + callback = lodash.createCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (++index < length) { + result[index] = callback(collection[index], index, collection); + } + } else { + baseEach(collection, function(value, key, collection) { + result[++index] = callback(value, key, collection); + }); + } + return result; + } + + /** + * Retrieves the maximum value of a collection. If the collection is empty or + * falsey `-Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.max(characters, function(chr) { return chr.age; }); + * // => { 'name': 'fred', 'age': 40 }; + * + * // using "_.pluck" callback shorthand + * _.max(characters, 'age'); + * // => { 'name': 'fred', 'age': 40 }; + */ + function max(collection, callback, thisArg) { + var computed = -Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value > result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current > computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the minimum value of a collection. If the collection is empty or + * falsey `Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.min(characters, function(chr) { return chr.age; }); + * // => { 'name': 'barney', 'age': 36 }; + * + * // using "_.pluck" callback shorthand + * _.min(characters, 'age'); + * // => { 'name': 'barney', 'age': 36 }; + */ + function min(collection, callback, thisArg) { + var computed = Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value < result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current < computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the value of a specified property from all elements in the collection. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {string} property The name of the property to pluck. + * @returns {Array} Returns a new array of property values. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.pluck(characters, 'name'); + * // => ['barney', 'fred'] + */ + var pluck = map; + + /** + * Reduces a collection to a value which is the accumulated result of running + * each element in the collection through the callback, where each successive + * callback execution consumes the return value of the previous execution. If + * `accumulator` is not provided the first element of the collection will be + * used as the initial `accumulator` value. The callback is bound to `thisArg` + * and invoked with four arguments; (accumulator, value, index|key, collection). + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var sum = _.reduce([1, 2, 3], function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function reduce(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + if (noaccum) { + accumulator = collection[++index]; + } + while (++index < length) { + accumulator = callback(accumulator, collection[index], index, collection); + } + } else { + baseEach(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection) + }); + } + return accumulator; + } + + /** + * This method is like `_.reduce` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var list = [[0, 1], [2, 3], [4, 5]]; + * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + forEachRight(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The opposite of `_.filter` this method returns the elements of a + * collection that the callback does **not** return truey for. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that failed the callback check. + * @example + * + * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [1, 3, 5] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.reject(characters, 'blocked'); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + * + * // using "_.where" callback shorthand + * _.reject(characters, { 'age': 36 }); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + */ + function reject(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + return filter(collection, function(value, index, collection) { + return !callback(value, index, collection); + }); + } + + /** + * Retrieves a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Allows working with functions like `_.map` + * without using their `index` arguments as `n`. + * @returns {Array} Returns the random sample(s) of `collection`. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + function sample(collection, n, guard) { + if (collection && typeof collection.length != 'number') { + collection = values(collection); + } else if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + if (n == null || guard) { + return collection ? collection[baseRandom(0, collection.length - 1)] : undefined; + } + var result = shuffle(collection); + result.length = nativeMin(nativeMax(0, n), result.length); + return result; + } + + /** + * Creates an array of shuffled values, using a version of the Fisher-Yates + * shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns a new shuffled collection. + * @example + * + * _.shuffle([1, 2, 3, 4, 5, 6]); + * // => [4, 1, 6, 3, 5, 2] + */ + function shuffle(collection) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + var rand = baseRandom(0, ++index); + result[index] = result[rand]; + result[rand] = value; + }); + return result; + } + + /** + * Gets the size of the `collection` by returning `collection.length` for arrays + * and array-like objects or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. + * @example + * + * _.size([1, 2]); + * // => 2 + * + * _.size({ 'one': 1, 'two': 2, 'three': 3 }); + * // => 3 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + var length = collection ? collection.length : 0; + return typeof length == 'number' ? length : keys(collection).length; + } + + /** + * Checks if the callback returns a truey value for **any** element of a + * collection. The function returns as soon as it finds a passing value and + * does not iterate over the entire collection. The callback is bound to + * `thisArg` and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.some(characters, 'blocked'); + * // => true + * + * // using "_.where" callback shorthand + * _.some(characters, { 'age': 1 }); + * // => false + */ + function some(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if ((result = callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return !(result = callback(value, index, collection)); + }); + } + return !!result; + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through the callback. This method + * performs a stable sort, that is, it will preserve the original sort order + * of equal elements. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an array of property names is provided for `callback` the collection + * will be sorted by each property value. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of sorted elements. + * @example + * + * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); + * // => [3, 1, 2] + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 26 }, + * { 'name': 'fred', 'age': 30 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(_.sortBy(characters, 'age'), _.values); + * // => [['barney', 26], ['fred', 30], ['barney', 36], ['fred', 40]] + * + * // sorting by multiple properties + * _.map(_.sortBy(characters, ['name', 'age']), _.values); + * // = > [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]] + */ + function sortBy(collection, callback, thisArg) { + var index = -1, + isArr = isArray(callback), + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + if (!isArr) { + callback = lodash.createCallback(callback, thisArg, 3); + } + forEach(collection, function(value, key, collection) { + var object = result[++index] = getObject(); + if (isArr) { + object.criteria = map(callback, function(key) { return value[key]; }); + } else { + (object.criteria = getArray())[0] = callback(value, key, collection); + } + object.index = index; + object.value = value; + }); + + length = result.length; + result.sort(compareAscending); + while (length--) { + var object = result[length]; + result[length] = object.value; + if (!isArr) { + releaseArray(object.criteria); + } + releaseObject(object); + } + return result; + } + + /** + * Converts the `collection` to an array. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to convert. + * @returns {Array} Returns the new converted array. + * @example + * + * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); + * // => [2, 3, 4] + */ + function toArray(collection) { + if (collection && typeof collection.length == 'number') { + return (support.unindexedChars && isString(collection)) + ? collection.split('') + : slice(collection); + } + return values(collection); + } + + /** + * Performs a deep comparison of each element in a `collection` to the given + * `properties` object, returning an array of all elements that have equivalent + * property values. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Object} props The object of property values to filter by. + * @returns {Array} Returns a new array of elements that have the given properties. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.where(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }] + * + * _.where(characters, { 'pets': ['dino'] }); + * // => [{ 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] }] + */ + var where = filter; + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are all falsey. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to compact. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result.push(value); + } + } + return result; + } + + /** + * Creates an array excluding all values of the provided arrays using strict + * equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to process. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); + * // => [1, 3, 4] + */ + function difference(array) { + return baseDifference(array, baseFlatten(arguments, true, true, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.findIndex(characters, function(chr) { + * return chr.age < 20; + * }); + * // => 2 + * + * // using "_.where" callback shorthand + * _.findIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findIndex(characters, 'blocked'); + * // => 1 + */ + function findIndex(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + if (callback(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of a `collection` from right to left. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': true }, + * { 'name': 'fred', 'age': 40, 'blocked': false }, + * { 'name': 'pebbles', 'age': 1, 'blocked': true } + * ]; + * + * _.findLastIndex(characters, function(chr) { + * return chr.age > 30; + * }); + * // => 1 + * + * // using "_.where" callback shorthand + * _.findLastIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findLastIndex(characters, 'blocked'); + * // => 2 + */ + function findLastIndex(array, callback, thisArg) { + var length = array ? array.length : 0; + callback = lodash.createCallback(callback, thisArg, 3); + while (length--) { + if (callback(array[length], length, array)) { + return length; + } + } + return -1; + } + + /** + * Gets the first element or first `n` elements of an array. If a callback + * is provided elements at the beginning of the array are returned as long + * as the callback returns truey. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias head, take + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([1, 2, 3], 2); + * // => [1, 2] + * + * _.first([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [1, 2] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.first(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': true, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.first(characters, { 'employer': 'slate' }), 'name'); + * // => ['barney', 'fred'] + */ + function first(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = -1; + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[0] : undefined; + } + } + return slice(array, 0, nativeMin(nativeMax(0, n), length)); + } + + /** + * Flattens a nested array (the nesting can be to any depth). If `isShallow` + * is truey, the array will only be flattened a single level. If a callback + * is provided each element of the array is passed through the callback before + * flattening. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new flattened array. + * @example + * + * _.flatten([1, [2], [3, [[4]]]]); + * // => [1, 2, 3, 4]; + * + * _.flatten([1, [2], [3, [[4]]]], true); + * // => [1, 2, 3, [[4]]]; + * + * var characters = [ + * { 'name': 'barney', 'age': 30, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * // using "_.pluck" callback shorthand + * _.flatten(characters, 'pets'); + * // => ['hoppy', 'baby puss', 'dino'] + */ + function flatten(array, isShallow, callback, thisArg) { + // juggle arguments + if (typeof isShallow != 'boolean' && isShallow != null) { + thisArg = callback; + callback = (typeof isShallow != 'function' && thisArg && thisArg[isShallow] === array) ? null : isShallow; + isShallow = false; + } + if (callback != null) { + array = map(array, callback, thisArg); + } + return baseFlatten(array, isShallow); + } + + /** + * Gets the index at which the first occurrence of `value` is found using + * strict equality for comparisons, i.e. `===`. If the array is already sorted + * providing `true` for `fromIndex` will run a faster binary search. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2); + * // => 1 + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 4 + * + * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); + * // => 2 + */ + function indexOf(array, value, fromIndex) { + if (typeof fromIndex == 'number') { + var length = array ? array.length : 0; + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0); + } else if (fromIndex) { + var index = sortedIndex(array, value); + return array[index] === value ? index : -1; + } + return baseIndexOf(array, value, fromIndex); + } + + /** + * Gets all but the last element or last `n` elements of an array. If a + * callback is provided elements at the end of the array are excluded from + * the result as long as the callback returns truey. The callback is bound + * to `thisArg` and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + * + * _.initial([1, 2, 3], 2); + * // => [1] + * + * _.initial([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [1] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.initial(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': false, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.initial(characters, { 'employer': 'na' }), 'name'); + * // => ['barney', 'fred'] + */ + function initial(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : callback || n; + } + return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); + } + + /** + * Creates an array of unique values present in all provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of shared values. + * @example + * + * _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2] + */ + function intersection() { + var args = [], + argsIndex = -1, + argsLength = arguments.length, + caches = getArray(), + indexOf = getIndexOf(), + trustIndexOf = indexOf === baseIndexOf, + seen = getArray(); + + while (++argsIndex < argsLength) { + var value = arguments[argsIndex]; + if (isArray(value) || isArguments(value)) { + args.push(value); + caches.push(trustIndexOf && value.length >= largeArraySize && + createCache(argsIndex ? args[argsIndex] : seen)); + } + } + var array = args[0], + index = -1, + length = array ? array.length : 0, + result = []; + + outer: + while (++index < length) { + var cache = caches[0]; + value = array[index]; + + if ((cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0) { + argsIndex = argsLength; + (cache || seen).push(value); + while (--argsIndex) { + cache = caches[argsIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) { + continue outer; + } + } + result.push(value); + } + } + while (argsLength--) { + cache = caches[argsLength]; + if (cache) { + releaseObject(cache); + } + } + releaseArray(caches); + releaseArray(seen); + return result; + } + + /** + * Gets the last element or last `n` elements of an array. If a callback is + * provided elements at the end of the array are returned as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + * + * _.last([1, 2, 3], 2); + * // => [2, 3] + * + * _.last([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [2, 3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.last(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.last(characters, { 'employer': 'na' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function last(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[length - 1] : undefined; + } + } + return slice(array, nativeMax(0, length - n)); + } + + /** + * Gets the index at which the last occurrence of `value` is found using strict + * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used + * as the offset from the end of the collection. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); + * // => 4 + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var index = array ? array.length : 0; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * Removes all provided values from the given array using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + function pull(array) { + var args = arguments, + argsIndex = 0, + argsLength = args.length, + length = array ? array.length : 0; + + while (++argsIndex < argsLength) { + var index = -1, + value = args[argsIndex]; + while (++index < length) { + if (array[index] === value) { + splice.call(array, index--, 1); + length--; + } + } + } + return array; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to but not including `end`. If `start` is less than `stop` a + * zero-length range is created unless a negative `step` is specified. + * + * @static + * @memberOf _ + * @category Arrays + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns a new range array. + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + function range(start, end, step) { + start = +start || 0; + step = typeof step == 'number' ? step : (+step || 1); + + if (end == null) { + end = start; + start = 0; + } + // use `Array(length)` so engines like Chakra and V8 avoid slower modes + // http://youtu.be/XAqIpGU8ZZk#t=17m25s + var index = -1, + length = nativeMax(0, ceil((end - start) / (step || 1))), + result = Array(length); + + while (++index < length) { + result[index] = start; + start += step; + } + return result; + } + + /** + * Removes all elements from an array that the callback returns truey for + * and returns an array of removed elements. The callback is bound to `thisArg` + * and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4, 5, 6]; + * var evens = _.remove(array, function(num) { return num % 2 == 0; }); + * + * console.log(array); + * // => [1, 3, 5] + * + * console.log(evens); + * // => [2, 4, 6] + */ + function remove(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0, + result = []; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (callback(value, index, array)) { + result.push(value); + splice.call(array, index--, 1); + length--; + } + } + return result; + } + + /** + * The opposite of `_.initial` this method gets all but the first element or + * first `n` elements of an array. If a callback function is provided elements + * at the beginning of the array are excluded from the result as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias drop, tail + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + * + * _.rest([1, 2, 3], 2); + * // => [3] + * + * _.rest([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.rest(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.rest(characters, { 'employer': 'slate' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function rest(array, callback, thisArg) { + if (typeof callback != 'number' && callback != null) { + var n = 0, + index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : nativeMax(0, callback); + } + return slice(array, n); + } + + /** + * Uses a binary search to determine the smallest index at which a value + * should be inserted into a given sorted array in order to maintain the sort + * order of the array. If a callback is provided it will be executed for + * `value` and each element of `array` to compute their sort ranking. The + * callback is bound to `thisArg` and invoked with one argument; (value). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([20, 30, 50], 40); + * // => 2 + * + * // using "_.pluck" callback shorthand + * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 2 + * + * var dict = { + * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } + * }; + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return dict.wordToNumber[word]; + * }); + * // => 2 + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return this.wordToNumber[word]; + * }, dict); + * // => 2 + */ + function sortedIndex(array, value, callback, thisArg) { + var low = 0, + high = array ? array.length : low; + + // explicitly reference `identity` for better inlining in Firefox + callback = callback ? lodash.createCallback(callback, thisArg, 1) : identity; + value = callback(value); + + while (low < high) { + var mid = (low + high) >>> 1; + (callback(array[mid]) < value) + ? low = mid + 1 + : high = mid; + } + return low; + } + + /** + * Creates an array of unique values, in order, of the provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of combined values. + * @example + * + * _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2, 3, 5, 4] + */ + function union() { + return baseUniq(baseFlatten(arguments, true, true)); + } + + /** + * Creates a duplicate-value-free version of an array using strict equality + * for comparisons, i.e. `===`. If the array is sorted, providing + * `true` for `isSorted` will use a faster algorithm. If a callback is provided + * each element of `array` is passed through the callback before uniqueness + * is computed. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Arrays + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a duplicate-value-free array. + * @example + * + * _.uniq([1, 2, 1, 3, 1]); + * // => [1, 2, 3] + * + * _.uniq([1, 1, 2, 2, 3], true); + * // => [1, 2, 3] + * + * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); }); + * // => ['A', 'b', 'C'] + * + * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math); + * // => [1, 2.5, 3] + * + * // using "_.pluck" callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniq(array, isSorted, callback, thisArg) { + // juggle arguments + if (typeof isSorted != 'boolean' && isSorted != null) { + thisArg = callback; + callback = (typeof isSorted != 'function' && thisArg && thisArg[isSorted] === array) ? null : isSorted; + isSorted = false; + } + if (callback != null) { + callback = lodash.createCallback(callback, thisArg, 3); + } + return baseUniq(array, isSorted, callback); + } + + /** + * Creates an array excluding all provided values using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); + * // => [2, 3, 4] + */ + function without(array) { + return baseDifference(array, slice(arguments, 1)); + } + + /** + * Creates an array that is the symmetric difference of the provided arrays. + * See http://en.wikipedia.org/wiki/Symmetric_difference. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of values. + * @example + * + * _.xor([1, 2, 3], [5, 2, 1, 4]); + * // => [3, 5, 4] + * + * _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); + * // => [1, 4, 5] + */ + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArray(array) || isArguments(array)) { + var result = result + ? baseUniq(baseDifference(result, array).concat(baseDifference(array, result))) + : array; + } + } + return result || []; + } + + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second + * elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @alias unzip + * @category Arrays + * @param {...Array} [array] Arrays to process. + * @returns {Array} Returns a new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + function zip() { + var array = arguments.length > 1 ? arguments : arguments[0], + index = -1, + length = array ? max(pluck(array, 'length')) : 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = pluck(array, index); + } + return result; + } + + /** + * Creates an object composed from arrays of `keys` and `values`. Provide + * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` + * or two arrays, one of `keys` and one of corresponding `values`. + * + * @static + * @memberOf _ + * @alias object + * @category Arrays + * @param {Array} keys The array of keys. + * @param {Array} [values=[]] The array of values. + * @returns {Object} Returns an object composed of the given keys and + * corresponding values. + * @example + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + function zipObject(keys, values) { + var index = -1, + length = keys ? keys.length : 0, + result = {}; + + if (!values && length && !isArray(keys[0])) { + values = []; + } + while (++index < length) { + var key = keys[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that executes `func`, with the `this` binding and + * arguments of the created function, only after being called `n` times. + * + * @static + * @memberOf _ + * @category Functions + * @param {number} n The number of times the function must be called before + * `func` is executed. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('Done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'Done saving!', after all saves have completed + */ + function after(n, func) { + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that, when called, invokes `func` with the `this` + * binding of `thisArg` and prepends any additional `bind` arguments to those + * provided to the bound function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var func = function(greeting) { + * return greeting + ' ' + this.name; + * }; + * + * func = _.bind(func, { 'name': 'fred' }, 'hi'); + * func(); + * // => 'hi fred' + */ + function bind(func, thisArg) { + return arguments.length > 2 + ? createWrapper(func, 17, slice(arguments, 2), null, thisArg) + : createWrapper(func, 1, null, null, thisArg); + } + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all the function properties + * of `object` will be bound. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to + * bind, specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { console.log('clicked ' + this.label); } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs', when the button is clicked + */ + function bindAll(object) { + var funcs = arguments.length > 1 ? baseFlatten(arguments, true, false, 1) : functions(object), + index = -1, + length = funcs.length; + + while (++index < length) { + var key = funcs[index]; + object[key] = createWrapper(object[key], 1, null, null, object); + } + return object; + } + + /** + * Creates a function that, when called, invokes the method at `object[key]` + * and prepends any additional `bindKey` arguments to those provided to the bound + * function. This method differs from `_.bind` by allowing bound functions to + * reference methods that will be redefined or don't yet exist. + * See http://michaux.ca/articles/lazy-function-definition-pattern. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'name': 'fred', + * 'greet': function(greeting) { + * return greeting + ' ' + this.name; + * } + * }; + * + * var func = _.bindKey(object, 'greet', 'hi'); + * func(); + * // => 'hi fred' + * + * object.greet = function(greeting) { + * return greeting + 'ya ' + this.name + '!'; + * }; + * + * func(); + * // => 'hiya fred!' + */ + function bindKey(object, key) { + return arguments.length > 2 + ? createWrapper(key, 19, slice(arguments, 2), null, object) + : createWrapper(key, 3, null, null, object); + } + + /** + * Creates a function that is the composition of the provided functions, + * where each function consumes the return value of the function that follows. + * For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + * Each function is executed with the `this` binding of the composed function. + * + * @static + * @memberOf _ + * @category Functions + * @param {...Function} [func] Functions to compose. + * @returns {Function} Returns the new composed function. + * @example + * + * var realNameMap = { + * 'pebbles': 'penelope' + * }; + * + * var format = function(name) { + * name = realNameMap[name.toLowerCase()] || name; + * return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase(); + * }; + * + * var greet = function(formatted) { + * return 'Hiya ' + formatted + '!'; + * }; + * + * var welcome = _.compose(greet, format); + * welcome('pebbles'); + * // => 'Hiya Penelope!' + */ + function compose() { + var funcs = arguments, + length = funcs.length; + + while (length--) { + if (!isFunction(funcs[length])) { + throw new TypeError; + } + } + return function() { + var args = arguments, + length = funcs.length; + + while (length--) { + args = [funcs[length].apply(this, args)]; + } + return args[0]; + }; + } + + /** + * Creates a function which accepts one or more arguments of `func` that when + * invoked either executes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` can be specified + * if `func.length` is not sufficient. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {Function} Returns the new curried function. + * @example + * + * var curried = _.curry(function(a, b, c) { + * console.log(a + b + c); + * }); + * + * curried(1)(2)(3); + * // => 6 + * + * curried(1, 2)(3); + * // => 6 + * + * curried(1, 2, 3); + * // => 6 + */ + function curry(func, arity) { + arity = typeof arity == 'number' ? arity : (+arity || func.length); + return createWrapper(func, 4, null, null, null, arity); + } + + /** + * Creates a function that will delay the execution of `func` until after + * `wait` milliseconds have elapsed since the last time it was invoked. + * Provide an options object to indicate that `func` should be invoked on + * the leading and/or trailing edge of the `wait` timeout. Subsequent calls + * to the debounced function will return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * var lazyLayout = _.debounce(calculateLayout, 150); + * jQuery(window).on('resize', lazyLayout); + * + * // execute `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * }); + * + * // ensure `batchLog` is executed once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * source.addEventListener('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * }, false); + */ + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + wait = nativeMax(0, wait) || 0; + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = options.leading; + maxWait = 'maxWait' in options && (nativeMax(wait, options.maxWait) || 0); + trailing = 'trailing' in options ? options.trailing : trailing; + } + var delayed = function() { + var remaining = wait - (now() - stamp); + if (remaining <= 0) { + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + var isCalled = trailingCall; + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + } else { + timeoutId = setTimeout(delayed, remaining); + } + }; + + var maxDelayed = function() { + if (timeoutId) { + clearTimeout(timeoutId); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (trailing || (maxWait !== wait)) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + }; + + return function() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + return result; + }; + } + + /** + * Defers executing the `func` function until the current call stack has cleared. + * Additional arguments will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { console.log(text); }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + function defer(func) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 1); + return setTimeout(function() { func.apply(undefined, args); }, 1); + } + + /** + * Executes the `func` function after `wait` milliseconds. Additional arguments + * will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { console.log(text); }, 1000, 'later'); + * // => logs 'later' after one second + */ + function delay(func, wait) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 2); + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it will be used to determine the cache key for storing the result + * based on the arguments provided to the memoized function. By default, the + * first argument provided to the memoized function is used as the cache key. + * The `func` is executed with the `this` binding of the memoized function. + * The result cache is exposed as the `cache` property on the memoized function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] A function used to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var fibonacci = _.memoize(function(n) { + * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); + * }); + * + * fibonacci(9) + * // => 34 + * + * var data = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // modifying the result cache + * var get = _.memoize(function(name) { return data[name]; }, _.identity); + * get('pebbles'); + * // => { 'name': 'pebbles', 'age': 1 } + * + * get.cache.pebbles.name = 'penelope'; + * get('pebbles'); + * // => { 'name': 'penelope', 'age': 1 } + */ + function memoize(func, resolver) { + if (!isFunction(func)) { + throw new TypeError; + } + var memoized = function() { + var cache = memoized.cache, + key = resolver ? resolver.apply(this, arguments) : keyPrefix + arguments[0]; + + return hasOwnProperty.call(cache, key) + ? cache[key] + : (cache[key] = func.apply(this, arguments)); + } + memoized.cache = {}; + return memoized; + } + + /** + * Creates a function that is restricted to execute `func` once. Repeat calls to + * the function will return the value of the first call. The `func` is executed + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` executes `createApplication` once + */ + function once(func) { + var ran, + result; + + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (ran) { + return result; + } + ran = true; + result = func.apply(this, arguments); + + // clear the `func` variable so the function may be garbage collected + func = null; + return result; + }; + } + + /** + * Creates a function that, when called, invokes `func` with any additional + * `partial` arguments prepended to those provided to the new function. This + * method is similar to `_.bind` except it does **not** alter the `this` binding. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { return greeting + ' ' + name; }; + * var hi = _.partial(greet, 'hi'); + * hi('fred'); + * // => 'hi fred' + */ + function partial(func) { + return createWrapper(func, 16, slice(arguments, 1)); + } + + /** + * This method is like `_.partial` except that `partial` arguments are + * appended to those provided to the new function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var defaultsDeep = _.partialRight(_.merge, _.defaults); + * + * var options = { + * 'variable': 'data', + * 'imports': { 'jq': $ } + * }; + * + * defaultsDeep(options, _.templateSettings); + * + * options.variable + * // => 'data' + * + * options.imports + * // => { '_': _, 'jq': $ } + */ + function partialRight(func) { + return createWrapper(func, 32, null, slice(arguments, 1)); + } + + /** + * Creates a function that, when executed, will only call the `func` function + * at most once per every `wait` milliseconds. Provide an options object to + * indicate that `func` should be invoked on the leading and/or trailing edge + * of the `wait` timeout. Subsequent calls to the throttled function will + * return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * var throttled = _.throttle(updatePosition, 100); + * jQuery(window).on('scroll', throttled); + * + * // execute `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? options.leading : leading; + trailing = 'trailing' in options ? options.trailing : trailing; + } + debounceOptions.leading = leading; + debounceOptions.maxWait = wait; + debounceOptions.trailing = trailing; + + return debounce(func, wait, debounceOptions); + } + + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Additional arguments provided to the function are appended + * to those provided to the wrapper function. The wrapper is executed with + * the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('Fred, Wilma, & Pebbles'); + * // => '

Fred, Wilma, & Pebbles

' + */ + function wrap(value, wrapper) { + return createWrapper(wrapper, 16, [value]); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'name': 'fred' }; + * var getter = _.constant(object); + * getter() === object; + * // => true + */ + function constant(value) { + return function() { + return value; + }; + } + + /** + * Produces a callback bound to an optional `thisArg`. If `func` is a property + * name the created callback will return the property value for a given element. + * If `func` is an object the created callback will return `true` for elements + * that contain the equivalent object properties, otherwise it will return `false`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // wrap to create custom callback shorthands + * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { + * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); + * return !match ? func(callback, thisArg) : function(object) { + * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; + * }; + * }); + * + * _.filter(characters, 'age__gt38'); + * // => [{ 'name': 'fred', 'age': 40 }] + */ + function createCallback(func, thisArg, argCount) { + var type = typeof func; + if (func == null || type == 'function') { + return baseCreateCallback(func, thisArg, argCount); + } + // handle "_.pluck" style callback shorthands + if (type != 'object') { + return property(func); + } + var props = keys(func), + key = props[0], + a = func[key]; + + // handle "_.where" style callback shorthands + if (props.length == 1 && a === a && !isObject(a)) { + // fast path the common case of providing an object with a single + // property containing a primitive value + return function(object) { + var b = object[key]; + return a === b && (a !== 0 || (1 / a == 1 / b)); + }; + } + return function(object) { + var length = props.length, + result = false; + + while (length--) { + if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) { + break; + } + } + return result; + }; + } + + /** + * 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); + } + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'name': 'fred' }; + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + /** + * Adds function properties of a source object to the destination object. + * If `object` is a function methods will be added to its prototype as well. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Function|Object} [object=lodash] object The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options] The options object. + * @param {boolean} [options.chain=true] Specify whether the functions added are chainable. + * @example + * + * function capitalize(string) { + * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); + * } + * + * _.mixin({ 'capitalize': capitalize }); + * _.capitalize('fred'); + * // => 'Fred' + * + * _('fred').capitalize().value(); + * // => 'Fred' + * + * _.mixin({ 'capitalize': capitalize }, { 'chain': false }); + * _('fred').capitalize(); + * // => 'Fred' + */ + function mixin(object, source, options) { + var chain = true, + methodNames = source && functions(source); + + if (!source || (!options && !methodNames.length)) { + if (options == null) { + options = source; + } + ctor = lodashWrapper; + source = object; + object = lodash; + methodNames = functions(source); + } + if (options === false) { + chain = false; + } else if (isObject(options) && 'chain' in options) { + chain = options.chain; + } + var ctor = object, + isFunc = isFunction(ctor); + + forEach(methodNames, function(methodName) { + var func = object[methodName] = source[methodName]; + if (isFunc) { + ctor.prototype[methodName] = function() { + var chainAll = this.__chain__, + value = this.__wrapped__, + args = [value]; + + push.apply(args, arguments); + var result = func.apply(object, args); + if (chain || chainAll) { + if (value === result && isObject(result)) { + return this; + } + result = new ctor(result); + result.__chain__ = chainAll; + } + return result; + }; + } + }); + } + + /** + * Reverts the '_' variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @memberOf _ + * @category Utilities + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + context._ = oldDash; + return this; + } + + /** + * A no-operation function. + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var object = { 'name': 'fred' }; + * _.noop(object) === undefined; + * // => true + */ + function noop() { + // no operation performed + } + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var stamp = _.now(); + * _.defer(function() { console.log(_.now() - stamp); }); + * // => logs the number of milliseconds it took for the deferred function to be called + */ + var now = isNative(now = Date.now) && now || function() { + return new Date().getTime(); + }; + + /** + * Converts the given value into an integer of the specified radix. + * If `radix` is `undefined` or `0` a `radix` of `10` is used unless the + * `value` is a hexadecimal, in which case a `radix` of `16` is used. + * + * Note: This method avoids differences in native ES3 and ES5 `parseInt` + * implementations. See http://es5.github.io/#E. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. + * @example + * + * _.parseInt('08'); + * // => 8 + */ + var parseInt = nativeParseInt(whitespace + '08') == 8 ? nativeParseInt : function(value, radix) { + // Firefox < 21 and Opera < 15 follow the ES3 specified implementation of `parseInt` + return nativeParseInt(isString(value) ? value.replace(reLeadingSpacesAndZeros, '') : value, radix || 0); + }; + + /** + * Creates a "_.pluck" style function, which returns the `key` value of a + * given object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} key The name of the property to retrieve. + * @returns {Function} Returns the new function. + * @example + * + * var characters = [ + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 36 } + * ]; + * + * var getName = _.property('name'); + * + * _.map(characters, getName); + * // => ['barney', 'fred'] + * + * _.sortBy(characters, getName); + * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] + */ + function property(key) { + return function(object) { + return object[key]; + }; + } + + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number will be + * returned. If `floating` is truey or either `min` or `max` are floats a + * floating-point number will be returned instead of an integer. + * + * @static + * @memberOf _ + * @category Utilities + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating=false] Specify returning a floating-point number. + * @returns {number} Returns a random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(min, max, floating) { + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (typeof min == 'boolean' && noMax) { + floating = min; + min = 1; + } + else if (!noMax && typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand +'').length - 1)))), max); + } + return baseRandom(min, max); + } + + /** + * Resolves the value of property `key` on `object`. If `key` is a function + * it will be invoked with the `this` binding of `object` and its result returned, + * else the property value is returned. If `object` is falsey then `undefined` + * is returned. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to resolve. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { + * 'cheese': 'crumpets', + * 'stuff': function() { + * return 'nonsense'; + * } + * }; + * + * _.result(object, 'cheese'); + * // => 'crumpets' + * + * _.result(object, 'stuff'); + * // => 'nonsense' + */ + function result(object, key) { + if (object) { + var value = object[key]; + return isFunction(value) ? object[key]() : value; + } + } + + /** + * 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('<%- value %>', { 'value': '\n```\n\nUsing [`npm`](http://npmjs.org/):\n\n```bash\nnpm i --save lodash\n\n{sudo} npm i -g lodash\nnpm ln lodash\n```\n\nIn [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/):\n\n```js\nvar _ = require('lodash');\n// or as Underscore\nvar _ = require('lodash/dist/lodash.underscore');\n```\n\n**Notes:**\n * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL\n * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('lodash.js');\n```\n\nIn an AMD loader:\n\n```js\nrequire({\n 'packages': [\n { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }\n ]\n},\n['lodash'], function(_) {\n console.log(_.VERSION);\n});\n```\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\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", + "readmeFilename": "README.md", + "_id": "lodash@2.4.1", + "_from": "lodash@^2.4.1", + "scripts": {} +} diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/index.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/index.js index 9549c96..cb0afc2 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/index.js +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/index.js @@ -1,7 +1,11 @@ module.exports = function (args, opts) { if (!opts) opts = {}; - var flags = { bools : {}, strings : {} }; + var flags = { bools : {}, strings : {}, unknownFn: null }; + + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { flags.allBools = true; @@ -42,7 +46,16 @@ module.exports = function (args, opts) { args = args.slice(0, args.indexOf('--')); } - function setArg (key, val) { + function argDefined(key, arg) { + return (flags.allBools && /^--[^=]+$/.test(arg)) || + flags.strings[key] || flags.bools[key] || aliases[key]; + } + + function setArg (key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } + var value = !flags.strings[key] && isNumber(val) ? Number(val) : val ; @@ -61,11 +74,11 @@ module.exports = function (args, opts) { // 'dotall' regex modifier. See: // http://stackoverflow.com/a/1068308/13216 var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); + setArg(m[1], m[2], arg); } else if (/^--no-.+/.test(arg)) { var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); + setArg(key, false, arg); } else if (/^--.+/.test(arg)) { var key = arg.match(/^--(.+)/)[1]; @@ -74,15 +87,15 @@ module.exports = function (args, opts) { && !flags.bools[key] && !flags.allBools && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); + setArg(key, next, arg); i++; } else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); + setArg(key, next === 'true', arg); i++; } else { - setArg(key, flags.strings[key] ? '' : true); + setArg(key, flags.strings[key] ? '' : true, arg); } } else if (/^-[^-]+/.test(arg)) { @@ -93,24 +106,24 @@ module.exports = function (args, opts) { var next = arg.slice(j+2); if (next === '-') { - setArg(letters[j], next) + setArg(letters[j], next, arg) continue; } if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); + setArg(letters[j], next, arg); broken = true; break; } if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); + setArg(letters[j], arg.slice(j+2), arg); broken = true; break; } else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); } } @@ -119,22 +132,28 @@ module.exports = function (args, opts) { if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) && !flags.bools[key] && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); + setArg(key, args[i+1], arg); i++; } else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); + setArg(key, args[i+1] === 'true', arg); i++; } else { - setArg(key, flags.strings[key] ? '' : true); + setArg(key, flags.strings[key] ? '' : true, arg); } } } else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } } } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/package.json index 3b36570..4d20429 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/package.json @@ -1,14 +1,16 @@ { "name": "minimist", - "version": "0.2.0", + "version": "1.1.0", "description": "parse argument options", "main": "index.js", "devDependencies": { "tape": "~1.0.4", - "tap": "~0.4.0" + "tap": "~0.4.0", + "covert": "^1.0.0" }, "scripts": { - "test": "tap test/*.js" + "test": "tap test/*.js", + "coverage": "covert test/*.js" }, "testling": { "files": "test/*.js", @@ -40,14 +42,14 @@ "url": "http://substack.net" }, "license": "MIT", - "gitHead": "f904dcc3c28f10eb11840091e9f0bab9d9519b5c", + "gitHead": "e2563e462be40c344c6c65b7cde85091fe261976", "bugs": { "url": "https://github.com/substack/minimist/issues" }, - "_id": "minimist@0.2.0", - "_shasum": "4dffe525dae2b864c66c2e23c6271d7afdecefce", - "_from": "minimist@^0.2.0", - "_npmVersion": "1.4.15", + "_id": "minimist@1.1.0", + "_shasum": "cdf225e8898f840a258ded44fc91776770afdc93", + "_from": "minimist@^1.1.0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "substack", "email": "mail@substack.net" @@ -59,10 +61,10 @@ } ], "dist": { - "shasum": "4dffe525dae2b864c66c2e23c6271d7afdecefce", - "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz" + "shasum": "cdf225e8898f840a258ded44fc91776770afdc93", + "tarball": "http://registry.npmjs.org/minimist/-/minimist-1.1.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz", + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/readme.markdown b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/readme.markdown index 8253221..30a74cf 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/readme.markdown +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/readme.markdown @@ -61,8 +61,13 @@ as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) * `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 +* `opts.stopEarly` - when true, populate `argv._` with everything after the +first non-option * `opts['--']` - when true, populate `argv._` with everything before the `--` and `argv['--']` with everything after the `--`. Here's an example: +* `opts.unknown` - a function which is invoked with a command line parameter not +defined in the `opts` configuration object. If the function returns `false`, the +unknown option is not added to `argv`. ``` > require('./')('one two three -- four five --six'.split(' '), { '--': true }) diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/test/stop_early.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/test/stop_early.js new file mode 100644 index 0000000..bdf9fbc --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/test/stop_early.js @@ -0,0 +1,15 @@ +var parse = require('../'); +var test = require('tape'); + +test('stops parsing on the first non-option when stopEarly is set', function (t) { + var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { + stopEarly: true + }); + + t.deepEqual(argv, { + aaa: 'bbb', + _: ['ccc', '--ddd'] + }); + + t.end(); +}); diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/test/unknown.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/test/unknown.js new file mode 100644 index 0000000..462a36b --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/minimist/test/unknown.js @@ -0,0 +1,102 @@ +var parse = require('../'); +var test = require('tape'); + +test('boolean and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'true', '--derp', 'true' ]; + var regular = [ '--herp', 'true', '-d', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('flag boolean true any double hyphen argument is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { + boolean: true, + unknown: unknownFn + }); + t.same(unknown, ['--tacos=good', 'cow', '-p']); + t.same(argv, { + honk: true, + _: [] + }); + t.end(); +}); + +test('string and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; + var regular = [ '--herp', 'hello', '-d', 'moon' ]; + var opts = { + alias: { h: 'herp' }, + string: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('default and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello' ]; + var regular = [ '--herp', 'hello' ]; + var opts = { + default: { 'h': 'bar' }, + alias: { 'h': 'herp' }, + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, []); + t.end(); + unknownFn(); // exercise fn for 100% coverage +}); + +test('value following -- is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '--bad', '--', 'good', 'arg' ]; + var opts = { + '--': true, + unknown: unknownFn + }; + var argv = parse(aliased, opts); + + t.same(unknown, ['--bad']); + t.same(argv, { + '--': ['good', 'arg'], + '_': [] + }) + t.end(); +}); diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md index 34c1189..e46b823 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md @@ -2,8 +2,8 @@ ***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/) +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/) This package is a mirror of the Streams2 and Streams3 implementations in Node-core. diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js index 7f4e3b8..19ab358 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js @@ -63,6 +63,8 @@ if (debug && debug.debuglog) { util.inherits(Readable, Stream); function ReadableState(options, stream) { + var Duplex = require('./_stream_duplex'); + options = options || {}; // the point at which it stops calling _read() to fill the buffer @@ -100,6 +102,9 @@ function ReadableState(options, stream) { // make all the buffer merging and length checks go away this.objectMode = !!options.objectMode; + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; + // 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. @@ -126,6 +131,8 @@ function ReadableState(options, stream) { } function Readable(options) { + var Duplex = require('./_stream_duplex'); + if (!(this instanceof Readable)) return new Readable(options); diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js index 9ea2829..db8539c 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js @@ -48,6 +48,8 @@ function WriteReq(chunk, encoding, cb) { } function WritableState(options, stream) { + var Duplex = require('./_stream_duplex'); + options = options || {}; // the point at which write() starts returning false @@ -61,6 +63,9 @@ function WritableState(options, stream) { // contains buffers or objects. this.objectMode = !!options.objectMode; + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.writableObjectMode; + // cast to ints. this.highWaterMark = ~~this.highWaterMark; diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js index 2e44a03..b00e54f 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -36,6 +36,14 @@ function assertEncoding(encoding) { } } +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. var StringDecoder = exports.StringDecoder = function(encoding) { this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); assertEncoding(encoding); @@ -60,37 +68,50 @@ var StringDecoder = exports.StringDecoder = function(encoding) { return; } + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. this.charLength = 0; }; +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . 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; + var available = (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; + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; if (this.charReceived < this.charLength) { // still not enough chars in this buffer? wait for more ... return ''; } + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + // 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 + // CESU-8: 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; @@ -100,34 +121,33 @@ StringDecoder.prototype.write = function(buffer) { 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); + if (buffer.length === 0) { + return charStr; + } break; } - var lenIncomplete = this.detectIncompleteChar(buffer); + // determine and set charLength / charReceived + 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; + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } 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 + // CESU-8: 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); + buffer.copy(this.charBuffer, 0, 0, size); return charStr.substring(0, end); } @@ -135,6 +155,10 @@ StringDecoder.prototype.write = function(buffer) { return charStr; }; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. 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; @@ -164,8 +188,7 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { break; } } - - return i; + this.charReceived = i; }; StringDecoder.prototype.end = function(buffer) { @@ -188,13 +211,11 @@ function passThroughWrite(buffer) { } function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json index 7f5d001..a8c586b 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,6 +1,6 @@ { "name": "string_decoder", - "version": "0.10.25-1", + "version": "0.10.31", "description": "The string_decoder module from Node core", "main": "index.js", "dependencies": {}, @@ -22,11 +22,33 @@ "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", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@~0.10.x", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json index e760eff..69eee6c 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.1.13-1", + "version": "1.1.13", "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", "main": "readable.js", "dependencies": { @@ -33,12 +33,38 @@ "url": "http://blog.izs.me/" }, "license": "MIT", - "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", + "gitHead": "3b672fd7ae92acf5b4ffdbabf74b372a0a56b051", "bugs": { "url": "https://github.com/isaacs/readable-stream/issues" }, "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.1.13-1", - "_from": "readable-stream@~1.1.9" + "_id": "readable-stream@1.1.13", + "_shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "_from": "readable-stream@~1.1.9", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/README.md b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/README.md index 33aa01e..ec74569 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/README.md +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/README.md @@ -100,7 +100,9 @@ The `transformFunction` must have the following signature: `function (chunk, enc 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. +Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. + +If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. ### flushFunction diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js index 0ca7705..6307220 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js @@ -240,7 +240,7 @@ function howMuchToRead(n, state) { if (state.objectMode) return n === 0 ? 0 : 1; - if (isNaN(n) || n === null) { + if (n === null || isNaN(n)) { // only flow one buffer at a time if (state.flowing && state.buffer.length) return state.buffer[0].length; @@ -275,6 +275,7 @@ Readable.prototype.read = function(n) { var state = this._readableState; state.calledRead = true; var nOrig = n; + var ret; if (typeof n !== 'number' || n > 0) state.emittedReadable = false; @@ -293,9 +294,28 @@ Readable.prototype.read = function(n) { // if we've ended, and we're now clear, then finish it up. if (n === 0 && state.ended) { + ret = null; + + // In cases where the decoder did not receive enough data + // to produce a full chunk, then immediately received an + // EOF, state.buffer will contain [, ]. + // howMuchToRead will see this and coerce the amount to + // read to zero (because it's looking at the length of the + // first in state.buffer), and we'll end up here. + // + // This can only happen via state.decoder -- no other venue + // exists for pushing a zero-length chunk into state.buffer + // and triggering this behavior. In this case, we return our + // remaining data and end the stream, if appropriate. + if (state.length > 0 && state.decoder) { + ret = fromList(n, state); + state.length -= ret.length; + } + if (state.length === 0) endReadable(this); - return null; + + return ret; } // All the actual chunk generation logic needs to be @@ -349,7 +369,6 @@ Readable.prototype.read = function(n) { if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - var ret; if (n > 0) ret = fromList(n, state); else @@ -382,8 +401,7 @@ function chunkInvalid(state, chunk) { 'string' !== typeof chunk && chunk !== null && chunk !== undefined && - !state.objectMode && - !er) { + !state.objectMode) { er = new TypeError('Invalid non-string/buffer chunk'); } return er; @@ -814,7 +832,12 @@ Readable.prototype.wrap = function(stream) { stream.on('data', function(chunk) { if (state.decoder) chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) + + // don't skip over falsy values in objectMode + //if (state.objectMode && util.isNullOrUndefined(chunk)) + if (state.objectMode && (chunk === null || chunk === undefined)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) return; var ret = self.push(chunk); diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js index d0254d5..4bdaa4f 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js @@ -37,7 +37,6 @@ var util = require('core-util-is'); util.inherits = require('inherits'); /**/ - var Stream = require('stream'); util.inherits(Writable, Stream); diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js index 2e44a03..b00e54f 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -36,6 +36,14 @@ function assertEncoding(encoding) { } } +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. var StringDecoder = exports.StringDecoder = function(encoding) { this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); assertEncoding(encoding); @@ -60,37 +68,50 @@ var StringDecoder = exports.StringDecoder = function(encoding) { return; } + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. this.charLength = 0; }; +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . 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; + var available = (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; + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; if (this.charReceived < this.charLength) { // still not enough chars in this buffer? wait for more ... return ''; } + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + // 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 + // CESU-8: 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; @@ -100,34 +121,33 @@ StringDecoder.prototype.write = function(buffer) { 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); + if (buffer.length === 0) { + return charStr; + } break; } - var lenIncomplete = this.detectIncompleteChar(buffer); + // determine and set charLength / charReceived + 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; + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } 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 + // CESU-8: 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); + buffer.copy(this.charBuffer, 0, 0, size); return charStr.substring(0, end); } @@ -135,6 +155,10 @@ StringDecoder.prototype.write = function(buffer) { return charStr; }; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. 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; @@ -164,8 +188,7 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { break; } } - - return i; + this.charReceived = i; }; StringDecoder.prototype.end = function(buffer) { @@ -188,13 +211,11 @@ function passThroughWrite(buffer) { } function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json index 7f5d001..a8c586b 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,6 +1,6 @@ { "name": "string_decoder", - "version": "0.10.25-1", + "version": "0.10.31", "description": "The string_decoder module from Node core", "main": "index.js", "dependencies": {}, @@ -22,11 +22,33 @@ "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", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@~0.10.x", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json index afdd6ef..15c84e6 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.0.27-1", + "version": "1.0.31", "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", "main": "readable.js", "dependencies": { @@ -37,13 +37,10 @@ "url": "https://github.com/isaacs/readable-stream/issues" }, "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.27-1", - "dist": { - "shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz" - }, - "_from": "readable-stream@~1.0.17", - "_npmVersion": "1.4.3", + "_id": "readable-stream@1.0.31", + "_shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "_from": "readable-stream@>=1.0.27-1 <1.1.0-0", + "_npmVersion": "1.4.9", "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" @@ -62,8 +59,11 @@ "email": "rod@vagg.org" } ], + "dist": { + "shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz" + }, "directories": {}, - "_shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md index e754831..093cb29 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md @@ -2,9 +2,11 @@ [![browser support][3]][4] +[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + 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. +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 precedence. ## Examples @@ -13,13 +15,15 @@ var extend = require("xtend") // extend returns a new object. Does not mutate arguments var combination = extend({ - a: "a" + a: "a", + b: 'c' }, { b: "b" }) // { a: "a", b: "b" } ``` +## Stability status: Locked ## MIT Licenced diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/immutable.js similarity index 100% rename from node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js rename to node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/immutable.js diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json index 99147b6..d90698e 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json @@ -1,6 +1,6 @@ { "name": "xtend", - "version": "3.0.0", + "version": "4.0.0", "description": "extend like a boss", "keywords": [ "extend", @@ -18,7 +18,7 @@ "type": "git", "url": "git://github.com/Raynos/xtend.git" }, - "main": "index", + "main": "immutable", "scripts": { "test": "node test" }, @@ -63,13 +63,11 @@ "engines": { "node": ">=0.4" }, - "_id": "xtend@3.0.0", - "dist": { - "shasum": "5cce7407baf642cba7becda568111c493f59665a", - "tarball": "http://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" - }, - "_from": "xtend@~3.0.0", - "_npmVersion": "1.4.6", + "gitHead": "94a95d76154103290533b2c55ffa0fe4be16bfef", + "_id": "xtend@4.0.0", + "_shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", + "_from": "xtend@>=4.0.0 <4.1.0-0", + "_npmVersion": "1.4.15", "_npmUser": { "name": "raynos", "email": "raynos2@gmail.com" @@ -80,8 +78,11 @@ "email": "raynos2@gmail.com" } ], + "dist": { + "shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", + "tarball": "http://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz" + }, "directories": {}, - "_shasum": "5cce7407baf642cba7becda568111c493f59665a", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/package.json index 673a482..cfaa0c8 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/package.json @@ -1,6 +1,6 @@ { "name": "through2", - "version": "0.5.1", + "version": "0.6.1", "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", "main": "through2.js", "scripts": { @@ -24,26 +24,23 @@ }, "license": "MIT", "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~3.0.0" + "readable-stream": ">=1.0.27-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" }, "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" + "bl": ">=0.9.0 <0.10.0-0", + "stream-spigot": ">=3.0.4 <3.1.0-0", + "tape": ">=2.14.0 <2.15.0-0" }, + "gitHead": "f66daaa2cb5d37b56c401f3b5a4962f709893267", "bugs": { "url": "https://github.com/rvagg/through2/issues" }, "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.5.1", - "dist": { - "shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "tarball": "http://registry.npmjs.org/through2/-/through2-0.5.1.tgz" - }, - "_from": "through2@^0.5.0", - "_npmVersion": "1.4.3", + "_id": "through2@0.6.1", + "_shasum": "f742b32893e8bd26146e789e4fd2ccb2c07a717e", + "_from": "through2@^0.6.1", + "_npmVersion": "1.4.21", "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" @@ -58,8 +55,11 @@ "email": "bryce@ravenwall.com" } ], + "dist": { + "shasum": "f742b32893e8bd26146e789e4fd2ccb2c07a717e", + "tarball": "http://registry.npmjs.org/through2/-/through2-0.6.1.tgz" + }, "directories": {}, - "_shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", + "_resolved": "https://registry.npmjs.org/through2/-/through2-0.6.1.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/through2.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/through2.js index d3610aa..5b7a880 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/through2.js +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/through2/through2.js @@ -2,6 +2,24 @@ var Transform = require('readable-stream/transform') , inherits = require('util').inherits , xtend = require('xtend') +function DestroyableTransform(opts) { + Transform.call(this, opts) + this._destroyed = false +} + +inherits(DestroyableTransform, Transform) + +DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) return + this._destroyed = true + + var self = this + process.nextTick(function() { + if (err) + self.emit('error', err) + self.emit('close') + }) +} // a noop _transform function function noop (chunk, enc, callback) { @@ -32,7 +50,7 @@ function through2 (construct) { // main export, just make me a transform stream! module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) + var t2 = new DestroyableTransform(options) t2._transform = transform @@ -52,10 +70,10 @@ module.exports.ctor = through2(function (options, transform, flush) { this.options = xtend(options, override) - Transform.call(this, this.options) + DestroyableTransform.call(this, this.options) } - inherits(Through2, Transform) + inherits(Through2, DestroyableTransform) Through2.prototype._transform = transform @@ -67,7 +85,7 @@ module.exports.ctor = through2(function (options, transform, flush) { module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true, highWaterMark: 16 }, options)) + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) t2._transform = transform diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.jshintignore b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.jshintignore new file mode 100644 index 0000000..ba2a97b --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.jshintignore @@ -0,0 +1,2 @@ +node_modules +coverage diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.jshintrc b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.jshintrc new file mode 100644 index 0000000..373d6c3 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.jshintrc @@ -0,0 +1,36 @@ +{ + "indent": 2, + "smarttabs": true, + "latedef": "nofunc", + "undef": true, + "unused": true, + "trailing": true, + "laxcomma": false, + "eqeqeq": true, + "eqnull": true, + "boss": true, + "expr": true, + "sub": true, + "newcap": true, + "quotmark": true, + "loopfunc": true, + "lastsemic": true, + "funcscope": true, + "browser": true, + "nonstandard": true, + "jquery": true, + "devel": true, + "node": true, + "esnext": true, + "globals": { + "describe": false, + "xdescribe": false, + "it": false, + "xit": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false, + "define": false + } +} diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.npmignore b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.npmignore new file mode 100644 index 0000000..b5ef13a --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.npmignore @@ -0,0 +1,6 @@ +.DS_Store +*.log +node_modules +build +*.node +components \ No newline at end of file diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.travis.yml b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.travis.yml new file mode 100644 index 0000000..8b95a9f --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" +after_script: + - npm run coveralls diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/LICENSE similarity index 77% rename from node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt rename to node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/LICENSE index 49869bb..4f482f9 100644 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/LICENSE @@ -1,6 +1,4 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +Copyright (c) 2013 Fractal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -19,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/README.md b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/README.md new file mode 100644 index 0000000..ae6f16f --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/README.md @@ -0,0 +1,127 @@ +# 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 + + + + + + + + + + + + + +
Packagevinyl
DescriptionA virtual file format
Node Version>= 0.9
+ +## What is this? + +Read this for more info about how this plays into the grand scheme of things https://medium.com/@eschoff/3828e8126466 + +## 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. Custom attributes are deep-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 false, 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 diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json new file mode 100644 index 0000000..2bf4c62 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json @@ -0,0 +1 @@ +{"/Users/contra/Projects/vinyl/index.js":{"path":"/Users/contra/Projects/vinyl/index.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":73,"12":14,"13":73,"14":73,"15":73,"16":73,"17":73,"18":73,"19":1,"20":26,"21":1,"22":29,"23":1,"24":6,"25":1,"26":3,"27":1,"28":14,"29":2,"30":12,"31":7,"32":5,"33":5,"34":14,"35":14,"36":1,"37":1,"38":13,"39":6,"40":14,"41":14,"42":75,"43":70,"44":5,"45":14,"46":1,"47":6,"48":3,"49":6,"50":3,"51":6,"52":2,"53":4,"54":2,"55":1,"56":1,"57":2,"58":2,"59":1,"60":2,"61":1,"62":6,"63":6,"64":6,"65":4,"66":6,"67":3,"68":6,"69":1,"70":6,"71":1,"72":99,"73":78,"74":1,"75":77,"76":1,"77":7,"78":1,"79":6,"80":1,"81":5,"82":1,"83":1,"84":46,"85":9,"86":1,"87":8,"88":5,"89":1},"b":{"1":[14,59],"2":[25,48],"3":[73,33],"4":[73,32],"5":[73,39],"6":[73,65],"7":[73,44],"8":[3,1,1],"9":[2,12],"10":[7,5],"11":[1,13],"12":[6,7],"13":[5,1],"14":[2,12],"15":[70,5],"16":[75,61,47,33,33,19],"17":[2,3],"18":[3,3],"19":[3,3],"20":[2,4],"21":[2,2],"22":[1,1],"23":[1,1],"24":[3,3],"25":[6,5],"26":[4,2],"27":[3,3],"28":[1,5],"29":[1,77],"30":[78,57,46],"31":[1,6],"32":[1,5],"33":[1,8],"34":[5,3],"35":[8,7]},"f":{"1":73,"2":26,"3":29,"4":6,"5":3,"6":14,"7":75,"8":6,"9":6,"10":99,"11":78,"12":7,"13":1,"14":46,"15":9},"fnMap":{"1":{"name":"File","line":11,"loc":{"start":{"line":11,"column":0},"end":{"line":11,"column":20}}},"2":{"name":"(anonymous_2)","line":30,"loc":{"start":{"line":30,"column":26},"end":{"line":30,"column":37}}},"3":{"name":"(anonymous_3)","line":34,"loc":{"start":{"line":34,"column":26},"end":{"line":34,"column":37}}},"4":{"name":"(anonymous_4)","line":38,"loc":{"start":{"line":38,"column":24},"end":{"line":38,"column":35}}},"5":{"name":"(anonymous_5)","line":43,"loc":{"start":{"line":43,"column":29},"end":{"line":43,"column":40}}},"6":{"name":"(anonymous_6)","line":47,"loc":{"start":{"line":47,"column":23},"end":{"line":47,"column":37}}},"7":{"name":"(anonymous_7)","line":81,"loc":{"start":{"line":81,"column":28},"end":{"line":81,"column":42}}},"8":{"name":"(anonymous_8)","line":93,"loc":{"start":{"line":93,"column":22},"end":{"line":93,"column":44}}},"9":{"name":"(anonymous_9)","line":114,"loc":{"start":{"line":114,"column":25},"end":{"line":114,"column":36}}},"10":{"name":"(anonymous_10)","line":138,"loc":{"start":{"line":138,"column":7},"end":{"line":138,"column":18}}},"11":{"name":"(anonymous_11)","line":141,"loc":{"start":{"line":141,"column":7},"end":{"line":141,"column":21}}},"12":{"name":"(anonymous_12)","line":151,"loc":{"start":{"line":151,"column":7},"end":{"line":151,"column":18}}},"13":{"name":"(anonymous_13)","line":156,"loc":{"start":{"line":156,"column":7},"end":{"line":156,"column":18}}},"14":{"name":"(anonymous_14)","line":162,"loc":{"start":{"line":162,"column":7},"end":{"line":162,"column":18}}},"15":{"name":"(anonymous_15)","line":165,"loc":{"start":{"line":165,"column":7},"end":{"line":165,"column":22}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":27}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":36}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":40}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":47}},"5":{"start":{"line":5,"column":0},"end":{"line":5,"column":41}},"6":{"start":{"line":6,"column":0},"end":{"line":6,"column":41}},"7":{"start":{"line":7,"column":0},"end":{"line":7,"column":37}},"8":{"start":{"line":8,"column":0},"end":{"line":8,"column":51}},"9":{"start":{"line":9,"column":0},"end":{"line":9,"column":31}},"10":{"start":{"line":11,"column":0},"end":{"line":28,"column":1}},"11":{"start":{"line":12,"column":2},"end":{"line":12,"column":23}},"12":{"start":{"line":12,"column":13},"end":{"line":12,"column":23}},"13":{"start":{"line":15,"column":2},"end":{"line":15,"column":55}},"14":{"start":{"line":16,"column":2},"end":{"line":16,"column":31}},"15":{"start":{"line":19,"column":2},"end":{"line":19,"column":39}},"16":{"start":{"line":20,"column":2},"end":{"line":20,"column":36}},"17":{"start":{"line":24,"column":2},"end":{"line":24,"column":32}},"18":{"start":{"line":27,"column":2},"end":{"line":27,"column":40}},"19":{"start":{"line":30,"column":0},"end":{"line":32,"column":2}},"20":{"start":{"line":31,"column":2},"end":{"line":31,"column":33}},"21":{"start":{"line":34,"column":0},"end":{"line":36,"column":2}},"22":{"start":{"line":35,"column":2},"end":{"line":35,"column":33}},"23":{"start":{"line":38,"column":0},"end":{"line":40,"column":2}},"24":{"start":{"line":39,"column":2},"end":{"line":39,"column":31}},"25":{"start":{"line":43,"column":0},"end":{"line":45,"column":2}},"26":{"start":{"line":44,"column":2},"end":{"line":44,"column":63}},"27":{"start":{"line":47,"column":0},"end":{"line":91,"column":2}},"28":{"start":{"line":48,"column":2},"end":{"line":61,"column":3}},"29":{"start":{"line":49,"column":4},"end":{"line":52,"column":6}},"30":{"start":{"line":53,"column":9},"end":{"line":61,"column":3}},"31":{"start":{"line":54,"column":4},"end":{"line":57,"column":6}},"32":{"start":{"line":59,"column":4},"end":{"line":59,"column":33}},"33":{"start":{"line":60,"column":4},"end":{"line":60,"column":42}},"34":{"start":{"line":64,"column":2},"end":{"line":64,"column":15}},"35":{"start":{"line":65,"column":2},"end":{"line":70,"column":3}},"36":{"start":{"line":66,"column":4},"end":{"line":66,"column":60}},"37":{"start":{"line":67,"column":4},"end":{"line":67,"column":65}},"38":{"start":{"line":68,"column":9},"end":{"line":70,"column":3}},"39":{"start":{"line":69,"column":4},"end":{"line":69,"column":73}},"40":{"start":{"line":72,"column":2},"end":{"line":78,"column":5}},"41":{"start":{"line":81,"column":2},"end":{"line":89,"column":11}},"42":{"start":{"line":83,"column":4},"end":{"line":87,"column":5}},"43":{"start":{"line":86,"column":6},"end":{"line":86,"column":13}},"44":{"start":{"line":88,"column":4},"end":{"line":88,"column":62}},"45":{"start":{"line":90,"column":2},"end":{"line":90,"column":14}},"46":{"start":{"line":93,"column":0},"end":{"line":112,"column":2}},"47":{"start":{"line":94,"column":2},"end":{"line":94,"column":21}},"48":{"start":{"line":94,"column":12},"end":{"line":94,"column":21}},"49":{"start":{"line":95,"column":2},"end":{"line":95,"column":53}},"50":{"start":{"line":95,"column":38},"end":{"line":95,"column":53}},"51":{"start":{"line":97,"column":2},"end":{"line":99,"column":3}},"52":{"start":{"line":98,"column":4},"end":{"line":98,"column":43}},"53":{"start":{"line":100,"column":2},"end":{"line":107,"column":3}},"54":{"start":{"line":101,"column":4},"end":{"line":105,"column":5}},"55":{"start":{"line":102,"column":6},"end":{"line":102,"column":32}},"56":{"start":{"line":104,"column":6},"end":{"line":104,"column":34}},"57":{"start":{"line":106,"column":4},"end":{"line":106,"column":18}},"58":{"start":{"line":110,"column":2},"end":{"line":110,"column":28}},"59":{"start":{"line":110,"column":15},"end":{"line":110,"column":28}},"60":{"start":{"line":111,"column":2},"end":{"line":111,"column":16}},"61":{"start":{"line":114,"column":0},"end":{"line":133,"column":2}},"62":{"start":{"line":115,"column":2},"end":{"line":115,"column":19}},"63":{"start":{"line":118,"column":2},"end":{"line":118,"column":70}},"64":{"start":{"line":120,"column":2},"end":{"line":122,"column":3}},"65":{"start":{"line":121,"column":4},"end":{"line":121,"column":35}},"66":{"start":{"line":124,"column":2},"end":{"line":126,"column":3}},"67":{"start":{"line":125,"column":4},"end":{"line":125,"column":42}},"68":{"start":{"line":128,"column":2},"end":{"line":130,"column":3}},"69":{"start":{"line":129,"column":4},"end":{"line":129,"column":47}},"70":{"start":{"line":132,"column":2},"end":{"line":132,"column":40}},"71":{"start":{"line":137,"column":0},"end":{"line":147,"column":3}},"72":{"start":{"line":139,"column":4},"end":{"line":139,"column":26}},"73":{"start":{"line":142,"column":4},"end":{"line":144,"column":5}},"74":{"start":{"line":143,"column":6},"end":{"line":143,"column":80}},"75":{"start":{"line":145,"column":4},"end":{"line":145,"column":25}},"76":{"start":{"line":150,"column":0},"end":{"line":159,"column":3}},"77":{"start":{"line":152,"column":4},"end":{"line":152,"column":80}},"78":{"start":{"line":152,"column":20},"end":{"line":152,"column":80}},"79":{"start":{"line":153,"column":4},"end":{"line":153,"column":80}},"80":{"start":{"line":153,"column":20},"end":{"line":153,"column":80}},"81":{"start":{"line":154,"column":4},"end":{"line":154,"column":47}},"82":{"start":{"line":157,"column":4},"end":{"line":157,"column":103}},"83":{"start":{"line":161,"column":0},"end":{"line":173,"column":3}},"84":{"start":{"line":163,"column":4},"end":{"line":163,"column":49}},"85":{"start":{"line":166,"column":4},"end":{"line":166,"column":75}},"86":{"start":{"line":166,"column":34},"end":{"line":166,"column":75}},"87":{"start":{"line":169,"column":4},"end":{"line":171,"column":5}},"88":{"start":{"line":170,"column":6},"end":{"line":170,"column":30}},"89":{"start":{"line":175,"column":0},"end":{"line":175,"column":22}}},"branchMap":{"1":{"line":12,"type":"if","locations":[{"start":{"line":12,"column":2},"end":{"line":12,"column":2}},{"start":{"line":12,"column":2},"end":{"line":12,"column":2}}]},"2":{"line":15,"type":"cond-expr","locations":[{"start":{"line":15,"column":28},"end":{"line":15,"column":39}},{"start":{"line":15,"column":42},"end":{"line":15,"column":54}}]},"3":{"line":16,"type":"binary-expr","locations":[{"start":{"line":16,"column":17},"end":{"line":16,"column":24}},{"start":{"line":16,"column":28},"end":{"line":16,"column":30}}]},"4":{"line":19,"type":"binary-expr","locations":[{"start":{"line":19,"column":13},"end":{"line":19,"column":21}},{"start":{"line":19,"column":25},"end":{"line":19,"column":38}}]},"5":{"line":20,"type":"binary-expr","locations":[{"start":{"line":20,"column":14},"end":{"line":20,"column":23}},{"start":{"line":20,"column":27},"end":{"line":20,"column":35}}]},"6":{"line":24,"type":"binary-expr","locations":[{"start":{"line":24,"column":14},"end":{"line":24,"column":23}},{"start":{"line":24,"column":27},"end":{"line":24,"column":31}}]},"7":{"line":27,"type":"binary-expr","locations":[{"start":{"line":27,"column":18},"end":{"line":27,"column":31}},{"start":{"line":27,"column":35},"end":{"line":27,"column":39}}]},"8":{"line":44,"type":"binary-expr","locations":[{"start":{"line":44,"column":9},"end":{"line":44,"column":22}},{"start":{"line":44,"column":26},"end":{"line":44,"column":35}},{"start":{"line":44,"column":39},"end":{"line":44,"column":62}}]},"9":{"line":48,"type":"if","locations":[{"start":{"line":48,"column":2},"end":{"line":48,"column":2}},{"start":{"line":48,"column":2},"end":{"line":48,"column":2}}]},"10":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":9},"end":{"line":53,"column":9}},{"start":{"line":53,"column":9},"end":{"line":53,"column":9}}]},"11":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":2},"end":{"line":65,"column":2}},{"start":{"line":65,"column":2},"end":{"line":65,"column":2}}]},"12":{"line":68,"type":"if","locations":[{"start":{"line":68,"column":9},"end":{"line":68,"column":9}},{"start":{"line":68,"column":9},"end":{"line":68,"column":9}}]},"13":{"line":69,"type":"cond-expr","locations":[{"start":{"line":69,"column":30},"end":{"line":69,"column":56}},{"start":{"line":69,"column":59},"end":{"line":69,"column":72}}]},"14":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":23},"end":{"line":75,"column":44}},{"start":{"line":75,"column":47},"end":{"line":75,"column":51}}]},"15":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":4},"end":{"line":83,"column":4}},{"start":{"line":83,"column":4},"end":{"line":83,"column":4}}]},"16":{"line":83,"type":"binary-expr","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":27}},{"start":{"line":83,"column":31},"end":{"line":83,"column":45}},{"start":{"line":84,"column":6},"end":{"line":84,"column":23}},{"start":{"line":84,"column":27},"end":{"line":84,"column":41}},{"start":{"line":85,"column":6},"end":{"line":85,"column":20}},{"start":{"line":85,"column":24},"end":{"line":85,"column":37}}]},"17":{"line":88,"type":"cond-expr","locations":[{"start":{"line":88,"column":27},"end":{"line":88,"column":49}},{"start":{"line":88,"column":52},"end":{"line":88,"column":61}}]},"18":{"line":94,"type":"if","locations":[{"start":{"line":94,"column":2},"end":{"line":94,"column":2}},{"start":{"line":94,"column":2},"end":{"line":94,"column":2}}]},"19":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":2},"end":{"line":95,"column":2}},{"start":{"line":95,"column":2},"end":{"line":95,"column":2}}]},"20":{"line":97,"type":"if","locations":[{"start":{"line":97,"column":2},"end":{"line":97,"column":2}},{"start":{"line":97,"column":2},"end":{"line":97,"column":2}}]},"21":{"line":100,"type":"if","locations":[{"start":{"line":100,"column":2},"end":{"line":100,"column":2}},{"start":{"line":100,"column":2},"end":{"line":100,"column":2}}]},"22":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":4},"end":{"line":101,"column":4}},{"start":{"line":101,"column":4},"end":{"line":101,"column":4}}]},"23":{"line":110,"type":"if","locations":[{"start":{"line":110,"column":2},"end":{"line":110,"column":2}},{"start":{"line":110,"column":2},"end":{"line":110,"column":2}}]},"24":{"line":118,"type":"cond-expr","locations":[{"start":{"line":118,"column":44},"end":{"line":118,"column":57}},{"start":{"line":118,"column":60},"end":{"line":118,"column":69}}]},"25":{"line":118,"type":"binary-expr","locations":[{"start":{"line":118,"column":18},"end":{"line":118,"column":27}},{"start":{"line":118,"column":31},"end":{"line":118,"column":40}}]},"26":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":2},"end":{"line":120,"column":2}},{"start":{"line":120,"column":2},"end":{"line":120,"column":2}}]},"27":{"line":124,"type":"if","locations":[{"start":{"line":124,"column":2},"end":{"line":124,"column":2}},{"start":{"line":124,"column":2},"end":{"line":124,"column":2}}]},"28":{"line":128,"type":"if","locations":[{"start":{"line":128,"column":2},"end":{"line":128,"column":2}},{"start":{"line":128,"column":2},"end":{"line":128,"column":2}}]},"29":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":4},"end":{"line":142,"column":4}},{"start":{"line":142,"column":4},"end":{"line":142,"column":4}}]},"30":{"line":142,"type":"binary-expr","locations":[{"start":{"line":142,"column":8},"end":{"line":142,"column":22}},{"start":{"line":142,"column":26},"end":{"line":142,"column":40}},{"start":{"line":142,"column":44},"end":{"line":142,"column":56}}]},"31":{"line":152,"type":"if","locations":[{"start":{"line":152,"column":4},"end":{"line":152,"column":4}},{"start":{"line":152,"column":4},"end":{"line":152,"column":4}}]},"32":{"line":153,"type":"if","locations":[{"start":{"line":153,"column":4},"end":{"line":153,"column":4}},{"start":{"line":153,"column":4},"end":{"line":153,"column":4}}]},"33":{"line":166,"type":"if","locations":[{"start":{"line":166,"column":4},"end":{"line":166,"column":4}},{"start":{"line":166,"column":4},"end":{"line":166,"column":4}}]},"34":{"line":169,"type":"if","locations":[{"start":{"line":169,"column":4},"end":{"line":169,"column":4}},{"start":{"line":169,"column":4},"end":{"line":169,"column":4}}]},"35":{"line":169,"type":"binary-expr","locations":[{"start":{"line":169,"column":8},"end":{"line":169,"column":12}},{"start":{"line":169,"column":16},"end":{"line":169,"column":34}}]}}},"/Users/contra/Projects/vinyl/lib/cloneBuffer.js":{"path":"/Users/contra/Projects/vinyl/lib/cloneBuffer.js","s":{"1":1,"2":1,"3":7,"4":7,"5":7},"b":{},"f":{"1":7},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":3,"column":0},"end":{"line":7,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":35}},"4":{"start":{"line":5,"column":2},"end":{"line":5,"column":16}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":13}}},"branchMap":{}},"/Users/contra/Projects/vinyl/lib/isBuffer.js":{"path":"/Users/contra/Projects/vinyl/lib/isBuffer.js","s":{"1":1,"2":1,"3":1,"4":108},"b":{"1":[108,107]},"f":{"1":108},"fnMap":{"1":{"name":"(anonymous_1)","line":5,"loc":{"start":{"line":5,"column":17},"end":{"line":5,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":24}},"3":{"start":{"line":5,"column":0},"end":{"line":7,"column":2}},"4":{"start":{"line":6,"column":2},"end":{"line":6,"column":54}}},"branchMap":{"1":{"line":6,"type":"binary-expr","locations":[{"start":{"line":6,"column":9},"end":{"line":6,"column":30}},{"start":{"line":6,"column":34},"end":{"line":6,"column":53}}]}}},"/Users/contra/Projects/vinyl/lib/isStream.js":{"path":"/Users/contra/Projects/vinyl/lib/isStream.js","s":{"1":1,"2":1,"3":99},"b":{"1":[99,40]},"f":{"1":99},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":36}}},"branchMap":{"1":{"line":4,"type":"binary-expr","locations":[{"start":{"line":4,"column":9},"end":{"line":4,"column":12}},{"start":{"line":4,"column":16},"end":{"line":4,"column":35}}]}}},"/Users/contra/Projects/vinyl/lib/isNull.js":{"path":"/Users/contra/Projects/vinyl/lib/isNull.js","s":{"1":1,"2":57},"b":{},"f":{"1":57},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":3,"column":2}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":20}}},"branchMap":{}},"/Users/contra/Projects/vinyl/lib/inspectStream.js":{"path":"/Users/contra/Projects/vinyl/lib/inspectStream.js","s":{"1":1,"2":1,"3":9,"4":2,"5":7,"6":7,"7":1,"8":7},"b":{"1":[2,7],"2":[1,6]},"f":{"1":9},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":34}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":37}},"2":{"start":{"line":3,"column":0},"end":{"line":11,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":32}},"4":{"start":{"line":4,"column":25},"end":{"line":4,"column":32}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":43}},"6":{"start":{"line":8,"column":2},"end":{"line":8,"column":47}},"7":{"start":{"line":8,"column":31},"end":{"line":8,"column":47}},"8":{"start":{"line":10,"column":2},"end":{"line":10,"column":34}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":4,"column":2}},{"start":{"line":4,"column":2},"end":{"line":4,"column":2}}]},"2":{"line":8,"type":"if","locations":[{"start":{"line":8,"column":2},"end":{"line":8,"column":2}},{"start":{"line":8,"column":2},"end":{"line":8,"column":2}}]}}}} \ No newline at end of file diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html new file mode 100644 index 0000000..b875fbd --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html @@ -0,0 +1,363 @@ + + + + Code coverage report for All files + + + + + + + +
+

Code coverage report for All files

+

+ + Statements: 100% (111 / 111)      + + + Branches: 100% (84 / 84)      + + + Functions: 100% (20 / 20)      + + + Lines: 100% (102 / 102)      + + Ignored: none      +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
vinyl/100%(89 / 89)100%(76 / 76)100%(15 / 15)100%(82 / 82)
vinyl/lib/100%(22 / 22)100%(8 / 8)100%(5 / 5)100%(20 / 20)
+
+
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html new file mode 100644 index 0000000..ef3bcc4 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html @@ -0,0 +1,350 @@ + + + + Code coverage report for vinyl/ + + + + + + + +
+

Code coverage report for vinyl/

+

+ + Statements: 100% (89 / 89)      + + + Branches: 100% (76 / 76)      + + + Functions: 100% (15 / 15)      + + + Lines: 100% (82 / 82)      + + Ignored: none      +

+
All files » vinyl/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js100%(89 / 89)100%(76 / 76)100%(15 / 15)100%(82 / 82)
+
+
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html new file mode 100644 index 0000000..36a4d76 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html @@ -0,0 +1,847 @@ + + + + Code coverage report for vinyl/index.js + + + + + + + +
+

Code coverage report for vinyl/index.js

+

+ + Statements: 100% (89 / 89)      + + + Branches: 100% (76 / 76)      + + + Functions: 100% (15 / 15)      + + + Lines: 100% (82 / 82)      + + Ignored: none      +

+
All files » vinyl/ » index.js
+
+
+

+
+
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 +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 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +1761 +1 +1 +1 +1 +1 +1 +1 +1 +  +1 +73 +  +  +73 +73 +  +  +73 +73 +  +  +  +73 +  +  +73 +  +  +1 +26 +  +  +1 +29 +  +  +1 +6 +  +  +  +1 +3 +  +  +1 +14 +2 +  +  +  +12 +7 +  +  +  +  +5 +5 +  +  +  +14 +14 +1 +1 +13 +6 +  +  +14 +  +  +  +  +  +  +  +  +14 +  +75 +  +  +70 +  +5 +  +14 +  +  +1 +6 +6 +  +6 +2 +  +4 +2 +1 +  +1 +  +2 +  +  +  +2 +2 +  +  +1 +6 +  +  +6 +  +6 +4 +  +  +6 +3 +  +  +6 +1 +  +  +6 +  +  +  +  +1 +  +99 +  +  +78 +1 +  +77 +  +  +  +  +1 +  +7 +6 +5 +  +  +1 +  +  +  +1 +  +46 +  +  +9 +  +  +8 +5 +  +  +  +  +1 + 
var path = require('path');
+var clone = require('lodash').clone;
+var cloneStats = require('clone-stats');
+var cloneBuffer = require('./lib/cloneBuffer');
+var isBuffer = require('./lib/isBuffer');
+var isStream = require('./lib/isStream');
+var isNull = require('./lib/isNull');
+var inspectStream = require('./lib/inspectStream');
+var Stream = require('stream');
+ 
+function File(file) {
+  if (!file) file = {};
+ 
+  // record path change
+  var history = file.path ? [file.path] : file.history;
+  this.history = history || [];
+ 
+  // TODO: should this be moved to vinyl-fs?
+  this.cwd = file.cwd || process.cwd();
+  this.base = file.base || this.cwd;
+ 
+  // 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(opt) {
+  if (typeof opt === 'boolean') {
+    opt = {
+      deep: opt,
+      contents: true
+    };
+  } else if (!opt) {
+    opt = {
+      deep: false,
+      contents: true
+    };
+  } else {
+    opt.deep = opt.deep === true;
+    opt.contents = opt.contents !== false;
+  }
+ 
+  // clone our file contents
+  var contents;
+  if (this.isStream()) {
+    contents = this.contents.pipe(new Stream.PassThrough());
+    this.contents = this.contents.pipe(new Stream.PassThrough());
+  } else if (this.isBuffer()) {
+    contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
+  }
+ 
+  var file = new File({
+    cwd: this.cwd,
+    base: this.base,
+    stat: (this.stat ? cloneStats(this.stat) : null),
+    history: this.history.slice(),
+    contents: contents
+  });
+ 
+  // clone our custom properties
+  Object.keys(this).forEach(function(key) {
+    // ignore built-in fields
+    if (key === '_contents' || key === 'stat' ||
+      key === 'history' || key === 'path' ||
+      key === 'base' || key === 'cwd') {
+      return;
+    }
+    file[key] = opt.deep ? clone(this[key], true) : this[key];
+  }, this);
+  return file;
+};
+ 
+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;
+  }
+ 
+  // isNull
+  if (opt.end) stream.end();
+  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.');
+  }
+});
+ 
+Object.defineProperty(File.prototype, 'path', {
+  get: function() {
+    return this.history[this.history.length - 1];
+  },
+  set: function(path) {
+    if (typeof path !== 'string') throw new Error('path should be string');
+ 
+    // record history only when path changed
+    if (path && path !== this.path) {
+      this.history.push(path);
+    }
+  }
+});
+ 
+module.exports = File;
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html new file mode 100644 index 0000000..39ec92b --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html @@ -0,0 +1,343 @@ + + + + Code coverage report for vinyl/lib/cloneBuffer.js + + + + + + + +
+

Code coverage report for vinyl/lib/cloneBuffer.js

+

+ + Statements: 100% (5 / 5)      + + + Branches: 100% (0 / 0)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (5 / 5)      + + Ignored: none      +

+
All files » vinyl/lib/ » cloneBuffer.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +81 +  +1 +7 +7 +7 +  + 
var Buffer = require('buffer').Buffer;
+ 
+module.exports = function(buf) {
+  var out = new Buffer(buf.length);
+  buf.copy(out);
+  return out;
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html new file mode 100644 index 0000000..5288f5a --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html @@ -0,0 +1,402 @@ + + + + Code coverage report for vinyl/lib/ + + + + + + + +
+

Code coverage report for vinyl/lib/

+

+ + Statements: 100% (22 / 22)      + + + Branches: 100% (8 / 8)      + + + Functions: 100% (5 / 5)      + + + Lines: 100% (20 / 20)      + + Ignored: none      +

+
All files » vinyl/lib/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
cloneBuffer.js100%(5 / 5)100%(0 / 0)100%(1 / 1)100%(5 / 5)
inspectStream.js100%(8 / 8)100%(4 / 4)100%(1 / 1)100%(6 / 6)
isBuffer.js100%(4 / 4)100%(2 / 2)100%(1 / 1)100%(4 / 4)
isNull.js100%(2 / 2)100%(0 / 0)100%(1 / 1)100%(2 / 2)
isStream.js100%(3 / 3)100%(2 / 2)100%(1 / 1)100%(3 / 3)
+
+
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html new file mode 100644 index 0000000..e8e5b36 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html @@ -0,0 +1,355 @@ + + + + Code coverage report for vinyl/lib/inspectStream.js + + + + + + + +
+

Code coverage report for vinyl/lib/inspectStream.js

+

+ + Statements: 100% (8 / 8)      + + + Branches: 100% (4 / 4)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (6 / 6)      + + Ignored: none      +

+
All files » vinyl/lib/ » inspectStream.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +121 +  +1 +9 +  +7 +  +7 +  +7 +  + 
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>';
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html new file mode 100644 index 0000000..a44efe4 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html @@ -0,0 +1,340 @@ + + + + Code coverage report for vinyl/lib/isBuffer.js + + + + + + + +
+

Code coverage report for vinyl/lib/isBuffer.js

+

+ + Statements: 100% (4 / 4)      + + + Branches: 100% (2 / 2)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (4 / 4)      + + Ignored: none      +

+
All files » vinyl/lib/ » isBuffer.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +71 +1 +  +  +1 +108 + 
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;
+};
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html new file mode 100644 index 0000000..010d3e0 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html @@ -0,0 +1,331 @@ + + + + Code coverage report for vinyl/lib/isNull.js + + + + + + + +
+

Code coverage report for vinyl/lib/isNull.js

+

+ + Statements: 100% (2 / 2)      + + + Branches: 100% (0 / 0)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (2 / 2)      + + Ignored: none      +

+
All files » vinyl/lib/ » isNull.js
+
+
+

+
+
1 +2 +3 +41 +57 +  + 
module.exports = function(v) {
+  return v === null;
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html new file mode 100644 index 0000000..511186f --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html @@ -0,0 +1,334 @@ + + + + Code coverage report for vinyl/lib/isStream.js + + + + + + + +
+

Code coverage report for vinyl/lib/isStream.js

+

+ + Statements: 100% (3 / 3)      + + + Branches: 100% (2 / 2)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (3 / 3)      + + Ignored: none      +

+
All files » vinyl/lib/ » isStream.js
+
+
+

+
+
1 +2 +3 +4 +51 +  +1 +99 + 
var Stream = require('stream').Stream;
+ 
+module.exports = function(o) {
+  return !!o && o instanceof Stream;
+};
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info new file mode 100644 index 0000000..bbebe38 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info @@ -0,0 +1,280 @@ +TN: +SF:/Users/contra/Projects/vinyl/index.js +FN:11,File +FN:30,(anonymous_2) +FN:34,(anonymous_3) +FN:38,(anonymous_4) +FN:43,(anonymous_5) +FN:47,(anonymous_6) +FN:81,(anonymous_7) +FN:93,(anonymous_8) +FN:114,(anonymous_9) +FN:138,(anonymous_10) +FN:141,(anonymous_11) +FN:151,(anonymous_12) +FN:156,(anonymous_13) +FN:162,(anonymous_14) +FN:165,(anonymous_15) +FNF:15 +FNH:15 +FNDA:73,File +FNDA:26,(anonymous_2) +FNDA:29,(anonymous_3) +FNDA:6,(anonymous_4) +FNDA:3,(anonymous_5) +FNDA:14,(anonymous_6) +FNDA:75,(anonymous_7) +FNDA:6,(anonymous_8) +FNDA:6,(anonymous_9) +FNDA:99,(anonymous_10) +FNDA:78,(anonymous_11) +FNDA:7,(anonymous_12) +FNDA:1,(anonymous_13) +FNDA:46,(anonymous_14) +FNDA:9,(anonymous_15) +DA:1,1 +DA:2,1 +DA:3,1 +DA:4,1 +DA:5,1 +DA:6,1 +DA:7,1 +DA:8,1 +DA:9,1 +DA:11,1 +DA:12,73 +DA:15,73 +DA:16,73 +DA:19,73 +DA:20,73 +DA:24,73 +DA:27,73 +DA:30,1 +DA:31,26 +DA:34,1 +DA:35,29 +DA:38,1 +DA:39,6 +DA:43,1 +DA:44,3 +DA:47,1 +DA:48,14 +DA:49,2 +DA:53,12 +DA:54,7 +DA:59,5 +DA:60,5 +DA:64,14 +DA:65,14 +DA:66,1 +DA:67,1 +DA:68,13 +DA:69,6 +DA:72,14 +DA:81,14 +DA:83,75 +DA:86,70 +DA:88,5 +DA:90,14 +DA:93,1 +DA:94,6 +DA:95,6 +DA:97,6 +DA:98,2 +DA:100,4 +DA:101,2 +DA:102,1 +DA:104,1 +DA:106,2 +DA:110,2 +DA:111,2 +DA:114,1 +DA:115,6 +DA:118,6 +DA:120,6 +DA:121,4 +DA:124,6 +DA:125,3 +DA:128,6 +DA:129,1 +DA:132,6 +DA:137,1 +DA:139,99 +DA:142,78 +DA:143,1 +DA:145,77 +DA:150,1 +DA:152,7 +DA:153,6 +DA:154,5 +DA:157,1 +DA:161,1 +DA:163,46 +DA:166,9 +DA:169,8 +DA:170,5 +DA:175,1 +LF:82 +LH:82 +BRDA:12,1,0,14 +BRDA:12,1,1,59 +BRDA:15,2,0,25 +BRDA:15,2,1,48 +BRDA:16,3,0,73 +BRDA:16,3,1,33 +BRDA:19,4,0,73 +BRDA:19,4,1,32 +BRDA:20,5,0,73 +BRDA:20,5,1,39 +BRDA:24,6,0,73 +BRDA:24,6,1,65 +BRDA:27,7,0,73 +BRDA:27,7,1,44 +BRDA:44,8,0,3 +BRDA:44,8,1,1 +BRDA:44,8,2,1 +BRDA:48,9,0,2 +BRDA:48,9,1,12 +BRDA:53,10,0,7 +BRDA:53,10,1,5 +BRDA:65,11,0,1 +BRDA:65,11,1,13 +BRDA:68,12,0,6 +BRDA:68,12,1,7 +BRDA:69,13,0,5 +BRDA:69,13,1,1 +BRDA:75,14,0,2 +BRDA:75,14,1,12 +BRDA:83,15,0,70 +BRDA:83,15,1,5 +BRDA:83,16,0,75 +BRDA:83,16,1,61 +BRDA:83,16,2,47 +BRDA:83,16,3,33 +BRDA:83,16,4,33 +BRDA:83,16,5,19 +BRDA:88,17,0,2 +BRDA:88,17,1,3 +BRDA:94,18,0,3 +BRDA:94,18,1,3 +BRDA:95,19,0,3 +BRDA:95,19,1,3 +BRDA:97,20,0,2 +BRDA:97,20,1,4 +BRDA:100,21,0,2 +BRDA:100,21,1,2 +BRDA:101,22,0,1 +BRDA:101,22,1,1 +BRDA:110,23,0,1 +BRDA:110,23,1,1 +BRDA:118,24,0,3 +BRDA:118,24,1,3 +BRDA:118,25,0,6 +BRDA:118,25,1,5 +BRDA:120,26,0,4 +BRDA:120,26,1,2 +BRDA:124,27,0,3 +BRDA:124,27,1,3 +BRDA:128,28,0,1 +BRDA:128,28,1,5 +BRDA:142,29,0,1 +BRDA:142,29,1,77 +BRDA:142,30,0,78 +BRDA:142,30,1,57 +BRDA:142,30,2,46 +BRDA:152,31,0,1 +BRDA:152,31,1,6 +BRDA:153,32,0,1 +BRDA:153,32,1,5 +BRDA:166,33,0,1 +BRDA:166,33,1,8 +BRDA:169,34,0,5 +BRDA:169,34,1,3 +BRDA:169,35,0,8 +BRDA:169,35,1,7 +BRF:76 +BRH:76 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/cloneBuffer.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:7,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,7 +DA:5,7 +DA:6,7 +LF:5 +LH:5 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isBuffer.js +FN:5,(anonymous_1) +FNF:1 +FNH:1 +FNDA:108,(anonymous_1) +DA:1,1 +DA:2,1 +DA:5,1 +DA:6,108 +LF:4 +LH:4 +BRDA:6,1,0,108 +BRDA:6,1,1,107 +BRF:2 +BRH:2 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isStream.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:99,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,99 +LF:3 +LH:3 +BRDA:4,1,0,99 +BRDA:4,1,1,40 +BRF:2 +BRH:2 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isNull.js +FN:1,(anonymous_1) +FNF:1 +FNH:1 +FNDA:57,(anonymous_1) +DA:1,1 +DA:2,57 +LF:2 +LH:2 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/inspectStream.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:9,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,9 +DA:6,7 +DA:8,7 +DA:10,7 +LF:6 +LH:6 +BRDA:4,1,0,2 +BRDA:4,1,1,7 +BRDA:8,2,0,1 +BRDA:8,2,1,6 +BRF:4 +BRH:4 +end_of_record diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/index.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/index.js new file mode 100644 index 0000000..09913c3 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/index.js @@ -0,0 +1,175 @@ +var path = require('path'); +var clone = require('lodash').clone; +var cloneStats = require('clone-stats'); +var cloneBuffer = require('./lib/cloneBuffer'); +var isBuffer = require('./lib/isBuffer'); +var isStream = require('./lib/isStream'); +var isNull = require('./lib/isNull'); +var inspectStream = require('./lib/inspectStream'); +var Stream = require('stream'); + +function File(file) { + if (!file) file = {}; + + // record path change + var history = file.path ? [file.path] : file.history; + this.history = history || []; + + // TODO: should this be moved to vinyl-fs? + this.cwd = file.cwd || process.cwd(); + this.base = file.base || this.cwd; + + // 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(opt) { + if (typeof opt === 'boolean') { + opt = { + deep: opt, + contents: true + }; + } else if (!opt) { + opt = { + deep: false, + contents: true + }; + } else { + opt.deep = opt.deep === true; + opt.contents = opt.contents !== false; + } + + // clone our file contents + var contents; + if (this.isStream()) { + contents = this.contents.pipe(new Stream.PassThrough()); + this.contents = this.contents.pipe(new Stream.PassThrough()); + } else if (this.isBuffer()) { + contents = opt.contents ? cloneBuffer(this.contents) : this.contents; + } + + var file = new File({ + cwd: this.cwd, + base: this.base, + stat: (this.stat ? cloneStats(this.stat) : null), + history: this.history.slice(), + contents: contents + }); + + // clone our custom properties + Object.keys(this).forEach(function(key) { + // ignore built-in fields + if (key === '_contents' || key === 'stat' || + key === 'history' || key === 'path' || + key === 'base' || key === 'cwd') { + return; + } + file[key] = opt.deep ? clone(this[key], true) : this[key]; + }, this); + return file; +}; + +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; + } + + // isNull + if (opt.end) stream.end(); + 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 ''; +}; + +// 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.'); + } +}); + +Object.defineProperty(File.prototype, 'path', { + get: function() { + return this.history[this.history.length - 1]; + }, + set: function(path) { + if (typeof path !== 'string') throw new Error('path should be string'); + + // record history only when path changed + if (path && path !== this.path) { + this.history.push(path); + } + } +}); + +module.exports = File; diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js new file mode 100644 index 0000000..89f09ed --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js @@ -0,0 +1,7 @@ +var Buffer = require('buffer').Buffer; + +module.exports = function(buf) { + var out = new Buffer(buf.length); + buf.copy(out); + return out; +}; diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js new file mode 100644 index 0000000..d36df6f --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js @@ -0,0 +1,11 @@ +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>'; +}; diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js new file mode 100644 index 0000000..0e23782 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js @@ -0,0 +1,7 @@ +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-watch/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js new file mode 100644 index 0000000..7f22c63 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js @@ -0,0 +1,3 @@ +module.exports = function(v) { + return v === null; +}; diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js new file mode 100644 index 0000000..9ce0929 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js @@ -0,0 +1,5 @@ +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/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md similarity index 94% rename from node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE rename to node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md index 1a14b43..146cb32 100644 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md @@ -1,4 +1,6 @@ -Copyright (c) 2012-2014 Raynos. +## 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 diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md new file mode 100644 index 0000000..8b12b6f --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md @@ -0,0 +1,17 @@ +# 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-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js new file mode 100644 index 0000000..e797cfe --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js @@ -0,0 +1,13 @@ +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-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json new file mode 100644 index 0000000..e691165 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json @@ -0,0 +1,57 @@ +{ + "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", + "tarball": "http://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" + }, + "_from": "clone-stats@^0.0.1", + "_npmVersion": "1.3.22", + "_npmUser": { + "name": "hughsk", + "email": "hughskennedy@gmail.com" + }, + "maintainers": [ + { + "name": "hughsk", + "email": "hughskennedy@gmail.com" + } + ], + "directories": {}, + "_shasum": "b88f94a82cf38b8791d58046ea4029ad88ca99d1", + "_resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" +} diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js new file mode 100644 index 0000000..e4bb281 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js @@ -0,0 +1,36 @@ +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-watch/node_modules/gulp-util/node_modules/vinyl/package.json b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/package.json new file mode 100644 index 0000000..2902031 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/package.json @@ -0,0 +1,70 @@ +{ + "name": "vinyl", + "description": "A virtual file format", + "version": "0.4.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", + "lodash": "^2.4.1" + }, + "devDependencies": { + "mocha": "^1.17.0", + "should": "^4.0.4", + "mocha-lcov-reporter": "^0.0.1", + "coveralls": "^2.6.1", + "istanbul": "^0.3.0", + "rimraf": "^2.2.5", + "jshint": "^2.4.1", + "buffer-equal": "0.0.1", + "lodash.templatesettings": "^2.4.1", + "event-stream": "^3.1.0" + }, + "scripts": { + "test": "istanbul cover node_modules/mocha/bin/_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" + } + ], + "gitHead": "6eae432519b007c313a8df83b093adfb97a2944c", + "bugs": { + "url": "https://github.com/wearefractal/vinyl/issues" + }, + "_id": "vinyl@0.4.3", + "_shasum": "19f61a1b28e72b4c50697889dbe91d7503943ecf", + "_from": "vinyl@^0.4.0", + "_npmVersion": "1.4.21", + "_npmUser": { + "name": "fractal", + "email": "contact@wearefractal.com" + }, + "maintainers": [ + { + "name": "fractal", + "email": "contact@wearefractal.com" + } + ], + "dist": { + "shasum": "19f61a1b28e72b4c50697889dbe91d7503943ecf", + "tarball": "http://registry.npmjs.org/vinyl/-/vinyl-0.4.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/perf/clone.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/perf/clone.js new file mode 100644 index 0000000..4df8578 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/perf/clone.js @@ -0,0 +1,59 @@ +var File = require('../'); + +var contents = new Buffer('blah blah blah'); + +var originalFile = new File({ + path: 'yo.coffee', + contents: contents +}); + +// simulate some history +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; + +originalFile.ast = { + a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { + + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +}; + +for (var i = 0; i < 10000; i++) { + originalFile.clone(true).ast; +} \ No newline at end of file diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/File.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/File.js new file mode 100644 index 0000000..419e7aa --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/File.js @@ -0,0 +1,753 @@ +var Stream = require('stream'); +var fs = require('fs'); +var path = require('path'); +var es = require('event-stream'); +var File = require('../'); + +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 history to []', function(done) { + var file = new File(); + file.history.should.eql([]); + 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); + file.history.should.eql([val]); + done(); + }); + + it('should set history to given value', function(done) { + var val = '/test.coffee'; + var file = new File({history: [val]}); + file.path.should.equal(val); + file.history.should.eql([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 buffer\'s reference with option contents: false', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.js', + contents: new Buffer('test') + }; + + var file = new File(options); + + var copy1 = file.clone({ contents: false }); + copy1.contents.should.equal(file.contents); + + var copy2 = file.clone({}); + copy2.contents.should.not.equal(file.contents); + + var copy3 = file.clone({ contents: 'any string' }); + copy3.contents.should.not.equal(file.contents); + + done(); + }); + + it('should copy all attributes over with Stream', function(done) { + var contents = new Stream.PassThrough(); + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: contents + }; + var file = new File(options); + var file2 = file.clone(); + + contents.write(new Buffer('wa')); + + process.nextTick(function() { + contents.write(new Buffer('dup')); + contents.end(); + }); + + 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, 'stream ref should not be the same'); + file.contents.pipe(es.wait(function(err, data) { + file2.contents.pipe(es.wait(function(err, data2) { + data2.should.not.equal(data, 'stream contents ref should not be the same'); + data2.should.eql(data, 'stream contents 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.equal(true); + copy.stat.isDirectory().should.equal(false); + should(file.stat instanceof fs.Stats).equal(true); + should(copy.stat instanceof fs.Stats).equal(true); + + done(); + }); + + it('should properly clone the `history` 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.history[0].should.equal(options.path); + copy.path = 'lol'; + file.path.should.not.equal(copy.path); + done(); + }); + + it('should copy custom properties', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.custom = { a: 'custom property' }; + + 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.custom.should.equal(file.custom); + file2.custom.a.should.equal(file.custom.a); + + done(); + }); + + it('should copy history', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.path = '/test/test.js'; + file.path = '/test/test-938di2s.js'; + var file2 = file.clone(); + + file2.history.should.eql([ + '/test/test.coffee', + '/test/test.js', + '/test/test-938di2s.js' + ]); + file2.history.should.not.equal([ + '/test/test.coffee', + '/test/test.js', + '/test/test-938di2s.js' + ]); + file2.path.should.eql('/test/test-938di2s.js'); + + done(); + }); + + it('should copy all attributes deeply', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.custom = { a: 'custom property' }; + + var file2 = file.clone(true); + file2.custom.should.eql(file.custom); + file2.custom.should.not.equal(file.custom); + file2.custom.a.should.equal(file.custom.a); + + var file3 = file.clone({ deep: true }); + file3.custom.should.eql(file.custom); + file3.custom.should.not.equal(file.custom); + file3.custom.a.should.equal(file.custom.a); + + var file4 = file.clone(false); + file4.custom.should.eql(file.custom); + file4.custom.should.equal(file.custom); + file4.custom.a.should.equal(file.custom.a); + + var file5 = file.clone({ deep: false }); + file5.custom.should.eql(file.custom); + file5.custom.should.equal(file.custom); + file5.custom.a.should.equal(file.custom.a); + + 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() { + 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() { + 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() { + 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() { + 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() { + throw new Error('should not write'); + }); + stream.on('end', function() { + 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(''); + 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('>'); + 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('>'); + 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('>'); + 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('>'); + 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(''); + 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(path.join('test','test.coffee')); + done(); + }); + }); + + describe('path get/set', function() { + + it('should record history when instantiation', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should record history when path change', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.js'; + file.path.should.eql('/test/test.js'); + file.history.should.eql(['/test/test.coffee', '/test/test.js']); + + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee', '/test/test.js', '/test/test.coffee']); + }); + + it('should not record history when set the same path', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.coffee'; + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + + // ignore when set empty string + file.path = ''; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should throw when set path null', function() { + var file = new File({ + cwd: '/', + path: null + }); + + should.not.exist(file.path); + file.history.should.eql([]); + + (function() { + file.path = null; + }).should.throw('path should be string'); + }); + }); +}); diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js new file mode 100644 index 0000000..34b3e7c --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js @@ -0,0 +1,27 @@ +var cloneBuffer = require('../lib/cloneBuffer'); +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(); + }); +}); diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js new file mode 100644 index 0000000..fe1802c --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js @@ -0,0 +1,53 @@ +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(''); + done(); + }); + + it('should work on a core Readable Stream', function(done) { + var testStream = new Stream.Readable(); + inspectStream(testStream).should.equal(''); + done(); + }); + + it('should work on a core Writable Stream', function(done) { + var testStream = new Stream.Writable(); + inspectStream(testStream).should.equal(''); + done(); + }); + + it('should work on a core Duplex Stream', function(done) { + var testStream = new Stream.Duplex(); + inspectStream(testStream).should.equal(''); + done(); + }); + + it('should work on a core Transform Stream', function(done) { + var testStream = new Stream.Transform(); + inspectStream(testStream).should.equal(''); + done(); + }); + + it('should work on a core PassThrough Stream', function(done) { + var testStream = new Stream.PassThrough(); + inspectStream(testStream).should.equal(''); + 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-watch/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js new file mode 100644 index 0000000..432ad2a --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js @@ -0,0 +1,29 @@ +var isBuffer = require('../lib/isBuffer'); +var Stream = require('stream'); +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(); + }); +}); diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/isNull.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/isNull.js new file mode 100644 index 0000000..356934a --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/isNull.js @@ -0,0 +1,22 @@ +var isNull = require('../lib/isNull'); +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(); + }); +}); diff --git a/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/isStream.js b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/isStream.js new file mode 100644 index 0000000..5cc0e0b --- /dev/null +++ b/node_modules/gulp-watch/node_modules/gulp-util/node_modules/vinyl/test/isStream.js @@ -0,0 +1,29 @@ +var isStream = require('../lib/isStream'); +var Stream = require('stream'); +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(); + }); +}); diff --git a/node_modules/gulp-watch/node_modules/gulp-util/package.json b/node_modules/gulp-watch/node_modules/gulp-util/package.json index 4bbf0fb..aff83d1 100644 --- a/node_modules/gulp-watch/node_modules/gulp-util/package.json +++ b/node_modules/gulp-watch/node_modules/gulp-util/package.json @@ -1,7 +1,7 @@ { "name": "gulp-util", "description": "Utility functions for gulp plugins", - "version": "2.2.20", + "version": "3.0.1", "homepage": "http://github.com/wearefractal/gulp-util", "repository": { "type": "git", @@ -16,19 +16,20 @@ "dependencies": { "chalk": "^0.5.0", "dateformat": "^1.0.7-1.2.3", + "lodash": "^2.4.1", "lodash._reinterpolate": "^2.4.1", "lodash.template": "^2.4.1", - "minimist": "^0.2.0", + "minimist": "^1.1.0", "multipipe": "^0.1.0", - "through2": "^0.5.0", - "vinyl": "^0.2.1" + "through2": "^0.6.1", + "vinyl": "^0.4.0" }, "devDependencies": { "mocha": "^1.17.0", "should": "^4.0.0", "mocha-lcov-reporter": "^0.0.1", "coveralls": "^2.7.0", - "istanbul": "^0.2.3", + "istanbul": "^0.3.0", "rimraf": "^2.2.5", "jshint": "^2.4.1", "buffer-equal": "~0.0.1", @@ -48,14 +49,14 @@ "url": "http://github.com/wearefractal/gulp-util/raw/master/LICENSE" } ], - "gitHead": "a44e450cfbe65fa4902b198bead4c65722cced0a", + "gitHead": "f6336c8ac9f52930b36ad14002cf267c06f801df", "bugs": { "url": "https://github.com/wearefractal/gulp-util/issues" }, - "_id": "gulp-util@2.2.20", - "_shasum": "d7146e5728910bd8f047a6b0b1e549bc22dbd64c", - "_from": "gulp-util@~2.2.6", - "_npmVersion": "1.5.0-alpha-1", + "_id": "gulp-util@3.0.1", + "_shasum": "8214894d05c2bb6cc7f5544918a51ddf88180f00", + "_from": "gulp-util@~3.0.0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -67,10 +68,10 @@ } ], "dist": { - "shasum": "d7146e5728910bd8f047a6b0b1e549bc22dbd64c", - "tarball": "http://registry.npmjs.org/gulp-util/-/gulp-util-2.2.20.tgz" + "shasum": "8214894d05c2bb6cc7f5544918a51ddf88180f00", + "tarball": "http://registry.npmjs.org/gulp-util/-/gulp-util-3.0.1.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-2.2.20.tgz", + "_resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.1.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/minimatch/minimatch.js b/node_modules/gulp-watch/node_modules/minimatch/minimatch.js index 4539678..4761786 100644 --- a/node_modules/gulp-watch/node_modules/minimatch/minimatch.js +++ b/node_modules/gulp-watch/node_modules/minimatch/minimatch.js @@ -260,6 +260,13 @@ minimatch.braceExpand = function (pattern, options) { } Minimatch.prototype.braceExpand = braceExpand + +function pad(n, width, z) { + z = z || '0'; + n = n + ''; + return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; +} + function braceExpand (pattern, options) { options = options || this.options pattern = typeof pattern === "undefined" @@ -332,13 +339,18 @@ function braceExpand (pattern, options) { this.debug("numset", numset[1], numset[2]) var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) , start = +numset[1] + , needPadding = numset[1][0] === '0' + , startWidth = numset[1].length + , padded , end = +numset[2] , inc = start > end ? -1 : 1 , set = [] + for (var i = start; i != (end + inc); i += inc) { + padded = needPadding ? pad(i, startWidth) : i + '' // append all the suffixes for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - set.push(i + suf[ii]) + set.push(padded + suf[ii]) } } return set diff --git a/node_modules/gulp-watch/node_modules/minimatch/package.json b/node_modules/gulp-watch/node_modules/minimatch/package.json index c34904a..7d373f7 100644 --- a/node_modules/gulp-watch/node_modules/minimatch/package.json +++ b/node_modules/gulp-watch/node_modules/minimatch/package.json @@ -6,7 +6,7 @@ }, "name": "minimatch", "description": "a glob matcher in javascript", - "version": "0.3.0", + "version": "0.4.0", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" @@ -29,14 +29,30 @@ "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 if this option is set. When not set, an empty list\nis returned if there are no 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", + "gitHead": "56dc703f56c3678a3fad47ae67c92050d1689656", "bugs": { "url": "https://github.com/isaacs/minimatch/issues" }, "homepage": "https://github.com/isaacs/minimatch", - "_id": "minimatch@0.3.0", - "_shasum": "275d8edaac4f1bb3326472089e7949c8394699dd", - "_from": "minimatch@~0.3", - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz" + "_id": "minimatch@0.4.0", + "_shasum": "bd2c7d060d2c8c8fd7cde7f1f2ed2d5b270fdb1b", + "_from": "minimatch@~0.4", + "_npmVersion": "1.5.0-alpha-1", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "bd2c7d060d2c8c8fd7cde7f1f2ed2d5b270fdb1b", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-0.4.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.4.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/minimatch/test/brace-expand.js b/node_modules/gulp-watch/node_modules/minimatch/test/brace-expand.js index 7ee278a..e63d3f6 100644 --- a/node_modules/gulp-watch/node_modules/minimatch/test/brace-expand.js +++ b/node_modules/gulp-watch/node_modules/minimatch/test/brace-expand.js @@ -21,6 +21,13 @@ tap.test("brace expansion", function (t) { , "a4b" , "a5b" ] ] , [ "a{b}c", ["a{b}c"] ] + , [ "a{00..05}b" + , ["a00b" + ,"a01b" + ,"a02b" + ,"a03b" + ,"a04b" + ,"a05b" ] ] ].forEach(function (tc) { var p = tc[0] , expect = tc[1] diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/lib/dest/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/lib/dest/index.js index 6e6691d..4ff4c27 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/lib/dest/index.js +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/lib/dest/index.js @@ -1,7 +1,9 @@ 'use strict'; +var _ = require('lodash'); +var defaults = _.defaults; + var path = require('path'); -var defaults = require('lodash.defaults'); var through2 = require('through2'); var mkdirp = require('mkdirp'); var fs = require('graceful-fs'); diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/lib/dest/writeContents/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/lib/dest/writeContents/index.js index 1cb6213..ab8f0f9 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/lib/dest/writeContents/index.js +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/lib/dest/writeContents/index.js @@ -1,35 +1,57 @@ 'use strict'; +var fs = require('fs'); var writeDir = require('./writeDir'); var writeStream = require('./writeStream'); var writeBuffer = require('./writeBuffer'); function writeContents(writePath, file, cb) { - var done = function(err){ - cb(err, file); + var written = function(err) { + var done = function(err) { + cb(err, file); + }; + if (err) { + return done(err); + } + + if (!file.stat || typeof file.stat.mode !== 'number') { + return done(); + } + + fs.stat(writePath, function(err, st) { + if (err) { + return done(err); + } + // octal 7777 = decimal 4095 + var currentMode = (st.mode & 4095); + if (currentMode === file.stat.mode) { + return done(); + } + fs.chmod(writePath, file.stat.mode, done); + }); }; // if directory then mkdirp it if (file.isDirectory()) { - writeDir(writePath, file, done); + writeDir(writePath, file, written); return; } // stream it to disk yo if (file.isStream()) { - writeStream(writePath, file, done); + writeStream(writePath, file, written); return; } // write it like normal if (file.isBuffer()) { - writeBuffer(writePath, file, done); + writeBuffer(writePath, file, written); return; } // if no contents then do nothing if (file.isNull()) { - done(); + cb(null, file); return; } } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/lib/src/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/lib/src/index.js index 4d5f046..d6fe194 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/lib/src/index.js +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/lib/src/index.js @@ -1,6 +1,8 @@ 'use strict'; -var defaults = require('lodash.defaults'); +var _ = require('lodash'); +var defaults = _.defaults; + var through = require('through2'); var gs = require('glob-stream'); var File = require('vinyl'); @@ -14,7 +16,7 @@ function createFile (globFile, enc, cb) { function src(glob, opt) { if (!isValidGlob(glob)) { - throw new Error('Invalid glob argument'); + throw new Error('Invalid glob argument: ' + glob); } var options = defaults({}, opt, { diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/.npmignore similarity index 100% rename from node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore rename to node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/.npmignore diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/.travis.yml b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/.travis.yml new file mode 100644 index 0000000..fca8ef0 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.10 + - 0.11 diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/LICENSE b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/LICENSE new file mode 100644 index 0000000..05a4010 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/LICENSE @@ -0,0 +1,23 @@ +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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/README.md new file mode 100644 index 0000000..5b3967e --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/README.md @@ -0,0 +1,218 @@ +# 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 if this option is set. When not 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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/minimatch.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/minimatch.js new file mode 100644 index 0000000..4761786 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/minimatch.js @@ -0,0 +1,1073 @@ +;(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 pad(n, width, z) { + z = z || '0'; + n = n + ''; + return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; +} + +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] + , needPadding = numset[1][0] === '0' + , startWidth = numset[1].length + , padded + , end = +numset[2] + , inc = start > end ? -1 : 1 + , set = [] + + for (var i = start; i != (end + inc); i += inc) { + padded = needPadding ? pad(i, startWidth) : i + '' + // append all the suffixes + for (var ii = 0, ll = suf.length; ii < ll; ii ++) { + set.push(padded + 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) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.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) + + // Find the basename of the path by looking for the last non-empty segment + var filename; + for (var i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (var i = 0, l = set.length; i < l; i ++) { + var pattern = set[i], file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + 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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/.npmignore b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/.npmignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/.npmignore @@ -0,0 +1 @@ +/node_modules diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS new file mode 100644 index 0000000..4a0bc50 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS @@ -0,0 +1,14 @@ +# 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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/LICENSE b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/LICENSE new file mode 100644 index 0000000..05a4010 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/LICENSE @@ -0,0 +1,23 @@ +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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/README.md new file mode 100644 index 0000000..03ee0f9 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/README.md @@ -0,0 +1,97 @@ +# 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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js new file mode 100644 index 0000000..d1d1381 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js @@ -0,0 +1,252 @@ +;(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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/package.json new file mode 100644 index 0000000..4472725 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/package.json @@ -0,0 +1,33 @@ +{ + "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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/basic.js new file mode 100644 index 0000000..f72697c --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/basic.js @@ -0,0 +1,369 @@ +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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/foreach.js new file mode 100644 index 0000000..eefb80d --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/foreach.js @@ -0,0 +1,52 @@ +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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js new file mode 100644 index 0000000..7af45b0 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js @@ -0,0 +1,50 @@ +#!/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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/LICENSE b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/LICENSE new file mode 100644 index 0000000..0c44ae7 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/LICENSE @@ -0,0 +1,27 @@ +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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/README.md new file mode 100644 index 0000000..7e36512 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/README.md @@ -0,0 +1,53 @@ +# 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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/bench.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/bench.js new file mode 100644 index 0000000..5acfd6d --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/bench.js @@ -0,0 +1,283 @@ +// 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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/package.json new file mode 100644 index 0000000..cb7e2bd --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/package.json @@ -0,0 +1,42 @@ +{ + "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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/sigmund.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/sigmund.js new file mode 100644 index 0000000..82c7ab8 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/sigmund.js @@ -0,0 +1,39 @@ +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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/test/basic.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/test/basic.js new file mode 100644 index 0000000..50c53a1 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/test/basic.js @@ -0,0 +1,24 @@ +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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/package.json new file mode 100644 index 0000000..156c5c3 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/package.json @@ -0,0 +1,58 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "1.0.0", + "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" + }, + "gitHead": "b374a643976eb55cdc19c60b6dd51ebe9bcc607a", + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "homepage": "https://github.com/isaacs/minimatch", + "_id": "minimatch@1.0.0", + "_shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d", + "_from": "minimatch@^1.0.0", + "_npmVersion": "1.4.21", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/basic.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/basic.js new file mode 100644 index 0000000..ae7ac73 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/basic.js @@ -0,0 +1,399 @@ +// 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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/brace-expand.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/brace-expand.js new file mode 100644 index 0000000..e63d3f6 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/brace-expand.js @@ -0,0 +1,40 @@ +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"] ] + , [ "a{00..05}b" + , ["a00b" + ,"a01b" + ,"a02b" + ,"a03b" + ,"a04b" + ,"a05b" ] ] + ].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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/caching.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/caching.js new file mode 100644 index 0000000..0fec4b0 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/caching.js @@ -0,0 +1,14 @@ +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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/defaults.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/defaults.js new file mode 100644 index 0000000..75e0571 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/defaults.js @@ -0,0 +1,274 @@ +// 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-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/extglob-ending-with-state-char.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/extglob-ending-with-state-char.js new file mode 100644 index 0000000..6676e26 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/extglob-ending-with-state-char.js @@ -0,0 +1,8 @@ +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-watch/node_modules/vinyl-fs/node_modules/glob-stream/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/package.json index 4f01967..7f6bd96 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/package.json +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/glob-stream/package.json @@ -1,7 +1,7 @@ { "name": "glob-stream", "description": "File system globs as a stream", - "version": "3.1.14", + "version": "3.1.15", "homepage": "http://github.com/wearefractal/glob-stream", "repository": { "type": "git", @@ -15,18 +15,18 @@ "main": "./index.js", "dependencies": { "glob": "^4.0.0", - "minimatch": "^0.3.0", + "minimatch": "^1.0.0", "ordered-read-streams": "0.0.8", - "glob2base": "^0.0.9", + "glob2base": "^0.0.11", "unique-stream": "^1.0.0", - "through2": "^0.5.1" + "through2": "^0.6.1" }, "devDependencies": { "mocha": "^1.17.0", "should": "^4.0.0", "mocha-lcov-reporter": "0.0.1", "coveralls": "^2.6.1", - "istanbul": "^0.2.3", + "istanbul": "^0.3.0", "rimraf": "^2.2.5", "jshint": "^2.4.1" }, @@ -43,14 +43,14 @@ "url": "http://github.com/wearefractal/glob-stream/raw/master/LICENSE" } ], - "gitHead": "f670ab68053cf21d8048d12b568f7f6973f70ee0", + "gitHead": "0923af26161489610becddd6f8de7ea3f2293979", "bugs": { "url": "https://github.com/wearefractal/glob-stream/issues" }, - "_id": "glob-stream@3.1.14", - "_shasum": "4a01ac53219c9582404858c6b76008fba0b10bf8", + "_id": "glob-stream@3.1.15", + "_shasum": "084bdbe9d8203fbb48bcf05c382dbb7e6666f8f5", "_from": "glob-stream@^3.1.5", - "_npmVersion": "1.5.0-alpha-1", + "_npmVersion": "1.4.21", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -62,10 +62,10 @@ } ], "dist": { - "shasum": "4a01ac53219c9582404858c6b76008fba0b10bf8", - "tarball": "http://registry.npmjs.org/glob-stream/-/glob-stream-3.1.14.tgz" + "shasum": "084bdbe9d8203fbb48bcf05c382dbb7e6666f8f5", + "tarball": "http://registry.npmjs.org/glob-stream/-/glob-stream-3.1.15.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.14.tgz", + "_resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.15.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/LICENSE.txt b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/README.md deleted file mode 100644 index da283fc..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/index.js deleted file mode 100644 index 52eec90..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de730..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6c..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd8..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/README.md deleted file mode 100644 index bee29a8..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/index.js deleted file mode 100644 index 139568a..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md deleted file mode 100644 index 23f3000..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js deleted file mode 100644 index 12be0bf..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json deleted file mode 100644 index f962e0e..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json +++ /dev/null @@ -1,79 +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", - "tarball": "http://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz" - }, - "_from": "lodash._shimkeys@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "6e9cc9666ff081f0b5a6c978b83e242e6949d203", - "_resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/README.md deleted file mode 100644 index eeb0a78..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/index.js deleted file mode 100644 index 3596ac3..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/package.json deleted file mode 100644 index adfee42..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/package.json +++ /dev/null @@ -1,56 +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", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/package.json deleted file mode 100644 index 99d6b91..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/package.json +++ /dev/null @@ -1,88 +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", - "tarball": "http://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz" - }, - "_from": "lodash.keys@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "48dea46df8ff7632b10d706b8acb26591e2b3727", - "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/package.json deleted file mode 100644 index 052b254..0000000 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash.defaults/package.json +++ /dev/null @@ -1,86 +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", - "tarball": "http://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz" - }, - "_from": "lodash.defaults@^2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "a7e8885f05e68851144b6e12a8f3678026bc4c54", - "_resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/LICENSE.txt b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/LICENSE.txt similarity index 100% rename from node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/LICENSE.txt rename to node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/LICENSE.txt diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/README.md new file mode 100644 index 0000000..6f9598e --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/README.md @@ -0,0 +1,163 @@ +# Lo-Dash v2.4.1 +A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features). + +## Download + +Check out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences]) for details over the differences between builds. + +* Modern builds perfect for newer browsers/environments:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.min.js) + +* Compatibility builds for older environment support too:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.min.js) + +* Underscore builds to use as a drop-in replacement:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.min.js) + +CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed. + +Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method. + +## Dive in + +There’s plenty of **[documentation](http://lodash.com/docs)**, [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).
+Check out DevDocs as a fast, organized, & searchable interface for our documentation. + +The full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).
+A list of upcoming features is available on our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap). + +## Features *not* in Underscore + + * AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.) + * [_(…)](http://lodash.com/docs#_) supports intuitive chaining + * [_.at](http://lodash.com/docs#at) for cherry-picking collection values + * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.constant](http://lodash.com/docs#constant) & [_.property](http://lodash.com/docs#property) function generators for composing functions + * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` + * [_.create](http://lodash.com/docs#create) for easier object inheritance + * [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins + * [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions + * [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control + * [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys + * [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early + * [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties + * [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties + * [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object` + * [_.mapValues](http://lodash.com/docs#mapValues) for [mapping](http://lodash.com/docs#map) values to an object + * [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions + * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend) + * [_.noop](http://lodash.com/docs#noop) for function placeholders + * [_.now](http://lodash.com/docs#now) as a cross-browser `Date.now` alternative + * [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior + * [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays + * [_.random](http://lodash.com/docs#random) supports returning floating-point numbers + * [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking + * [_.sortBy](http://lodash.com/docs#sortBy) supports sorting by multiple properties + * [_.support](http://lodash.com/docs#support) for flagging environment features + * [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals) + * [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects + * [_.where](http://lodash.com/docs#where) supports deep object comparisons + * [_.xor](http://lodash.com/docs#xor) as a companion to [_.difference](http://lodash.com/docs#difference), [_.intersection](http://lodash.com/docs#intersection), & [_.union](http://lodash.com/docs#union) + * [_.zip](http://lodash.com/docs#zip) is capable of unzipping values + * [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), & + [more](http://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks + * [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), & + [more](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings + * [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), & + [more](http://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands + * [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), & + [more](http://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight") right-associative methods + +## Resources + + * Podcasts + - [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/) + + * Posts + - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/) + - [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/) + + * Videos + - [Introduction](https://vimeo.com/44154599) + - [Origins](https://vimeo.com/44154600) + - [Optimizations & builds](https://vimeo.com/44154601) + - [Native method use](https://vimeo.com/48576012) + - [Testing](https://vimeo.com/45865290) + - [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk) + + A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources). + +## Support + +Tested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.21~0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
+Automated browser test results [are available](https://saucelabs.com/u/lodash) as well as [Travis CI](https://travis-ci.org/) builds for [lodash](https://travis-ci.org/lodash/lodash/), [lodash-cli](https://travis-ci.org/lodash/lodash-cli/), [lodash-amd](https://travis-ci.org/lodash/lodash-amd/), [lodash-node](https://travis-ci.org/lodash/lodash-node/), & [grunt-lodash](https://travis-ci.org/lodash/grunt-lodash). + +Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
+[![Sauce Labs](http://lodash.com/_img/sauce.png)](https://saucelabs.com/ "Sauce Labs: Selenium Testing & More") + +## Installation & usage + +In browsers: + +```html + +``` + +Using [`npm`](http://npmjs.org/): + +```bash +npm i --save lodash + +{sudo} npm i -g lodash +npm ln lodash +``` + +In [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/): + +```js +var _ = require('lodash'); +// or as Underscore +var _ = require('lodash/dist/lodash.underscore'); +``` + +**Notes:** + * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL + * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it + +In [Rhino](http://www.mozilla.org/rhino/): + +```js +load('lodash.js'); +``` + +In an AMD loader: + +```js +require({ + 'packages': [ + { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' } + ] +}, +['lodash'], function(_) { + console.log(_.VERSION); +}); +``` + +## 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/) | + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.compat.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.compat.js new file mode 100644 index 0000000..23798ba --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.compat.js @@ -0,0 +1,7157 @@ +/** + * @license + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash -o ./dist/lodash.compat.js` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre ES5 environments */ + var undefined; + + /** Used to pool arrays and objects used internally */ + var arrayPool = [], + objectPool = []; + + /** Used to generate unique IDs */ + var idCounter = 0; + + /** Used internally to indicate various things */ + var indicatorObject = {}; + + /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */ + var keyPrefix = +new Date + ''; + + /** Used as the size when optimizations are enabled for large arrays */ + var largeArraySize = 75; + + /** Used as the max size of the `arrayPool` and `objectPool` */ + var maxPoolSize = 40; + + /** Used to detect and test whitespace */ + var whitespace = ( + // whitespace + ' \t\x0B\f\xA0\ufeff' + + + // line terminators + '\n\r\u2028\u2029' + + + // unicode category "Zs" space separators + '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' + ); + + /** 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 match regexp flags from their coerced string values */ + var reFlags = /\w*$/; + + /** Used to detected named functions */ + var reFuncName = /^\s*function[ \n\r\t]+\w/; + + /** Used to match "interpolate" template delimiters */ + var reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match leading whitespace and zeros to be removed */ + var reLeadingSpacesAndZeros = RegExp('^[' + whitespace + ']*0+(?=.$)'); + + /** Used to ensure capturing order of template delimiters */ + var reNoMatch = /($^)/; + + /** Used to detect functions containing a `this` reference */ + var reThis = /\bthis\b/; + + /** Used to match unescaped characters in compiled string literals */ + var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; + + /** Used to assign default `context` object properties */ + var contextProps = [ + 'Array', 'Boolean', 'Date', 'Error', 'Function', 'Math', 'Number', 'Object', + 'RegExp', 'String', '_', 'attachEvent', 'clearTimeout', 'isFinite', 'isNaN', + 'parseInt', 'setTimeout' + ]; + + /** Used to fix the JScript [[DontEnum]] bug */ + var shadowedProps = [ + 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', + 'toLocaleString', 'toString', 'valueOf' + ]; + + /** Used to make template sourceURLs easier to identify */ + var templateCounter = 0; + + /** `Object#toString` result shortcuts */ + var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + boolClass = '[object Boolean]', + dateClass = '[object Date]', + errorClass = '[object Error]', + funcClass = '[object Function]', + numberClass = '[object Number]', + objectClass = '[object Object]', + regexpClass = '[object RegExp]', + stringClass = '[object String]'; + + /** Used to identify object classifications that `_.clone` supports */ + var cloneableClasses = {}; + cloneableClasses[funcClass] = false; + cloneableClasses[argsClass] = cloneableClasses[arrayClass] = + cloneableClasses[boolClass] = cloneableClasses[dateClass] = + cloneableClasses[numberClass] = cloneableClasses[objectClass] = + cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true; + + /** Used as an internal `_.debounce` options object */ + var debounceOptions = { + 'leading': false, + 'maxWait': 0, + 'trailing': false + }; + + /** Used as the property descriptor for `__bindData__` */ + var descriptor = { + 'configurable': false, + 'enumerable': false, + 'value': null, + 'writable': false + }; + + /** Used as the data object for `iteratorTemplate` */ + var iteratorData = { + 'args': '', + 'array': null, + 'bottom': '', + 'firstArg': '', + 'init': '', + 'keys': null, + 'loop': '', + 'shadowedProps': null, + 'support': null, + 'top': '', + 'useHas': false + }; + + /** 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 + }; + + /** Used to escape characters for inclusion in compiled string literals */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\t': 't', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Used as a reference to the global object */ + var root = (objectTypes[typeof window] && window) || this; + + /** Detect free variable `exports` */ + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports` */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + + /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ + var freeGlobal = objectTypes[typeof global] && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.indexOf` without support for binary searches + * or `fromIndex` constraints. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * An implementation of `_.contains` for cache objects that mimics the return + * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var type = typeof value; + cache = cache.cache; + + if (type == 'boolean' || value == null) { + return cache[value] ? 0 : -1; + } + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value; + cache = (cache = cache[type]) && cache[key]; + + return type == 'object' + ? (cache && baseIndexOf(cache, value) > -1 ? 0 : -1) + : (cache ? 0 : -1); + } + + /** + * Adds a given value to the corresponding cache object. + * + * @private + * @param {*} value The value to add to the cache. + */ + function cachePush(value) { + var cache = this.cache, + type = typeof value; + + if (type == 'boolean' || value == null) { + cache[value] = true; + } else { + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value, + typeCache = cache[type] || (cache[type] = {}); + + if (type == 'object') { + (typeCache[key] || (typeCache[key] = [])).push(value); + } else { + typeCache[key] = true; + } + } + } + + /** + * Used by `_.max` and `_.min` as the default callback when a given + * collection is a string value. + * + * @private + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. + */ + function charAtCallback(value) { + return value.charCodeAt(0); + } + + /** + * Used by `sortBy` to compare transformed `collection` elements, stable sorting + * them in ascending order. + * + * @private + * @param {Object} a The object to compare to `b`. + * @param {Object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. + */ + function compareAscending(a, b) { + var ac = a.criteria, + bc = b.criteria, + index = -1, + length = ac.length; + + while (++index < length) { + var value = ac[index], + other = bc[index]; + + if (value !== other) { + if (value > other || typeof value == 'undefined') { + return 1; + } + if (value < other || typeof other == 'undefined') { + return -1; + } + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to return the same value for + // `a` and `b`. See https://github.com/jashkenas/underscore/pull/1247 + // + // This also ensures a stable sort in V8 and other engines. + // See http://code.google.com/p/v8/issues/detail?id=90 + return a.index - b.index; + } + + /** + * Creates a cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [array=[]] The array to search. + * @returns {null|Object} Returns the cache object or `null` if caching should not be used. + */ + function createCache(array) { + var index = -1, + length = array.length, + first = array[0], + mid = array[(length / 2) | 0], + last = array[length - 1]; + + if (first && typeof first == 'object' && + mid && typeof mid == 'object' && last && typeof last == 'object') { + return false; + } + var cache = getObject(); + cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false; + + var result = getObject(); + result.array = array; + result.cache = cache; + result.push = cachePush; + + while (++index < length) { + result.push(array[index]); + } + return result; + } + + /** + * 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]; + } + + /** + * Gets an array from the array pool or creates a new one if the pool is empty. + * + * @private + * @returns {Array} The array from the pool. + */ + function getArray() { + return arrayPool.pop() || []; + } + + /** + * Gets an object from the object pool or creates a new one if the pool is empty. + * + * @private + * @returns {Object} The object from the pool. + */ + function getObject() { + return objectPool.pop() || { + 'array': null, + 'cache': null, + 'criteria': null, + 'false': false, + 'index': 0, + 'null': false, + 'number': null, + 'object': null, + 'push': null, + 'string': null, + 'true': false, + 'undefined': false, + 'value': null + }; + } + + /** + * Checks if `value` is a DOM node in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM node, else `false`. + */ + function isNode(value) { + // IE < 9 presents DOM nodes as `Object` objects except they have `toString` + // methods that are `typeof` "string" and still can coerce nodes to strings + return typeof value.toString != 'function' && typeof (value + '') == 'string'; + } + + /** + * Releases the given array back to the array pool. + * + * @private + * @param {Array} [array] The array to release. + */ + function releaseArray(array) { + array.length = 0; + if (arrayPool.length < maxPoolSize) { + arrayPool.push(array); + } + } + + /** + * Releases the given object back to the object pool. + * + * @private + * @param {Object} [object] The object to release. + */ + function releaseObject(object) { + var cache = object.cache; + if (cache) { + releaseObject(cache); + } + object.array = object.cache = object.criteria = object.object = object.number = object.string = object.value = null; + if (objectPool.length < maxPoolSize) { + objectPool.push(object); + } + } + + /** + * Slices the `collection` from the `start` index up to, but not including, + * the `end` index. + * + * Note: This function is used instead of `Array#slice` to support node lists + * in IE < 9 and to ensure dense arrays are returned. + * + * @private + * @param {Array|Object|string} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {Array} Returns the new array. + */ + function slice(array, start, end) { + start || (start = 0); + if (typeof end == 'undefined') { + end = array ? array.length : 0; + } + var index = -1, + length = end - start || 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = array[start + index]; + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new `lodash` function using the given context object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} [context=root] The context object. + * @returns {Function} Returns the `lodash` function. + */ + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See http://es5.github.io/#x11.1.5. + context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; + + /** Native constructor references */ + var Array = context.Array, + Boolean = context.Boolean, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ + var arrayRef = []; + + /** Used for native method references */ + var errorProto = Error.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + + /** Used to restore the original `_` reference in `noConflict` */ + var oldDash = context._; + + /** 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, '.*?') + '$' + ); + + /** Native method shortcuts */ + var ceil = Math.ceil, + clearTimeout = context.clearTimeout, + floor = Math.floor, + fnToString = Function.prototype.toString, + getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf, + hasOwnProperty = objectProto.hasOwnProperty, + push = arrayRef.push, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + setTimeout = context.setTimeout, + splice = arrayRef.splice, + unshift = arrayRef.unshift; + + /** Used to set meta data on functions */ + var defineProperty = (function() { + // IE 8 only accepts DOM elements + try { + var o = {}, + func = isNative(func = Object.defineProperty) && func, + result = func(o, o, o) && func; + } catch(e) { } + return result; + }()); + + /* Native method shortcuts for methods with the same name as other `lodash` methods */ + var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate, + nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray, + nativeIsFinite = context.isFinite, + nativeIsNaN = context.isNaN, + nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys, + nativeMax = Math.max, + nativeMin = Math.min, + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + + /** Used to lookup a built-in constructor by [[Class]] */ + var ctorByClass = {}; + ctorByClass[arrayClass] = Array; + ctorByClass[boolClass] = Boolean; + ctorByClass[dateClass] = Date; + ctorByClass[funcClass] = Function; + ctorByClass[objectClass] = Object; + ctorByClass[numberClass] = Number; + ctorByClass[regexpClass] = RegExp; + ctorByClass[stringClass] = String; + + /** Used to avoid iterating non-enumerable properties in IE < 9 */ + var nonEnumProps = {}; + nonEnumProps[arrayClass] = nonEnumProps[dateClass] = nonEnumProps[numberClass] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; + nonEnumProps[boolClass] = nonEnumProps[stringClass] = { 'constructor': true, 'toString': true, 'valueOf': true }; + nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true }; + nonEnumProps[objectClass] = { 'constructor': true }; + + (function() { + var length = shadowedProps.length; + while (length--) { + var key = shadowedProps[length]; + for (var className in nonEnumProps) { + if (hasOwnProperty.call(nonEnumProps, className) && !hasOwnProperty.call(nonEnumProps[className], key)) { + nonEnumProps[className][key] = false; + } + } + } + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps the given value to enable intuitive + * method chaining. + * + * In addition to Lo-Dash methods, wrappers also have the following `Array` methods: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, + * and `unshift` + * + * Chaining is supported in custom builds as long as the `value` method is + * implicitly or explicitly included in the build. + * + * The chainable wrapper functions are: + * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, + * `compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`, + * `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, + * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`, + * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, + * `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, + * `union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, + * and `zip` + * + * The non-chainable wrapper functions are: + * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`, + * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, + * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, + * `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, + * `template`, `unescape`, `uniqueId`, and `value` + * + * The wrapper functions `first` and `last` return wrapped values when `n` is + * provided, otherwise they return unwrapped values. + * + * Explicit chaining can be enabled by using the `_.chain` method. + * + * @name _ + * @constructor + * @category Chaining + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(num) { + * return num * num; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + // don't wrap if already wrapped, even if wrapped by a different `lodash` constructor + return (value && typeof value == 'object' && !isArray(value) && hasOwnProperty.call(value, '__wrapped__')) + ? value + : new lodashWrapper(value); + } + + /** + * A fast path for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {Object} Returns a `lodash` instance. + */ + function lodashWrapper(value, chainAll) { + this.__chain__ = !!chainAll; + this.__wrapped__ = value; + } + // ensure `new lodashWrapper` is an instance of `lodash` + lodashWrapper.prototype = lodash.prototype; + + /** + * An object used to flag environments features. + * + * @static + * @memberOf _ + * @type Object + */ + var support = lodash.support = {}; + + (function() { + var ctor = function() { this.x = 1; }, + object = { '0': 1, 'length': 1 }, + props = []; + + ctor.prototype = { 'valueOf': 1, 'y': 1 }; + for (var key in new ctor) { props.push(key); } + for (key in arguments) { } + + /** + * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.argsClass = toString.call(arguments) == argsClass; + + /** + * Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5). + * + * @memberOf _.support + * @type boolean + */ + support.argsObject = arguments.constructor == Object && !(arguments instanceof Array); + + /** + * Detect if `name` or `message` properties of `Error.prototype` are + * enumerable by default. (IE < 9, Safari < 5.1) + * + * @memberOf _.support + * @type boolean + */ + support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); + + /** + * Detect if `prototype` properties are enumerable by default. + * + * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 + * (if the prototype or a property on the prototype has been set) + * incorrectly sets a function's `prototype` property [[Enumerable]] + * value to `true`. + * + * @memberOf _.support + * @type boolean + */ + support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); + + /** + * Detect if functions can be decompiled by `Function#toString` + * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). + * + * @memberOf _.support + * @type boolean + */ + support.funcDecomp = !isNative(context.WinRTError) && reThis.test(runInContext); + + /** + * Detect if `Function#name` is supported (all but IE). + * + * @memberOf _.support + * @type boolean + */ + support.funcNames = typeof Function.name == 'string'; + + /** + * Detect if `arguments` object indexes are non-enumerable + * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumArgs = key != 0; + + /** + * Detect if properties shadowing those on `Object.prototype` are non-enumerable. + * + * In IE < 9 an objects own properties, shadowing non-enumerable ones, are + * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumShadows = !/valueOf/.test(props); + + /** + * Detect if own properties are iterated after inherited properties (all but IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.ownLast = props[0] != 'x'; + + /** + * Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. + * + * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` + * and `splice()` functions that fail to remove the last element, `value[0]`, + * of array-like objects even though the `length` property is set to `0`. + * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` + * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. + * + * @memberOf _.support + * @type boolean + */ + support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); + + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index and IE 8 can only access + * characters by index on string literals. + * + * @memberOf _.support + * @type boolean + */ + support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; + + /** + * Detect if a DOM node's [[Class]] is resolvable (all but IE < 9) + * and that the JS engine errors when attempting to coerce an object to + * a string without a `toString` function. + * + * @memberOf _.support + * @type boolean + */ + try { + support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); + } catch(e) { + support.nodeClass = true; + } + }(1)); + + /** + * 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 + */ + lodash.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 + */ + '_': lodash + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The template used to create iterator functions. + * + * @private + * @param {Object} data The data object used to populate the text. + * @returns {string} Returns the interpolated text. + */ + var iteratorTemplate = function(obj) { + + var __p = 'var index, iterable = ' + + (obj.firstArg) + + ', result = ' + + (obj.init) + + ';\nif (!iterable) return result;\n' + + (obj.top) + + ';'; + if (obj.array) { + __p += '\nvar length = iterable.length; index = -1;\nif (' + + (obj.array) + + ') { '; + if (support.unindexedChars) { + __p += '\n if (isString(iterable)) {\n iterable = iterable.split(\'\')\n } '; + } + __p += '\n while (++index < length) {\n ' + + (obj.loop) + + ';\n }\n}\nelse { '; + } else if (support.nonEnumArgs) { + __p += '\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += \'\';\n ' + + (obj.loop) + + ';\n }\n } else { '; + } + + if (support.enumPrototypes) { + __p += '\n var skipProto = typeof iterable == \'function\';\n '; + } + + if (support.enumErrorProps) { + __p += '\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n '; + } + + var conditions = []; if (support.enumPrototypes) { conditions.push('!(skipProto && index == "prototype")'); } if (support.enumErrorProps) { conditions.push('!(skipErrorProps && (index == "message" || index == "name"))'); } + + if (obj.useHas && obj.keys) { + __p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n'; + if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + } else { + __p += '\n for (index in iterable) {\n'; + if (obj.useHas) { conditions.push("hasOwnProperty.call(iterable, index)"); } if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + if (support.nonEnumShadows) { + __p += '\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n '; + for (k = 0; k < 7; k++) { + __p += '\n index = \'' + + (obj.shadowedProps[k]) + + '\';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))'; + if (!obj.useHas) { + __p += ' || (!nonEnum[index] && iterable[index] !== objectProto[index])'; + } + __p += ') {\n ' + + (obj.loop) + + ';\n } '; + } + __p += '\n } '; + } + + } + + if (obj.array || support.nonEnumArgs) { + __p += '\n}'; + } + __p += + (obj.bottom) + + ';\nreturn result'; + + return __p + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.bind` that creates the bound function and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new bound function. + */ + function baseBind(bindData) { + var func = bindData[0], + partialArgs = bindData[2], + thisArg = bindData[4]; + + function bound() { + // `Function#bind` spec + // http://es5.github.io/#x15.3.4.5 + if (partialArgs) { + // avoid `arguments` object deoptimizations by using `slice` instead + // of `Array.prototype.slice.call` and not assigning `arguments` to a + // variable as a ternary expression + var args = slice(partialArgs); + push.apply(args, arguments); + } + // mimic the constructor's `return` behavior + // http://es5.github.io/#x13.2.2 + if (this instanceof bound) { + // ensure `new bound` is an instance of `func` + var thisBinding = baseCreate(func.prototype), + result = func.apply(thisBinding, args || arguments); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisArg, args || arguments); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.clone` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, callback, stackA, stackB) { + if (callback) { + var result = callback(value); + if (typeof result != 'undefined') { + return result; + } + } + // inspect [[Class]] + var isObj = isObject(value); + if (isObj) { + var className = toString.call(value); + if (!cloneableClasses[className] || (!support.nodeClass && isNode(value))) { + return value; + } + var ctor = ctorByClass[className]; + switch (className) { + case boolClass: + case dateClass: + return new ctor(+value); + + case numberClass: + case stringClass: + return new ctor(value); + + case regexpClass: + result = ctor(value.source, reFlags.exec(value)); + result.lastIndex = value.lastIndex; + return result; + } + } else { + return value; + } + var isArr = isArray(value); + if (isDeep) { + // check for circular references and return corresponding clone + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + result = isArr ? ctor(value.length) : {}; + } + else { + result = isArr ? slice(value) : assign({}, value); + } + // add array properties assigned by `RegExp#exec` + if (isArr) { + if (hasOwnProperty.call(value, 'index')) { + result.index = value.index; + } + if (hasOwnProperty.call(value, 'input')) { + result.input = value.input; + } + } + // exit for shallow clone + if (!isDeep) { + return result; + } + // add the source value to the stack of traversed objects + // and associate it with its clone + stackA.push(value); + stackB.push(result); + + // recursively populate clone (susceptible to call stack limits) + (isArr ? baseEach : forOwn)(value, function(objValue, key) { + result[key] = baseClone(objValue, isDeep, callback, stackA, stackB); + }); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + function baseCreate(prototype, properties) { + return isObject(prototype) ? nativeCreate(prototype) : {}; + } + // fallback for browsers without `Object.create` + if (!nativeCreate) { + baseCreate = (function() { + function Object() {} + return function(prototype) { + if (isObject(prototype)) { + Object.prototype = prototype; + var result = new Object; + Object.prototype = null; + } + return result || context.Object(); + }; + }()); + } + + /** + * The base implementation of `_.createCallback` without support for creating + * "_.pluck" or "_.where" style callbacks. + * + * @private + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + */ + function baseCreateCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + // exit early for no `thisArg` or already bound by `Function#bind` + if (typeof thisArg == 'undefined' || !('prototype' in func)) { + return func; + } + var bindData = func.__bindData__; + if (typeof bindData == 'undefined') { + if (support.funcNames) { + bindData = !func.name; + } + bindData = bindData || !support.funcDecomp; + if (!bindData) { + var source = fnToString.call(func); + if (!support.funcNames) { + bindData = !reFuncName.test(source); + } + if (!bindData) { + // checks if `func` references the `this` keyword and stores the result + bindData = reThis.test(source); + setBindData(func, bindData); + } + } + } + // exit early if there are no `this` references or `func` is bound + if (bindData === false || (bindData !== true && bindData[1] & 1)) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 2: return function(a, b) { + return func.call(thisArg, a, b); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + } + return bind(func, thisArg); + } + + /** + * The base implementation of `createWrapper` that creates the wrapper and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new function. + */ + function baseCreateWrapper(bindData) { + var func = bindData[0], + bitmask = bindData[1], + partialArgs = bindData[2], + partialRightArgs = bindData[3], + thisArg = bindData[4], + arity = bindData[5]; + + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + key = func; + + function bound() { + var thisBinding = isBind ? thisArg : this; + if (partialArgs) { + var args = slice(partialArgs); + push.apply(args, arguments); + } + if (partialRightArgs || isCurry) { + args || (args = slice(arguments)); + if (partialRightArgs) { + push.apply(args, partialRightArgs); + } + if (isCurry && args.length < arity) { + bitmask |= 16 & ~32; + return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]); + } + } + args || (args = arguments); + if (isBindKey) { + func = thisBinding[key]; + } + if (this instanceof bound) { + thisBinding = baseCreate(func.prototype); + var result = func.apply(thisBinding, args); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisBinding, args); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.difference` that accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to process. + * @param {Array} [values] The array of values to exclude. + * @returns {Array} Returns a new array of filtered values. + */ + function baseDifference(array, values) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + isLarge = length >= largeArraySize && indexOf === baseIndexOf, + result = []; + + if (isLarge) { + var cache = createCache(values); + if (cache) { + indexOf = cacheIndexOf; + values = cache; + } else { + isLarge = false; + } + } + while (++index < length) { + var value = array[index]; + if (indexOf(values, value) < 0) { + result.push(value); + } + } + if (isLarge) { + releaseObject(values); + } + return result; + } + + /** + * The base implementation of `_.flatten` without support for callback + * shorthands or `thisArg` binding. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isStrict=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {Array} Returns a new flattened array. + */ + function baseFlatten(array, isShallow, isStrict, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (value && typeof value == 'object' && typeof value.length == 'number' + && (isArray(value) || isArguments(value))) { + // recursively flatten arrays (susceptible to call stack limits) + if (!isShallow) { + value = baseFlatten(value, isShallow, isStrict); + } + var valIndex = -1, + valLength = value.length, + resIndex = result.length; + + result.length += valLength; + while (++valIndex < valLength) { + result[resIndex++] = value[valIndex]; + } + } else if (!isStrict) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.isEqual`, without support for `thisArg` binding, + * that allows partial "_.where" style comparisons. + * + * @private + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `a` objects. + * @param {Array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { + // used to indicate that when comparing objects, `a` has at least the properties of `b` + if (callback) { + var result = callback(a, b); + if (typeof result != 'undefined') { + return !!result; + } + } + // exit early for identical values + if (a === b) { + // treat `+0` vs. `-0` as not equal + return a !== 0 || (1 / a == 1 / b); + } + var type = typeof a, + otherType = typeof b; + + // exit early for unlike primitive values + if (a === a && + !(a && objectTypes[type]) && + !(b && objectTypes[otherType])) { + return false; + } + // exit early for `null` and `undefined` avoiding ES3's Function#call behavior + // http://es5.github.io/#x15.3.4.4 + if (a == null || b == null) { + return a === b; + } + // compare [[Class]] names + var className = toString.call(a), + otherClass = toString.call(b); + + if (className == argsClass) { + className = objectClass; + } + if (otherClass == argsClass) { + otherClass = objectClass; + } + if (className != otherClass) { + return false; + } + switch (className) { + case boolClass: + case dateClass: + // coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal + return +a == +b; + + case numberClass: + // treat `NaN` vs. `NaN` as equal + return (a != +a) + ? b != +b + // but treat `+0` vs. `-0` as not equal + : (a == 0 ? (1 / a == 1 / b) : a == +b); + + case regexpClass: + case stringClass: + // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) + // treat string primitives and their corresponding object instances as equal + return a == String(b); + } + var isArr = className == arrayClass; + if (!isArr) { + // unwrap any `lodash` wrapped values + var aWrapped = hasOwnProperty.call(a, '__wrapped__'), + bWrapped = hasOwnProperty.call(b, '__wrapped__'); + + if (aWrapped || bWrapped) { + return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB); + } + // exit for functions and DOM nodes + if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) { + return false; + } + // in older versions of Opera, `arguments` objects have `Array` constructors + var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor, + ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor; + + // non `Object` object instances with different constructors are not equal + if (ctorA != ctorB && + !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && + ('constructor' in a && 'constructor' in b) + ) { + return false; + } + } + // assume cyclic structures are equal + // the algorithm for detecting cyclic structures is adapted from ES 5.1 + // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == a) { + return stackB[length] == b; + } + } + var size = 0; + result = true; + + // add `a` and `b` to the stack of traversed objects + stackA.push(a); + stackB.push(b); + + // recursively compare objects and arrays (susceptible to call stack limits) + if (isArr) { + // compare lengths to determine if a deep comparison is necessary + length = a.length; + size = b.length; + result = size == length; + + if (result || isWhere) { + // deep compare the contents, ignoring non-numeric properties + while (size--) { + var index = length, + value = b[size]; + + if (isWhere) { + while (index--) { + if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } + } + else { + // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` + // which, in this case, is more costly + forIn(b, function(value, key, b) { + if (hasOwnProperty.call(b, key)) { + // count the number of properties. + size++; + // deep compare each property value. + return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB)); + } + }); + + if (result && !isWhere) { + // ensure both objects have the same number of properties + forIn(a, function(value, key, a) { + if (hasOwnProperty.call(a, key)) { + // `size` will be `-1` if `a` has more properties than `b` + return (result = --size > -1); + } + }); + } + } + stackA.pop(); + stackB.pop(); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.merge` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [callback] The function to customize merging properties. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + */ + function baseMerge(object, source, callback, stackA, stackB) { + (isArray(source) ? forEach : forOwn)(source, function(source, key) { + var found, + isArr, + result = source, + value = object[key]; + + if (source && ((isArr = isArray(source)) || isPlainObject(source))) { + // avoid merging previously merged cyclic sources + var stackLength = stackA.length; + while (stackLength--) { + if ((found = stackA[stackLength] == source)) { + value = stackB[stackLength]; + break; + } + } + if (!found) { + var isShallow; + if (callback) { + result = callback(value, source); + if ((isShallow = typeof result != 'undefined')) { + value = result; + } + } + if (!isShallow) { + value = isArr + ? (isArray(value) ? value : []) + : (isPlainObject(value) ? value : {}); + } + // add `source` and associated `value` to the stack of traversed objects + stackA.push(source); + stackB.push(value); + + // recursively merge objects and arrays (susceptible to call stack limits) + if (!isShallow) { + baseMerge(value, source, callback, stackA, stackB); + } + } + } + else { + if (callback) { + result = callback(value, source); + if (typeof result == 'undefined') { + result = source; + } + } + if (typeof result != 'undefined') { + value = result; + } + } + object[key] = value; + }); + } + + /** + * The base implementation of `_.random` without argument juggling or support + * for returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns a random number. + */ + function baseRandom(min, max) { + return min + floor(nativeRandom() * (max - min + 1)); + } + + /** + * The base implementation of `_.uniq` without support for callback shorthands + * or `thisArg` binding. + * + * @private + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. + */ + function baseUniq(array, isSorted, callback) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + result = []; + + var isLarge = !isSorted && length >= largeArraySize && indexOf === baseIndexOf, + seen = (callback || isLarge) ? getArray() : result; + + if (isLarge) { + var cache = createCache(seen); + indexOf = cacheIndexOf; + seen = cache; + } + while (++index < length) { + var value = array[index], + computed = callback ? callback(value, index, array) : value; + + if (isSorted + ? !index || seen[seen.length - 1] !== computed + : indexOf(seen, computed) < 0 + ) { + if (callback || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + if (isLarge) { + releaseArray(seen.array); + releaseObject(seen); + } else if (callback) { + releaseArray(seen); + } + return result; + } + + /** + * Creates a function that aggregates a collection, creating an object composed + * of keys generated from the results of running each element of the collection + * through a callback. The given `setter` function sets the keys and values + * of the composed object. + * + * @private + * @param {Function} setter The setter function. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter) { + return function(collection, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, callback(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, callback(value, key, collection), collection); + }); + } + return result; + }; + } + + /** + * Creates a function that, when called, either curries or invokes `func` + * with an optional `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` + * 8 - `_.curry` (bound) + * 16 - `_.partial` + * 32 - `_.partialRight` + * @param {Array} [partialArgs] An array of arguments to prepend to those + * provided to the new function. + * @param {Array} [partialRightArgs] An array of arguments to append to those + * provided to the new function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new function. + */ + function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + isPartial = bitmask & 16, + isPartialRight = bitmask & 32; + + if (!isBindKey && !isFunction(func)) { + throw new TypeError; + } + if (isPartial && !partialArgs.length) { + bitmask &= ~16; + isPartial = partialArgs = false; + } + if (isPartialRight && !partialRightArgs.length) { + bitmask &= ~32; + isPartialRight = partialRightArgs = false; + } + var bindData = func && func.__bindData__; + if (bindData && bindData !== true) { + // clone `bindData` + bindData = slice(bindData); + if (bindData[2]) { + bindData[2] = slice(bindData[2]); + } + if (bindData[3]) { + bindData[3] = slice(bindData[3]); + } + // set `thisBinding` is not previously bound + if (isBind && !(bindData[1] & 1)) { + bindData[4] = thisArg; + } + // set if previously bound but not currently (subsequent curried functions) + if (!isBind && bindData[1] & 1) { + bitmask |= 8; + } + // set curried arity if not yet set + if (isCurry && !(bindData[1] & 4)) { + bindData[5] = arity; + } + // append partial left arguments + if (isPartial) { + push.apply(bindData[2] || (bindData[2] = []), partialArgs); + } + // append partial right arguments + if (isPartialRight) { + unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs); + } + // merge flags + bindData[1] |= bitmask; + return createWrapper.apply(null, bindData); + } + // fast path for `_.bind` + var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper; + return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]); + } + + /** + * Creates compiled iteration functions. + * + * @private + * @param {...Object} [options] The compile options object(s). + * @param {string} [options.array] Code to determine if the iterable is an array or array-like. + * @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop. + * @param {Function} [options.keys] A reference to `_.keys` for use in own property iteration. + * @param {string} [options.args] A comma separated string of iteration function arguments. + * @param {string} [options.top] Code to execute before the iteration branches. + * @param {string} [options.loop] Code to execute in the object loop. + * @param {string} [options.bottom] Code to execute after the iteration branches. + * @returns {Function} Returns the compiled function. + */ + function createIterator() { + // data properties + iteratorData.shadowedProps = shadowedProps; + + // iterator options + iteratorData.array = iteratorData.bottom = iteratorData.loop = iteratorData.top = ''; + iteratorData.init = 'iterable'; + iteratorData.useHas = true; + + // merge options into a template data object + for (var object, index = 0; object = arguments[index]; index++) { + for (var key in object) { + iteratorData[key] = object[key]; + } + } + var args = iteratorData.args; + iteratorData.firstArg = /^[^,]+/.exec(args)[0]; + + // create the function factory + var factory = Function( + 'baseCreateCallback, errorClass, errorProto, hasOwnProperty, ' + + 'indicatorObject, isArguments, isArray, isString, keys, objectProto, ' + + 'objectTypes, nonEnumProps, stringClass, stringProto, toString', + 'return function(' + args + ') {\n' + iteratorTemplate(iteratorData) + '\n}' + ); + + // return the compiled function + return factory( + baseCreateCallback, errorClass, errorProto, hasOwnProperty, + indicatorObject, isArguments, isArray, isString, iteratorData.keys, objectProto, + objectTypes, nonEnumProps, stringClass, stringProto, toString + ); + } + + /** + * 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]; + } + + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized, this method returns the custom method, otherwise it returns + * the `baseIndexOf` function. + * + * @private + * @returns {Function} Returns the "indexOf" function. + */ + function getIndexOf() { + var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result; + return result; + } + + /** + * 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); + } + + /** + * Sets `this` binding data on a given function. + * + * @private + * @param {Function} func The function to set data on. + * @param {Array} value The data array to set. + */ + var setBindData = !defineProperty ? noop : function(func, value) { + descriptor.value = value; + defineProperty(func, '__bindData__', descriptor); + }; + + /** + * A fallback implementation of `isPlainObject` which checks if a given value + * is an object created by the `Object` constructor, assuming objects created + * by the `Object` constructor have no inherited enumerable properties and that + * there are no `Object.prototype` extensions. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + */ + function shimIsPlainObject(value) { + var ctor, + result; + + // avoid non Object objects, `arguments` objects, and DOM elements + if (!(value && toString.call(value) == objectClass) || + (ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor)) || + (!support.argsClass && isArguments(value)) || + (!support.nodeClass && isNode(value))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + if (support.ownLast) { + forIn(value, function(value, key, object) { + result = hasOwnProperty.call(object, key); + return false; + }); + return result !== false; + } + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + forIn(value, function(value, key) { + result = key; + }); + return typeof result == 'undefined' || hasOwnProperty.call(value, result); + } + + /** + * Used by `unescape` to convert HTML entities to characters. + * + * @private + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + function unescapeHtmlChar(match) { + return htmlUnescapes[match]; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Checks if `value` is an `arguments` object. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @example + * + * (function() { return _.isArguments(arguments); })(1, 2, 3); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == argsClass || false; + } + // fallback for browsers that can't detect `arguments` objects by [[Class]] + if (!support.argsClass) { + isArguments = function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee') || false; + }; + } + + /** + * Checks if `value` is an array. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. + * @example + * + * (function() { return _.isArray(arguments); })(); + * // => false + * + * _.isArray([1, 2, 3]); + * // => true + */ + var isArray = nativeIsArray || function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == arrayClass || false; + }; + + /** + * 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 = createIterator({ + 'args': 'object', + 'init': '[]', + 'top': 'if (!(objectTypes[typeof object])) return result', + 'loop': 'result.push(index)' + }); + + /** + * 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 []; + } + if ((support.enumPrototypes && typeof object == 'function') || + (support.nonEnumArgs && object.length && isArguments(object))) { + return shimKeys(object); + } + return nativeKeys(object); + }; + + /** Reusable iterator options shared by `each`, `forIn`, and `forOwn` */ + var eachIteratorOptions = { + 'args': 'collection, callback, thisArg', + 'top': "callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)", + 'array': "typeof length == 'number'", + 'keys': keys, + 'loop': 'if (callback(iterable[index], index, collection) === false) return result' + }; + + /** Reusable iterator options for `assign` and `defaults` */ + var defaultsIteratorOptions = { + 'args': 'object, source, guard', + 'top': + 'var args = arguments,\n' + + ' argsIndex = 0,\n' + + " argsLength = typeof guard == 'number' ? 2 : args.length;\n" + + 'while (++argsIndex < argsLength) {\n' + + ' iterable = args[argsIndex];\n' + + ' if (iterable && objectTypes[typeof iterable]) {', + 'keys': keys, + 'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]", + 'bottom': ' }\n}' + }; + + /** Reusable iterator options for `forIn` and `forOwn` */ + var forOwnIteratorOptions = { + 'top': 'if (!objectTypes[typeof iterable]) return result;\n' + eachIteratorOptions.top, + 'array': false + }; + + /** + * 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 = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to convert HTML entities to characters */ + var htmlUnescapes = invert(htmlEscapes); + + /** Used to match HTML entities and HTML characters */ + var reEscapedHtml = RegExp('(' + keys(htmlUnescapes).join('|') + ')', 'g'), + reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); + + /** + * A function compiled to iterate `arguments` objects, arrays, objects, and + * strings consistenly across environments, executing the callback for each + * element in the collection. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index|key, collection). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @private + * @type Function + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEach = createIterator(eachIteratorOptions); + + /*--------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources will overwrite property assignments of previous + * sources. If a callback is provided it will be executed to produce the + * assigned values. The callback is bound to `thisArg` and invoked with two + * arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @type Function + * @alias extend + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * _.assign({ 'name': 'fred' }, { 'employer': 'slate' }); + * // => { 'name': 'fred', 'employer': 'slate' } + * + * var defaults = _.partialRight(_.assign, function(a, b) { + * return typeof a == 'undefined' ? b : a; + * }); + * + * var object = { 'name': 'barney' }; + * defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ + var assign = createIterator(defaultsIteratorOptions, { + 'top': + defaultsIteratorOptions.top.replace(';', + ';\n' + + "if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n" + + ' var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n' + + "} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n" + + ' callback = args[--argsLength];\n' + + '}' + ), + 'loop': 'result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]' + }); + + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects will also + * be cloned, otherwise they will be assigned by reference. If a callback + * is provided it will be executed to produce the cloned values. If the + * callback returns `undefined` cloning will be handled by the method instead. + * The callback is bound to `thisArg` and invoked with one argument; (value). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var shallow = _.clone(characters); + * shallow[0] === characters[0]; + * // => true + * + * var deep = _.clone(characters, true); + * deep[0] === characters[0]; + * // => false + * + * _.mixin({ + * 'clone': _.partialRight(_.clone, function(value) { + * return _.isElement(value) ? value.cloneNode(false) : undefined; + * }) + * }); + * + * var clone = _.clone(document.body); + * clone.childNodes.length; + * // => 0 + */ + function clone(value, isDeep, callback, thisArg) { + // allows working with "Collections" methods without using their `index` + // and `collection` arguments for `isDeep` and `callback` + if (typeof isDeep != 'boolean' && isDeep != null) { + thisArg = callback; + callback = isDeep; + isDeep = false; + } + return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates a deep clone of `value`. If a callback is provided it will be + * executed to produce the cloned values. If the callback returns `undefined` + * cloning will be handled by the method instead. The callback is bound to + * `thisArg` and invoked with one argument; (value). + * + * Note: This method is loosely based on the structured clone algorithm. Functions + * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and + * objects created by constructors other than `Object` are cloned to plain `Object` objects. + * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var deep = _.cloneDeep(characters); + * deep[0] === characters[0]; + * // => false + * + * var view = { + * 'label': 'docs', + * 'node': element + * }; + * + * var clone = _.cloneDeep(view, function(value) { + * return _.isElement(value) ? value.cloneNode(true) : undefined; + * }); + * + * clone.node == view.node; + * // => false + */ + function cloneDeep(value, callback, thisArg) { + return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { 'constructor': Circle }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties ? assign(result, properties) : result; + } + + /** + * 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 = createIterator(defaultsIteratorOptions); + + /** + * This method is like `_.findIndex` except that it returns the key of the + * first element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': false }, + * 'fred': { 'age': 40, 'blocked': true }, + * 'pebbles': { 'age': 1, 'blocked': false } + * }; + * + * _.findKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (property order is not guaranteed across environments) + * + * // using "_.where" callback shorthand + * _.findKey(characters, { 'age': 1 }); + * // => 'pebbles' + * + * // using "_.pluck" callback shorthand + * _.findKey(characters, 'blocked'); + * // => 'fred' + */ + function findKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwn(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * This method is like `_.findKey` except that it iterates over elements + * of a `collection` in the opposite order. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': true }, + * 'fred': { 'age': 40, 'blocked': false }, + * 'pebbles': { 'age': 1, 'blocked': true } + * }; + * + * _.findLastKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles`, assuming `_.findKey` returns `barney` + * + * // using "_.where" callback shorthand + * _.findLastKey(characters, { 'age': 40 }); + * // => 'fred' + * + * // using "_.pluck" callback shorthand + * _.findLastKey(characters, 'blocked'); + * // => 'pebbles' + */ + function findLastKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwnRight(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * Iterates over own and inherited enumerable properties of an object, + * executing the callback for each property. The callback is bound to `thisArg` + * and invoked with three arguments; (value, key, object). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forIn(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) + */ + var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, { + 'useHas': false + }); + + /** + * This method is like `_.forIn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forInRight(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'move', 'y', and 'x' assuming `_.forIn ` logs 'x', 'y', and 'move' + */ + function forInRight(object, callback, thisArg) { + var pairs = []; + + forIn(object, function(value, key) { + pairs.push(key, value); + }); + + var length = pairs.length; + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + if (callback(pairs[length--], pairs[length], object) === false) { + break; + } + } + return object; + } + + /** + * Iterates over own enumerable properties of an object, executing the callback + * for each property. The callback is bound to `thisArg` and invoked with three + * arguments; (value, key, object). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs '0', '1', and 'length' (property order is not guaranteed across environments) + */ + var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions); + + /** + * This method is like `_.forOwn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs 'length', '1', and '0' assuming `_.forOwn` logs '0', '1', and 'length' + */ + function forOwnRight(object, callback, thisArg) { + var props = keys(object), + length = props.length; + + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + var key = props[length]; + if (callback(object[key], key, object) === false) { + break; + } + } + return object; + } + + /** + * Creates a sorted array of property names of all enumerable properties, + * own and inherited, of `object` that have function values. + * + * @static + * @memberOf _ + * @alias methods + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names that have function values. + * @example + * + * _.functions(_); + * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] + */ + function functions(object) { + var result = []; + forIn(object, function(value, key) { + if (isFunction(value)) { + result.push(key); + } + }); + return result.sort(); + } + + /** + * Checks if the specified property name exists as a direct property of `object`, + * instead of an inherited property. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to check. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. + * @example + * + * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + * // => true + */ + function has(object, key) { + return object ? hasOwnProperty.call(object, key) : false; + } + + /** + * Creates an object composed of the inverted keys and values of the given object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to invert. + * @returns {Object} Returns the created inverted object. + * @example + * + * _.invert({ 'first': 'fred', 'second': 'barney' }); + * // => { 'fred': 'first', 'barney': 'second' } + */ + function invert(object) { + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + result[object[key]] = key; + } + return result; + } + + /** + * Checks if `value` is a boolean value. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @example + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + value && typeof value == 'object' && toString.call(value) == boolClass || false; + } + + /** + * Checks if `value` is a date. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + */ + function isDate(value) { + return value && typeof value == 'object' && toString.call(value) == dateClass || false; + } + + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + */ + function isElement(value) { + return value && value.nodeType === 1 || false; + } + + /** + * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a + * length of `0` and objects with no own enumerable properties are considered + * "empty". + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. + * @example + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({}); + * // => true + * + * _.isEmpty(''); + * // => true + */ + function isEmpty(value) { + var result = true; + if (!value) { + return result; + } + var className = toString.call(value), + length = value.length; + + if ((className == arrayClass || className == stringClass || + (support.argsClass ? className == argsClass : isArguments(value))) || + (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { + return !length; + } + forOwn(value, function() { + return (result = false); + }); + return result; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent to each other. If a callback is provided it will be executed + * to compare values. If the callback returns `undefined` comparisons will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (a, b). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'name': 'fred' }; + * var copy = { 'name': 'fred' }; + * + * object == copy; + * // => false + * + * _.isEqual(object, copy); + * // => true + * + * var words = ['hello', 'goodbye']; + * var otherWords = ['hi', 'goodbye']; + * + * _.isEqual(words, otherWords, function(a, b) { + * var reGreet = /^(?:hello|hi)$/i, + * aGreet = _.isString(a) && reGreet.test(a), + * bGreet = _.isString(b) && reGreet.test(b); + * + * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; + * }); + * // => true + */ + function isEqual(a, b, callback, thisArg) { + return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2)); + } + + /** + * Checks if `value` is, or can be coerced to, a finite number. + * + * Note: This is not the same as native `isFinite` which will return true for + * booleans and empty strings. See http://es5.github.io/#x15.1.2.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. + * @example + * + * _.isFinite(-101); + * // => true + * + * _.isFinite('10'); + * // => true + * + * _.isFinite(true); + * // => false + * + * _.isFinite(''); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + function isFinite(value) { + return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); + } + + /** + * Checks if `value` is a function. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + */ + function isFunction(value) { + return typeof value == 'function'; + } + // fallback for older versions of Chrome and Safari + if (isFunction(/x/)) { + isFunction = function(value) { + return typeof value == 'function' && toString.call(value) == funcClass; + }; + } + + /** + * 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]); + } + + /** + * Checks if `value` is `NaN`. + * + * Note: This is not the same as native `isNaN` which will return `true` for + * `undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // `NaN` as a primitive is the only value that is not equal to itself + // (perform the [[Class]] check first to avoid errors with some host objects in IE) + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(undefined); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is a number. + * + * Note: `NaN` is considered a number. See http://es5.github.io/#x8.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. + * @example + * + * _.isNumber(8.4 * 5); + * // => true + */ + function isNumber(value) { + return typeof value == 'number' || + value && typeof value == 'object' && toString.call(value) == numberClass || false; + } + + /** + * Checks if `value` is an object created by the `Object` constructor. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * _.isPlainObject(new Shape); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + */ + var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { + if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) { + return false; + } + var valueOf = value.valueOf, + objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); + + return objProto + ? (value == objProto || getPrototypeOf(value) == objProto) + : shimIsPlainObject(value); + }; + + /** + * Checks if `value` is a regular expression. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @example + * + * _.isRegExp(/fred/); + * // => true + */ + function isRegExp(value) { + return value && objectTypes[typeof value] && toString.call(value) == regexpClass || false; + } + + /** + * Checks if `value` is a string. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. + * @example + * + * _.isString('fred'); + * // => true + */ + function isString(value) { + return typeof value == 'string' || + value && typeof value == 'object' && toString.call(value) == stringClass || false; + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + */ + function isUndefined(value) { + return typeof value == 'undefined'; + } + + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new object with values of the results of each `callback` execution. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + * + * var characters = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // using "_.pluck" callback shorthand + * _.mapValues(characters, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } + */ + function mapValues(object, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + forOwn(object, function(value, key, object) { + result[key] = callback(value, key, object); + }); + return result; + } + + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * will overwrite property assignments of previous sources. If a callback is + * provided it will be executed to produce the merged values of the destination + * and source properties. If the callback returns `undefined` merging will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * var names = { + * 'characters': [ + * { 'name': 'barney' }, + * { 'name': 'fred' } + * ] + * }; + * + * var ages = { + * 'characters': [ + * { 'age': 36 }, + * { 'age': 40 } + * ] + * }; + * + * _.merge(names, ages); + * // => { 'characters': [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] } + * + * var food = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var otherFood = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(food, otherFood, function(a, b) { + * return _.isArray(a) ? a.concat(b) : undefined; + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } + */ + function merge(object) { + var args = arguments, + length = 2; + + if (!isObject(object)) { + return object; + } + // allows working with `_.reduce` and `_.reduceRight` without using + // their `index` and `collection` arguments + if (typeof args[2] != 'number') { + length = args.length; + } + if (length > 3 && typeof args[length - 2] == 'function') { + var callback = baseCreateCallback(args[--length - 1], args[length--], 2); + } else if (length > 2 && typeof args[length - 1] == 'function') { + callback = args[--length]; + } + var sources = slice(arguments, 1, length), + index = -1, + stackA = getArray(), + stackB = getArray(); + + while (++index < length) { + baseMerge(object, sources[index], callback, stackA, stackB); + } + releaseArray(stackA); + releaseArray(stackB); + return object; + } + + /** + * Creates a shallow clone of `object` excluding the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` omitting the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object without the omitted properties. + * @example + * + * _.omit({ 'name': 'fred', 'age': 40 }, 'age'); + * // => { 'name': 'fred' } + * + * _.omit({ 'name': 'fred', 'age': 40 }, function(value) { + * return typeof value == 'number'; + * }); + * // => { 'name': 'fred' } + */ + function omit(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var props = []; + forIn(object, function(value, key) { + props.push(key); + }); + props = baseDifference(props, baseFlatten(arguments, true, false, 1)); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + result[key] = object[key]; + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (!callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * Creates a two dimensional array of an object's key-value pairs, + * i.e. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments) + */ + function pairs(object) { + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; + } + + /** + * Creates a shallow clone of `object` composed of the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` picking the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object composed of the picked properties. + * @example + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, 'name'); + * // => { 'name': 'fred' } + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) { + * return key.charAt(0) != '_'; + * }); + * // => { 'name': 'fred' } + */ + function pick(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var index = -1, + props = baseFlatten(arguments, true, false, 1), + length = isObject(object) ? props.length : 0; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * An alternative to `_.reduce` this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable properties through a callback, with each callback execution + * potentially mutating the `accumulator` object. The callback is bound to + * `thisArg` and invoked with four arguments; (accumulator, value, key, object). + * Callbacks may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { + * num *= num; + * if (num % 2) { + * return result.push(num) < 3; + * } + * }); + * // => [1, 9, 25] + * + * var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function transform(object, callback, accumulator, thisArg) { + var isArr = isArray(object); + if (accumulator == null) { + if (isArr) { + accumulator = []; + } else { + var ctor = object && object.constructor, + proto = ctor && ctor.prototype; + + accumulator = baseCreate(proto); + } + } + if (callback) { + callback = lodash.createCallback(callback, thisArg, 4); + (isArr ? baseEach : forOwn)(object, function(value, index, object) { + return callback(accumulator, value, index, object); + }); + } + return accumulator; + } + + /** + * 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; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array of elements from the specified indexes, or keys, of the + * `collection`. Indexes may be specified as individual arguments or as arrays + * of indexes. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` + * to retrieve, specified as individual indexes or arrays of indexes. + * @returns {Array} Returns a new array of elements corresponding to the + * provided indexes. + * @example + * + * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); + * // => ['a', 'c', 'e'] + * + * _.at(['fred', 'barney', 'pebbles'], 0, 2); + * // => ['fred', 'pebbles'] + */ + function at(collection) { + var args = arguments, + index = -1, + props = baseFlatten(args, true, false, 1), + length = (args[2] && args[2][args[1]] === collection) ? 1 : props.length, + result = Array(length); + + if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + while(++index < length) { + result[index] = collection[props[index]]; + } + return result; + } + + /** + * Checks if a given value is present in a collection using strict equality + * for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the + * offset from the end of the collection. + * + * @static + * @memberOf _ + * @alias include + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. + * @example + * + * _.contains([1, 2, 3], 1); + * // => true + * + * _.contains([1, 2, 3], 1, 2); + * // => false + * + * _.contains({ 'name': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.contains('pebbles', 'eb'); + * // => true + */ + function contains(collection, target, fromIndex) { + var index = -1, + indexOf = getIndexOf(), + length = collection ? collection.length : 0, + result = false; + + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; + if (isArray(collection)) { + result = indexOf(collection, target, fromIndex) > -1; + } else if (typeof length == 'number') { + result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1; + } else { + baseEach(collection, function(value) { + if (++index >= fromIndex) { + return !(result = value === target); + } + }); + } + return result; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through the callback. The corresponding value + * of each key is the number of times the key was returned by the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1); + }); + + /** + * Checks if the given callback returns truey value for **all** elements of + * a collection. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes']); + * // => false + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.every(characters, 'age'); + * // => true + * + * // using "_.where" callback shorthand + * _.every(characters, { 'age': 36 }); + * // => false + */ + function every(collection, callback, thisArg) { + var result = true; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (!(result = !!callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return (result = !!callback(value, index, collection)); + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning an array of all elements + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that passed the callback check. + * @example + * + * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [2, 4, 6] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.filter(characters, 'blocked'); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + * + * // using "_.where" callback shorthand + * _.filter(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + */ + function filter(collection, callback, thisArg) { + var result = []; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + result.push(value); + } + } + } else { + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result.push(value); + } + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning the first element that + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias detect, findWhere + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.find(characters, function(chr) { + * return chr.age < 40; + * }); + * // => { 'name': 'barney', 'age': 36, 'blocked': false } + * + * // using "_.where" callback shorthand + * _.find(characters, { 'age': 1 }); + * // => { 'name': 'pebbles', 'age': 1, 'blocked': false } + * + * // using "_.pluck" callback shorthand + * _.find(characters, 'blocked'); + * // => { 'name': 'fred', 'age': 40, 'blocked': true } + */ + function find(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + return value; + } + } + } else { + var result; + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + } + + /** + * This method is like `_.find` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(num) { + * return num % 2 == 1; + * }); + * // => 3 + */ + function findLast(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forEachRight(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + + /** + * Iterates over elements of a collection, executing the callback for each + * element. The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * Note: As with other "Collections" methods, objects with a `length` property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); + * // => logs each number and returns '1,2,3' + * + * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); }); + * // => logs each number and returns the object (property order is not guaranteed across environments) + */ + function forEach(collection, callback, thisArg) { + if (callback && typeof thisArg == 'undefined' && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (callback(collection[index], index, collection) === false) { + break; + } + } + } else { + baseEach(collection, callback, thisArg); + } + return collection; + } + + /** + * This method is like `_.forEach` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); + * // => logs each number from right to left and returns '3,2,1' + */ + function forEachRight(collection, callback, thisArg) { + var iterable = collection, + length = collection ? collection.length : 0; + + callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (length--) { + if (callback(collection[length], length, collection) === false) { + break; + } + } + } else { + if (typeof length != 'number') { + var props = keys(collection); + length = props.length; + } else if (support.unindexedChars && isString(collection)) { + iterable = collection.split(''); + } + baseEach(collection, function(value, key, collection) { + key = props ? props[--length] : --length; + return callback(iterable[key], key, collection); + }); + } + return collection; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of a collection through the callback. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false` + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using "_.pluck" callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value); + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of the collection through the given callback. The corresponding + * value of each key is the last element responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keys = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keys, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keys, function(key) { return String.fromCharCode(key.code); }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + + /** + * Invokes the method named by `methodName` on each element in the `collection` + * returning an array of the results of each invoked method. Additional arguments + * will be provided to each invoked method. If `methodName` is a function it + * will be invoked for, and `this` bound to, each element in the `collection`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|string} methodName The name of the method to invoke or + * the function invoked per iteration. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {Array} Returns a new array of the results of each invoked method. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + function invoke(collection, methodName) { + var args = slice(arguments, 2), + index = -1, + isFunc = typeof methodName == 'function', + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args); + }); + return result; + } + + /** + * Creates an array of values by running each element in the collection + * through the callback. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias collect + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of the results of each `callback` execution. + * @example + * + * _.map([1, 2, 3], function(num) { return num * 3; }); + * // => [3, 6, 9] + * + * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); + * // => [3, 6, 9] (property order is not guaranteed across environments) + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(characters, 'name'); + * // => ['barney', 'fred'] + */ + function map(collection, callback, thisArg) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + callback = lodash.createCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (++index < length) { + result[index] = callback(collection[index], index, collection); + } + } else { + baseEach(collection, function(value, key, collection) { + result[++index] = callback(value, key, collection); + }); + } + return result; + } + + /** + * Retrieves the maximum value of a collection. If the collection is empty or + * falsey `-Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.max(characters, function(chr) { return chr.age; }); + * // => { 'name': 'fred', 'age': 40 }; + * + * // using "_.pluck" callback shorthand + * _.max(characters, 'age'); + * // => { 'name': 'fred', 'age': 40 }; + */ + function max(collection, callback, thisArg) { + var computed = -Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value > result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current > computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the minimum value of a collection. If the collection is empty or + * falsey `Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.min(characters, function(chr) { return chr.age; }); + * // => { 'name': 'barney', 'age': 36 }; + * + * // using "_.pluck" callback shorthand + * _.min(characters, 'age'); + * // => { 'name': 'barney', 'age': 36 }; + */ + function min(collection, callback, thisArg) { + var computed = Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value < result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current < computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the value of a specified property from all elements in the collection. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {string} property The name of the property to pluck. + * @returns {Array} Returns a new array of property values. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.pluck(characters, 'name'); + * // => ['barney', 'fred'] + */ + var pluck = map; + + /** + * Reduces a collection to a value which is the accumulated result of running + * each element in the collection through the callback, where each successive + * callback execution consumes the return value of the previous execution. If + * `accumulator` is not provided the first element of the collection will be + * used as the initial `accumulator` value. The callback is bound to `thisArg` + * and invoked with four arguments; (accumulator, value, index|key, collection). + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var sum = _.reduce([1, 2, 3], function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function reduce(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + if (noaccum) { + accumulator = collection[++index]; + } + while (++index < length) { + accumulator = callback(accumulator, collection[index], index, collection); + } + } else { + baseEach(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection) + }); + } + return accumulator; + } + + /** + * This method is like `_.reduce` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var list = [[0, 1], [2, 3], [4, 5]]; + * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + forEachRight(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The opposite of `_.filter` this method returns the elements of a + * collection that the callback does **not** return truey for. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that failed the callback check. + * @example + * + * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [1, 3, 5] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.reject(characters, 'blocked'); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + * + * // using "_.where" callback shorthand + * _.reject(characters, { 'age': 36 }); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + */ + function reject(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + return filter(collection, function(value, index, collection) { + return !callback(value, index, collection); + }); + } + + /** + * Retrieves a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Allows working with functions like `_.map` + * without using their `index` arguments as `n`. + * @returns {Array} Returns the random sample(s) of `collection`. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + function sample(collection, n, guard) { + if (collection && typeof collection.length != 'number') { + collection = values(collection); + } else if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + if (n == null || guard) { + return collection ? collection[baseRandom(0, collection.length - 1)] : undefined; + } + var result = shuffle(collection); + result.length = nativeMin(nativeMax(0, n), result.length); + return result; + } + + /** + * Creates an array of shuffled values, using a version of the Fisher-Yates + * shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns a new shuffled collection. + * @example + * + * _.shuffle([1, 2, 3, 4, 5, 6]); + * // => [4, 1, 6, 3, 5, 2] + */ + function shuffle(collection) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + var rand = baseRandom(0, ++index); + result[index] = result[rand]; + result[rand] = value; + }); + return result; + } + + /** + * Gets the size of the `collection` by returning `collection.length` for arrays + * and array-like objects or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. + * @example + * + * _.size([1, 2]); + * // => 2 + * + * _.size({ 'one': 1, 'two': 2, 'three': 3 }); + * // => 3 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + var length = collection ? collection.length : 0; + return typeof length == 'number' ? length : keys(collection).length; + } + + /** + * Checks if the callback returns a truey value for **any** element of a + * collection. The function returns as soon as it finds a passing value and + * does not iterate over the entire collection. The callback is bound to + * `thisArg` and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.some(characters, 'blocked'); + * // => true + * + * // using "_.where" callback shorthand + * _.some(characters, { 'age': 1 }); + * // => false + */ + function some(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if ((result = callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return !(result = callback(value, index, collection)); + }); + } + return !!result; + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through the callback. This method + * performs a stable sort, that is, it will preserve the original sort order + * of equal elements. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an array of property names is provided for `callback` the collection + * will be sorted by each property value. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of sorted elements. + * @example + * + * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); + * // => [3, 1, 2] + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 26 }, + * { 'name': 'fred', 'age': 30 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(_.sortBy(characters, 'age'), _.values); + * // => [['barney', 26], ['fred', 30], ['barney', 36], ['fred', 40]] + * + * // sorting by multiple properties + * _.map(_.sortBy(characters, ['name', 'age']), _.values); + * // = > [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]] + */ + function sortBy(collection, callback, thisArg) { + var index = -1, + isArr = isArray(callback), + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + if (!isArr) { + callback = lodash.createCallback(callback, thisArg, 3); + } + forEach(collection, function(value, key, collection) { + var object = result[++index] = getObject(); + if (isArr) { + object.criteria = map(callback, function(key) { return value[key]; }); + } else { + (object.criteria = getArray())[0] = callback(value, key, collection); + } + object.index = index; + object.value = value; + }); + + length = result.length; + result.sort(compareAscending); + while (length--) { + var object = result[length]; + result[length] = object.value; + if (!isArr) { + releaseArray(object.criteria); + } + releaseObject(object); + } + return result; + } + + /** + * Converts the `collection` to an array. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to convert. + * @returns {Array} Returns the new converted array. + * @example + * + * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); + * // => [2, 3, 4] + */ + function toArray(collection) { + if (collection && typeof collection.length == 'number') { + return (support.unindexedChars && isString(collection)) + ? collection.split('') + : slice(collection); + } + return values(collection); + } + + /** + * Performs a deep comparison of each element in a `collection` to the given + * `properties` object, returning an array of all elements that have equivalent + * property values. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Object} props The object of property values to filter by. + * @returns {Array} Returns a new array of elements that have the given properties. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.where(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }] + * + * _.where(characters, { 'pets': ['dino'] }); + * // => [{ 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] }] + */ + var where = filter; + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are all falsey. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to compact. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result.push(value); + } + } + return result; + } + + /** + * Creates an array excluding all values of the provided arrays using strict + * equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to process. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); + * // => [1, 3, 4] + */ + function difference(array) { + return baseDifference(array, baseFlatten(arguments, true, true, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.findIndex(characters, function(chr) { + * return chr.age < 20; + * }); + * // => 2 + * + * // using "_.where" callback shorthand + * _.findIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findIndex(characters, 'blocked'); + * // => 1 + */ + function findIndex(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + if (callback(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of a `collection` from right to left. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': true }, + * { 'name': 'fred', 'age': 40, 'blocked': false }, + * { 'name': 'pebbles', 'age': 1, 'blocked': true } + * ]; + * + * _.findLastIndex(characters, function(chr) { + * return chr.age > 30; + * }); + * // => 1 + * + * // using "_.where" callback shorthand + * _.findLastIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findLastIndex(characters, 'blocked'); + * // => 2 + */ + function findLastIndex(array, callback, thisArg) { + var length = array ? array.length : 0; + callback = lodash.createCallback(callback, thisArg, 3); + while (length--) { + if (callback(array[length], length, array)) { + return length; + } + } + return -1; + } + + /** + * Gets the first element or first `n` elements of an array. If a callback + * is provided elements at the beginning of the array are returned as long + * as the callback returns truey. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias head, take + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([1, 2, 3], 2); + * // => [1, 2] + * + * _.first([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [1, 2] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.first(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': true, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.first(characters, { 'employer': 'slate' }), 'name'); + * // => ['barney', 'fred'] + */ + function first(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = -1; + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[0] : undefined; + } + } + return slice(array, 0, nativeMin(nativeMax(0, n), length)); + } + + /** + * Flattens a nested array (the nesting can be to any depth). If `isShallow` + * is truey, the array will only be flattened a single level. If a callback + * is provided each element of the array is passed through the callback before + * flattening. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new flattened array. + * @example + * + * _.flatten([1, [2], [3, [[4]]]]); + * // => [1, 2, 3, 4]; + * + * _.flatten([1, [2], [3, [[4]]]], true); + * // => [1, 2, 3, [[4]]]; + * + * var characters = [ + * { 'name': 'barney', 'age': 30, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * // using "_.pluck" callback shorthand + * _.flatten(characters, 'pets'); + * // => ['hoppy', 'baby puss', 'dino'] + */ + function flatten(array, isShallow, callback, thisArg) { + // juggle arguments + if (typeof isShallow != 'boolean' && isShallow != null) { + thisArg = callback; + callback = (typeof isShallow != 'function' && thisArg && thisArg[isShallow] === array) ? null : isShallow; + isShallow = false; + } + if (callback != null) { + array = map(array, callback, thisArg); + } + return baseFlatten(array, isShallow); + } + + /** + * Gets the index at which the first occurrence of `value` is found using + * strict equality for comparisons, i.e. `===`. If the array is already sorted + * providing `true` for `fromIndex` will run a faster binary search. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2); + * // => 1 + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 4 + * + * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); + * // => 2 + */ + function indexOf(array, value, fromIndex) { + if (typeof fromIndex == 'number') { + var length = array ? array.length : 0; + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0); + } else if (fromIndex) { + var index = sortedIndex(array, value); + return array[index] === value ? index : -1; + } + return baseIndexOf(array, value, fromIndex); + } + + /** + * Gets all but the last element or last `n` elements of an array. If a + * callback is provided elements at the end of the array are excluded from + * the result as long as the callback returns truey. The callback is bound + * to `thisArg` and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + * + * _.initial([1, 2, 3], 2); + * // => [1] + * + * _.initial([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [1] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.initial(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': false, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.initial(characters, { 'employer': 'na' }), 'name'); + * // => ['barney', 'fred'] + */ + function initial(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : callback || n; + } + return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); + } + + /** + * Creates an array of unique values present in all provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of shared values. + * @example + * + * _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2] + */ + function intersection() { + var args = [], + argsIndex = -1, + argsLength = arguments.length, + caches = getArray(), + indexOf = getIndexOf(), + trustIndexOf = indexOf === baseIndexOf, + seen = getArray(); + + while (++argsIndex < argsLength) { + var value = arguments[argsIndex]; + if (isArray(value) || isArguments(value)) { + args.push(value); + caches.push(trustIndexOf && value.length >= largeArraySize && + createCache(argsIndex ? args[argsIndex] : seen)); + } + } + var array = args[0], + index = -1, + length = array ? array.length : 0, + result = []; + + outer: + while (++index < length) { + var cache = caches[0]; + value = array[index]; + + if ((cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0) { + argsIndex = argsLength; + (cache || seen).push(value); + while (--argsIndex) { + cache = caches[argsIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) { + continue outer; + } + } + result.push(value); + } + } + while (argsLength--) { + cache = caches[argsLength]; + if (cache) { + releaseObject(cache); + } + } + releaseArray(caches); + releaseArray(seen); + return result; + } + + /** + * Gets the last element or last `n` elements of an array. If a callback is + * provided elements at the end of the array are returned as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + * + * _.last([1, 2, 3], 2); + * // => [2, 3] + * + * _.last([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [2, 3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.last(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.last(characters, { 'employer': 'na' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function last(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[length - 1] : undefined; + } + } + return slice(array, nativeMax(0, length - n)); + } + + /** + * Gets the index at which the last occurrence of `value` is found using strict + * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used + * as the offset from the end of the collection. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); + * // => 4 + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var index = array ? array.length : 0; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * Removes all provided values from the given array using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + function pull(array) { + var args = arguments, + argsIndex = 0, + argsLength = args.length, + length = array ? array.length : 0; + + while (++argsIndex < argsLength) { + var index = -1, + value = args[argsIndex]; + while (++index < length) { + if (array[index] === value) { + splice.call(array, index--, 1); + length--; + } + } + } + return array; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to but not including `end`. If `start` is less than `stop` a + * zero-length range is created unless a negative `step` is specified. + * + * @static + * @memberOf _ + * @category Arrays + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns a new range array. + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + function range(start, end, step) { + start = +start || 0; + step = typeof step == 'number' ? step : (+step || 1); + + if (end == null) { + end = start; + start = 0; + } + // use `Array(length)` so engines like Chakra and V8 avoid slower modes + // http://youtu.be/XAqIpGU8ZZk#t=17m25s + var index = -1, + length = nativeMax(0, ceil((end - start) / (step || 1))), + result = Array(length); + + while (++index < length) { + result[index] = start; + start += step; + } + return result; + } + + /** + * Removes all elements from an array that the callback returns truey for + * and returns an array of removed elements. The callback is bound to `thisArg` + * and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4, 5, 6]; + * var evens = _.remove(array, function(num) { return num % 2 == 0; }); + * + * console.log(array); + * // => [1, 3, 5] + * + * console.log(evens); + * // => [2, 4, 6] + */ + function remove(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0, + result = []; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (callback(value, index, array)) { + result.push(value); + splice.call(array, index--, 1); + length--; + } + } + return result; + } + + /** + * The opposite of `_.initial` this method gets all but the first element or + * first `n` elements of an array. If a callback function is provided elements + * at the beginning of the array are excluded from the result as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias drop, tail + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + * + * _.rest([1, 2, 3], 2); + * // => [3] + * + * _.rest([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.rest(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.rest(characters, { 'employer': 'slate' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function rest(array, callback, thisArg) { + if (typeof callback != 'number' && callback != null) { + var n = 0, + index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : nativeMax(0, callback); + } + return slice(array, n); + } + + /** + * Uses a binary search to determine the smallest index at which a value + * should be inserted into a given sorted array in order to maintain the sort + * order of the array. If a callback is provided it will be executed for + * `value` and each element of `array` to compute their sort ranking. The + * callback is bound to `thisArg` and invoked with one argument; (value). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([20, 30, 50], 40); + * // => 2 + * + * // using "_.pluck" callback shorthand + * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 2 + * + * var dict = { + * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } + * }; + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return dict.wordToNumber[word]; + * }); + * // => 2 + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return this.wordToNumber[word]; + * }, dict); + * // => 2 + */ + function sortedIndex(array, value, callback, thisArg) { + var low = 0, + high = array ? array.length : low; + + // explicitly reference `identity` for better inlining in Firefox + callback = callback ? lodash.createCallback(callback, thisArg, 1) : identity; + value = callback(value); + + while (low < high) { + var mid = (low + high) >>> 1; + (callback(array[mid]) < value) + ? low = mid + 1 + : high = mid; + } + return low; + } + + /** + * Creates an array of unique values, in order, of the provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of combined values. + * @example + * + * _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2, 3, 5, 4] + */ + function union() { + return baseUniq(baseFlatten(arguments, true, true)); + } + + /** + * Creates a duplicate-value-free version of an array using strict equality + * for comparisons, i.e. `===`. If the array is sorted, providing + * `true` for `isSorted` will use a faster algorithm. If a callback is provided + * each element of `array` is passed through the callback before uniqueness + * is computed. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Arrays + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a duplicate-value-free array. + * @example + * + * _.uniq([1, 2, 1, 3, 1]); + * // => [1, 2, 3] + * + * _.uniq([1, 1, 2, 2, 3], true); + * // => [1, 2, 3] + * + * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); }); + * // => ['A', 'b', 'C'] + * + * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math); + * // => [1, 2.5, 3] + * + * // using "_.pluck" callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniq(array, isSorted, callback, thisArg) { + // juggle arguments + if (typeof isSorted != 'boolean' && isSorted != null) { + thisArg = callback; + callback = (typeof isSorted != 'function' && thisArg && thisArg[isSorted] === array) ? null : isSorted; + isSorted = false; + } + if (callback != null) { + callback = lodash.createCallback(callback, thisArg, 3); + } + return baseUniq(array, isSorted, callback); + } + + /** + * Creates an array excluding all provided values using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); + * // => [2, 3, 4] + */ + function without(array) { + return baseDifference(array, slice(arguments, 1)); + } + + /** + * Creates an array that is the symmetric difference of the provided arrays. + * See http://en.wikipedia.org/wiki/Symmetric_difference. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of values. + * @example + * + * _.xor([1, 2, 3], [5, 2, 1, 4]); + * // => [3, 5, 4] + * + * _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); + * // => [1, 4, 5] + */ + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArray(array) || isArguments(array)) { + var result = result + ? baseUniq(baseDifference(result, array).concat(baseDifference(array, result))) + : array; + } + } + return result || []; + } + + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second + * elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @alias unzip + * @category Arrays + * @param {...Array} [array] Arrays to process. + * @returns {Array} Returns a new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + function zip() { + var array = arguments.length > 1 ? arguments : arguments[0], + index = -1, + length = array ? max(pluck(array, 'length')) : 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = pluck(array, index); + } + return result; + } + + /** + * Creates an object composed from arrays of `keys` and `values`. Provide + * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` + * or two arrays, one of `keys` and one of corresponding `values`. + * + * @static + * @memberOf _ + * @alias object + * @category Arrays + * @param {Array} keys The array of keys. + * @param {Array} [values=[]] The array of values. + * @returns {Object} Returns an object composed of the given keys and + * corresponding values. + * @example + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + function zipObject(keys, values) { + var index = -1, + length = keys ? keys.length : 0, + result = {}; + + if (!values && length && !isArray(keys[0])) { + values = []; + } + while (++index < length) { + var key = keys[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that executes `func`, with the `this` binding and + * arguments of the created function, only after being called `n` times. + * + * @static + * @memberOf _ + * @category Functions + * @param {number} n The number of times the function must be called before + * `func` is executed. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('Done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'Done saving!', after all saves have completed + */ + function after(n, func) { + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that, when called, invokes `func` with the `this` + * binding of `thisArg` and prepends any additional `bind` arguments to those + * provided to the bound function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var func = function(greeting) { + * return greeting + ' ' + this.name; + * }; + * + * func = _.bind(func, { 'name': 'fred' }, 'hi'); + * func(); + * // => 'hi fred' + */ + function bind(func, thisArg) { + return arguments.length > 2 + ? createWrapper(func, 17, slice(arguments, 2), null, thisArg) + : createWrapper(func, 1, null, null, thisArg); + } + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all the function properties + * of `object` will be bound. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to + * bind, specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { console.log('clicked ' + this.label); } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs', when the button is clicked + */ + function bindAll(object) { + var funcs = arguments.length > 1 ? baseFlatten(arguments, true, false, 1) : functions(object), + index = -1, + length = funcs.length; + + while (++index < length) { + var key = funcs[index]; + object[key] = createWrapper(object[key], 1, null, null, object); + } + return object; + } + + /** + * Creates a function that, when called, invokes the method at `object[key]` + * and prepends any additional `bindKey` arguments to those provided to the bound + * function. This method differs from `_.bind` by allowing bound functions to + * reference methods that will be redefined or don't yet exist. + * See http://michaux.ca/articles/lazy-function-definition-pattern. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'name': 'fred', + * 'greet': function(greeting) { + * return greeting + ' ' + this.name; + * } + * }; + * + * var func = _.bindKey(object, 'greet', 'hi'); + * func(); + * // => 'hi fred' + * + * object.greet = function(greeting) { + * return greeting + 'ya ' + this.name + '!'; + * }; + * + * func(); + * // => 'hiya fred!' + */ + function bindKey(object, key) { + return arguments.length > 2 + ? createWrapper(key, 19, slice(arguments, 2), null, object) + : createWrapper(key, 3, null, null, object); + } + + /** + * Creates a function that is the composition of the provided functions, + * where each function consumes the return value of the function that follows. + * For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + * Each function is executed with the `this` binding of the composed function. + * + * @static + * @memberOf _ + * @category Functions + * @param {...Function} [func] Functions to compose. + * @returns {Function} Returns the new composed function. + * @example + * + * var realNameMap = { + * 'pebbles': 'penelope' + * }; + * + * var format = function(name) { + * name = realNameMap[name.toLowerCase()] || name; + * return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase(); + * }; + * + * var greet = function(formatted) { + * return 'Hiya ' + formatted + '!'; + * }; + * + * var welcome = _.compose(greet, format); + * welcome('pebbles'); + * // => 'Hiya Penelope!' + */ + function compose() { + var funcs = arguments, + length = funcs.length; + + while (length--) { + if (!isFunction(funcs[length])) { + throw new TypeError; + } + } + return function() { + var args = arguments, + length = funcs.length; + + while (length--) { + args = [funcs[length].apply(this, args)]; + } + return args[0]; + }; + } + + /** + * Creates a function which accepts one or more arguments of `func` that when + * invoked either executes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` can be specified + * if `func.length` is not sufficient. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {Function} Returns the new curried function. + * @example + * + * var curried = _.curry(function(a, b, c) { + * console.log(a + b + c); + * }); + * + * curried(1)(2)(3); + * // => 6 + * + * curried(1, 2)(3); + * // => 6 + * + * curried(1, 2, 3); + * // => 6 + */ + function curry(func, arity) { + arity = typeof arity == 'number' ? arity : (+arity || func.length); + return createWrapper(func, 4, null, null, null, arity); + } + + /** + * Creates a function that will delay the execution of `func` until after + * `wait` milliseconds have elapsed since the last time it was invoked. + * Provide an options object to indicate that `func` should be invoked on + * the leading and/or trailing edge of the `wait` timeout. Subsequent calls + * to the debounced function will return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * var lazyLayout = _.debounce(calculateLayout, 150); + * jQuery(window).on('resize', lazyLayout); + * + * // execute `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * }); + * + * // ensure `batchLog` is executed once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * source.addEventListener('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * }, false); + */ + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + wait = nativeMax(0, wait) || 0; + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = options.leading; + maxWait = 'maxWait' in options && (nativeMax(wait, options.maxWait) || 0); + trailing = 'trailing' in options ? options.trailing : trailing; + } + var delayed = function() { + var remaining = wait - (now() - stamp); + if (remaining <= 0) { + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + var isCalled = trailingCall; + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + } else { + timeoutId = setTimeout(delayed, remaining); + } + }; + + var maxDelayed = function() { + if (timeoutId) { + clearTimeout(timeoutId); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (trailing || (maxWait !== wait)) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + }; + + return function() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + return result; + }; + } + + /** + * Defers executing the `func` function until the current call stack has cleared. + * Additional arguments will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { console.log(text); }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + function defer(func) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 1); + return setTimeout(function() { func.apply(undefined, args); }, 1); + } + + /** + * Executes the `func` function after `wait` milliseconds. Additional arguments + * will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { console.log(text); }, 1000, 'later'); + * // => logs 'later' after one second + */ + function delay(func, wait) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 2); + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it will be used to determine the cache key for storing the result + * based on the arguments provided to the memoized function. By default, the + * first argument provided to the memoized function is used as the cache key. + * The `func` is executed with the `this` binding of the memoized function. + * The result cache is exposed as the `cache` property on the memoized function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] A function used to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var fibonacci = _.memoize(function(n) { + * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); + * }); + * + * fibonacci(9) + * // => 34 + * + * var data = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // modifying the result cache + * var get = _.memoize(function(name) { return data[name]; }, _.identity); + * get('pebbles'); + * // => { 'name': 'pebbles', 'age': 1 } + * + * get.cache.pebbles.name = 'penelope'; + * get('pebbles'); + * // => { 'name': 'penelope', 'age': 1 } + */ + function memoize(func, resolver) { + if (!isFunction(func)) { + throw new TypeError; + } + var memoized = function() { + var cache = memoized.cache, + key = resolver ? resolver.apply(this, arguments) : keyPrefix + arguments[0]; + + return hasOwnProperty.call(cache, key) + ? cache[key] + : (cache[key] = func.apply(this, arguments)); + } + memoized.cache = {}; + return memoized; + } + + /** + * Creates a function that is restricted to execute `func` once. Repeat calls to + * the function will return the value of the first call. The `func` is executed + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` executes `createApplication` once + */ + function once(func) { + var ran, + result; + + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (ran) { + return result; + } + ran = true; + result = func.apply(this, arguments); + + // clear the `func` variable so the function may be garbage collected + func = null; + return result; + }; + } + + /** + * Creates a function that, when called, invokes `func` with any additional + * `partial` arguments prepended to those provided to the new function. This + * method is similar to `_.bind` except it does **not** alter the `this` binding. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { return greeting + ' ' + name; }; + * var hi = _.partial(greet, 'hi'); + * hi('fred'); + * // => 'hi fred' + */ + function partial(func) { + return createWrapper(func, 16, slice(arguments, 1)); + } + + /** + * This method is like `_.partial` except that `partial` arguments are + * appended to those provided to the new function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var defaultsDeep = _.partialRight(_.merge, _.defaults); + * + * var options = { + * 'variable': 'data', + * 'imports': { 'jq': $ } + * }; + * + * defaultsDeep(options, _.templateSettings); + * + * options.variable + * // => 'data' + * + * options.imports + * // => { '_': _, 'jq': $ } + */ + function partialRight(func) { + return createWrapper(func, 32, null, slice(arguments, 1)); + } + + /** + * Creates a function that, when executed, will only call the `func` function + * at most once per every `wait` milliseconds. Provide an options object to + * indicate that `func` should be invoked on the leading and/or trailing edge + * of the `wait` timeout. Subsequent calls to the throttled function will + * return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * var throttled = _.throttle(updatePosition, 100); + * jQuery(window).on('scroll', throttled); + * + * // execute `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? options.leading : leading; + trailing = 'trailing' in options ? options.trailing : trailing; + } + debounceOptions.leading = leading; + debounceOptions.maxWait = wait; + debounceOptions.trailing = trailing; + + return debounce(func, wait, debounceOptions); + } + + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Additional arguments provided to the function are appended + * to those provided to the wrapper function. The wrapper is executed with + * the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('Fred, Wilma, & Pebbles'); + * // => '

Fred, Wilma, & Pebbles

' + */ + function wrap(value, wrapper) { + return createWrapper(wrapper, 16, [value]); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'name': 'fred' }; + * var getter = _.constant(object); + * getter() === object; + * // => true + */ + function constant(value) { + return function() { + return value; + }; + } + + /** + * Produces a callback bound to an optional `thisArg`. If `func` is a property + * name the created callback will return the property value for a given element. + * If `func` is an object the created callback will return `true` for elements + * that contain the equivalent object properties, otherwise it will return `false`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // wrap to create custom callback shorthands + * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { + * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); + * return !match ? func(callback, thisArg) : function(object) { + * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; + * }; + * }); + * + * _.filter(characters, 'age__gt38'); + * // => [{ 'name': 'fred', 'age': 40 }] + */ + function createCallback(func, thisArg, argCount) { + var type = typeof func; + if (func == null || type == 'function') { + return baseCreateCallback(func, thisArg, argCount); + } + // handle "_.pluck" style callback shorthands + if (type != 'object') { + return property(func); + } + var props = keys(func), + key = props[0], + a = func[key]; + + // handle "_.where" style callback shorthands + if (props.length == 1 && a === a && !isObject(a)) { + // fast path the common case of providing an object with a single + // property containing a primitive value + return function(object) { + var b = object[key]; + return a === b && (a !== 0 || (1 / a == 1 / b)); + }; + } + return function(object) { + var length = props.length, + result = false; + + while (length--) { + if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) { + break; + } + } + return result; + }; + } + + /** + * 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); + } + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'name': 'fred' }; + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + /** + * Adds function properties of a source object to the destination object. + * If `object` is a function methods will be added to its prototype as well. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Function|Object} [object=lodash] object The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options] The options object. + * @param {boolean} [options.chain=true] Specify whether the functions added are chainable. + * @example + * + * function capitalize(string) { + * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); + * } + * + * _.mixin({ 'capitalize': capitalize }); + * _.capitalize('fred'); + * // => 'Fred' + * + * _('fred').capitalize().value(); + * // => 'Fred' + * + * _.mixin({ 'capitalize': capitalize }, { 'chain': false }); + * _('fred').capitalize(); + * // => 'Fred' + */ + function mixin(object, source, options) { + var chain = true, + methodNames = source && functions(source); + + if (!source || (!options && !methodNames.length)) { + if (options == null) { + options = source; + } + ctor = lodashWrapper; + source = object; + object = lodash; + methodNames = functions(source); + } + if (options === false) { + chain = false; + } else if (isObject(options) && 'chain' in options) { + chain = options.chain; + } + var ctor = object, + isFunc = isFunction(ctor); + + forEach(methodNames, function(methodName) { + var func = object[methodName] = source[methodName]; + if (isFunc) { + ctor.prototype[methodName] = function() { + var chainAll = this.__chain__, + value = this.__wrapped__, + args = [value]; + + push.apply(args, arguments); + var result = func.apply(object, args); + if (chain || chainAll) { + if (value === result && isObject(result)) { + return this; + } + result = new ctor(result); + result.__chain__ = chainAll; + } + return result; + }; + } + }); + } + + /** + * Reverts the '_' variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @memberOf _ + * @category Utilities + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + context._ = oldDash; + return this; + } + + /** + * A no-operation function. + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var object = { 'name': 'fred' }; + * _.noop(object) === undefined; + * // => true + */ + function noop() { + // no operation performed + } + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var stamp = _.now(); + * _.defer(function() { console.log(_.now() - stamp); }); + * // => logs the number of milliseconds it took for the deferred function to be called + */ + var now = isNative(now = Date.now) && now || function() { + return new Date().getTime(); + }; + + /** + * Converts the given value into an integer of the specified radix. + * If `radix` is `undefined` or `0` a `radix` of `10` is used unless the + * `value` is a hexadecimal, in which case a `radix` of `16` is used. + * + * Note: This method avoids differences in native ES3 and ES5 `parseInt` + * implementations. See http://es5.github.io/#E. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. + * @example + * + * _.parseInt('08'); + * // => 8 + */ + var parseInt = nativeParseInt(whitespace + '08') == 8 ? nativeParseInt : function(value, radix) { + // Firefox < 21 and Opera < 15 follow the ES3 specified implementation of `parseInt` + return nativeParseInt(isString(value) ? value.replace(reLeadingSpacesAndZeros, '') : value, radix || 0); + }; + + /** + * Creates a "_.pluck" style function, which returns the `key` value of a + * given object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} key The name of the property to retrieve. + * @returns {Function} Returns the new function. + * @example + * + * var characters = [ + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 36 } + * ]; + * + * var getName = _.property('name'); + * + * _.map(characters, getName); + * // => ['barney', 'fred'] + * + * _.sortBy(characters, getName); + * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] + */ + function property(key) { + return function(object) { + return object[key]; + }; + } + + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number will be + * returned. If `floating` is truey or either `min` or `max` are floats a + * floating-point number will be returned instead of an integer. + * + * @static + * @memberOf _ + * @category Utilities + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating=false] Specify returning a floating-point number. + * @returns {number} Returns a random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(min, max, floating) { + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (typeof min == 'boolean' && noMax) { + floating = min; + min = 1; + } + else if (!noMax && typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand +'').length - 1)))), max); + } + return baseRandom(min, max); + } + + /** + * Resolves the value of property `key` on `object`. If `key` is a function + * it will be invoked with the `this` binding of `object` and its result returned, + * else the property value is returned. If `object` is falsey then `undefined` + * is returned. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to resolve. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { + * 'cheese': 'crumpets', + * 'stuff': function() { + * return 'nonsense'; + * } + * }; + * + * _.result(object, 'cheese'); + * // => 'crumpets' + * + * _.result(object, 'stuff'); + * // => 'nonsense' + */ + function result(object, key) { + if (object) { + var value = object[key]; + return isFunction(value) ? object[key]() : value; + } + } + + /** + * 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('<%- value %>', { 'value': '\n```\n\nUsing [`npm`](http://npmjs.org/):\n\n```bash\nnpm i --save lodash\n\n{sudo} npm i -g lodash\nnpm ln lodash\n```\n\nIn [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/):\n\n```js\nvar _ = require('lodash');\n// or as Underscore\nvar _ = require('lodash/dist/lodash.underscore');\n```\n\n**Notes:**\n * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL\n * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('lodash.js');\n```\n\nIn an AMD loader:\n\n```js\nrequire({\n 'packages': [\n { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }\n ]\n},\n['lodash'], function(_) {\n console.log(_.VERSION);\n});\n```\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\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", + "readmeFilename": "README.md", + "_id": "lodash@2.4.1", + "_from": "lodash@^2.4.1", + "scripts": {} +} diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/cli.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/cli.js index a60a624..2c1e7c4 100755 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/cli.js +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/cli.js @@ -2,26 +2,30 @@ 'use strict'; var fs = require('fs'); var pkg = require('./package.json'); -var stripBom = require('./index'); -var input = process.argv[2]; +var stripBom = require('./'); +var argv = process.argv.slice(2); +var input = argv[0]; function help() { - console.log(pkg.description); - console.log(''); - console.log('Usage'); - console.log(' $ strip-bom > '); - console.log(' $ cat | strip-bom > '); - console.log(''); - console.log('Example'); - console.log(' $ strip-bom unicorn.txt > unicorn-without-bom.txt'); + console.log([ + '', + ' ' + pkg.description, + '', + ' Usage', + ' strip-bom > ', + ' cat | strip-bom > ', + '', + ' Example', + ' strip-bom unicorn.txt > unicorn-without-bom.txt' + ].join('\n')); } -if (process.argv.indexOf('--help') !== -1) { +if (argv.indexOf('--help') !== -1) { help(); return; } -if (process.argv.indexOf('--version') !== -1) { +if (argv.indexOf('--version') !== -1) { console.log(pkg.version); return; } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/index.js index 30119a6..c085b4c 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/index.js +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/index.js @@ -3,11 +3,11 @@ var isUtf8 = require('is-utf8'); var stripBom = module.exports = function (arg) { if (typeof arg === 'string') { - return arg.replace(/^\uFEFF/g, ''); + return arg.replace(/^\ufeff/g, ''); } if (Buffer.isBuffer(arg) && isUtf8(arg) && - arg[0] === 0xEF && arg[1] === 0xBB && arg[2] === 0xBF) { + arg[0] === 0xef && arg[1] === 0xbb && arg[2] === 0xbf) { return arg.slice(3); } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/first-chunk-stream/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/first-chunk-stream/package.json index 8cf4e9c..c330081 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/first-chunk-stream/package.json +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/first-chunk-stream/package.json @@ -1,11 +1,11 @@ { "name": "first-chunk-stream", - "version": "0.1.0", + "version": "1.0.0", "description": "Transform the first chunk in a stream", "license": "MIT", "repository": { "type": "git", - "url": "git://github.com/sindresorhus/first-chunk-stream" + "url": "https://github.com/sindresorhus/first-chunk-stream" }, "author": { "name": "Sindre Sorhus", @@ -36,15 +36,15 @@ "concat-stream": "^1.4.5", "mocha": "*" }, - "gitHead": "79ca900b4d31074448dc7767eae79f1e605dca20", + "gitHead": "8b0b1750edcc30fa2b2071245198181e925be619", "bugs": { "url": "https://github.com/sindresorhus/first-chunk-stream/issues" }, "homepage": "https://github.com/sindresorhus/first-chunk-stream", - "_id": "first-chunk-stream@0.1.0", - "_shasum": "755d3ec14d49a86e3d2fcc08beead5c0ca2b9c0a", - "_from": "first-chunk-stream@^0.1.0", - "_npmVersion": "1.4.13", + "_id": "first-chunk-stream@1.0.0", + "_shasum": "59bfb50cd905f60d7c394cd3d9acaab4e6ad934e", + "_from": "first-chunk-stream@^1.0.0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" @@ -56,10 +56,10 @@ } ], "dist": { - "shasum": "755d3ec14d49a86e3d2fcc08beead5c0ca2b9c0a", - "tarball": "http://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-0.1.0.tgz" + "shasum": "59bfb50cd905f60d7c394cd3d9acaab4e6ad934e", + "tarball": "http://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-0.1.0.tgz", + "_resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/package.json index 6e4c955..9dc4627 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/package.json +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/package.json @@ -1,20 +1,20 @@ { "name": "strip-bom", - "version": "0.3.1", + "version": "1.0.0", "description": "Strip UTF-8 byte order mark (BOM) from a string/buffer/stream", "license": "MIT", "repository": { "type": "git", "url": "git://github.com/sindresorhus/strip-bom" }, - "bin": { - "strip-bom": "cli.js" - }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, + "bin": { + "strip-bom": "cli.js" + }, "engines": { "node": ">=0.10.0" }, @@ -45,22 +45,21 @@ "streams" ], "dependencies": { - "first-chunk-stream": "^0.1.0", + "first-chunk-stream": "^1.0.0", "is-utf8": "^0.2.0" }, "devDependencies": { "concat-stream": "^1.4.5", "mocha": "*" }, - "gitHead": "bac8b80dceb94ce6d544dfc1234e755c779f9829", "bugs": { "url": "https://github.com/sindresorhus/strip-bom/issues" }, "homepage": "https://github.com/sindresorhus/strip-bom", - "_id": "strip-bom@0.3.1", - "_shasum": "9e8a39eff456ff9abc2f059f5f2225bb0f3f7ca5", - "_from": "strip-bom@^0.3.0", - "_npmVersion": "1.4.13", + "_id": "strip-bom@1.0.0", + "_shasum": "85b8862f3844b5a6d5ec8467a93598173a36f794", + "_from": "strip-bom@^1.0.0", + "_npmVersion": "1.4.9", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" @@ -72,10 +71,10 @@ } ], "dist": { - "shasum": "9e8a39eff456ff9abc2f059f5f2225bb0f3f7ca5", - "tarball": "http://registry.npmjs.org/strip-bom/-/strip-bom-0.3.1.tgz" + "shasum": "85b8862f3844b5a6d5ec8467a93598173a36f794", + "tarball": "http://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-0.3.1.tgz", + "_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/readme.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/readme.md index d0747ca..10e1d8f 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/readme.md +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/strip-bom/readme.md @@ -2,21 +2,17 @@ > Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string/buffer/stream - From Wikipedia: > The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8. -## Install +## Usage ```sh $ npm install --save strip-bom ``` - -## Usage - ```js var fs = require('fs'); var stripBom = require('strip-bom'); @@ -46,15 +42,15 @@ fs.createReadStream('unicorn.txt') $ npm install --global strip-bom ``` -```sh +``` $ strip-bom --help -Usage - $ strip-bom > - $ cat | strip-bom > + Usage + strip-bom > + cat | strip-bom > -Example - $ strip-bom unicorn.txt > unicorn-without-bom.txt + Example + strip-bom unicorn.txt > unicorn-without-bom.txt ``` diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/README.md index 33aa01e..ec74569 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/README.md +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/README.md @@ -100,7 +100,9 @@ The `transformFunction` must have the following signature: `function (chunk, enc 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. +Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. + +If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. ### flushFunction diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js index 0ca7705..6307220 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js @@ -240,7 +240,7 @@ function howMuchToRead(n, state) { if (state.objectMode) return n === 0 ? 0 : 1; - if (isNaN(n) || n === null) { + if (n === null || isNaN(n)) { // only flow one buffer at a time if (state.flowing && state.buffer.length) return state.buffer[0].length; @@ -275,6 +275,7 @@ Readable.prototype.read = function(n) { var state = this._readableState; state.calledRead = true; var nOrig = n; + var ret; if (typeof n !== 'number' || n > 0) state.emittedReadable = false; @@ -293,9 +294,28 @@ Readable.prototype.read = function(n) { // if we've ended, and we're now clear, then finish it up. if (n === 0 && state.ended) { + ret = null; + + // In cases where the decoder did not receive enough data + // to produce a full chunk, then immediately received an + // EOF, state.buffer will contain [, ]. + // howMuchToRead will see this and coerce the amount to + // read to zero (because it's looking at the length of the + // first in state.buffer), and we'll end up here. + // + // This can only happen via state.decoder -- no other venue + // exists for pushing a zero-length chunk into state.buffer + // and triggering this behavior. In this case, we return our + // remaining data and end the stream, if appropriate. + if (state.length > 0 && state.decoder) { + ret = fromList(n, state); + state.length -= ret.length; + } + if (state.length === 0) endReadable(this); - return null; + + return ret; } // All the actual chunk generation logic needs to be @@ -349,7 +369,6 @@ Readable.prototype.read = function(n) { if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - var ret; if (n > 0) ret = fromList(n, state); else @@ -382,8 +401,7 @@ function chunkInvalid(state, chunk) { 'string' !== typeof chunk && chunk !== null && chunk !== undefined && - !state.objectMode && - !er) { + !state.objectMode) { er = new TypeError('Invalid non-string/buffer chunk'); } return er; @@ -814,7 +832,12 @@ Readable.prototype.wrap = function(stream) { stream.on('data', function(chunk) { if (state.decoder) chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) + + // don't skip over falsy values in objectMode + //if (state.objectMode && util.isNullOrUndefined(chunk)) + if (state.objectMode && (chunk === null || chunk === undefined)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) return; var ret = self.push(chunk); diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js index d0254d5..4bdaa4f 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js @@ -37,7 +37,6 @@ var util = require('core-util-is'); util.inherits = require('inherits'); /**/ - var Stream = require('stream'); util.inherits(Writable, Stream); diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js index 2e44a03..b00e54f 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -36,6 +36,14 @@ function assertEncoding(encoding) { } } +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. var StringDecoder = exports.StringDecoder = function(encoding) { this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); assertEncoding(encoding); @@ -60,37 +68,50 @@ var StringDecoder = exports.StringDecoder = function(encoding) { return; } + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. this.charLength = 0; }; +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . 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; + var available = (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; + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; if (this.charReceived < this.charLength) { // still not enough chars in this buffer? wait for more ... return ''; } + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + // 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 + // CESU-8: 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; @@ -100,34 +121,33 @@ StringDecoder.prototype.write = function(buffer) { 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); + if (buffer.length === 0) { + return charStr; + } break; } - var lenIncomplete = this.detectIncompleteChar(buffer); + // determine and set charLength / charReceived + 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; + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } 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 + // CESU-8: 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); + buffer.copy(this.charBuffer, 0, 0, size); return charStr.substring(0, end); } @@ -135,6 +155,10 @@ StringDecoder.prototype.write = function(buffer) { return charStr; }; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. 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; @@ -164,8 +188,7 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { break; } } - - return i; + this.charReceived = i; }; StringDecoder.prototype.end = function(buffer) { @@ -188,13 +211,11 @@ function passThroughWrite(buffer) { } function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json index 7f5d001..a8c586b 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,6 +1,6 @@ { "name": "string_decoder", - "version": "0.10.25-1", + "version": "0.10.31", "description": "The string_decoder module from Node core", "main": "index.js", "dependencies": {}, @@ -22,11 +22,33 @@ "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", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@~0.10.x", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/package.json index afdd6ef..15c84e6 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/package.json +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.0.27-1", + "version": "1.0.31", "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", "main": "readable.js", "dependencies": { @@ -37,13 +37,10 @@ "url": "https://github.com/isaacs/readable-stream/issues" }, "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.27-1", - "dist": { - "shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz" - }, - "_from": "readable-stream@~1.0.17", - "_npmVersion": "1.4.3", + "_id": "readable-stream@1.0.31", + "_shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "_from": "readable-stream@>=1.0.27-1 <1.1.0-0", + "_npmVersion": "1.4.9", "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" @@ -62,8 +59,11 @@ "email": "rod@vagg.org" } ], + "dist": { + "shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz" + }, "directories": {}, - "_shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/README.md index e754831..093cb29 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/README.md +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/README.md @@ -2,9 +2,11 @@ [![browser support][3]][4] +[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + 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. +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 precedence. ## Examples @@ -13,13 +15,15 @@ var extend = require("xtend") // extend returns a new object. Does not mutate arguments var combination = extend({ - a: "a" + a: "a", + b: 'c' }, { b: "b" }) // { a: "a", b: "b" } ``` +## Stability status: Locked ## MIT Licenced diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/immutable.js similarity index 100% rename from node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/index.js rename to node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/immutable.js diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/package.json index 99147b6..d90698e 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/package.json +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/package.json @@ -1,6 +1,6 @@ { "name": "xtend", - "version": "3.0.0", + "version": "4.0.0", "description": "extend like a boss", "keywords": [ "extend", @@ -18,7 +18,7 @@ "type": "git", "url": "git://github.com/Raynos/xtend.git" }, - "main": "index", + "main": "immutable", "scripts": { "test": "node test" }, @@ -63,13 +63,11 @@ "engines": { "node": ">=0.4" }, - "_id": "xtend@3.0.0", - "dist": { - "shasum": "5cce7407baf642cba7becda568111c493f59665a", - "tarball": "http://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" - }, - "_from": "xtend@~3.0.0", - "_npmVersion": "1.4.6", + "gitHead": "94a95d76154103290533b2c55ffa0fe4be16bfef", + "_id": "xtend@4.0.0", + "_shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", + "_from": "xtend@>=4.0.0 <4.1.0-0", + "_npmVersion": "1.4.15", "_npmUser": { "name": "raynos", "email": "raynos2@gmail.com" @@ -80,8 +78,11 @@ "email": "raynos2@gmail.com" } ], + "dist": { + "shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", + "tarball": "http://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz" + }, "directories": {}, - "_shasum": "5cce7407baf642cba7becda568111c493f59665a", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/package.json index bf3f167..cfaa0c8 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/package.json +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/package.json @@ -1,6 +1,6 @@ { "name": "through2", - "version": "0.5.1", + "version": "0.6.1", "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", "main": "through2.js", "scripts": { @@ -24,26 +24,23 @@ }, "license": "MIT", "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~3.0.0" + "readable-stream": ">=1.0.27-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" }, "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" + "bl": ">=0.9.0 <0.10.0-0", + "stream-spigot": ">=3.0.4 <3.1.0-0", + "tape": ">=2.14.0 <2.15.0-0" }, + "gitHead": "f66daaa2cb5d37b56c401f3b5a4962f709893267", "bugs": { "url": "https://github.com/rvagg/through2/issues" }, "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.5.1", - "dist": { - "shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "tarball": "http://registry.npmjs.org/through2/-/through2-0.5.1.tgz" - }, - "_from": "through2@^0.5.1", - "_npmVersion": "1.4.3", + "_id": "through2@0.6.1", + "_shasum": "f742b32893e8bd26146e789e4fd2ccb2c07a717e", + "_from": "through2@^0.6.1", + "_npmVersion": "1.4.21", "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" @@ -58,8 +55,11 @@ "email": "bryce@ravenwall.com" } ], + "dist": { + "shasum": "f742b32893e8bd26146e789e4fd2ccb2c07a717e", + "tarball": "http://registry.npmjs.org/through2/-/through2-0.6.1.tgz" + }, "directories": {}, - "_shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", + "_resolved": "https://registry.npmjs.org/through2/-/through2-0.6.1.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/through2.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/through2.js index d3610aa..5b7a880 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/through2.js +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/through2/through2.js @@ -2,6 +2,24 @@ var Transform = require('readable-stream/transform') , inherits = require('util').inherits , xtend = require('xtend') +function DestroyableTransform(opts) { + Transform.call(this, opts) + this._destroyed = false +} + +inherits(DestroyableTransform, Transform) + +DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) return + this._destroyed = true + + var self = this + process.nextTick(function() { + if (err) + self.emit('error', err) + self.emit('close') + }) +} // a noop _transform function function noop (chunk, enc, callback) { @@ -32,7 +50,7 @@ function through2 (construct) { // main export, just make me a transform stream! module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) + var t2 = new DestroyableTransform(options) t2._transform = transform @@ -52,10 +70,10 @@ module.exports.ctor = through2(function (options, transform, flush) { this.options = xtend(options, override) - Transform.call(this, this.options) + DestroyableTransform.call(this, this.options) } - inherits(Through2, Transform) + inherits(Through2, DestroyableTransform) Through2.prototype._transform = transform @@ -67,7 +85,7 @@ module.exports.ctor = through2(function (options, transform, flush) { module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true, highWaterMark: 16 }, options)) + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) t2._transform = transform diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.jshintignore b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.jshintignore new file mode 100644 index 0000000..ba2a97b --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.jshintignore @@ -0,0 +1,2 @@ +node_modules +coverage diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.jshintrc b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.jshintrc new file mode 100644 index 0000000..373d6c3 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.jshintrc @@ -0,0 +1,36 @@ +{ + "indent": 2, + "smarttabs": true, + "latedef": "nofunc", + "undef": true, + "unused": true, + "trailing": true, + "laxcomma": false, + "eqeqeq": true, + "eqnull": true, + "boss": true, + "expr": true, + "sub": true, + "newcap": true, + "quotmark": true, + "loopfunc": true, + "lastsemic": true, + "funcscope": true, + "browser": true, + "nonstandard": true, + "jquery": true, + "devel": true, + "node": true, + "esnext": true, + "globals": { + "describe": false, + "xdescribe": false, + "it": false, + "xit": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false, + "define": false + } +} diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.npmignore b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.npmignore new file mode 100644 index 0000000..b5ef13a --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.npmignore @@ -0,0 +1,6 @@ +.DS_Store +*.log +node_modules +build +*.node +components \ No newline at end of file diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.travis.yml b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.travis.yml new file mode 100644 index 0000000..8b95a9f --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" +after_script: + - npm run coveralls diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/LICENSE.txt b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/LICENSE similarity index 77% rename from node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/LICENSE.txt rename to node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/LICENSE index 49869bb..4f482f9 100644 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/LICENSE.txt +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/LICENSE @@ -1,6 +1,4 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +Copyright (c) 2013 Fractal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -19,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/README.md new file mode 100644 index 0000000..ae6f16f --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/README.md @@ -0,0 +1,127 @@ +# 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 + + + + + + + + + + + + + +
Packagevinyl
DescriptionA virtual file format
Node Version>= 0.9
+ +## What is this? + +Read this for more info about how this plays into the grand scheme of things https://medium.com/@eschoff/3828e8126466 + +## 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. Custom attributes are deep-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 false, 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 diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/coverage.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/coverage.json new file mode 100644 index 0000000..2bf4c62 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/coverage.json @@ -0,0 +1 @@ +{"/Users/contra/Projects/vinyl/index.js":{"path":"/Users/contra/Projects/vinyl/index.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":73,"12":14,"13":73,"14":73,"15":73,"16":73,"17":73,"18":73,"19":1,"20":26,"21":1,"22":29,"23":1,"24":6,"25":1,"26":3,"27":1,"28":14,"29":2,"30":12,"31":7,"32":5,"33":5,"34":14,"35":14,"36":1,"37":1,"38":13,"39":6,"40":14,"41":14,"42":75,"43":70,"44":5,"45":14,"46":1,"47":6,"48":3,"49":6,"50":3,"51":6,"52":2,"53":4,"54":2,"55":1,"56":1,"57":2,"58":2,"59":1,"60":2,"61":1,"62":6,"63":6,"64":6,"65":4,"66":6,"67":3,"68":6,"69":1,"70":6,"71":1,"72":99,"73":78,"74":1,"75":77,"76":1,"77":7,"78":1,"79":6,"80":1,"81":5,"82":1,"83":1,"84":46,"85":9,"86":1,"87":8,"88":5,"89":1},"b":{"1":[14,59],"2":[25,48],"3":[73,33],"4":[73,32],"5":[73,39],"6":[73,65],"7":[73,44],"8":[3,1,1],"9":[2,12],"10":[7,5],"11":[1,13],"12":[6,7],"13":[5,1],"14":[2,12],"15":[70,5],"16":[75,61,47,33,33,19],"17":[2,3],"18":[3,3],"19":[3,3],"20":[2,4],"21":[2,2],"22":[1,1],"23":[1,1],"24":[3,3],"25":[6,5],"26":[4,2],"27":[3,3],"28":[1,5],"29":[1,77],"30":[78,57,46],"31":[1,6],"32":[1,5],"33":[1,8],"34":[5,3],"35":[8,7]},"f":{"1":73,"2":26,"3":29,"4":6,"5":3,"6":14,"7":75,"8":6,"9":6,"10":99,"11":78,"12":7,"13":1,"14":46,"15":9},"fnMap":{"1":{"name":"File","line":11,"loc":{"start":{"line":11,"column":0},"end":{"line":11,"column":20}}},"2":{"name":"(anonymous_2)","line":30,"loc":{"start":{"line":30,"column":26},"end":{"line":30,"column":37}}},"3":{"name":"(anonymous_3)","line":34,"loc":{"start":{"line":34,"column":26},"end":{"line":34,"column":37}}},"4":{"name":"(anonymous_4)","line":38,"loc":{"start":{"line":38,"column":24},"end":{"line":38,"column":35}}},"5":{"name":"(anonymous_5)","line":43,"loc":{"start":{"line":43,"column":29},"end":{"line":43,"column":40}}},"6":{"name":"(anonymous_6)","line":47,"loc":{"start":{"line":47,"column":23},"end":{"line":47,"column":37}}},"7":{"name":"(anonymous_7)","line":81,"loc":{"start":{"line":81,"column":28},"end":{"line":81,"column":42}}},"8":{"name":"(anonymous_8)","line":93,"loc":{"start":{"line":93,"column":22},"end":{"line":93,"column":44}}},"9":{"name":"(anonymous_9)","line":114,"loc":{"start":{"line":114,"column":25},"end":{"line":114,"column":36}}},"10":{"name":"(anonymous_10)","line":138,"loc":{"start":{"line":138,"column":7},"end":{"line":138,"column":18}}},"11":{"name":"(anonymous_11)","line":141,"loc":{"start":{"line":141,"column":7},"end":{"line":141,"column":21}}},"12":{"name":"(anonymous_12)","line":151,"loc":{"start":{"line":151,"column":7},"end":{"line":151,"column":18}}},"13":{"name":"(anonymous_13)","line":156,"loc":{"start":{"line":156,"column":7},"end":{"line":156,"column":18}}},"14":{"name":"(anonymous_14)","line":162,"loc":{"start":{"line":162,"column":7},"end":{"line":162,"column":18}}},"15":{"name":"(anonymous_15)","line":165,"loc":{"start":{"line":165,"column":7},"end":{"line":165,"column":22}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":27}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":36}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":40}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":47}},"5":{"start":{"line":5,"column":0},"end":{"line":5,"column":41}},"6":{"start":{"line":6,"column":0},"end":{"line":6,"column":41}},"7":{"start":{"line":7,"column":0},"end":{"line":7,"column":37}},"8":{"start":{"line":8,"column":0},"end":{"line":8,"column":51}},"9":{"start":{"line":9,"column":0},"end":{"line":9,"column":31}},"10":{"start":{"line":11,"column":0},"end":{"line":28,"column":1}},"11":{"start":{"line":12,"column":2},"end":{"line":12,"column":23}},"12":{"start":{"line":12,"column":13},"end":{"line":12,"column":23}},"13":{"start":{"line":15,"column":2},"end":{"line":15,"column":55}},"14":{"start":{"line":16,"column":2},"end":{"line":16,"column":31}},"15":{"start":{"line":19,"column":2},"end":{"line":19,"column":39}},"16":{"start":{"line":20,"column":2},"end":{"line":20,"column":36}},"17":{"start":{"line":24,"column":2},"end":{"line":24,"column":32}},"18":{"start":{"line":27,"column":2},"end":{"line":27,"column":40}},"19":{"start":{"line":30,"column":0},"end":{"line":32,"column":2}},"20":{"start":{"line":31,"column":2},"end":{"line":31,"column":33}},"21":{"start":{"line":34,"column":0},"end":{"line":36,"column":2}},"22":{"start":{"line":35,"column":2},"end":{"line":35,"column":33}},"23":{"start":{"line":38,"column":0},"end":{"line":40,"column":2}},"24":{"start":{"line":39,"column":2},"end":{"line":39,"column":31}},"25":{"start":{"line":43,"column":0},"end":{"line":45,"column":2}},"26":{"start":{"line":44,"column":2},"end":{"line":44,"column":63}},"27":{"start":{"line":47,"column":0},"end":{"line":91,"column":2}},"28":{"start":{"line":48,"column":2},"end":{"line":61,"column":3}},"29":{"start":{"line":49,"column":4},"end":{"line":52,"column":6}},"30":{"start":{"line":53,"column":9},"end":{"line":61,"column":3}},"31":{"start":{"line":54,"column":4},"end":{"line":57,"column":6}},"32":{"start":{"line":59,"column":4},"end":{"line":59,"column":33}},"33":{"start":{"line":60,"column":4},"end":{"line":60,"column":42}},"34":{"start":{"line":64,"column":2},"end":{"line":64,"column":15}},"35":{"start":{"line":65,"column":2},"end":{"line":70,"column":3}},"36":{"start":{"line":66,"column":4},"end":{"line":66,"column":60}},"37":{"start":{"line":67,"column":4},"end":{"line":67,"column":65}},"38":{"start":{"line":68,"column":9},"end":{"line":70,"column":3}},"39":{"start":{"line":69,"column":4},"end":{"line":69,"column":73}},"40":{"start":{"line":72,"column":2},"end":{"line":78,"column":5}},"41":{"start":{"line":81,"column":2},"end":{"line":89,"column":11}},"42":{"start":{"line":83,"column":4},"end":{"line":87,"column":5}},"43":{"start":{"line":86,"column":6},"end":{"line":86,"column":13}},"44":{"start":{"line":88,"column":4},"end":{"line":88,"column":62}},"45":{"start":{"line":90,"column":2},"end":{"line":90,"column":14}},"46":{"start":{"line":93,"column":0},"end":{"line":112,"column":2}},"47":{"start":{"line":94,"column":2},"end":{"line":94,"column":21}},"48":{"start":{"line":94,"column":12},"end":{"line":94,"column":21}},"49":{"start":{"line":95,"column":2},"end":{"line":95,"column":53}},"50":{"start":{"line":95,"column":38},"end":{"line":95,"column":53}},"51":{"start":{"line":97,"column":2},"end":{"line":99,"column":3}},"52":{"start":{"line":98,"column":4},"end":{"line":98,"column":43}},"53":{"start":{"line":100,"column":2},"end":{"line":107,"column":3}},"54":{"start":{"line":101,"column":4},"end":{"line":105,"column":5}},"55":{"start":{"line":102,"column":6},"end":{"line":102,"column":32}},"56":{"start":{"line":104,"column":6},"end":{"line":104,"column":34}},"57":{"start":{"line":106,"column":4},"end":{"line":106,"column":18}},"58":{"start":{"line":110,"column":2},"end":{"line":110,"column":28}},"59":{"start":{"line":110,"column":15},"end":{"line":110,"column":28}},"60":{"start":{"line":111,"column":2},"end":{"line":111,"column":16}},"61":{"start":{"line":114,"column":0},"end":{"line":133,"column":2}},"62":{"start":{"line":115,"column":2},"end":{"line":115,"column":19}},"63":{"start":{"line":118,"column":2},"end":{"line":118,"column":70}},"64":{"start":{"line":120,"column":2},"end":{"line":122,"column":3}},"65":{"start":{"line":121,"column":4},"end":{"line":121,"column":35}},"66":{"start":{"line":124,"column":2},"end":{"line":126,"column":3}},"67":{"start":{"line":125,"column":4},"end":{"line":125,"column":42}},"68":{"start":{"line":128,"column":2},"end":{"line":130,"column":3}},"69":{"start":{"line":129,"column":4},"end":{"line":129,"column":47}},"70":{"start":{"line":132,"column":2},"end":{"line":132,"column":40}},"71":{"start":{"line":137,"column":0},"end":{"line":147,"column":3}},"72":{"start":{"line":139,"column":4},"end":{"line":139,"column":26}},"73":{"start":{"line":142,"column":4},"end":{"line":144,"column":5}},"74":{"start":{"line":143,"column":6},"end":{"line":143,"column":80}},"75":{"start":{"line":145,"column":4},"end":{"line":145,"column":25}},"76":{"start":{"line":150,"column":0},"end":{"line":159,"column":3}},"77":{"start":{"line":152,"column":4},"end":{"line":152,"column":80}},"78":{"start":{"line":152,"column":20},"end":{"line":152,"column":80}},"79":{"start":{"line":153,"column":4},"end":{"line":153,"column":80}},"80":{"start":{"line":153,"column":20},"end":{"line":153,"column":80}},"81":{"start":{"line":154,"column":4},"end":{"line":154,"column":47}},"82":{"start":{"line":157,"column":4},"end":{"line":157,"column":103}},"83":{"start":{"line":161,"column":0},"end":{"line":173,"column":3}},"84":{"start":{"line":163,"column":4},"end":{"line":163,"column":49}},"85":{"start":{"line":166,"column":4},"end":{"line":166,"column":75}},"86":{"start":{"line":166,"column":34},"end":{"line":166,"column":75}},"87":{"start":{"line":169,"column":4},"end":{"line":171,"column":5}},"88":{"start":{"line":170,"column":6},"end":{"line":170,"column":30}},"89":{"start":{"line":175,"column":0},"end":{"line":175,"column":22}}},"branchMap":{"1":{"line":12,"type":"if","locations":[{"start":{"line":12,"column":2},"end":{"line":12,"column":2}},{"start":{"line":12,"column":2},"end":{"line":12,"column":2}}]},"2":{"line":15,"type":"cond-expr","locations":[{"start":{"line":15,"column":28},"end":{"line":15,"column":39}},{"start":{"line":15,"column":42},"end":{"line":15,"column":54}}]},"3":{"line":16,"type":"binary-expr","locations":[{"start":{"line":16,"column":17},"end":{"line":16,"column":24}},{"start":{"line":16,"column":28},"end":{"line":16,"column":30}}]},"4":{"line":19,"type":"binary-expr","locations":[{"start":{"line":19,"column":13},"end":{"line":19,"column":21}},{"start":{"line":19,"column":25},"end":{"line":19,"column":38}}]},"5":{"line":20,"type":"binary-expr","locations":[{"start":{"line":20,"column":14},"end":{"line":20,"column":23}},{"start":{"line":20,"column":27},"end":{"line":20,"column":35}}]},"6":{"line":24,"type":"binary-expr","locations":[{"start":{"line":24,"column":14},"end":{"line":24,"column":23}},{"start":{"line":24,"column":27},"end":{"line":24,"column":31}}]},"7":{"line":27,"type":"binary-expr","locations":[{"start":{"line":27,"column":18},"end":{"line":27,"column":31}},{"start":{"line":27,"column":35},"end":{"line":27,"column":39}}]},"8":{"line":44,"type":"binary-expr","locations":[{"start":{"line":44,"column":9},"end":{"line":44,"column":22}},{"start":{"line":44,"column":26},"end":{"line":44,"column":35}},{"start":{"line":44,"column":39},"end":{"line":44,"column":62}}]},"9":{"line":48,"type":"if","locations":[{"start":{"line":48,"column":2},"end":{"line":48,"column":2}},{"start":{"line":48,"column":2},"end":{"line":48,"column":2}}]},"10":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":9},"end":{"line":53,"column":9}},{"start":{"line":53,"column":9},"end":{"line":53,"column":9}}]},"11":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":2},"end":{"line":65,"column":2}},{"start":{"line":65,"column":2},"end":{"line":65,"column":2}}]},"12":{"line":68,"type":"if","locations":[{"start":{"line":68,"column":9},"end":{"line":68,"column":9}},{"start":{"line":68,"column":9},"end":{"line":68,"column":9}}]},"13":{"line":69,"type":"cond-expr","locations":[{"start":{"line":69,"column":30},"end":{"line":69,"column":56}},{"start":{"line":69,"column":59},"end":{"line":69,"column":72}}]},"14":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":23},"end":{"line":75,"column":44}},{"start":{"line":75,"column":47},"end":{"line":75,"column":51}}]},"15":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":4},"end":{"line":83,"column":4}},{"start":{"line":83,"column":4},"end":{"line":83,"column":4}}]},"16":{"line":83,"type":"binary-expr","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":27}},{"start":{"line":83,"column":31},"end":{"line":83,"column":45}},{"start":{"line":84,"column":6},"end":{"line":84,"column":23}},{"start":{"line":84,"column":27},"end":{"line":84,"column":41}},{"start":{"line":85,"column":6},"end":{"line":85,"column":20}},{"start":{"line":85,"column":24},"end":{"line":85,"column":37}}]},"17":{"line":88,"type":"cond-expr","locations":[{"start":{"line":88,"column":27},"end":{"line":88,"column":49}},{"start":{"line":88,"column":52},"end":{"line":88,"column":61}}]},"18":{"line":94,"type":"if","locations":[{"start":{"line":94,"column":2},"end":{"line":94,"column":2}},{"start":{"line":94,"column":2},"end":{"line":94,"column":2}}]},"19":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":2},"end":{"line":95,"column":2}},{"start":{"line":95,"column":2},"end":{"line":95,"column":2}}]},"20":{"line":97,"type":"if","locations":[{"start":{"line":97,"column":2},"end":{"line":97,"column":2}},{"start":{"line":97,"column":2},"end":{"line":97,"column":2}}]},"21":{"line":100,"type":"if","locations":[{"start":{"line":100,"column":2},"end":{"line":100,"column":2}},{"start":{"line":100,"column":2},"end":{"line":100,"column":2}}]},"22":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":4},"end":{"line":101,"column":4}},{"start":{"line":101,"column":4},"end":{"line":101,"column":4}}]},"23":{"line":110,"type":"if","locations":[{"start":{"line":110,"column":2},"end":{"line":110,"column":2}},{"start":{"line":110,"column":2},"end":{"line":110,"column":2}}]},"24":{"line":118,"type":"cond-expr","locations":[{"start":{"line":118,"column":44},"end":{"line":118,"column":57}},{"start":{"line":118,"column":60},"end":{"line":118,"column":69}}]},"25":{"line":118,"type":"binary-expr","locations":[{"start":{"line":118,"column":18},"end":{"line":118,"column":27}},{"start":{"line":118,"column":31},"end":{"line":118,"column":40}}]},"26":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":2},"end":{"line":120,"column":2}},{"start":{"line":120,"column":2},"end":{"line":120,"column":2}}]},"27":{"line":124,"type":"if","locations":[{"start":{"line":124,"column":2},"end":{"line":124,"column":2}},{"start":{"line":124,"column":2},"end":{"line":124,"column":2}}]},"28":{"line":128,"type":"if","locations":[{"start":{"line":128,"column":2},"end":{"line":128,"column":2}},{"start":{"line":128,"column":2},"end":{"line":128,"column":2}}]},"29":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":4},"end":{"line":142,"column":4}},{"start":{"line":142,"column":4},"end":{"line":142,"column":4}}]},"30":{"line":142,"type":"binary-expr","locations":[{"start":{"line":142,"column":8},"end":{"line":142,"column":22}},{"start":{"line":142,"column":26},"end":{"line":142,"column":40}},{"start":{"line":142,"column":44},"end":{"line":142,"column":56}}]},"31":{"line":152,"type":"if","locations":[{"start":{"line":152,"column":4},"end":{"line":152,"column":4}},{"start":{"line":152,"column":4},"end":{"line":152,"column":4}}]},"32":{"line":153,"type":"if","locations":[{"start":{"line":153,"column":4},"end":{"line":153,"column":4}},{"start":{"line":153,"column":4},"end":{"line":153,"column":4}}]},"33":{"line":166,"type":"if","locations":[{"start":{"line":166,"column":4},"end":{"line":166,"column":4}},{"start":{"line":166,"column":4},"end":{"line":166,"column":4}}]},"34":{"line":169,"type":"if","locations":[{"start":{"line":169,"column":4},"end":{"line":169,"column":4}},{"start":{"line":169,"column":4},"end":{"line":169,"column":4}}]},"35":{"line":169,"type":"binary-expr","locations":[{"start":{"line":169,"column":8},"end":{"line":169,"column":12}},{"start":{"line":169,"column":16},"end":{"line":169,"column":34}}]}}},"/Users/contra/Projects/vinyl/lib/cloneBuffer.js":{"path":"/Users/contra/Projects/vinyl/lib/cloneBuffer.js","s":{"1":1,"2":1,"3":7,"4":7,"5":7},"b":{},"f":{"1":7},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":3,"column":0},"end":{"line":7,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":35}},"4":{"start":{"line":5,"column":2},"end":{"line":5,"column":16}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":13}}},"branchMap":{}},"/Users/contra/Projects/vinyl/lib/isBuffer.js":{"path":"/Users/contra/Projects/vinyl/lib/isBuffer.js","s":{"1":1,"2":1,"3":1,"4":108},"b":{"1":[108,107]},"f":{"1":108},"fnMap":{"1":{"name":"(anonymous_1)","line":5,"loc":{"start":{"line":5,"column":17},"end":{"line":5,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":24}},"3":{"start":{"line":5,"column":0},"end":{"line":7,"column":2}},"4":{"start":{"line":6,"column":2},"end":{"line":6,"column":54}}},"branchMap":{"1":{"line":6,"type":"binary-expr","locations":[{"start":{"line":6,"column":9},"end":{"line":6,"column":30}},{"start":{"line":6,"column":34},"end":{"line":6,"column":53}}]}}},"/Users/contra/Projects/vinyl/lib/isStream.js":{"path":"/Users/contra/Projects/vinyl/lib/isStream.js","s":{"1":1,"2":1,"3":99},"b":{"1":[99,40]},"f":{"1":99},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":36}}},"branchMap":{"1":{"line":4,"type":"binary-expr","locations":[{"start":{"line":4,"column":9},"end":{"line":4,"column":12}},{"start":{"line":4,"column":16},"end":{"line":4,"column":35}}]}}},"/Users/contra/Projects/vinyl/lib/isNull.js":{"path":"/Users/contra/Projects/vinyl/lib/isNull.js","s":{"1":1,"2":57},"b":{},"f":{"1":57},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":3,"column":2}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":20}}},"branchMap":{}},"/Users/contra/Projects/vinyl/lib/inspectStream.js":{"path":"/Users/contra/Projects/vinyl/lib/inspectStream.js","s":{"1":1,"2":1,"3":9,"4":2,"5":7,"6":7,"7":1,"8":7},"b":{"1":[2,7],"2":[1,6]},"f":{"1":9},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":34}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":37}},"2":{"start":{"line":3,"column":0},"end":{"line":11,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":32}},"4":{"start":{"line":4,"column":25},"end":{"line":4,"column":32}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":43}},"6":{"start":{"line":8,"column":2},"end":{"line":8,"column":47}},"7":{"start":{"line":8,"column":31},"end":{"line":8,"column":47}},"8":{"start":{"line":10,"column":2},"end":{"line":10,"column":34}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":4,"column":2}},{"start":{"line":4,"column":2},"end":{"line":4,"column":2}}]},"2":{"line":8,"type":"if","locations":[{"start":{"line":8,"column":2},"end":{"line":8,"column":2}},{"start":{"line":8,"column":2},"end":{"line":8,"column":2}}]}}}} \ No newline at end of file diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/index.html b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/index.html new file mode 100644 index 0000000..b875fbd --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/index.html @@ -0,0 +1,363 @@ + + + + Code coverage report for All files + + + + + + + +
+

Code coverage report for All files

+

+ + Statements: 100% (111 / 111)      + + + Branches: 100% (84 / 84)      + + + Functions: 100% (20 / 20)      + + + Lines: 100% (102 / 102)      + + Ignored: none      +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
vinyl/100%(89 / 89)100%(76 / 76)100%(15 / 15)100%(82 / 82)
vinyl/lib/100%(22 / 22)100%(8 / 8)100%(5 / 5)100%(20 / 20)
+
+
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.css b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.html b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.html new file mode 100644 index 0000000..ef3bcc4 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.html @@ -0,0 +1,350 @@ + + + + Code coverage report for vinyl/ + + + + + + + +
+

Code coverage report for vinyl/

+

+ + Statements: 100% (89 / 89)      + + + Branches: 100% (76 / 76)      + + + Functions: 100% (15 / 15)      + + + Lines: 100% (82 / 82)      + + Ignored: none      +

+
All files » vinyl/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js100%(89 / 89)100%(76 / 76)100%(15 / 15)100%(82 / 82)
+
+
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html new file mode 100644 index 0000000..36a4d76 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html @@ -0,0 +1,847 @@ + + + + Code coverage report for vinyl/index.js + + + + + + + +
+

Code coverage report for vinyl/index.js

+

+ + Statements: 100% (89 / 89)      + + + Branches: 100% (76 / 76)      + + + Functions: 100% (15 / 15)      + + + Lines: 100% (82 / 82)      + + Ignored: none      +

+
All files » vinyl/ » index.js
+
+
+

+
+
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 +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 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +1761 +1 +1 +1 +1 +1 +1 +1 +1 +  +1 +73 +  +  +73 +73 +  +  +73 +73 +  +  +  +73 +  +  +73 +  +  +1 +26 +  +  +1 +29 +  +  +1 +6 +  +  +  +1 +3 +  +  +1 +14 +2 +  +  +  +12 +7 +  +  +  +  +5 +5 +  +  +  +14 +14 +1 +1 +13 +6 +  +  +14 +  +  +  +  +  +  +  +  +14 +  +75 +  +  +70 +  +5 +  +14 +  +  +1 +6 +6 +  +6 +2 +  +4 +2 +1 +  +1 +  +2 +  +  +  +2 +2 +  +  +1 +6 +  +  +6 +  +6 +4 +  +  +6 +3 +  +  +6 +1 +  +  +6 +  +  +  +  +1 +  +99 +  +  +78 +1 +  +77 +  +  +  +  +1 +  +7 +6 +5 +  +  +1 +  +  +  +1 +  +46 +  +  +9 +  +  +8 +5 +  +  +  +  +1 + 
var path = require('path');
+var clone = require('lodash').clone;
+var cloneStats = require('clone-stats');
+var cloneBuffer = require('./lib/cloneBuffer');
+var isBuffer = require('./lib/isBuffer');
+var isStream = require('./lib/isStream');
+var isNull = require('./lib/isNull');
+var inspectStream = require('./lib/inspectStream');
+var Stream = require('stream');
+ 
+function File(file) {
+  if (!file) file = {};
+ 
+  // record path change
+  var history = file.path ? [file.path] : file.history;
+  this.history = history || [];
+ 
+  // TODO: should this be moved to vinyl-fs?
+  this.cwd = file.cwd || process.cwd();
+  this.base = file.base || this.cwd;
+ 
+  // 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(opt) {
+  if (typeof opt === 'boolean') {
+    opt = {
+      deep: opt,
+      contents: true
+    };
+  } else if (!opt) {
+    opt = {
+      deep: false,
+      contents: true
+    };
+  } else {
+    opt.deep = opt.deep === true;
+    opt.contents = opt.contents !== false;
+  }
+ 
+  // clone our file contents
+  var contents;
+  if (this.isStream()) {
+    contents = this.contents.pipe(new Stream.PassThrough());
+    this.contents = this.contents.pipe(new Stream.PassThrough());
+  } else if (this.isBuffer()) {
+    contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
+  }
+ 
+  var file = new File({
+    cwd: this.cwd,
+    base: this.base,
+    stat: (this.stat ? cloneStats(this.stat) : null),
+    history: this.history.slice(),
+    contents: contents
+  });
+ 
+  // clone our custom properties
+  Object.keys(this).forEach(function(key) {
+    // ignore built-in fields
+    if (key === '_contents' || key === 'stat' ||
+      key === 'history' || key === 'path' ||
+      key === 'base' || key === 'cwd') {
+      return;
+    }
+    file[key] = opt.deep ? clone(this[key], true) : this[key];
+  }, this);
+  return file;
+};
+ 
+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;
+  }
+ 
+  // isNull
+  if (opt.end) stream.end();
+  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.');
+  }
+});
+ 
+Object.defineProperty(File.prototype, 'path', {
+  get: function() {
+    return this.history[this.history.length - 1];
+  },
+  set: function(path) {
+    if (typeof path !== 'string') throw new Error('path should be string');
+ 
+    // record history only when path changed
+    if (path && path !== this.path) {
+      this.history.push(path);
+    }
+  }
+});
+ 
+module.exports = File;
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html new file mode 100644 index 0000000..39ec92b --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html @@ -0,0 +1,343 @@ + + + + Code coverage report for vinyl/lib/cloneBuffer.js + + + + + + + +
+

Code coverage report for vinyl/lib/cloneBuffer.js

+

+ + Statements: 100% (5 / 5)      + + + Branches: 100% (0 / 0)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (5 / 5)      + + Ignored: none      +

+
All files » vinyl/lib/ » cloneBuffer.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +81 +  +1 +7 +7 +7 +  + 
var Buffer = require('buffer').Buffer;
+ 
+module.exports = function(buf) {
+  var out = new Buffer(buf.length);
+  buf.copy(out);
+  return out;
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html new file mode 100644 index 0000000..5288f5a --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html @@ -0,0 +1,402 @@ + + + + Code coverage report for vinyl/lib/ + + + + + + + +
+

Code coverage report for vinyl/lib/

+

+ + Statements: 100% (22 / 22)      + + + Branches: 100% (8 / 8)      + + + Functions: 100% (5 / 5)      + + + Lines: 100% (20 / 20)      + + Ignored: none      +

+
All files » vinyl/lib/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
cloneBuffer.js100%(5 / 5)100%(0 / 0)100%(1 / 1)100%(5 / 5)
inspectStream.js100%(8 / 8)100%(4 / 4)100%(1 / 1)100%(6 / 6)
isBuffer.js100%(4 / 4)100%(2 / 2)100%(1 / 1)100%(4 / 4)
isNull.js100%(2 / 2)100%(0 / 0)100%(1 / 1)100%(2 / 2)
isStream.js100%(3 / 3)100%(2 / 2)100%(1 / 1)100%(3 / 3)
+
+
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html new file mode 100644 index 0000000..e8e5b36 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html @@ -0,0 +1,355 @@ + + + + Code coverage report for vinyl/lib/inspectStream.js + + + + + + + +
+

Code coverage report for vinyl/lib/inspectStream.js

+

+ + Statements: 100% (8 / 8)      + + + Branches: 100% (4 / 4)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (6 / 6)      + + Ignored: none      +

+
All files » vinyl/lib/ » inspectStream.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +121 +  +1 +9 +  +7 +  +7 +  +7 +  + 
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>';
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html new file mode 100644 index 0000000..a44efe4 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html @@ -0,0 +1,340 @@ + + + + Code coverage report for vinyl/lib/isBuffer.js + + + + + + + +
+

Code coverage report for vinyl/lib/isBuffer.js

+

+ + Statements: 100% (4 / 4)      + + + Branches: 100% (2 / 2)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (4 / 4)      + + Ignored: none      +

+
All files » vinyl/lib/ » isBuffer.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +71 +1 +  +  +1 +108 + 
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;
+};
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html new file mode 100644 index 0000000..010d3e0 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html @@ -0,0 +1,331 @@ + + + + Code coverage report for vinyl/lib/isNull.js + + + + + + + +
+

Code coverage report for vinyl/lib/isNull.js

+

+ + Statements: 100% (2 / 2)      + + + Branches: 100% (0 / 0)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (2 / 2)      + + Ignored: none      +

+
All files » vinyl/lib/ » isNull.js
+
+
+

+
+
1 +2 +3 +41 +57 +  + 
module.exports = function(v) {
+  return v === null;
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html new file mode 100644 index 0000000..511186f --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html @@ -0,0 +1,334 @@ + + + + Code coverage report for vinyl/lib/isStream.js + + + + + + + +
+

Code coverage report for vinyl/lib/isStream.js

+

+ + Statements: 100% (3 / 3)      + + + Branches: 100% (2 / 2)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (3 / 3)      + + Ignored: none      +

+
All files » vinyl/lib/ » isStream.js
+
+
+

+
+
1 +2 +3 +4 +51 +  +1 +99 + 
var Stream = require('stream').Stream;
+ 
+module.exports = function(o) {
+  return !!o && o instanceof Stream;
+};
+ +
+ + + + + + + + diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov.info b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov.info new file mode 100644 index 0000000..bbebe38 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov.info @@ -0,0 +1,280 @@ +TN: +SF:/Users/contra/Projects/vinyl/index.js +FN:11,File +FN:30,(anonymous_2) +FN:34,(anonymous_3) +FN:38,(anonymous_4) +FN:43,(anonymous_5) +FN:47,(anonymous_6) +FN:81,(anonymous_7) +FN:93,(anonymous_8) +FN:114,(anonymous_9) +FN:138,(anonymous_10) +FN:141,(anonymous_11) +FN:151,(anonymous_12) +FN:156,(anonymous_13) +FN:162,(anonymous_14) +FN:165,(anonymous_15) +FNF:15 +FNH:15 +FNDA:73,File +FNDA:26,(anonymous_2) +FNDA:29,(anonymous_3) +FNDA:6,(anonymous_4) +FNDA:3,(anonymous_5) +FNDA:14,(anonymous_6) +FNDA:75,(anonymous_7) +FNDA:6,(anonymous_8) +FNDA:6,(anonymous_9) +FNDA:99,(anonymous_10) +FNDA:78,(anonymous_11) +FNDA:7,(anonymous_12) +FNDA:1,(anonymous_13) +FNDA:46,(anonymous_14) +FNDA:9,(anonymous_15) +DA:1,1 +DA:2,1 +DA:3,1 +DA:4,1 +DA:5,1 +DA:6,1 +DA:7,1 +DA:8,1 +DA:9,1 +DA:11,1 +DA:12,73 +DA:15,73 +DA:16,73 +DA:19,73 +DA:20,73 +DA:24,73 +DA:27,73 +DA:30,1 +DA:31,26 +DA:34,1 +DA:35,29 +DA:38,1 +DA:39,6 +DA:43,1 +DA:44,3 +DA:47,1 +DA:48,14 +DA:49,2 +DA:53,12 +DA:54,7 +DA:59,5 +DA:60,5 +DA:64,14 +DA:65,14 +DA:66,1 +DA:67,1 +DA:68,13 +DA:69,6 +DA:72,14 +DA:81,14 +DA:83,75 +DA:86,70 +DA:88,5 +DA:90,14 +DA:93,1 +DA:94,6 +DA:95,6 +DA:97,6 +DA:98,2 +DA:100,4 +DA:101,2 +DA:102,1 +DA:104,1 +DA:106,2 +DA:110,2 +DA:111,2 +DA:114,1 +DA:115,6 +DA:118,6 +DA:120,6 +DA:121,4 +DA:124,6 +DA:125,3 +DA:128,6 +DA:129,1 +DA:132,6 +DA:137,1 +DA:139,99 +DA:142,78 +DA:143,1 +DA:145,77 +DA:150,1 +DA:152,7 +DA:153,6 +DA:154,5 +DA:157,1 +DA:161,1 +DA:163,46 +DA:166,9 +DA:169,8 +DA:170,5 +DA:175,1 +LF:82 +LH:82 +BRDA:12,1,0,14 +BRDA:12,1,1,59 +BRDA:15,2,0,25 +BRDA:15,2,1,48 +BRDA:16,3,0,73 +BRDA:16,3,1,33 +BRDA:19,4,0,73 +BRDA:19,4,1,32 +BRDA:20,5,0,73 +BRDA:20,5,1,39 +BRDA:24,6,0,73 +BRDA:24,6,1,65 +BRDA:27,7,0,73 +BRDA:27,7,1,44 +BRDA:44,8,0,3 +BRDA:44,8,1,1 +BRDA:44,8,2,1 +BRDA:48,9,0,2 +BRDA:48,9,1,12 +BRDA:53,10,0,7 +BRDA:53,10,1,5 +BRDA:65,11,0,1 +BRDA:65,11,1,13 +BRDA:68,12,0,6 +BRDA:68,12,1,7 +BRDA:69,13,0,5 +BRDA:69,13,1,1 +BRDA:75,14,0,2 +BRDA:75,14,1,12 +BRDA:83,15,0,70 +BRDA:83,15,1,5 +BRDA:83,16,0,75 +BRDA:83,16,1,61 +BRDA:83,16,2,47 +BRDA:83,16,3,33 +BRDA:83,16,4,33 +BRDA:83,16,5,19 +BRDA:88,17,0,2 +BRDA:88,17,1,3 +BRDA:94,18,0,3 +BRDA:94,18,1,3 +BRDA:95,19,0,3 +BRDA:95,19,1,3 +BRDA:97,20,0,2 +BRDA:97,20,1,4 +BRDA:100,21,0,2 +BRDA:100,21,1,2 +BRDA:101,22,0,1 +BRDA:101,22,1,1 +BRDA:110,23,0,1 +BRDA:110,23,1,1 +BRDA:118,24,0,3 +BRDA:118,24,1,3 +BRDA:118,25,0,6 +BRDA:118,25,1,5 +BRDA:120,26,0,4 +BRDA:120,26,1,2 +BRDA:124,27,0,3 +BRDA:124,27,1,3 +BRDA:128,28,0,1 +BRDA:128,28,1,5 +BRDA:142,29,0,1 +BRDA:142,29,1,77 +BRDA:142,30,0,78 +BRDA:142,30,1,57 +BRDA:142,30,2,46 +BRDA:152,31,0,1 +BRDA:152,31,1,6 +BRDA:153,32,0,1 +BRDA:153,32,1,5 +BRDA:166,33,0,1 +BRDA:166,33,1,8 +BRDA:169,34,0,5 +BRDA:169,34,1,3 +BRDA:169,35,0,8 +BRDA:169,35,1,7 +BRF:76 +BRH:76 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/cloneBuffer.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:7,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,7 +DA:5,7 +DA:6,7 +LF:5 +LH:5 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isBuffer.js +FN:5,(anonymous_1) +FNF:1 +FNH:1 +FNDA:108,(anonymous_1) +DA:1,1 +DA:2,1 +DA:5,1 +DA:6,108 +LF:4 +LH:4 +BRDA:6,1,0,108 +BRDA:6,1,1,107 +BRF:2 +BRH:2 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isStream.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:99,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,99 +LF:3 +LH:3 +BRDA:4,1,0,99 +BRDA:4,1,1,40 +BRF:2 +BRH:2 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isNull.js +FN:1,(anonymous_1) +FNF:1 +FNH:1 +FNDA:57,(anonymous_1) +DA:1,1 +DA:2,57 +LF:2 +LH:2 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/inspectStream.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:9,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,9 +DA:6,7 +DA:8,7 +DA:10,7 +LF:6 +LH:6 +BRDA:4,1,0,2 +BRDA:4,1,1,7 +BRDA:8,2,0,1 +BRDA:8,2,1,6 +BRF:4 +BRH:4 +end_of_record diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/index.js new file mode 100644 index 0000000..09913c3 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/index.js @@ -0,0 +1,175 @@ +var path = require('path'); +var clone = require('lodash').clone; +var cloneStats = require('clone-stats'); +var cloneBuffer = require('./lib/cloneBuffer'); +var isBuffer = require('./lib/isBuffer'); +var isStream = require('./lib/isStream'); +var isNull = require('./lib/isNull'); +var inspectStream = require('./lib/inspectStream'); +var Stream = require('stream'); + +function File(file) { + if (!file) file = {}; + + // record path change + var history = file.path ? [file.path] : file.history; + this.history = history || []; + + // TODO: should this be moved to vinyl-fs? + this.cwd = file.cwd || process.cwd(); + this.base = file.base || this.cwd; + + // 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(opt) { + if (typeof opt === 'boolean') { + opt = { + deep: opt, + contents: true + }; + } else if (!opt) { + opt = { + deep: false, + contents: true + }; + } else { + opt.deep = opt.deep === true; + opt.contents = opt.contents !== false; + } + + // clone our file contents + var contents; + if (this.isStream()) { + contents = this.contents.pipe(new Stream.PassThrough()); + this.contents = this.contents.pipe(new Stream.PassThrough()); + } else if (this.isBuffer()) { + contents = opt.contents ? cloneBuffer(this.contents) : this.contents; + } + + var file = new File({ + cwd: this.cwd, + base: this.base, + stat: (this.stat ? cloneStats(this.stat) : null), + history: this.history.slice(), + contents: contents + }); + + // clone our custom properties + Object.keys(this).forEach(function(key) { + // ignore built-in fields + if (key === '_contents' || key === 'stat' || + key === 'history' || key === 'path' || + key === 'base' || key === 'cwd') { + return; + } + file[key] = opt.deep ? clone(this[key], true) : this[key]; + }, this); + return file; +}; + +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; + } + + // isNull + if (opt.end) stream.end(); + 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 ''; +}; + +// 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.'); + } +}); + +Object.defineProperty(File.prototype, 'path', { + get: function() { + return this.history[this.history.length - 1]; + }, + set: function(path) { + if (typeof path !== 'string') throw new Error('path should be string'); + + // record history only when path changed + if (path && path !== this.path) { + this.history.push(path); + } + } +}); + +module.exports = File; diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js new file mode 100644 index 0000000..89f09ed --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js @@ -0,0 +1,7 @@ +var Buffer = require('buffer').Buffer; + +module.exports = function(buf) { + var out = new Buffer(buf.length); + buf.copy(out); + return out; +}; diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js new file mode 100644 index 0000000..d36df6f --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js @@ -0,0 +1,11 @@ +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>'; +}; diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isBuffer.js new file mode 100644 index 0000000..0e23782 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isBuffer.js @@ -0,0 +1,7 @@ +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-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js new file mode 100644 index 0000000..7f22c63 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js @@ -0,0 +1,3 @@ +module.exports = function(v) { + return v === null; +}; diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isStream.js new file mode 100644 index 0000000..9ce0929 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/lib/isStream.js @@ -0,0 +1,5 @@ +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-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/LICENSE.md new file mode 100644 index 0000000..146cb32 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/LICENSE.md @@ -0,0 +1,21 @@ +## 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-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/README.md b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/README.md new file mode 100644 index 0000000..8b12b6f --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/README.md @@ -0,0 +1,17 @@ +# 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-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/index.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/index.js new file mode 100644 index 0000000..e797cfe --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/index.js @@ -0,0 +1,13 @@ +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-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/package.json new file mode 100644 index 0000000..e691165 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/package.json @@ -0,0 +1,57 @@ +{ + "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", + "tarball": "http://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" + }, + "_from": "clone-stats@^0.0.1", + "_npmVersion": "1.3.22", + "_npmUser": { + "name": "hughsk", + "email": "hughskennedy@gmail.com" + }, + "maintainers": [ + { + "name": "hughsk", + "email": "hughskennedy@gmail.com" + } + ], + "directories": {}, + "_shasum": "b88f94a82cf38b8791d58046ea4029ad88ca99d1", + "_resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" +} diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/test.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/test.js new file mode 100644 index 0000000..e4bb281 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/test.js @@ -0,0 +1,36 @@ +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-watch/node_modules/vinyl-fs/node_modules/vinyl/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/package.json new file mode 100644 index 0000000..2902031 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/package.json @@ -0,0 +1,70 @@ +{ + "name": "vinyl", + "description": "A virtual file format", + "version": "0.4.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", + "lodash": "^2.4.1" + }, + "devDependencies": { + "mocha": "^1.17.0", + "should": "^4.0.4", + "mocha-lcov-reporter": "^0.0.1", + "coveralls": "^2.6.1", + "istanbul": "^0.3.0", + "rimraf": "^2.2.5", + "jshint": "^2.4.1", + "buffer-equal": "0.0.1", + "lodash.templatesettings": "^2.4.1", + "event-stream": "^3.1.0" + }, + "scripts": { + "test": "istanbul cover node_modules/mocha/bin/_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" + } + ], + "gitHead": "6eae432519b007c313a8df83b093adfb97a2944c", + "bugs": { + "url": "https://github.com/wearefractal/vinyl/issues" + }, + "_id": "vinyl@0.4.3", + "_shasum": "19f61a1b28e72b4c50697889dbe91d7503943ecf", + "_from": "vinyl@^0.4.0", + "_npmVersion": "1.4.21", + "_npmUser": { + "name": "fractal", + "email": "contact@wearefractal.com" + }, + "maintainers": [ + { + "name": "fractal", + "email": "contact@wearefractal.com" + } + ], + "dist": { + "shasum": "19f61a1b28e72b4c50697889dbe91d7503943ecf", + "tarball": "http://registry.npmjs.org/vinyl/-/vinyl-0.4.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/perf/clone.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/perf/clone.js new file mode 100644 index 0000000..4df8578 --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/perf/clone.js @@ -0,0 +1,59 @@ +var File = require('../'); + +var contents = new Buffer('blah blah blah'); + +var originalFile = new File({ + path: 'yo.coffee', + contents: contents +}); + +// simulate some history +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; + +originalFile.ast = { + a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { + + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +}; + +for (var i = 0; i < 10000; i++) { + originalFile.clone(true).ast; +} \ No newline at end of file diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/File.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/File.js new file mode 100644 index 0000000..419e7aa --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/File.js @@ -0,0 +1,753 @@ +var Stream = require('stream'); +var fs = require('fs'); +var path = require('path'); +var es = require('event-stream'); +var File = require('../'); + +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 history to []', function(done) { + var file = new File(); + file.history.should.eql([]); + 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); + file.history.should.eql([val]); + done(); + }); + + it('should set history to given value', function(done) { + var val = '/test.coffee'; + var file = new File({history: [val]}); + file.path.should.equal(val); + file.history.should.eql([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 buffer\'s reference with option contents: false', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.js', + contents: new Buffer('test') + }; + + var file = new File(options); + + var copy1 = file.clone({ contents: false }); + copy1.contents.should.equal(file.contents); + + var copy2 = file.clone({}); + copy2.contents.should.not.equal(file.contents); + + var copy3 = file.clone({ contents: 'any string' }); + copy3.contents.should.not.equal(file.contents); + + done(); + }); + + it('should copy all attributes over with Stream', function(done) { + var contents = new Stream.PassThrough(); + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: contents + }; + var file = new File(options); + var file2 = file.clone(); + + contents.write(new Buffer('wa')); + + process.nextTick(function() { + contents.write(new Buffer('dup')); + contents.end(); + }); + + 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, 'stream ref should not be the same'); + file.contents.pipe(es.wait(function(err, data) { + file2.contents.pipe(es.wait(function(err, data2) { + data2.should.not.equal(data, 'stream contents ref should not be the same'); + data2.should.eql(data, 'stream contents 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.equal(true); + copy.stat.isDirectory().should.equal(false); + should(file.stat instanceof fs.Stats).equal(true); + should(copy.stat instanceof fs.Stats).equal(true); + + done(); + }); + + it('should properly clone the `history` 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.history[0].should.equal(options.path); + copy.path = 'lol'; + file.path.should.not.equal(copy.path); + done(); + }); + + it('should copy custom properties', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.custom = { a: 'custom property' }; + + 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.custom.should.equal(file.custom); + file2.custom.a.should.equal(file.custom.a); + + done(); + }); + + it('should copy history', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.path = '/test/test.js'; + file.path = '/test/test-938di2s.js'; + var file2 = file.clone(); + + file2.history.should.eql([ + '/test/test.coffee', + '/test/test.js', + '/test/test-938di2s.js' + ]); + file2.history.should.not.equal([ + '/test/test.coffee', + '/test/test.js', + '/test/test-938di2s.js' + ]); + file2.path.should.eql('/test/test-938di2s.js'); + + done(); + }); + + it('should copy all attributes deeply', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.custom = { a: 'custom property' }; + + var file2 = file.clone(true); + file2.custom.should.eql(file.custom); + file2.custom.should.not.equal(file.custom); + file2.custom.a.should.equal(file.custom.a); + + var file3 = file.clone({ deep: true }); + file3.custom.should.eql(file.custom); + file3.custom.should.not.equal(file.custom); + file3.custom.a.should.equal(file.custom.a); + + var file4 = file.clone(false); + file4.custom.should.eql(file.custom); + file4.custom.should.equal(file.custom); + file4.custom.a.should.equal(file.custom.a); + + var file5 = file.clone({ deep: false }); + file5.custom.should.eql(file.custom); + file5.custom.should.equal(file.custom); + file5.custom.a.should.equal(file.custom.a); + + 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() { + 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() { + 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() { + 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() { + 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() { + throw new Error('should not write'); + }); + stream.on('end', function() { + 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(''); + 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('>'); + 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('>'); + 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('>'); + 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('>'); + 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(''); + 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(path.join('test','test.coffee')); + done(); + }); + }); + + describe('path get/set', function() { + + it('should record history when instantiation', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should record history when path change', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.js'; + file.path.should.eql('/test/test.js'); + file.history.should.eql(['/test/test.coffee', '/test/test.js']); + + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee', '/test/test.js', '/test/test.coffee']); + }); + + it('should not record history when set the same path', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.coffee'; + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + + // ignore when set empty string + file.path = ''; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should throw when set path null', function() { + var file = new File({ + cwd: '/', + path: null + }); + + should.not.exist(file.path); + file.history.should.eql([]); + + (function() { + file.path = null; + }).should.throw('path should be string'); + }); + }); +}); diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/cloneBuffer.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/cloneBuffer.js new file mode 100644 index 0000000..34b3e7c --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/cloneBuffer.js @@ -0,0 +1,27 @@ +var cloneBuffer = require('../lib/cloneBuffer'); +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(); + }); +}); diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/inspectStream.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/inspectStream.js new file mode 100644 index 0000000..fe1802c --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/inspectStream.js @@ -0,0 +1,53 @@ +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(''); + done(); + }); + + it('should work on a core Readable Stream', function(done) { + var testStream = new Stream.Readable(); + inspectStream(testStream).should.equal(''); + done(); + }); + + it('should work on a core Writable Stream', function(done) { + var testStream = new Stream.Writable(); + inspectStream(testStream).should.equal(''); + done(); + }); + + it('should work on a core Duplex Stream', function(done) { + var testStream = new Stream.Duplex(); + inspectStream(testStream).should.equal(''); + done(); + }); + + it('should work on a core Transform Stream', function(done) { + var testStream = new Stream.Transform(); + inspectStream(testStream).should.equal(''); + done(); + }); + + it('should work on a core PassThrough Stream', function(done) { + var testStream = new Stream.PassThrough(); + inspectStream(testStream).should.equal(''); + 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-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isBuffer.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isBuffer.js new file mode 100644 index 0000000..432ad2a --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isBuffer.js @@ -0,0 +1,29 @@ +var isBuffer = require('../lib/isBuffer'); +var Stream = require('stream'); +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(); + }); +}); diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isNull.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isNull.js new file mode 100644 index 0000000..356934a --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isNull.js @@ -0,0 +1,22 @@ +var isNull = require('../lib/isNull'); +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(); + }); +}); diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isStream.js b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isStream.js new file mode 100644 index 0000000..5cc0e0b --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/node_modules/vinyl/test/isStream.js @@ -0,0 +1,29 @@ +var isStream = require('../lib/isStream'); +var Stream = require('stream'); +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(); + }); +}); diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/package.json b/node_modules/gulp-watch/node_modules/vinyl-fs/package.json index 3255010..b8e9af8 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/package.json +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/package.json @@ -1,7 +1,7 @@ { "name": "vinyl-fs", "description": "Vinyl adapter for the file system", - "version": "0.3.4", + "version": "0.3.7", "homepage": "http://github.com/wearefractal/vinyl-fs", "repository": { "type": "git", @@ -17,21 +17,22 @@ "glob-stream": "^3.1.5", "glob-watcher": "^0.0.6", "graceful-fs": "^3.0.0", - "lodash.defaults": "^2.4.1", + "lodash": "^2.4.1", "mkdirp": "^0.5.0", - "strip-bom": "^0.3.0", - "through2": "^0.5.1", - "vinyl": "^0.2.0" + "strip-bom": "^1.0.0", + "through2": "^0.6.1", + "vinyl": "^0.4.0" }, "devDependencies": { "buffer-equal": "^0.0.1", "coveralls": "^2.6.1", - "istanbul": "^0.2.3", + "istanbul": "^0.3.0", "jshint": "^2.4.1", "mocha": "^1.17.0", "mocha-lcov-reporter": "^0.0.1", "rimraf": "^2.2.5", - "should": "^4.0.0" + "should": "^4.0.0", + "sinon": "^1.10.3" }, "scripts": { "test": "mocha --reporter spec && jshint lib", @@ -47,14 +48,14 @@ "url": "http://github.com/wearefractal/vinyl-fs/raw/master/LICENSE" } ], - "gitHead": "a83eb9a53aa0c4e50306a20845111ccda276146d", + "gitHead": "1a5efe8d1f7d698691103f2fdc21e07dc1bd5634", "bugs": { "url": "https://github.com/wearefractal/vinyl-fs/issues" }, - "_id": "vinyl-fs@0.3.4", - "_shasum": "0df7154a9e07d47b14d2fcff914303439da97a84", + "_id": "vinyl-fs@0.3.7", + "_shasum": "2e25cfe6df5c80818f97ff417bf5c21a41e4a49b", "_from": "vinyl-fs@~0.3.0", - "_npmVersion": "1.4.14", + "_npmVersion": "1.4.21", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -66,10 +67,10 @@ } ], "dist": { - "shasum": "0df7154a9e07d47b14d2fcff914303439da97a84", - "tarball": "http://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.4.tgz" + "shasum": "2e25cfe6df5c80818f97ff417bf5c21a41e4a49b", + "tarball": "http://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.7.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.4.tgz", + "_resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.7.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/test/dest.js b/node_modules/gulp-watch/node_modules/vinyl-fs/test/dest.js index 27796a5..7704f8d 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/test/dest.js +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/test/dest.js @@ -1,3 +1,7 @@ +var spies = require('./spy'); +var chmodSpy = spies.chmodSpy; +var statSpy = spies.statSpy; + var vfs = require('../'); var path = require('path'); @@ -13,6 +17,9 @@ require('mocha'); var wipeOut = function(cb) { rimraf(path.join(__dirname, './out-fixtures/'), cb); + spies.setError('false'); + statSpy.reset(); + chmodSpy.reset(); }; var dataWrap = function(fn) { @@ -363,6 +370,245 @@ describe('dest stream', function() { stream1.end(); }); + it('should update file mode to match the vinyl mode', function(done) { + var inputPath = path.join(__dirname, './fixtures/test.coffee'); + var inputBase = path.join(__dirname, './fixtures/'); + var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + var expectedContents = fs.readFileSync(inputPath); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + var startMode = 0655; + var expectedMode = 0722; + + var expectedFile = new File({ + base: inputBase, + cwd: __dirname, + path: inputPath, + contents: expectedContents, + stat: { + mode: expectedMode + } + }); + + var onEnd = function(){ + should(chmodSpy.called).be.ok; + buffered.length.should.equal(1); + buffered[0].should.equal(expectedFile); + fs.existsSync(expectedPath).should.equal(true); + realMode(fs.lstatSync(expectedPath).mode).should.equal(expectedMode); + done(); + }; + + fs.mkdirSync(expectedBase); + fs.closeSync(fs.openSync(expectedPath, 'w')); + fs.chmodSync(expectedPath, startMode); + + chmodSpy.reset(); + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + + var buffered = []; + bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); + + stream.pipe(bufferStream); + stream.write(expectedFile); + stream.end(); + }); + + it('should update directory mode to match the vinyl mode', function(done) { + var inputBase = path.join(__dirname, './fixtures/'); + var inputPath = path.join(__dirname, './fixtures/wow'); + var expectedPath = path.join(__dirname, './out-fixtures/wow'); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + + var firstFile = new File({ + base: inputBase, + cwd: __dirname, + path: expectedPath, + stat: fs.statSync(inputPath) + }); + var startMode = firstFile.stat.mode; + var expectedMode = 0727; + + var expectedFile = new File(firstFile); + expectedFile.stat.mode = (startMode & ~07777) | expectedMode; + + var onEnd = function(){ + buffered.length.should.equal(2); + buffered[0].should.equal(firstFile); + buffered[1].should.equal(expectedFile); + buffered[0].cwd.should.equal(expectedCwd, 'cwd should have changed'); + buffered[0].base.should.equal(expectedBase, 'base should have changed'); + buffered[0].path.should.equal(expectedPath, 'path should have changed'); + realMode(fs.lstatSync(expectedPath).mode).should.equal(expectedMode); + done(); + }; + + fs.mkdirSync(expectedBase); + + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + + var buffered = []; + bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); + + stream.pipe(bufferStream); + stream.write(firstFile); + stream.write(expectedFile); + stream.end(); + }); + + it('should report IO errors', function(done) { + var inputPath = path.join(__dirname, './fixtures/test.coffee'); + var inputBase = path.join(__dirname, './fixtures/'); + var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + var expectedContents = fs.readFileSync(inputPath); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + var expectedMode = 0722; + + var expectedFile = new File({ + base: inputBase, + cwd: __dirname, + path: inputPath, + contents: expectedContents, + stat: { + mode: expectedMode + } + }); + + fs.mkdirSync(expectedBase); + fs.closeSync(fs.openSync(expectedPath, 'w')); + fs.chmodSync(expectedPath, 0); + + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + stream.on('error', function(err) { + err.code.should.equal('EACCES'); + done(); + }); + stream.write(expectedFile); + }); + + it('should report stat errors', function(done) { + var inputPath = path.join(__dirname, './fixtures/test.coffee'); + var inputBase = path.join(__dirname, './fixtures/'); + var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + var expectedContents = fs.readFileSync(inputPath); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + var expectedMode = 0722; + + var expectedFile = new File({ + base: inputBase, + cwd: __dirname, + path: inputPath, + contents: expectedContents, + stat: { + mode: expectedMode + } + }); + + fs.mkdirSync(expectedBase); + fs.closeSync(fs.openSync(expectedPath, 'w')); + + spies.setError(function(mod, fn) { + if (fn === 'stat' && arguments[2] === expectedPath) { + return new Error('stat error'); + } + }); + + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + stream.on('error', function(err) { + err.message.should.equal('stat error'); + done(); + }); + stream.write(expectedFile); + }); + + it('should report chmod errors', function(done) { + var inputPath = path.join(__dirname, './fixtures/test.coffee'); + var inputBase = path.join(__dirname, './fixtures/'); + var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + var expectedContents = fs.readFileSync(inputPath); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + var expectedMode = 0722; + + var expectedFile = new File({ + base: inputBase, + cwd: __dirname, + path: inputPath, + contents: expectedContents, + stat: { + mode: expectedMode + } + }); + + fs.mkdirSync(expectedBase); + fs.closeSync(fs.openSync(expectedPath, 'w')); + + spies.setError(function(mod, fn) { + if (fn === 'chmod' && arguments[2] === expectedPath) { + return new Error('chmod error'); + } + }); + + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + stream.on('error', function(err) { + err.message.should.equal('chmod error'); + done(); + }); + stream.write(expectedFile); + }); + + it('should not chmod a matching file', function(done) { + var inputPath = path.join(__dirname, './fixtures/test.coffee'); + var inputBase = path.join(__dirname, './fixtures/'); + var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + var expectedContents = fs.readFileSync(inputPath); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + var expectedMode = 0722; + + var expectedFile = new File({ + base: inputBase, + cwd: __dirname, + path: inputPath, + contents: expectedContents, + stat: { + mode: expectedMode + } + }); + + var expectedCount = 0; + spies.setError(function(mod, fn) { + if (fn === 'stat' && arguments[2] === expectedPath) { + expectedCount++; + } + }); + + var onEnd = function(){ + expectedCount.should.equal(1); + should(chmodSpy.called).be.not.ok; + realMode(fs.lstatSync(expectedPath).mode).should.equal(expectedMode); + done(); + }; + + fs.mkdirSync(expectedBase); + fs.closeSync(fs.openSync(expectedPath, 'w')); + fs.chmodSync(expectedPath, expectedMode); + + statSpy.reset(); + chmodSpy.reset(); + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + + var buffered = []; + bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); + + stream.pipe(bufferStream); + stream.write(expectedFile); + stream.end(); + }); + ['end', 'finish'].forEach(function(eventName) { it('should emit ' + eventName + ' event', function(done) { var srcPath = path.join(__dirname, './fixtures/test.coffee'); diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/test/spy.js b/node_modules/gulp-watch/node_modules/vinyl-fs/test/spy.js new file mode 100644 index 0000000..e14512b --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/test/spy.js @@ -0,0 +1,27 @@ +var fs = require('fs'); +var sinon = require('sinon'); + +var errorfn = false; + +function maybeCallAsync(module, func) { + var original = module[func]; + return sinon.stub(module, func, function() { + var args = Array.prototype.slice.call(arguments); + args.unshift(module, func); + var err = typeof errorfn === 'function' && + errorfn.apply(this, args); + if (!err) { + original.apply(this, arguments); + } else { + arguments[arguments.length - 1](err); + } + }); +} + +module.exports = { + setError: function(fn) { + errorfn = fn; + }, + chmodSpy: maybeCallAsync(fs, 'chmod'), + statSpy: maybeCallAsync(fs, 'stat') +}; diff --git a/node_modules/gulp-watch/node_modules/vinyl-fs/test/src.js b/node_modules/gulp-watch/node_modules/vinyl-fs/test/src.js index 99608e0..ec1eb47 100644 --- a/node_modules/gulp-watch/node_modules/vinyl-fs/test/src.js +++ b/node_modules/gulp-watch/node_modules/vinyl-fs/test/src.js @@ -1,3 +1,7 @@ +var spies = require('./spy'); +var chmodSpy = spies.chmodSpy; +var statSpy = spies.statSpy; + var vfs = require('../'); var path = require('path'); diff --git a/node_modules/gulp-watch/node_modules/vinyl/.travis.yml b/node_modules/gulp-watch/node_modules/vinyl/.travis.yml index 33ad9f8..8b95a9f 100644 --- a/node_modules/gulp-watch/node_modules/vinyl/.travis.yml +++ b/node_modules/gulp-watch/node_modules/vinyl/.travis.yml @@ -1,6 +1,5 @@ language: node_js node_js: - - "0.9" - "0.10" after_script: - - npm run coveralls \ No newline at end of file + - npm run coveralls diff --git a/node_modules/gulp-watch/node_modules/vinyl/LICENSE b/node_modules/gulp-watch/node_modules/vinyl/LICENSE old mode 100755 new mode 100644 diff --git a/node_modules/gulp-watch/node_modules/vinyl/README.md b/node_modules/gulp-watch/node_modules/vinyl/README.md index 3f97efc..ae6f16f 100644 --- a/node_modules/gulp-watch/node_modules/vinyl/README.md +++ b/node_modules/gulp-watch/node_modules/vinyl/README.md @@ -17,6 +17,10 @@ +## What is this? + +Read this for more info about how this plays into the grand scheme of things https://medium.com/@eschoff/3828e8126466 + ## File ```javascript @@ -25,7 +29,7 @@ var File = require('vinyl'); var coffeeFile = new File({ cwd: "/", base: "/test/", - path: "/test/file.coffee" + path: "/test/file.coffee", contents: new Buffer("test = 123") }); ``` @@ -79,7 +83,7 @@ Returns true if file.contents is null. ### clone() -Returns a new File object with all attributes cloned. +Returns a new File object with all attributes cloned. Custom attributes are deep-cloned. ### pipe(stream[, opt]) @@ -89,7 +93,7 @@ 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). +If opt.end is false, the destination stream will not be ended (same as node core). Returns the stream. @@ -120,4 +124,4 @@ console.log(file.relative); // file.coffee [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 +[depstat-image]: https://david-dm.org/wearefractal/vinyl.png diff --git a/node_modules/gulp-watch/node_modules/vinyl/index.js b/node_modules/gulp-watch/node_modules/vinyl/index.js index 97f5c75..a0c73ea 100644 --- a/node_modules/gulp-watch/node_modules/vinyl/index.js +++ b/node_modules/gulp-watch/node_modules/vinyl/index.js @@ -1,6 +1,8 @@ var path = require('path'); var cloneStats = require('clone-stats'); +var _ = require('lodash'); +var cloneDeep = _.cloneDeep; var isBuffer = require('./lib/isBuffer'); var isStream = require('./lib/isStream'); @@ -11,12 +13,13 @@ var cloneBuffer = require('./lib/cloneBuffer'); function File(file) { if (!file) file = {}; + // record path change + this.history = file.path ? [file.path] : []; + // 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; @@ -43,16 +46,18 @@ File.prototype.isDirectory = function() { }; 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 - }); + var clone = new File(); + + Object.keys(this).forEach(function(key) { + if (key !== '_contents' && key !== 'stat') { + clone[key] = cloneDeep(this[key]); + } + }, this); + + clone.contents = this.isBuffer() ? cloneBuffer(this.contents) : this.contents; + clone.stat = this.stat ? cloneStats(this.stat) : null; + + return clone; }; File.prototype.pipe = function(stream, opt) { @@ -74,8 +79,6 @@ File.prototype.pipe = function(stream, opt) { if (opt.end) stream.end(); return stream; } - - return stream; }; File.prototype.inspect = function() { @@ -125,4 +128,18 @@ Object.defineProperty(File.prototype, 'relative', { } }); +Object.defineProperty(File.prototype, 'path', { + get: function() { + return this.history[this.history.length - 1]; + }, + set: function(path) { + if (typeof path !== 'string') throw new Error('path should be string'); + + // record history only when path changed + if (path && path !== this.path) { + this.history.push(path); + } + } +}); + module.exports = File; diff --git a/node_modules/gulp-watch/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/gulp-watch/node_modules/vinyl/node_modules/clone-stats/package.json index 4967bde..e691165 100644 --- a/node_modules/gulp-watch/node_modules/vinyl/node_modules/clone-stats/package.json +++ b/node_modules/gulp-watch/node_modules/vinyl/node_modules/clone-stats/package.json @@ -39,7 +39,7 @@ "shasum": "b88f94a82cf38b8791d58046ea4029ad88ca99d1", "tarball": "http://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" }, - "_from": "clone-stats@~0.0.1", + "_from": "clone-stats@^0.0.1", "_npmVersion": "1.3.22", "_npmUser": { "name": "hughsk", diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/LICENSE.txt similarity index 100% rename from node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/LICENSE.txt rename to node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/LICENSE.txt diff --git a/node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/README.md b/node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/README.md new file mode 100644 index 0000000..6f9598e --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/README.md @@ -0,0 +1,163 @@ +# Lo-Dash v2.4.1 +A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features). + +## Download + +Check out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences]) for details over the differences between builds. + +* Modern builds perfect for newer browsers/environments:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.min.js) + +* Compatibility builds for older environment support too:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.min.js) + +* Underscore builds to use as a drop-in replacement:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.min.js) + +CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed. + +Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method. + +## Dive in + +There’s plenty of **[documentation](http://lodash.com/docs)**, [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).
+Check out DevDocs as a fast, organized, & searchable interface for our documentation. + +The full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).
+A list of upcoming features is available on our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap). + +## Features *not* in Underscore + + * AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.) + * [_(…)](http://lodash.com/docs#_) supports intuitive chaining + * [_.at](http://lodash.com/docs#at) for cherry-picking collection values + * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.constant](http://lodash.com/docs#constant) & [_.property](http://lodash.com/docs#property) function generators for composing functions + * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` + * [_.create](http://lodash.com/docs#create) for easier object inheritance + * [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins + * [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions + * [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control + * [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys + * [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early + * [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties + * [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties + * [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object` + * [_.mapValues](http://lodash.com/docs#mapValues) for [mapping](http://lodash.com/docs#map) values to an object + * [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions + * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend) + * [_.noop](http://lodash.com/docs#noop) for function placeholders + * [_.now](http://lodash.com/docs#now) as a cross-browser `Date.now` alternative + * [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior + * [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays + * [_.random](http://lodash.com/docs#random) supports returning floating-point numbers + * [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking + * [_.sortBy](http://lodash.com/docs#sortBy) supports sorting by multiple properties + * [_.support](http://lodash.com/docs#support) for flagging environment features + * [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals) + * [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects + * [_.where](http://lodash.com/docs#where) supports deep object comparisons + * [_.xor](http://lodash.com/docs#xor) as a companion to [_.difference](http://lodash.com/docs#difference), [_.intersection](http://lodash.com/docs#intersection), & [_.union](http://lodash.com/docs#union) + * [_.zip](http://lodash.com/docs#zip) is capable of unzipping values + * [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), & + [more](http://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks + * [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), & + [more](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings + * [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), & + [more](http://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands + * [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), & + [more](http://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight") right-associative methods + +## Resources + + * Podcasts + - [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/) + + * Posts + - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/) + - [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/) + + * Videos + - [Introduction](https://vimeo.com/44154599) + - [Origins](https://vimeo.com/44154600) + - [Optimizations & builds](https://vimeo.com/44154601) + - [Native method use](https://vimeo.com/48576012) + - [Testing](https://vimeo.com/45865290) + - [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk) + + A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources). + +## Support + +Tested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.21~0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
+Automated browser test results [are available](https://saucelabs.com/u/lodash) as well as [Travis CI](https://travis-ci.org/) builds for [lodash](https://travis-ci.org/lodash/lodash/), [lodash-cli](https://travis-ci.org/lodash/lodash-cli/), [lodash-amd](https://travis-ci.org/lodash/lodash-amd/), [lodash-node](https://travis-ci.org/lodash/lodash-node/), & [grunt-lodash](https://travis-ci.org/lodash/grunt-lodash). + +Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
+[![Sauce Labs](http://lodash.com/_img/sauce.png)](https://saucelabs.com/ "Sauce Labs: Selenium Testing & More") + +## Installation & usage + +In browsers: + +```html + +``` + +Using [`npm`](http://npmjs.org/): + +```bash +npm i --save lodash + +{sudo} npm i -g lodash +npm ln lodash +``` + +In [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/): + +```js +var _ = require('lodash'); +// or as Underscore +var _ = require('lodash/dist/lodash.underscore'); +``` + +**Notes:** + * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL + * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it + +In [Rhino](http://www.mozilla.org/rhino/): + +```js +load('lodash.js'); +``` + +In an AMD loader: + +```js +require({ + 'packages': [ + { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' } + ] +}, +['lodash'], function(_) { + console.log(_.VERSION); +}); +``` + +## 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/) | + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/dist/lodash.compat.js b/node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/dist/lodash.compat.js new file mode 100644 index 0000000..23798ba --- /dev/null +++ b/node_modules/gulp-watch/node_modules/vinyl/node_modules/lodash/dist/lodash.compat.js @@ -0,0 +1,7157 @@ +/** + * @license + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash -o ./dist/lodash.compat.js` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre ES5 environments */ + var undefined; + + /** Used to pool arrays and objects used internally */ + var arrayPool = [], + objectPool = []; + + /** Used to generate unique IDs */ + var idCounter = 0; + + /** Used internally to indicate various things */ + var indicatorObject = {}; + + /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */ + var keyPrefix = +new Date + ''; + + /** Used as the size when optimizations are enabled for large arrays */ + var largeArraySize = 75; + + /** Used as the max size of the `arrayPool` and `objectPool` */ + var maxPoolSize = 40; + + /** Used to detect and test whitespace */ + var whitespace = ( + // whitespace + ' \t\x0B\f\xA0\ufeff' + + + // line terminators + '\n\r\u2028\u2029' + + + // unicode category "Zs" space separators + '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' + ); + + /** 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 match regexp flags from their coerced string values */ + var reFlags = /\w*$/; + + /** Used to detected named functions */ + var reFuncName = /^\s*function[ \n\r\t]+\w/; + + /** Used to match "interpolate" template delimiters */ + var reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match leading whitespace and zeros to be removed */ + var reLeadingSpacesAndZeros = RegExp('^[' + whitespace + ']*0+(?=.$)'); + + /** Used to ensure capturing order of template delimiters */ + var reNoMatch = /($^)/; + + /** Used to detect functions containing a `this` reference */ + var reThis = /\bthis\b/; + + /** Used to match unescaped characters in compiled string literals */ + var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; + + /** Used to assign default `context` object properties */ + var contextProps = [ + 'Array', 'Boolean', 'Date', 'Error', 'Function', 'Math', 'Number', 'Object', + 'RegExp', 'String', '_', 'attachEvent', 'clearTimeout', 'isFinite', 'isNaN', + 'parseInt', 'setTimeout' + ]; + + /** Used to fix the JScript [[DontEnum]] bug */ + var shadowedProps = [ + 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', + 'toLocaleString', 'toString', 'valueOf' + ]; + + /** Used to make template sourceURLs easier to identify */ + var templateCounter = 0; + + /** `Object#toString` result shortcuts */ + var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + boolClass = '[object Boolean]', + dateClass = '[object Date]', + errorClass = '[object Error]', + funcClass = '[object Function]', + numberClass = '[object Number]', + objectClass = '[object Object]', + regexpClass = '[object RegExp]', + stringClass = '[object String]'; + + /** Used to identify object classifications that `_.clone` supports */ + var cloneableClasses = {}; + cloneableClasses[funcClass] = false; + cloneableClasses[argsClass] = cloneableClasses[arrayClass] = + cloneableClasses[boolClass] = cloneableClasses[dateClass] = + cloneableClasses[numberClass] = cloneableClasses[objectClass] = + cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true; + + /** Used as an internal `_.debounce` options object */ + var debounceOptions = { + 'leading': false, + 'maxWait': 0, + 'trailing': false + }; + + /** Used as the property descriptor for `__bindData__` */ + var descriptor = { + 'configurable': false, + 'enumerable': false, + 'value': null, + 'writable': false + }; + + /** Used as the data object for `iteratorTemplate` */ + var iteratorData = { + 'args': '', + 'array': null, + 'bottom': '', + 'firstArg': '', + 'init': '', + 'keys': null, + 'loop': '', + 'shadowedProps': null, + 'support': null, + 'top': '', + 'useHas': false + }; + + /** 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 + }; + + /** Used to escape characters for inclusion in compiled string literals */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\t': 't', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Used as a reference to the global object */ + var root = (objectTypes[typeof window] && window) || this; + + /** Detect free variable `exports` */ + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports` */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + + /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ + var freeGlobal = objectTypes[typeof global] && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.indexOf` without support for binary searches + * or `fromIndex` constraints. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * An implementation of `_.contains` for cache objects that mimics the return + * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var type = typeof value; + cache = cache.cache; + + if (type == 'boolean' || value == null) { + return cache[value] ? 0 : -1; + } + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value; + cache = (cache = cache[type]) && cache[key]; + + return type == 'object' + ? (cache && baseIndexOf(cache, value) > -1 ? 0 : -1) + : (cache ? 0 : -1); + } + + /** + * Adds a given value to the corresponding cache object. + * + * @private + * @param {*} value The value to add to the cache. + */ + function cachePush(value) { + var cache = this.cache, + type = typeof value; + + if (type == 'boolean' || value == null) { + cache[value] = true; + } else { + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value, + typeCache = cache[type] || (cache[type] = {}); + + if (type == 'object') { + (typeCache[key] || (typeCache[key] = [])).push(value); + } else { + typeCache[key] = true; + } + } + } + + /** + * Used by `_.max` and `_.min` as the default callback when a given + * collection is a string value. + * + * @private + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. + */ + function charAtCallback(value) { + return value.charCodeAt(0); + } + + /** + * Used by `sortBy` to compare transformed `collection` elements, stable sorting + * them in ascending order. + * + * @private + * @param {Object} a The object to compare to `b`. + * @param {Object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. + */ + function compareAscending(a, b) { + var ac = a.criteria, + bc = b.criteria, + index = -1, + length = ac.length; + + while (++index < length) { + var value = ac[index], + other = bc[index]; + + if (value !== other) { + if (value > other || typeof value == 'undefined') { + return 1; + } + if (value < other || typeof other == 'undefined') { + return -1; + } + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to return the same value for + // `a` and `b`. See https://github.com/jashkenas/underscore/pull/1247 + // + // This also ensures a stable sort in V8 and other engines. + // See http://code.google.com/p/v8/issues/detail?id=90 + return a.index - b.index; + } + + /** + * Creates a cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [array=[]] The array to search. + * @returns {null|Object} Returns the cache object or `null` if caching should not be used. + */ + function createCache(array) { + var index = -1, + length = array.length, + first = array[0], + mid = array[(length / 2) | 0], + last = array[length - 1]; + + if (first && typeof first == 'object' && + mid && typeof mid == 'object' && last && typeof last == 'object') { + return false; + } + var cache = getObject(); + cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false; + + var result = getObject(); + result.array = array; + result.cache = cache; + result.push = cachePush; + + while (++index < length) { + result.push(array[index]); + } + return result; + } + + /** + * 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]; + } + + /** + * Gets an array from the array pool or creates a new one if the pool is empty. + * + * @private + * @returns {Array} The array from the pool. + */ + function getArray() { + return arrayPool.pop() || []; + } + + /** + * Gets an object from the object pool or creates a new one if the pool is empty. + * + * @private + * @returns {Object} The object from the pool. + */ + function getObject() { + return objectPool.pop() || { + 'array': null, + 'cache': null, + 'criteria': null, + 'false': false, + 'index': 0, + 'null': false, + 'number': null, + 'object': null, + 'push': null, + 'string': null, + 'true': false, + 'undefined': false, + 'value': null + }; + } + + /** + * Checks if `value` is a DOM node in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM node, else `false`. + */ + function isNode(value) { + // IE < 9 presents DOM nodes as `Object` objects except they have `toString` + // methods that are `typeof` "string" and still can coerce nodes to strings + return typeof value.toString != 'function' && typeof (value + '') == 'string'; + } + + /** + * Releases the given array back to the array pool. + * + * @private + * @param {Array} [array] The array to release. + */ + function releaseArray(array) { + array.length = 0; + if (arrayPool.length < maxPoolSize) { + arrayPool.push(array); + } + } + + /** + * Releases the given object back to the object pool. + * + * @private + * @param {Object} [object] The object to release. + */ + function releaseObject(object) { + var cache = object.cache; + if (cache) { + releaseObject(cache); + } + object.array = object.cache = object.criteria = object.object = object.number = object.string = object.value = null; + if (objectPool.length < maxPoolSize) { + objectPool.push(object); + } + } + + /** + * Slices the `collection` from the `start` index up to, but not including, + * the `end` index. + * + * Note: This function is used instead of `Array#slice` to support node lists + * in IE < 9 and to ensure dense arrays are returned. + * + * @private + * @param {Array|Object|string} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {Array} Returns the new array. + */ + function slice(array, start, end) { + start || (start = 0); + if (typeof end == 'undefined') { + end = array ? array.length : 0; + } + var index = -1, + length = end - start || 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = array[start + index]; + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new `lodash` function using the given context object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} [context=root] The context object. + * @returns {Function} Returns the `lodash` function. + */ + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See http://es5.github.io/#x11.1.5. + context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; + + /** Native constructor references */ + var Array = context.Array, + Boolean = context.Boolean, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ + var arrayRef = []; + + /** Used for native method references */ + var errorProto = Error.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + + /** Used to restore the original `_` reference in `noConflict` */ + var oldDash = context._; + + /** 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, '.*?') + '$' + ); + + /** Native method shortcuts */ + var ceil = Math.ceil, + clearTimeout = context.clearTimeout, + floor = Math.floor, + fnToString = Function.prototype.toString, + getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf, + hasOwnProperty = objectProto.hasOwnProperty, + push = arrayRef.push, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + setTimeout = context.setTimeout, + splice = arrayRef.splice, + unshift = arrayRef.unshift; + + /** Used to set meta data on functions */ + var defineProperty = (function() { + // IE 8 only accepts DOM elements + try { + var o = {}, + func = isNative(func = Object.defineProperty) && func, + result = func(o, o, o) && func; + } catch(e) { } + return result; + }()); + + /* Native method shortcuts for methods with the same name as other `lodash` methods */ + var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate, + nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray, + nativeIsFinite = context.isFinite, + nativeIsNaN = context.isNaN, + nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys, + nativeMax = Math.max, + nativeMin = Math.min, + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + + /** Used to lookup a built-in constructor by [[Class]] */ + var ctorByClass = {}; + ctorByClass[arrayClass] = Array; + ctorByClass[boolClass] = Boolean; + ctorByClass[dateClass] = Date; + ctorByClass[funcClass] = Function; + ctorByClass[objectClass] = Object; + ctorByClass[numberClass] = Number; + ctorByClass[regexpClass] = RegExp; + ctorByClass[stringClass] = String; + + /** Used to avoid iterating non-enumerable properties in IE < 9 */ + var nonEnumProps = {}; + nonEnumProps[arrayClass] = nonEnumProps[dateClass] = nonEnumProps[numberClass] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; + nonEnumProps[boolClass] = nonEnumProps[stringClass] = { 'constructor': true, 'toString': true, 'valueOf': true }; + nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true }; + nonEnumProps[objectClass] = { 'constructor': true }; + + (function() { + var length = shadowedProps.length; + while (length--) { + var key = shadowedProps[length]; + for (var className in nonEnumProps) { + if (hasOwnProperty.call(nonEnumProps, className) && !hasOwnProperty.call(nonEnumProps[className], key)) { + nonEnumProps[className][key] = false; + } + } + } + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps the given value to enable intuitive + * method chaining. + * + * In addition to Lo-Dash methods, wrappers also have the following `Array` methods: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, + * and `unshift` + * + * Chaining is supported in custom builds as long as the `value` method is + * implicitly or explicitly included in the build. + * + * The chainable wrapper functions are: + * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, + * `compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`, + * `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, + * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`, + * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, + * `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, + * `union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, + * and `zip` + * + * The non-chainable wrapper functions are: + * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`, + * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, + * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, + * `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, + * `template`, `unescape`, `uniqueId`, and `value` + * + * The wrapper functions `first` and `last` return wrapped values when `n` is + * provided, otherwise they return unwrapped values. + * + * Explicit chaining can be enabled by using the `_.chain` method. + * + * @name _ + * @constructor + * @category Chaining + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(num) { + * return num * num; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + // don't wrap if already wrapped, even if wrapped by a different `lodash` constructor + return (value && typeof value == 'object' && !isArray(value) && hasOwnProperty.call(value, '__wrapped__')) + ? value + : new lodashWrapper(value); + } + + /** + * A fast path for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {Object} Returns a `lodash` instance. + */ + function lodashWrapper(value, chainAll) { + this.__chain__ = !!chainAll; + this.__wrapped__ = value; + } + // ensure `new lodashWrapper` is an instance of `lodash` + lodashWrapper.prototype = lodash.prototype; + + /** + * An object used to flag environments features. + * + * @static + * @memberOf _ + * @type Object + */ + var support = lodash.support = {}; + + (function() { + var ctor = function() { this.x = 1; }, + object = { '0': 1, 'length': 1 }, + props = []; + + ctor.prototype = { 'valueOf': 1, 'y': 1 }; + for (var key in new ctor) { props.push(key); } + for (key in arguments) { } + + /** + * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.argsClass = toString.call(arguments) == argsClass; + + /** + * Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5). + * + * @memberOf _.support + * @type boolean + */ + support.argsObject = arguments.constructor == Object && !(arguments instanceof Array); + + /** + * Detect if `name` or `message` properties of `Error.prototype` are + * enumerable by default. (IE < 9, Safari < 5.1) + * + * @memberOf _.support + * @type boolean + */ + support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); + + /** + * Detect if `prototype` properties are enumerable by default. + * + * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 + * (if the prototype or a property on the prototype has been set) + * incorrectly sets a function's `prototype` property [[Enumerable]] + * value to `true`. + * + * @memberOf _.support + * @type boolean + */ + support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); + + /** + * Detect if functions can be decompiled by `Function#toString` + * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). + * + * @memberOf _.support + * @type boolean + */ + support.funcDecomp = !isNative(context.WinRTError) && reThis.test(runInContext); + + /** + * Detect if `Function#name` is supported (all but IE). + * + * @memberOf _.support + * @type boolean + */ + support.funcNames = typeof Function.name == 'string'; + + /** + * Detect if `arguments` object indexes are non-enumerable + * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumArgs = key != 0; + + /** + * Detect if properties shadowing those on `Object.prototype` are non-enumerable. + * + * In IE < 9 an objects own properties, shadowing non-enumerable ones, are + * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumShadows = !/valueOf/.test(props); + + /** + * Detect if own properties are iterated after inherited properties (all but IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.ownLast = props[0] != 'x'; + + /** + * Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. + * + * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` + * and `splice()` functions that fail to remove the last element, `value[0]`, + * of array-like objects even though the `length` property is set to `0`. + * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` + * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. + * + * @memberOf _.support + * @type boolean + */ + support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); + + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index and IE 8 can only access + * characters by index on string literals. + * + * @memberOf _.support + * @type boolean + */ + support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; + + /** + * Detect if a DOM node's [[Class]] is resolvable (all but IE < 9) + * and that the JS engine errors when attempting to coerce an object to + * a string without a `toString` function. + * + * @memberOf _.support + * @type boolean + */ + try { + support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); + } catch(e) { + support.nodeClass = true; + } + }(1)); + + /** + * 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 + */ + lodash.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 + */ + '_': lodash + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The template used to create iterator functions. + * + * @private + * @param {Object} data The data object used to populate the text. + * @returns {string} Returns the interpolated text. + */ + var iteratorTemplate = function(obj) { + + var __p = 'var index, iterable = ' + + (obj.firstArg) + + ', result = ' + + (obj.init) + + ';\nif (!iterable) return result;\n' + + (obj.top) + + ';'; + if (obj.array) { + __p += '\nvar length = iterable.length; index = -1;\nif (' + + (obj.array) + + ') { '; + if (support.unindexedChars) { + __p += '\n if (isString(iterable)) {\n iterable = iterable.split(\'\')\n } '; + } + __p += '\n while (++index < length) {\n ' + + (obj.loop) + + ';\n }\n}\nelse { '; + } else if (support.nonEnumArgs) { + __p += '\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += \'\';\n ' + + (obj.loop) + + ';\n }\n } else { '; + } + + if (support.enumPrototypes) { + __p += '\n var skipProto = typeof iterable == \'function\';\n '; + } + + if (support.enumErrorProps) { + __p += '\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n '; + } + + var conditions = []; if (support.enumPrototypes) { conditions.push('!(skipProto && index == "prototype")'); } if (support.enumErrorProps) { conditions.push('!(skipErrorProps && (index == "message" || index == "name"))'); } + + if (obj.useHas && obj.keys) { + __p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n'; + if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + } else { + __p += '\n for (index in iterable) {\n'; + if (obj.useHas) { conditions.push("hasOwnProperty.call(iterable, index)"); } if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + if (support.nonEnumShadows) { + __p += '\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n '; + for (k = 0; k < 7; k++) { + __p += '\n index = \'' + + (obj.shadowedProps[k]) + + '\';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))'; + if (!obj.useHas) { + __p += ' || (!nonEnum[index] && iterable[index] !== objectProto[index])'; + } + __p += ') {\n ' + + (obj.loop) + + ';\n } '; + } + __p += '\n } '; + } + + } + + if (obj.array || support.nonEnumArgs) { + __p += '\n}'; + } + __p += + (obj.bottom) + + ';\nreturn result'; + + return __p + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.bind` that creates the bound function and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new bound function. + */ + function baseBind(bindData) { + var func = bindData[0], + partialArgs = bindData[2], + thisArg = bindData[4]; + + function bound() { + // `Function#bind` spec + // http://es5.github.io/#x15.3.4.5 + if (partialArgs) { + // avoid `arguments` object deoptimizations by using `slice` instead + // of `Array.prototype.slice.call` and not assigning `arguments` to a + // variable as a ternary expression + var args = slice(partialArgs); + push.apply(args, arguments); + } + // mimic the constructor's `return` behavior + // http://es5.github.io/#x13.2.2 + if (this instanceof bound) { + // ensure `new bound` is an instance of `func` + var thisBinding = baseCreate(func.prototype), + result = func.apply(thisBinding, args || arguments); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisArg, args || arguments); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.clone` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, callback, stackA, stackB) { + if (callback) { + var result = callback(value); + if (typeof result != 'undefined') { + return result; + } + } + // inspect [[Class]] + var isObj = isObject(value); + if (isObj) { + var className = toString.call(value); + if (!cloneableClasses[className] || (!support.nodeClass && isNode(value))) { + return value; + } + var ctor = ctorByClass[className]; + switch (className) { + case boolClass: + case dateClass: + return new ctor(+value); + + case numberClass: + case stringClass: + return new ctor(value); + + case regexpClass: + result = ctor(value.source, reFlags.exec(value)); + result.lastIndex = value.lastIndex; + return result; + } + } else { + return value; + } + var isArr = isArray(value); + if (isDeep) { + // check for circular references and return corresponding clone + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + result = isArr ? ctor(value.length) : {}; + } + else { + result = isArr ? slice(value) : assign({}, value); + } + // add array properties assigned by `RegExp#exec` + if (isArr) { + if (hasOwnProperty.call(value, 'index')) { + result.index = value.index; + } + if (hasOwnProperty.call(value, 'input')) { + result.input = value.input; + } + } + // exit for shallow clone + if (!isDeep) { + return result; + } + // add the source value to the stack of traversed objects + // and associate it with its clone + stackA.push(value); + stackB.push(result); + + // recursively populate clone (susceptible to call stack limits) + (isArr ? baseEach : forOwn)(value, function(objValue, key) { + result[key] = baseClone(objValue, isDeep, callback, stackA, stackB); + }); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + function baseCreate(prototype, properties) { + return isObject(prototype) ? nativeCreate(prototype) : {}; + } + // fallback for browsers without `Object.create` + if (!nativeCreate) { + baseCreate = (function() { + function Object() {} + return function(prototype) { + if (isObject(prototype)) { + Object.prototype = prototype; + var result = new Object; + Object.prototype = null; + } + return result || context.Object(); + }; + }()); + } + + /** + * The base implementation of `_.createCallback` without support for creating + * "_.pluck" or "_.where" style callbacks. + * + * @private + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + */ + function baseCreateCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + // exit early for no `thisArg` or already bound by `Function#bind` + if (typeof thisArg == 'undefined' || !('prototype' in func)) { + return func; + } + var bindData = func.__bindData__; + if (typeof bindData == 'undefined') { + if (support.funcNames) { + bindData = !func.name; + } + bindData = bindData || !support.funcDecomp; + if (!bindData) { + var source = fnToString.call(func); + if (!support.funcNames) { + bindData = !reFuncName.test(source); + } + if (!bindData) { + // checks if `func` references the `this` keyword and stores the result + bindData = reThis.test(source); + setBindData(func, bindData); + } + } + } + // exit early if there are no `this` references or `func` is bound + if (bindData === false || (bindData !== true && bindData[1] & 1)) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 2: return function(a, b) { + return func.call(thisArg, a, b); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + } + return bind(func, thisArg); + } + + /** + * The base implementation of `createWrapper` that creates the wrapper and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new function. + */ + function baseCreateWrapper(bindData) { + var func = bindData[0], + bitmask = bindData[1], + partialArgs = bindData[2], + partialRightArgs = bindData[3], + thisArg = bindData[4], + arity = bindData[5]; + + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + key = func; + + function bound() { + var thisBinding = isBind ? thisArg : this; + if (partialArgs) { + var args = slice(partialArgs); + push.apply(args, arguments); + } + if (partialRightArgs || isCurry) { + args || (args = slice(arguments)); + if (partialRightArgs) { + push.apply(args, partialRightArgs); + } + if (isCurry && args.length < arity) { + bitmask |= 16 & ~32; + return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]); + } + } + args || (args = arguments); + if (isBindKey) { + func = thisBinding[key]; + } + if (this instanceof bound) { + thisBinding = baseCreate(func.prototype); + var result = func.apply(thisBinding, args); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisBinding, args); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.difference` that accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to process. + * @param {Array} [values] The array of values to exclude. + * @returns {Array} Returns a new array of filtered values. + */ + function baseDifference(array, values) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + isLarge = length >= largeArraySize && indexOf === baseIndexOf, + result = []; + + if (isLarge) { + var cache = createCache(values); + if (cache) { + indexOf = cacheIndexOf; + values = cache; + } else { + isLarge = false; + } + } + while (++index < length) { + var value = array[index]; + if (indexOf(values, value) < 0) { + result.push(value); + } + } + if (isLarge) { + releaseObject(values); + } + return result; + } + + /** + * The base implementation of `_.flatten` without support for callback + * shorthands or `thisArg` binding. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isStrict=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {Array} Returns a new flattened array. + */ + function baseFlatten(array, isShallow, isStrict, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (value && typeof value == 'object' && typeof value.length == 'number' + && (isArray(value) || isArguments(value))) { + // recursively flatten arrays (susceptible to call stack limits) + if (!isShallow) { + value = baseFlatten(value, isShallow, isStrict); + } + var valIndex = -1, + valLength = value.length, + resIndex = result.length; + + result.length += valLength; + while (++valIndex < valLength) { + result[resIndex++] = value[valIndex]; + } + } else if (!isStrict) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.isEqual`, without support for `thisArg` binding, + * that allows partial "_.where" style comparisons. + * + * @private + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `a` objects. + * @param {Array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { + // used to indicate that when comparing objects, `a` has at least the properties of `b` + if (callback) { + var result = callback(a, b); + if (typeof result != 'undefined') { + return !!result; + } + } + // exit early for identical values + if (a === b) { + // treat `+0` vs. `-0` as not equal + return a !== 0 || (1 / a == 1 / b); + } + var type = typeof a, + otherType = typeof b; + + // exit early for unlike primitive values + if (a === a && + !(a && objectTypes[type]) && + !(b && objectTypes[otherType])) { + return false; + } + // exit early for `null` and `undefined` avoiding ES3's Function#call behavior + // http://es5.github.io/#x15.3.4.4 + if (a == null || b == null) { + return a === b; + } + // compare [[Class]] names + var className = toString.call(a), + otherClass = toString.call(b); + + if (className == argsClass) { + className = objectClass; + } + if (otherClass == argsClass) { + otherClass = objectClass; + } + if (className != otherClass) { + return false; + } + switch (className) { + case boolClass: + case dateClass: + // coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal + return +a == +b; + + case numberClass: + // treat `NaN` vs. `NaN` as equal + return (a != +a) + ? b != +b + // but treat `+0` vs. `-0` as not equal + : (a == 0 ? (1 / a == 1 / b) : a == +b); + + case regexpClass: + case stringClass: + // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) + // treat string primitives and their corresponding object instances as equal + return a == String(b); + } + var isArr = className == arrayClass; + if (!isArr) { + // unwrap any `lodash` wrapped values + var aWrapped = hasOwnProperty.call(a, '__wrapped__'), + bWrapped = hasOwnProperty.call(b, '__wrapped__'); + + if (aWrapped || bWrapped) { + return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB); + } + // exit for functions and DOM nodes + if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) { + return false; + } + // in older versions of Opera, `arguments` objects have `Array` constructors + var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor, + ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor; + + // non `Object` object instances with different constructors are not equal + if (ctorA != ctorB && + !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && + ('constructor' in a && 'constructor' in b) + ) { + return false; + } + } + // assume cyclic structures are equal + // the algorithm for detecting cyclic structures is adapted from ES 5.1 + // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == a) { + return stackB[length] == b; + } + } + var size = 0; + result = true; + + // add `a` and `b` to the stack of traversed objects + stackA.push(a); + stackB.push(b); + + // recursively compare objects and arrays (susceptible to call stack limits) + if (isArr) { + // compare lengths to determine if a deep comparison is necessary + length = a.length; + size = b.length; + result = size == length; + + if (result || isWhere) { + // deep compare the contents, ignoring non-numeric properties + while (size--) { + var index = length, + value = b[size]; + + if (isWhere) { + while (index--) { + if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } + } + else { + // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` + // which, in this case, is more costly + forIn(b, function(value, key, b) { + if (hasOwnProperty.call(b, key)) { + // count the number of properties. + size++; + // deep compare each property value. + return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB)); + } + }); + + if (result && !isWhere) { + // ensure both objects have the same number of properties + forIn(a, function(value, key, a) { + if (hasOwnProperty.call(a, key)) { + // `size` will be `-1` if `a` has more properties than `b` + return (result = --size > -1); + } + }); + } + } + stackA.pop(); + stackB.pop(); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.merge` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [callback] The function to customize merging properties. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + */ + function baseMerge(object, source, callback, stackA, stackB) { + (isArray(source) ? forEach : forOwn)(source, function(source, key) { + var found, + isArr, + result = source, + value = object[key]; + + if (source && ((isArr = isArray(source)) || isPlainObject(source))) { + // avoid merging previously merged cyclic sources + var stackLength = stackA.length; + while (stackLength--) { + if ((found = stackA[stackLength] == source)) { + value = stackB[stackLength]; + break; + } + } + if (!found) { + var isShallow; + if (callback) { + result = callback(value, source); + if ((isShallow = typeof result != 'undefined')) { + value = result; + } + } + if (!isShallow) { + value = isArr + ? (isArray(value) ? value : []) + : (isPlainObject(value) ? value : {}); + } + // add `source` and associated `value` to the stack of traversed objects + stackA.push(source); + stackB.push(value); + + // recursively merge objects and arrays (susceptible to call stack limits) + if (!isShallow) { + baseMerge(value, source, callback, stackA, stackB); + } + } + } + else { + if (callback) { + result = callback(value, source); + if (typeof result == 'undefined') { + result = source; + } + } + if (typeof result != 'undefined') { + value = result; + } + } + object[key] = value; + }); + } + + /** + * The base implementation of `_.random` without argument juggling or support + * for returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns a random number. + */ + function baseRandom(min, max) { + return min + floor(nativeRandom() * (max - min + 1)); + } + + /** + * The base implementation of `_.uniq` without support for callback shorthands + * or `thisArg` binding. + * + * @private + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. + */ + function baseUniq(array, isSorted, callback) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + result = []; + + var isLarge = !isSorted && length >= largeArraySize && indexOf === baseIndexOf, + seen = (callback || isLarge) ? getArray() : result; + + if (isLarge) { + var cache = createCache(seen); + indexOf = cacheIndexOf; + seen = cache; + } + while (++index < length) { + var value = array[index], + computed = callback ? callback(value, index, array) : value; + + if (isSorted + ? !index || seen[seen.length - 1] !== computed + : indexOf(seen, computed) < 0 + ) { + if (callback || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + if (isLarge) { + releaseArray(seen.array); + releaseObject(seen); + } else if (callback) { + releaseArray(seen); + } + return result; + } + + /** + * Creates a function that aggregates a collection, creating an object composed + * of keys generated from the results of running each element of the collection + * through a callback. The given `setter` function sets the keys and values + * of the composed object. + * + * @private + * @param {Function} setter The setter function. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter) { + return function(collection, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, callback(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, callback(value, key, collection), collection); + }); + } + return result; + }; + } + + /** + * Creates a function that, when called, either curries or invokes `func` + * with an optional `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` + * 8 - `_.curry` (bound) + * 16 - `_.partial` + * 32 - `_.partialRight` + * @param {Array} [partialArgs] An array of arguments to prepend to those + * provided to the new function. + * @param {Array} [partialRightArgs] An array of arguments to append to those + * provided to the new function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new function. + */ + function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + isPartial = bitmask & 16, + isPartialRight = bitmask & 32; + + if (!isBindKey && !isFunction(func)) { + throw new TypeError; + } + if (isPartial && !partialArgs.length) { + bitmask &= ~16; + isPartial = partialArgs = false; + } + if (isPartialRight && !partialRightArgs.length) { + bitmask &= ~32; + isPartialRight = partialRightArgs = false; + } + var bindData = func && func.__bindData__; + if (bindData && bindData !== true) { + // clone `bindData` + bindData = slice(bindData); + if (bindData[2]) { + bindData[2] = slice(bindData[2]); + } + if (bindData[3]) { + bindData[3] = slice(bindData[3]); + } + // set `thisBinding` is not previously bound + if (isBind && !(bindData[1] & 1)) { + bindData[4] = thisArg; + } + // set if previously bound but not currently (subsequent curried functions) + if (!isBind && bindData[1] & 1) { + bitmask |= 8; + } + // set curried arity if not yet set + if (isCurry && !(bindData[1] & 4)) { + bindData[5] = arity; + } + // append partial left arguments + if (isPartial) { + push.apply(bindData[2] || (bindData[2] = []), partialArgs); + } + // append partial right arguments + if (isPartialRight) { + unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs); + } + // merge flags + bindData[1] |= bitmask; + return createWrapper.apply(null, bindData); + } + // fast path for `_.bind` + var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper; + return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]); + } + + /** + * Creates compiled iteration functions. + * + * @private + * @param {...Object} [options] The compile options object(s). + * @param {string} [options.array] Code to determine if the iterable is an array or array-like. + * @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop. + * @param {Function} [options.keys] A reference to `_.keys` for use in own property iteration. + * @param {string} [options.args] A comma separated string of iteration function arguments. + * @param {string} [options.top] Code to execute before the iteration branches. + * @param {string} [options.loop] Code to execute in the object loop. + * @param {string} [options.bottom] Code to execute after the iteration branches. + * @returns {Function} Returns the compiled function. + */ + function createIterator() { + // data properties + iteratorData.shadowedProps = shadowedProps; + + // iterator options + iteratorData.array = iteratorData.bottom = iteratorData.loop = iteratorData.top = ''; + iteratorData.init = 'iterable'; + iteratorData.useHas = true; + + // merge options into a template data object + for (var object, index = 0; object = arguments[index]; index++) { + for (var key in object) { + iteratorData[key] = object[key]; + } + } + var args = iteratorData.args; + iteratorData.firstArg = /^[^,]+/.exec(args)[0]; + + // create the function factory + var factory = Function( + 'baseCreateCallback, errorClass, errorProto, hasOwnProperty, ' + + 'indicatorObject, isArguments, isArray, isString, keys, objectProto, ' + + 'objectTypes, nonEnumProps, stringClass, stringProto, toString', + 'return function(' + args + ') {\n' + iteratorTemplate(iteratorData) + '\n}' + ); + + // return the compiled function + return factory( + baseCreateCallback, errorClass, errorProto, hasOwnProperty, + indicatorObject, isArguments, isArray, isString, iteratorData.keys, objectProto, + objectTypes, nonEnumProps, stringClass, stringProto, toString + ); + } + + /** + * 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]; + } + + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized, this method returns the custom method, otherwise it returns + * the `baseIndexOf` function. + * + * @private + * @returns {Function} Returns the "indexOf" function. + */ + function getIndexOf() { + var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result; + return result; + } + + /** + * 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); + } + + /** + * Sets `this` binding data on a given function. + * + * @private + * @param {Function} func The function to set data on. + * @param {Array} value The data array to set. + */ + var setBindData = !defineProperty ? noop : function(func, value) { + descriptor.value = value; + defineProperty(func, '__bindData__', descriptor); + }; + + /** + * A fallback implementation of `isPlainObject` which checks if a given value + * is an object created by the `Object` constructor, assuming objects created + * by the `Object` constructor have no inherited enumerable properties and that + * there are no `Object.prototype` extensions. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + */ + function shimIsPlainObject(value) { + var ctor, + result; + + // avoid non Object objects, `arguments` objects, and DOM elements + if (!(value && toString.call(value) == objectClass) || + (ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor)) || + (!support.argsClass && isArguments(value)) || + (!support.nodeClass && isNode(value))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + if (support.ownLast) { + forIn(value, function(value, key, object) { + result = hasOwnProperty.call(object, key); + return false; + }); + return result !== false; + } + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + forIn(value, function(value, key) { + result = key; + }); + return typeof result == 'undefined' || hasOwnProperty.call(value, result); + } + + /** + * Used by `unescape` to convert HTML entities to characters. + * + * @private + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + function unescapeHtmlChar(match) { + return htmlUnescapes[match]; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Checks if `value` is an `arguments` object. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @example + * + * (function() { return _.isArguments(arguments); })(1, 2, 3); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == argsClass || false; + } + // fallback for browsers that can't detect `arguments` objects by [[Class]] + if (!support.argsClass) { + isArguments = function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee') || false; + }; + } + + /** + * Checks if `value` is an array. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. + * @example + * + * (function() { return _.isArray(arguments); })(); + * // => false + * + * _.isArray([1, 2, 3]); + * // => true + */ + var isArray = nativeIsArray || function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == arrayClass || false; + }; + + /** + * 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 = createIterator({ + 'args': 'object', + 'init': '[]', + 'top': 'if (!(objectTypes[typeof object])) return result', + 'loop': 'result.push(index)' + }); + + /** + * 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 []; + } + if ((support.enumPrototypes && typeof object == 'function') || + (support.nonEnumArgs && object.length && isArguments(object))) { + return shimKeys(object); + } + return nativeKeys(object); + }; + + /** Reusable iterator options shared by `each`, `forIn`, and `forOwn` */ + var eachIteratorOptions = { + 'args': 'collection, callback, thisArg', + 'top': "callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)", + 'array': "typeof length == 'number'", + 'keys': keys, + 'loop': 'if (callback(iterable[index], index, collection) === false) return result' + }; + + /** Reusable iterator options for `assign` and `defaults` */ + var defaultsIteratorOptions = { + 'args': 'object, source, guard', + 'top': + 'var args = arguments,\n' + + ' argsIndex = 0,\n' + + " argsLength = typeof guard == 'number' ? 2 : args.length;\n" + + 'while (++argsIndex < argsLength) {\n' + + ' iterable = args[argsIndex];\n' + + ' if (iterable && objectTypes[typeof iterable]) {', + 'keys': keys, + 'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]", + 'bottom': ' }\n}' + }; + + /** Reusable iterator options for `forIn` and `forOwn` */ + var forOwnIteratorOptions = { + 'top': 'if (!objectTypes[typeof iterable]) return result;\n' + eachIteratorOptions.top, + 'array': false + }; + + /** + * 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 = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to convert HTML entities to characters */ + var htmlUnescapes = invert(htmlEscapes); + + /** Used to match HTML entities and HTML characters */ + var reEscapedHtml = RegExp('(' + keys(htmlUnescapes).join('|') + ')', 'g'), + reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); + + /** + * A function compiled to iterate `arguments` objects, arrays, objects, and + * strings consistenly across environments, executing the callback for each + * element in the collection. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index|key, collection). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @private + * @type Function + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEach = createIterator(eachIteratorOptions); + + /*--------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources will overwrite property assignments of previous + * sources. If a callback is provided it will be executed to produce the + * assigned values. The callback is bound to `thisArg` and invoked with two + * arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @type Function + * @alias extend + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * _.assign({ 'name': 'fred' }, { 'employer': 'slate' }); + * // => { 'name': 'fred', 'employer': 'slate' } + * + * var defaults = _.partialRight(_.assign, function(a, b) { + * return typeof a == 'undefined' ? b : a; + * }); + * + * var object = { 'name': 'barney' }; + * defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ + var assign = createIterator(defaultsIteratorOptions, { + 'top': + defaultsIteratorOptions.top.replace(';', + ';\n' + + "if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n" + + ' var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n' + + "} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n" + + ' callback = args[--argsLength];\n' + + '}' + ), + 'loop': 'result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]' + }); + + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects will also + * be cloned, otherwise they will be assigned by reference. If a callback + * is provided it will be executed to produce the cloned values. If the + * callback returns `undefined` cloning will be handled by the method instead. + * The callback is bound to `thisArg` and invoked with one argument; (value). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var shallow = _.clone(characters); + * shallow[0] === characters[0]; + * // => true + * + * var deep = _.clone(characters, true); + * deep[0] === characters[0]; + * // => false + * + * _.mixin({ + * 'clone': _.partialRight(_.clone, function(value) { + * return _.isElement(value) ? value.cloneNode(false) : undefined; + * }) + * }); + * + * var clone = _.clone(document.body); + * clone.childNodes.length; + * // => 0 + */ + function clone(value, isDeep, callback, thisArg) { + // allows working with "Collections" methods without using their `index` + // and `collection` arguments for `isDeep` and `callback` + if (typeof isDeep != 'boolean' && isDeep != null) { + thisArg = callback; + callback = isDeep; + isDeep = false; + } + return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates a deep clone of `value`. If a callback is provided it will be + * executed to produce the cloned values. If the callback returns `undefined` + * cloning will be handled by the method instead. The callback is bound to + * `thisArg` and invoked with one argument; (value). + * + * Note: This method is loosely based on the structured clone algorithm. Functions + * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and + * objects created by constructors other than `Object` are cloned to plain `Object` objects. + * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var deep = _.cloneDeep(characters); + * deep[0] === characters[0]; + * // => false + * + * var view = { + * 'label': 'docs', + * 'node': element + * }; + * + * var clone = _.cloneDeep(view, function(value) { + * return _.isElement(value) ? value.cloneNode(true) : undefined; + * }); + * + * clone.node == view.node; + * // => false + */ + function cloneDeep(value, callback, thisArg) { + return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { 'constructor': Circle }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties ? assign(result, properties) : result; + } + + /** + * 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 = createIterator(defaultsIteratorOptions); + + /** + * This method is like `_.findIndex` except that it returns the key of the + * first element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': false }, + * 'fred': { 'age': 40, 'blocked': true }, + * 'pebbles': { 'age': 1, 'blocked': false } + * }; + * + * _.findKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (property order is not guaranteed across environments) + * + * // using "_.where" callback shorthand + * _.findKey(characters, { 'age': 1 }); + * // => 'pebbles' + * + * // using "_.pluck" callback shorthand + * _.findKey(characters, 'blocked'); + * // => 'fred' + */ + function findKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwn(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * This method is like `_.findKey` except that it iterates over elements + * of a `collection` in the opposite order. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': true }, + * 'fred': { 'age': 40, 'blocked': false }, + * 'pebbles': { 'age': 1, 'blocked': true } + * }; + * + * _.findLastKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles`, assuming `_.findKey` returns `barney` + * + * // using "_.where" callback shorthand + * _.findLastKey(characters, { 'age': 40 }); + * // => 'fred' + * + * // using "_.pluck" callback shorthand + * _.findLastKey(characters, 'blocked'); + * // => 'pebbles' + */ + function findLastKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwnRight(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * Iterates over own and inherited enumerable properties of an object, + * executing the callback for each property. The callback is bound to `thisArg` + * and invoked with three arguments; (value, key, object). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forIn(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) + */ + var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, { + 'useHas': false + }); + + /** + * This method is like `_.forIn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forInRight(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'move', 'y', and 'x' assuming `_.forIn ` logs 'x', 'y', and 'move' + */ + function forInRight(object, callback, thisArg) { + var pairs = []; + + forIn(object, function(value, key) { + pairs.push(key, value); + }); + + var length = pairs.length; + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + if (callback(pairs[length--], pairs[length], object) === false) { + break; + } + } + return object; + } + + /** + * Iterates over own enumerable properties of an object, executing the callback + * for each property. The callback is bound to `thisArg` and invoked with three + * arguments; (value, key, object). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs '0', '1', and 'length' (property order is not guaranteed across environments) + */ + var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions); + + /** + * This method is like `_.forOwn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs 'length', '1', and '0' assuming `_.forOwn` logs '0', '1', and 'length' + */ + function forOwnRight(object, callback, thisArg) { + var props = keys(object), + length = props.length; + + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + var key = props[length]; + if (callback(object[key], key, object) === false) { + break; + } + } + return object; + } + + /** + * Creates a sorted array of property names of all enumerable properties, + * own and inherited, of `object` that have function values. + * + * @static + * @memberOf _ + * @alias methods + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names that have function values. + * @example + * + * _.functions(_); + * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] + */ + function functions(object) { + var result = []; + forIn(object, function(value, key) { + if (isFunction(value)) { + result.push(key); + } + }); + return result.sort(); + } + + /** + * Checks if the specified property name exists as a direct property of `object`, + * instead of an inherited property. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to check. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. + * @example + * + * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + * // => true + */ + function has(object, key) { + return object ? hasOwnProperty.call(object, key) : false; + } + + /** + * Creates an object composed of the inverted keys and values of the given object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to invert. + * @returns {Object} Returns the created inverted object. + * @example + * + * _.invert({ 'first': 'fred', 'second': 'barney' }); + * // => { 'fred': 'first', 'barney': 'second' } + */ + function invert(object) { + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + result[object[key]] = key; + } + return result; + } + + /** + * Checks if `value` is a boolean value. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @example + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + value && typeof value == 'object' && toString.call(value) == boolClass || false; + } + + /** + * Checks if `value` is a date. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + */ + function isDate(value) { + return value && typeof value == 'object' && toString.call(value) == dateClass || false; + } + + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + */ + function isElement(value) { + return value && value.nodeType === 1 || false; + } + + /** + * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a + * length of `0` and objects with no own enumerable properties are considered + * "empty". + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. + * @example + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({}); + * // => true + * + * _.isEmpty(''); + * // => true + */ + function isEmpty(value) { + var result = true; + if (!value) { + return result; + } + var className = toString.call(value), + length = value.length; + + if ((className == arrayClass || className == stringClass || + (support.argsClass ? className == argsClass : isArguments(value))) || + (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { + return !length; + } + forOwn(value, function() { + return (result = false); + }); + return result; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent to each other. If a callback is provided it will be executed + * to compare values. If the callback returns `undefined` comparisons will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (a, b). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'name': 'fred' }; + * var copy = { 'name': 'fred' }; + * + * object == copy; + * // => false + * + * _.isEqual(object, copy); + * // => true + * + * var words = ['hello', 'goodbye']; + * var otherWords = ['hi', 'goodbye']; + * + * _.isEqual(words, otherWords, function(a, b) { + * var reGreet = /^(?:hello|hi)$/i, + * aGreet = _.isString(a) && reGreet.test(a), + * bGreet = _.isString(b) && reGreet.test(b); + * + * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; + * }); + * // => true + */ + function isEqual(a, b, callback, thisArg) { + return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2)); + } + + /** + * Checks if `value` is, or can be coerced to, a finite number. + * + * Note: This is not the same as native `isFinite` which will return true for + * booleans and empty strings. See http://es5.github.io/#x15.1.2.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. + * @example + * + * _.isFinite(-101); + * // => true + * + * _.isFinite('10'); + * // => true + * + * _.isFinite(true); + * // => false + * + * _.isFinite(''); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + function isFinite(value) { + return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); + } + + /** + * Checks if `value` is a function. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + */ + function isFunction(value) { + return typeof value == 'function'; + } + // fallback for older versions of Chrome and Safari + if (isFunction(/x/)) { + isFunction = function(value) { + return typeof value == 'function' && toString.call(value) == funcClass; + }; + } + + /** + * 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]); + } + + /** + * Checks if `value` is `NaN`. + * + * Note: This is not the same as native `isNaN` which will return `true` for + * `undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // `NaN` as a primitive is the only value that is not equal to itself + // (perform the [[Class]] check first to avoid errors with some host objects in IE) + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(undefined); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is a number. + * + * Note: `NaN` is considered a number. See http://es5.github.io/#x8.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. + * @example + * + * _.isNumber(8.4 * 5); + * // => true + */ + function isNumber(value) { + return typeof value == 'number' || + value && typeof value == 'object' && toString.call(value) == numberClass || false; + } + + /** + * Checks if `value` is an object created by the `Object` constructor. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * _.isPlainObject(new Shape); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + */ + var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { + if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) { + return false; + } + var valueOf = value.valueOf, + objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); + + return objProto + ? (value == objProto || getPrototypeOf(value) == objProto) + : shimIsPlainObject(value); + }; + + /** + * Checks if `value` is a regular expression. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @example + * + * _.isRegExp(/fred/); + * // => true + */ + function isRegExp(value) { + return value && objectTypes[typeof value] && toString.call(value) == regexpClass || false; + } + + /** + * Checks if `value` is a string. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. + * @example + * + * _.isString('fred'); + * // => true + */ + function isString(value) { + return typeof value == 'string' || + value && typeof value == 'object' && toString.call(value) == stringClass || false; + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + */ + function isUndefined(value) { + return typeof value == 'undefined'; + } + + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new object with values of the results of each `callback` execution. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + * + * var characters = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // using "_.pluck" callback shorthand + * _.mapValues(characters, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } + */ + function mapValues(object, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + forOwn(object, function(value, key, object) { + result[key] = callback(value, key, object); + }); + return result; + } + + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * will overwrite property assignments of previous sources. If a callback is + * provided it will be executed to produce the merged values of the destination + * and source properties. If the callback returns `undefined` merging will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * var names = { + * 'characters': [ + * { 'name': 'barney' }, + * { 'name': 'fred' } + * ] + * }; + * + * var ages = { + * 'characters': [ + * { 'age': 36 }, + * { 'age': 40 } + * ] + * }; + * + * _.merge(names, ages); + * // => { 'characters': [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] } + * + * var food = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var otherFood = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(food, otherFood, function(a, b) { + * return _.isArray(a) ? a.concat(b) : undefined; + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } + */ + function merge(object) { + var args = arguments, + length = 2; + + if (!isObject(object)) { + return object; + } + // allows working with `_.reduce` and `_.reduceRight` without using + // their `index` and `collection` arguments + if (typeof args[2] != 'number') { + length = args.length; + } + if (length > 3 && typeof args[length - 2] == 'function') { + var callback = baseCreateCallback(args[--length - 1], args[length--], 2); + } else if (length > 2 && typeof args[length - 1] == 'function') { + callback = args[--length]; + } + var sources = slice(arguments, 1, length), + index = -1, + stackA = getArray(), + stackB = getArray(); + + while (++index < length) { + baseMerge(object, sources[index], callback, stackA, stackB); + } + releaseArray(stackA); + releaseArray(stackB); + return object; + } + + /** + * Creates a shallow clone of `object` excluding the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` omitting the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object without the omitted properties. + * @example + * + * _.omit({ 'name': 'fred', 'age': 40 }, 'age'); + * // => { 'name': 'fred' } + * + * _.omit({ 'name': 'fred', 'age': 40 }, function(value) { + * return typeof value == 'number'; + * }); + * // => { 'name': 'fred' } + */ + function omit(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var props = []; + forIn(object, function(value, key) { + props.push(key); + }); + props = baseDifference(props, baseFlatten(arguments, true, false, 1)); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + result[key] = object[key]; + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (!callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * Creates a two dimensional array of an object's key-value pairs, + * i.e. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments) + */ + function pairs(object) { + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; + } + + /** + * Creates a shallow clone of `object` composed of the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` picking the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object composed of the picked properties. + * @example + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, 'name'); + * // => { 'name': 'fred' } + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) { + * return key.charAt(0) != '_'; + * }); + * // => { 'name': 'fred' } + */ + function pick(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var index = -1, + props = baseFlatten(arguments, true, false, 1), + length = isObject(object) ? props.length : 0; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * An alternative to `_.reduce` this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable properties through a callback, with each callback execution + * potentially mutating the `accumulator` object. The callback is bound to + * `thisArg` and invoked with four arguments; (accumulator, value, key, object). + * Callbacks may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { + * num *= num; + * if (num % 2) { + * return result.push(num) < 3; + * } + * }); + * // => [1, 9, 25] + * + * var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function transform(object, callback, accumulator, thisArg) { + var isArr = isArray(object); + if (accumulator == null) { + if (isArr) { + accumulator = []; + } else { + var ctor = object && object.constructor, + proto = ctor && ctor.prototype; + + accumulator = baseCreate(proto); + } + } + if (callback) { + callback = lodash.createCallback(callback, thisArg, 4); + (isArr ? baseEach : forOwn)(object, function(value, index, object) { + return callback(accumulator, value, index, object); + }); + } + return accumulator; + } + + /** + * 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; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array of elements from the specified indexes, or keys, of the + * `collection`. Indexes may be specified as individual arguments or as arrays + * of indexes. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` + * to retrieve, specified as individual indexes or arrays of indexes. + * @returns {Array} Returns a new array of elements corresponding to the + * provided indexes. + * @example + * + * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); + * // => ['a', 'c', 'e'] + * + * _.at(['fred', 'barney', 'pebbles'], 0, 2); + * // => ['fred', 'pebbles'] + */ + function at(collection) { + var args = arguments, + index = -1, + props = baseFlatten(args, true, false, 1), + length = (args[2] && args[2][args[1]] === collection) ? 1 : props.length, + result = Array(length); + + if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + while(++index < length) { + result[index] = collection[props[index]]; + } + return result; + } + + /** + * Checks if a given value is present in a collection using strict equality + * for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the + * offset from the end of the collection. + * + * @static + * @memberOf _ + * @alias include + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. + * @example + * + * _.contains([1, 2, 3], 1); + * // => true + * + * _.contains([1, 2, 3], 1, 2); + * // => false + * + * _.contains({ 'name': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.contains('pebbles', 'eb'); + * // => true + */ + function contains(collection, target, fromIndex) { + var index = -1, + indexOf = getIndexOf(), + length = collection ? collection.length : 0, + result = false; + + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; + if (isArray(collection)) { + result = indexOf(collection, target, fromIndex) > -1; + } else if (typeof length == 'number') { + result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1; + } else { + baseEach(collection, function(value) { + if (++index >= fromIndex) { + return !(result = value === target); + } + }); + } + return result; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through the callback. The corresponding value + * of each key is the number of times the key was returned by the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1); + }); + + /** + * Checks if the given callback returns truey value for **all** elements of + * a collection. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes']); + * // => false + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.every(characters, 'age'); + * // => true + * + * // using "_.where" callback shorthand + * _.every(characters, { 'age': 36 }); + * // => false + */ + function every(collection, callback, thisArg) { + var result = true; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (!(result = !!callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return (result = !!callback(value, index, collection)); + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning an array of all elements + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that passed the callback check. + * @example + * + * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [2, 4, 6] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.filter(characters, 'blocked'); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + * + * // using "_.where" callback shorthand + * _.filter(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + */ + function filter(collection, callback, thisArg) { + var result = []; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + result.push(value); + } + } + } else { + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result.push(value); + } + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning the first element that + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias detect, findWhere + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.find(characters, function(chr) { + * return chr.age < 40; + * }); + * // => { 'name': 'barney', 'age': 36, 'blocked': false } + * + * // using "_.where" callback shorthand + * _.find(characters, { 'age': 1 }); + * // => { 'name': 'pebbles', 'age': 1, 'blocked': false } + * + * // using "_.pluck" callback shorthand + * _.find(characters, 'blocked'); + * // => { 'name': 'fred', 'age': 40, 'blocked': true } + */ + function find(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + return value; + } + } + } else { + var result; + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + } + + /** + * This method is like `_.find` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(num) { + * return num % 2 == 1; + * }); + * // => 3 + */ + function findLast(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forEachRight(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + + /** + * Iterates over elements of a collection, executing the callback for each + * element. The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * Note: As with other "Collections" methods, objects with a `length` property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); + * // => logs each number and returns '1,2,3' + * + * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); }); + * // => logs each number and returns the object (property order is not guaranteed across environments) + */ + function forEach(collection, callback, thisArg) { + if (callback && typeof thisArg == 'undefined' && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (callback(collection[index], index, collection) === false) { + break; + } + } + } else { + baseEach(collection, callback, thisArg); + } + return collection; + } + + /** + * This method is like `_.forEach` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); + * // => logs each number from right to left and returns '3,2,1' + */ + function forEachRight(collection, callback, thisArg) { + var iterable = collection, + length = collection ? collection.length : 0; + + callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (length--) { + if (callback(collection[length], length, collection) === false) { + break; + } + } + } else { + if (typeof length != 'number') { + var props = keys(collection); + length = props.length; + } else if (support.unindexedChars && isString(collection)) { + iterable = collection.split(''); + } + baseEach(collection, function(value, key, collection) { + key = props ? props[--length] : --length; + return callback(iterable[key], key, collection); + }); + } + return collection; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of a collection through the callback. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false` + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using "_.pluck" callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value); + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of the collection through the given callback. The corresponding + * value of each key is the last element responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keys = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keys, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keys, function(key) { return String.fromCharCode(key.code); }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + + /** + * Invokes the method named by `methodName` on each element in the `collection` + * returning an array of the results of each invoked method. Additional arguments + * will be provided to each invoked method. If `methodName` is a function it + * will be invoked for, and `this` bound to, each element in the `collection`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|string} methodName The name of the method to invoke or + * the function invoked per iteration. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {Array} Returns a new array of the results of each invoked method. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + function invoke(collection, methodName) { + var args = slice(arguments, 2), + index = -1, + isFunc = typeof methodName == 'function', + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args); + }); + return result; + } + + /** + * Creates an array of values by running each element in the collection + * through the callback. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias collect + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of the results of each `callback` execution. + * @example + * + * _.map([1, 2, 3], function(num) { return num * 3; }); + * // => [3, 6, 9] + * + * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); + * // => [3, 6, 9] (property order is not guaranteed across environments) + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(characters, 'name'); + * // => ['barney', 'fred'] + */ + function map(collection, callback, thisArg) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + callback = lodash.createCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (++index < length) { + result[index] = callback(collection[index], index, collection); + } + } else { + baseEach(collection, function(value, key, collection) { + result[++index] = callback(value, key, collection); + }); + } + return result; + } + + /** + * Retrieves the maximum value of a collection. If the collection is empty or + * falsey `-Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.max(characters, function(chr) { return chr.age; }); + * // => { 'name': 'fred', 'age': 40 }; + * + * // using "_.pluck" callback shorthand + * _.max(characters, 'age'); + * // => { 'name': 'fred', 'age': 40 }; + */ + function max(collection, callback, thisArg) { + var computed = -Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value > result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current > computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the minimum value of a collection. If the collection is empty or + * falsey `Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.min(characters, function(chr) { return chr.age; }); + * // => { 'name': 'barney', 'age': 36 }; + * + * // using "_.pluck" callback shorthand + * _.min(characters, 'age'); + * // => { 'name': 'barney', 'age': 36 }; + */ + function min(collection, callback, thisArg) { + var computed = Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value < result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current < computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the value of a specified property from all elements in the collection. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {string} property The name of the property to pluck. + * @returns {Array} Returns a new array of property values. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.pluck(characters, 'name'); + * // => ['barney', 'fred'] + */ + var pluck = map; + + /** + * Reduces a collection to a value which is the accumulated result of running + * each element in the collection through the callback, where each successive + * callback execution consumes the return value of the previous execution. If + * `accumulator` is not provided the first element of the collection will be + * used as the initial `accumulator` value. The callback is bound to `thisArg` + * and invoked with four arguments; (accumulator, value, index|key, collection). + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var sum = _.reduce([1, 2, 3], function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function reduce(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + if (noaccum) { + accumulator = collection[++index]; + } + while (++index < length) { + accumulator = callback(accumulator, collection[index], index, collection); + } + } else { + baseEach(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection) + }); + } + return accumulator; + } + + /** + * This method is like `_.reduce` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var list = [[0, 1], [2, 3], [4, 5]]; + * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + forEachRight(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The opposite of `_.filter` this method returns the elements of a + * collection that the callback does **not** return truey for. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that failed the callback check. + * @example + * + * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [1, 3, 5] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.reject(characters, 'blocked'); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + * + * // using "_.where" callback shorthand + * _.reject(characters, { 'age': 36 }); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + */ + function reject(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + return filter(collection, function(value, index, collection) { + return !callback(value, index, collection); + }); + } + + /** + * Retrieves a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Allows working with functions like `_.map` + * without using their `index` arguments as `n`. + * @returns {Array} Returns the random sample(s) of `collection`. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + function sample(collection, n, guard) { + if (collection && typeof collection.length != 'number') { + collection = values(collection); + } else if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + if (n == null || guard) { + return collection ? collection[baseRandom(0, collection.length - 1)] : undefined; + } + var result = shuffle(collection); + result.length = nativeMin(nativeMax(0, n), result.length); + return result; + } + + /** + * Creates an array of shuffled values, using a version of the Fisher-Yates + * shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns a new shuffled collection. + * @example + * + * _.shuffle([1, 2, 3, 4, 5, 6]); + * // => [4, 1, 6, 3, 5, 2] + */ + function shuffle(collection) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + var rand = baseRandom(0, ++index); + result[index] = result[rand]; + result[rand] = value; + }); + return result; + } + + /** + * Gets the size of the `collection` by returning `collection.length` for arrays + * and array-like objects or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. + * @example + * + * _.size([1, 2]); + * // => 2 + * + * _.size({ 'one': 1, 'two': 2, 'three': 3 }); + * // => 3 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + var length = collection ? collection.length : 0; + return typeof length == 'number' ? length : keys(collection).length; + } + + /** + * Checks if the callback returns a truey value for **any** element of a + * collection. The function returns as soon as it finds a passing value and + * does not iterate over the entire collection. The callback is bound to + * `thisArg` and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.some(characters, 'blocked'); + * // => true + * + * // using "_.where" callback shorthand + * _.some(characters, { 'age': 1 }); + * // => false + */ + function some(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if ((result = callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return !(result = callback(value, index, collection)); + }); + } + return !!result; + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through the callback. This method + * performs a stable sort, that is, it will preserve the original sort order + * of equal elements. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an array of property names is provided for `callback` the collection + * will be sorted by each property value. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of sorted elements. + * @example + * + * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); + * // => [3, 1, 2] + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 26 }, + * { 'name': 'fred', 'age': 30 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(_.sortBy(characters, 'age'), _.values); + * // => [['barney', 26], ['fred', 30], ['barney', 36], ['fred', 40]] + * + * // sorting by multiple properties + * _.map(_.sortBy(characters, ['name', 'age']), _.values); + * // = > [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]] + */ + function sortBy(collection, callback, thisArg) { + var index = -1, + isArr = isArray(callback), + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + if (!isArr) { + callback = lodash.createCallback(callback, thisArg, 3); + } + forEach(collection, function(value, key, collection) { + var object = result[++index] = getObject(); + if (isArr) { + object.criteria = map(callback, function(key) { return value[key]; }); + } else { + (object.criteria = getArray())[0] = callback(value, key, collection); + } + object.index = index; + object.value = value; + }); + + length = result.length; + result.sort(compareAscending); + while (length--) { + var object = result[length]; + result[length] = object.value; + if (!isArr) { + releaseArray(object.criteria); + } + releaseObject(object); + } + return result; + } + + /** + * Converts the `collection` to an array. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to convert. + * @returns {Array} Returns the new converted array. + * @example + * + * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); + * // => [2, 3, 4] + */ + function toArray(collection) { + if (collection && typeof collection.length == 'number') { + return (support.unindexedChars && isString(collection)) + ? collection.split('') + : slice(collection); + } + return values(collection); + } + + /** + * Performs a deep comparison of each element in a `collection` to the given + * `properties` object, returning an array of all elements that have equivalent + * property values. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Object} props The object of property values to filter by. + * @returns {Array} Returns a new array of elements that have the given properties. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.where(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }] + * + * _.where(characters, { 'pets': ['dino'] }); + * // => [{ 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] }] + */ + var where = filter; + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are all falsey. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to compact. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result.push(value); + } + } + return result; + } + + /** + * Creates an array excluding all values of the provided arrays using strict + * equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to process. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); + * // => [1, 3, 4] + */ + function difference(array) { + return baseDifference(array, baseFlatten(arguments, true, true, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.findIndex(characters, function(chr) { + * return chr.age < 20; + * }); + * // => 2 + * + * // using "_.where" callback shorthand + * _.findIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findIndex(characters, 'blocked'); + * // => 1 + */ + function findIndex(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + if (callback(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of a `collection` from right to left. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': true }, + * { 'name': 'fred', 'age': 40, 'blocked': false }, + * { 'name': 'pebbles', 'age': 1, 'blocked': true } + * ]; + * + * _.findLastIndex(characters, function(chr) { + * return chr.age > 30; + * }); + * // => 1 + * + * // using "_.where" callback shorthand + * _.findLastIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findLastIndex(characters, 'blocked'); + * // => 2 + */ + function findLastIndex(array, callback, thisArg) { + var length = array ? array.length : 0; + callback = lodash.createCallback(callback, thisArg, 3); + while (length--) { + if (callback(array[length], length, array)) { + return length; + } + } + return -1; + } + + /** + * Gets the first element or first `n` elements of an array. If a callback + * is provided elements at the beginning of the array are returned as long + * as the callback returns truey. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias head, take + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([1, 2, 3], 2); + * // => [1, 2] + * + * _.first([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [1, 2] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.first(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': true, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.first(characters, { 'employer': 'slate' }), 'name'); + * // => ['barney', 'fred'] + */ + function first(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = -1; + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[0] : undefined; + } + } + return slice(array, 0, nativeMin(nativeMax(0, n), length)); + } + + /** + * Flattens a nested array (the nesting can be to any depth). If `isShallow` + * is truey, the array will only be flattened a single level. If a callback + * is provided each element of the array is passed through the callback before + * flattening. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new flattened array. + * @example + * + * _.flatten([1, [2], [3, [[4]]]]); + * // => [1, 2, 3, 4]; + * + * _.flatten([1, [2], [3, [[4]]]], true); + * // => [1, 2, 3, [[4]]]; + * + * var characters = [ + * { 'name': 'barney', 'age': 30, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * // using "_.pluck" callback shorthand + * _.flatten(characters, 'pets'); + * // => ['hoppy', 'baby puss', 'dino'] + */ + function flatten(array, isShallow, callback, thisArg) { + // juggle arguments + if (typeof isShallow != 'boolean' && isShallow != null) { + thisArg = callback; + callback = (typeof isShallow != 'function' && thisArg && thisArg[isShallow] === array) ? null : isShallow; + isShallow = false; + } + if (callback != null) { + array = map(array, callback, thisArg); + } + return baseFlatten(array, isShallow); + } + + /** + * Gets the index at which the first occurrence of `value` is found using + * strict equality for comparisons, i.e. `===`. If the array is already sorted + * providing `true` for `fromIndex` will run a faster binary search. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2); + * // => 1 + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 4 + * + * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); + * // => 2 + */ + function indexOf(array, value, fromIndex) { + if (typeof fromIndex == 'number') { + var length = array ? array.length : 0; + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0); + } else if (fromIndex) { + var index = sortedIndex(array, value); + return array[index] === value ? index : -1; + } + return baseIndexOf(array, value, fromIndex); + } + + /** + * Gets all but the last element or last `n` elements of an array. If a + * callback is provided elements at the end of the array are excluded from + * the result as long as the callback returns truey. The callback is bound + * to `thisArg` and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + * + * _.initial([1, 2, 3], 2); + * // => [1] + * + * _.initial([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [1] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.initial(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': false, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.initial(characters, { 'employer': 'na' }), 'name'); + * // => ['barney', 'fred'] + */ + function initial(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : callback || n; + } + return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); + } + + /** + * Creates an array of unique values present in all provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of shared values. + * @example + * + * _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2] + */ + function intersection() { + var args = [], + argsIndex = -1, + argsLength = arguments.length, + caches = getArray(), + indexOf = getIndexOf(), + trustIndexOf = indexOf === baseIndexOf, + seen = getArray(); + + while (++argsIndex < argsLength) { + var value = arguments[argsIndex]; + if (isArray(value) || isArguments(value)) { + args.push(value); + caches.push(trustIndexOf && value.length >= largeArraySize && + createCache(argsIndex ? args[argsIndex] : seen)); + } + } + var array = args[0], + index = -1, + length = array ? array.length : 0, + result = []; + + outer: + while (++index < length) { + var cache = caches[0]; + value = array[index]; + + if ((cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0) { + argsIndex = argsLength; + (cache || seen).push(value); + while (--argsIndex) { + cache = caches[argsIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) { + continue outer; + } + } + result.push(value); + } + } + while (argsLength--) { + cache = caches[argsLength]; + if (cache) { + releaseObject(cache); + } + } + releaseArray(caches); + releaseArray(seen); + return result; + } + + /** + * Gets the last element or last `n` elements of an array. If a callback is + * provided elements at the end of the array are returned as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + * + * _.last([1, 2, 3], 2); + * // => [2, 3] + * + * _.last([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [2, 3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.last(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.last(characters, { 'employer': 'na' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function last(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[length - 1] : undefined; + } + } + return slice(array, nativeMax(0, length - n)); + } + + /** + * Gets the index at which the last occurrence of `value` is found using strict + * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used + * as the offset from the end of the collection. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); + * // => 4 + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var index = array ? array.length : 0; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * Removes all provided values from the given array using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + function pull(array) { + var args = arguments, + argsIndex = 0, + argsLength = args.length, + length = array ? array.length : 0; + + while (++argsIndex < argsLength) { + var index = -1, + value = args[argsIndex]; + while (++index < length) { + if (array[index] === value) { + splice.call(array, index--, 1); + length--; + } + } + } + return array; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to but not including `end`. If `start` is less than `stop` a + * zero-length range is created unless a negative `step` is specified. + * + * @static + * @memberOf _ + * @category Arrays + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns a new range array. + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + function range(start, end, step) { + start = +start || 0; + step = typeof step == 'number' ? step : (+step || 1); + + if (end == null) { + end = start; + start = 0; + } + // use `Array(length)` so engines like Chakra and V8 avoid slower modes + // http://youtu.be/XAqIpGU8ZZk#t=17m25s + var index = -1, + length = nativeMax(0, ceil((end - start) / (step || 1))), + result = Array(length); + + while (++index < length) { + result[index] = start; + start += step; + } + return result; + } + + /** + * Removes all elements from an array that the callback returns truey for + * and returns an array of removed elements. The callback is bound to `thisArg` + * and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4, 5, 6]; + * var evens = _.remove(array, function(num) { return num % 2 == 0; }); + * + * console.log(array); + * // => [1, 3, 5] + * + * console.log(evens); + * // => [2, 4, 6] + */ + function remove(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0, + result = []; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (callback(value, index, array)) { + result.push(value); + splice.call(array, index--, 1); + length--; + } + } + return result; + } + + /** + * The opposite of `_.initial` this method gets all but the first element or + * first `n` elements of an array. If a callback function is provided elements + * at the beginning of the array are excluded from the result as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias drop, tail + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + * + * _.rest([1, 2, 3], 2); + * // => [3] + * + * _.rest([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.rest(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.rest(characters, { 'employer': 'slate' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function rest(array, callback, thisArg) { + if (typeof callback != 'number' && callback != null) { + var n = 0, + index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : nativeMax(0, callback); + } + return slice(array, n); + } + + /** + * Uses a binary search to determine the smallest index at which a value + * should be inserted into a given sorted array in order to maintain the sort + * order of the array. If a callback is provided it will be executed for + * `value` and each element of `array` to compute their sort ranking. The + * callback is bound to `thisArg` and invoked with one argument; (value). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([20, 30, 50], 40); + * // => 2 + * + * // using "_.pluck" callback shorthand + * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 2 + * + * var dict = { + * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } + * }; + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return dict.wordToNumber[word]; + * }); + * // => 2 + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return this.wordToNumber[word]; + * }, dict); + * // => 2 + */ + function sortedIndex(array, value, callback, thisArg) { + var low = 0, + high = array ? array.length : low; + + // explicitly reference `identity` for better inlining in Firefox + callback = callback ? lodash.createCallback(callback, thisArg, 1) : identity; + value = callback(value); + + while (low < high) { + var mid = (low + high) >>> 1; + (callback(array[mid]) < value) + ? low = mid + 1 + : high = mid; + } + return low; + } + + /** + * Creates an array of unique values, in order, of the provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of combined values. + * @example + * + * _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2, 3, 5, 4] + */ + function union() { + return baseUniq(baseFlatten(arguments, true, true)); + } + + /** + * Creates a duplicate-value-free version of an array using strict equality + * for comparisons, i.e. `===`. If the array is sorted, providing + * `true` for `isSorted` will use a faster algorithm. If a callback is provided + * each element of `array` is passed through the callback before uniqueness + * is computed. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Arrays + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a duplicate-value-free array. + * @example + * + * _.uniq([1, 2, 1, 3, 1]); + * // => [1, 2, 3] + * + * _.uniq([1, 1, 2, 2, 3], true); + * // => [1, 2, 3] + * + * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); }); + * // => ['A', 'b', 'C'] + * + * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math); + * // => [1, 2.5, 3] + * + * // using "_.pluck" callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniq(array, isSorted, callback, thisArg) { + // juggle arguments + if (typeof isSorted != 'boolean' && isSorted != null) { + thisArg = callback; + callback = (typeof isSorted != 'function' && thisArg && thisArg[isSorted] === array) ? null : isSorted; + isSorted = false; + } + if (callback != null) { + callback = lodash.createCallback(callback, thisArg, 3); + } + return baseUniq(array, isSorted, callback); + } + + /** + * Creates an array excluding all provided values using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); + * // => [2, 3, 4] + */ + function without(array) { + return baseDifference(array, slice(arguments, 1)); + } + + /** + * Creates an array that is the symmetric difference of the provided arrays. + * See http://en.wikipedia.org/wiki/Symmetric_difference. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of values. + * @example + * + * _.xor([1, 2, 3], [5, 2, 1, 4]); + * // => [3, 5, 4] + * + * _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); + * // => [1, 4, 5] + */ + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArray(array) || isArguments(array)) { + var result = result + ? baseUniq(baseDifference(result, array).concat(baseDifference(array, result))) + : array; + } + } + return result || []; + } + + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second + * elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @alias unzip + * @category Arrays + * @param {...Array} [array] Arrays to process. + * @returns {Array} Returns a new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + function zip() { + var array = arguments.length > 1 ? arguments : arguments[0], + index = -1, + length = array ? max(pluck(array, 'length')) : 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = pluck(array, index); + } + return result; + } + + /** + * Creates an object composed from arrays of `keys` and `values`. Provide + * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` + * or two arrays, one of `keys` and one of corresponding `values`. + * + * @static + * @memberOf _ + * @alias object + * @category Arrays + * @param {Array} keys The array of keys. + * @param {Array} [values=[]] The array of values. + * @returns {Object} Returns an object composed of the given keys and + * corresponding values. + * @example + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + function zipObject(keys, values) { + var index = -1, + length = keys ? keys.length : 0, + result = {}; + + if (!values && length && !isArray(keys[0])) { + values = []; + } + while (++index < length) { + var key = keys[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that executes `func`, with the `this` binding and + * arguments of the created function, only after being called `n` times. + * + * @static + * @memberOf _ + * @category Functions + * @param {number} n The number of times the function must be called before + * `func` is executed. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('Done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'Done saving!', after all saves have completed + */ + function after(n, func) { + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that, when called, invokes `func` with the `this` + * binding of `thisArg` and prepends any additional `bind` arguments to those + * provided to the bound function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var func = function(greeting) { + * return greeting + ' ' + this.name; + * }; + * + * func = _.bind(func, { 'name': 'fred' }, 'hi'); + * func(); + * // => 'hi fred' + */ + function bind(func, thisArg) { + return arguments.length > 2 + ? createWrapper(func, 17, slice(arguments, 2), null, thisArg) + : createWrapper(func, 1, null, null, thisArg); + } + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all the function properties + * of `object` will be bound. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to + * bind, specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { console.log('clicked ' + this.label); } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs', when the button is clicked + */ + function bindAll(object) { + var funcs = arguments.length > 1 ? baseFlatten(arguments, true, false, 1) : functions(object), + index = -1, + length = funcs.length; + + while (++index < length) { + var key = funcs[index]; + object[key] = createWrapper(object[key], 1, null, null, object); + } + return object; + } + + /** + * Creates a function that, when called, invokes the method at `object[key]` + * and prepends any additional `bindKey` arguments to those provided to the bound + * function. This method differs from `_.bind` by allowing bound functions to + * reference methods that will be redefined or don't yet exist. + * See http://michaux.ca/articles/lazy-function-definition-pattern. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'name': 'fred', + * 'greet': function(greeting) { + * return greeting + ' ' + this.name; + * } + * }; + * + * var func = _.bindKey(object, 'greet', 'hi'); + * func(); + * // => 'hi fred' + * + * object.greet = function(greeting) { + * return greeting + 'ya ' + this.name + '!'; + * }; + * + * func(); + * // => 'hiya fred!' + */ + function bindKey(object, key) { + return arguments.length > 2 + ? createWrapper(key, 19, slice(arguments, 2), null, object) + : createWrapper(key, 3, null, null, object); + } + + /** + * Creates a function that is the composition of the provided functions, + * where each function consumes the return value of the function that follows. + * For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + * Each function is executed with the `this` binding of the composed function. + * + * @static + * @memberOf _ + * @category Functions + * @param {...Function} [func] Functions to compose. + * @returns {Function} Returns the new composed function. + * @example + * + * var realNameMap = { + * 'pebbles': 'penelope' + * }; + * + * var format = function(name) { + * name = realNameMap[name.toLowerCase()] || name; + * return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase(); + * }; + * + * var greet = function(formatted) { + * return 'Hiya ' + formatted + '!'; + * }; + * + * var welcome = _.compose(greet, format); + * welcome('pebbles'); + * // => 'Hiya Penelope!' + */ + function compose() { + var funcs = arguments, + length = funcs.length; + + while (length--) { + if (!isFunction(funcs[length])) { + throw new TypeError; + } + } + return function() { + var args = arguments, + length = funcs.length; + + while (length--) { + args = [funcs[length].apply(this, args)]; + } + return args[0]; + }; + } + + /** + * Creates a function which accepts one or more arguments of `func` that when + * invoked either executes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` can be specified + * if `func.length` is not sufficient. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {Function} Returns the new curried function. + * @example + * + * var curried = _.curry(function(a, b, c) { + * console.log(a + b + c); + * }); + * + * curried(1)(2)(3); + * // => 6 + * + * curried(1, 2)(3); + * // => 6 + * + * curried(1, 2, 3); + * // => 6 + */ + function curry(func, arity) { + arity = typeof arity == 'number' ? arity : (+arity || func.length); + return createWrapper(func, 4, null, null, null, arity); + } + + /** + * Creates a function that will delay the execution of `func` until after + * `wait` milliseconds have elapsed since the last time it was invoked. + * Provide an options object to indicate that `func` should be invoked on + * the leading and/or trailing edge of the `wait` timeout. Subsequent calls + * to the debounced function will return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * var lazyLayout = _.debounce(calculateLayout, 150); + * jQuery(window).on('resize', lazyLayout); + * + * // execute `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * }); + * + * // ensure `batchLog` is executed once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * source.addEventListener('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * }, false); + */ + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + wait = nativeMax(0, wait) || 0; + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = options.leading; + maxWait = 'maxWait' in options && (nativeMax(wait, options.maxWait) || 0); + trailing = 'trailing' in options ? options.trailing : trailing; + } + var delayed = function() { + var remaining = wait - (now() - stamp); + if (remaining <= 0) { + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + var isCalled = trailingCall; + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + } else { + timeoutId = setTimeout(delayed, remaining); + } + }; + + var maxDelayed = function() { + if (timeoutId) { + clearTimeout(timeoutId); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (trailing || (maxWait !== wait)) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + }; + + return function() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + return result; + }; + } + + /** + * Defers executing the `func` function until the current call stack has cleared. + * Additional arguments will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { console.log(text); }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + function defer(func) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 1); + return setTimeout(function() { func.apply(undefined, args); }, 1); + } + + /** + * Executes the `func` function after `wait` milliseconds. Additional arguments + * will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { console.log(text); }, 1000, 'later'); + * // => logs 'later' after one second + */ + function delay(func, wait) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 2); + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it will be used to determine the cache key for storing the result + * based on the arguments provided to the memoized function. By default, the + * first argument provided to the memoized function is used as the cache key. + * The `func` is executed with the `this` binding of the memoized function. + * The result cache is exposed as the `cache` property on the memoized function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] A function used to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var fibonacci = _.memoize(function(n) { + * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); + * }); + * + * fibonacci(9) + * // => 34 + * + * var data = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // modifying the result cache + * var get = _.memoize(function(name) { return data[name]; }, _.identity); + * get('pebbles'); + * // => { 'name': 'pebbles', 'age': 1 } + * + * get.cache.pebbles.name = 'penelope'; + * get('pebbles'); + * // => { 'name': 'penelope', 'age': 1 } + */ + function memoize(func, resolver) { + if (!isFunction(func)) { + throw new TypeError; + } + var memoized = function() { + var cache = memoized.cache, + key = resolver ? resolver.apply(this, arguments) : keyPrefix + arguments[0]; + + return hasOwnProperty.call(cache, key) + ? cache[key] + : (cache[key] = func.apply(this, arguments)); + } + memoized.cache = {}; + return memoized; + } + + /** + * Creates a function that is restricted to execute `func` once. Repeat calls to + * the function will return the value of the first call. The `func` is executed + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` executes `createApplication` once + */ + function once(func) { + var ran, + result; + + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (ran) { + return result; + } + ran = true; + result = func.apply(this, arguments); + + // clear the `func` variable so the function may be garbage collected + func = null; + return result; + }; + } + + /** + * Creates a function that, when called, invokes `func` with any additional + * `partial` arguments prepended to those provided to the new function. This + * method is similar to `_.bind` except it does **not** alter the `this` binding. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { return greeting + ' ' + name; }; + * var hi = _.partial(greet, 'hi'); + * hi('fred'); + * // => 'hi fred' + */ + function partial(func) { + return createWrapper(func, 16, slice(arguments, 1)); + } + + /** + * This method is like `_.partial` except that `partial` arguments are + * appended to those provided to the new function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var defaultsDeep = _.partialRight(_.merge, _.defaults); + * + * var options = { + * 'variable': 'data', + * 'imports': { 'jq': $ } + * }; + * + * defaultsDeep(options, _.templateSettings); + * + * options.variable + * // => 'data' + * + * options.imports + * // => { '_': _, 'jq': $ } + */ + function partialRight(func) { + return createWrapper(func, 32, null, slice(arguments, 1)); + } + + /** + * Creates a function that, when executed, will only call the `func` function + * at most once per every `wait` milliseconds. Provide an options object to + * indicate that `func` should be invoked on the leading and/or trailing edge + * of the `wait` timeout. Subsequent calls to the throttled function will + * return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * var throttled = _.throttle(updatePosition, 100); + * jQuery(window).on('scroll', throttled); + * + * // execute `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? options.leading : leading; + trailing = 'trailing' in options ? options.trailing : trailing; + } + debounceOptions.leading = leading; + debounceOptions.maxWait = wait; + debounceOptions.trailing = trailing; + + return debounce(func, wait, debounceOptions); + } + + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Additional arguments provided to the function are appended + * to those provided to the wrapper function. The wrapper is executed with + * the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('Fred, Wilma, & Pebbles'); + * // => '

Fred, Wilma, & Pebbles

' + */ + function wrap(value, wrapper) { + return createWrapper(wrapper, 16, [value]); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'name': 'fred' }; + * var getter = _.constant(object); + * getter() === object; + * // => true + */ + function constant(value) { + return function() { + return value; + }; + } + + /** + * Produces a callback bound to an optional `thisArg`. If `func` is a property + * name the created callback will return the property value for a given element. + * If `func` is an object the created callback will return `true` for elements + * that contain the equivalent object properties, otherwise it will return `false`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // wrap to create custom callback shorthands + * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { + * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); + * return !match ? func(callback, thisArg) : function(object) { + * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; + * }; + * }); + * + * _.filter(characters, 'age__gt38'); + * // => [{ 'name': 'fred', 'age': 40 }] + */ + function createCallback(func, thisArg, argCount) { + var type = typeof func; + if (func == null || type == 'function') { + return baseCreateCallback(func, thisArg, argCount); + } + // handle "_.pluck" style callback shorthands + if (type != 'object') { + return property(func); + } + var props = keys(func), + key = props[0], + a = func[key]; + + // handle "_.where" style callback shorthands + if (props.length == 1 && a === a && !isObject(a)) { + // fast path the common case of providing an object with a single + // property containing a primitive value + return function(object) { + var b = object[key]; + return a === b && (a !== 0 || (1 / a == 1 / b)); + }; + } + return function(object) { + var length = props.length, + result = false; + + while (length--) { + if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) { + break; + } + } + return result; + }; + } + + /** + * 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); + } + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'name': 'fred' }; + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + /** + * Adds function properties of a source object to the destination object. + * If `object` is a function methods will be added to its prototype as well. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Function|Object} [object=lodash] object The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options] The options object. + * @param {boolean} [options.chain=true] Specify whether the functions added are chainable. + * @example + * + * function capitalize(string) { + * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); + * } + * + * _.mixin({ 'capitalize': capitalize }); + * _.capitalize('fred'); + * // => 'Fred' + * + * _('fred').capitalize().value(); + * // => 'Fred' + * + * _.mixin({ 'capitalize': capitalize }, { 'chain': false }); + * _('fred').capitalize(); + * // => 'Fred' + */ + function mixin(object, source, options) { + var chain = true, + methodNames = source && functions(source); + + if (!source || (!options && !methodNames.length)) { + if (options == null) { + options = source; + } + ctor = lodashWrapper; + source = object; + object = lodash; + methodNames = functions(source); + } + if (options === false) { + chain = false; + } else if (isObject(options) && 'chain' in options) { + chain = options.chain; + } + var ctor = object, + isFunc = isFunction(ctor); + + forEach(methodNames, function(methodName) { + var func = object[methodName] = source[methodName]; + if (isFunc) { + ctor.prototype[methodName] = function() { + var chainAll = this.__chain__, + value = this.__wrapped__, + args = [value]; + + push.apply(args, arguments); + var result = func.apply(object, args); + if (chain || chainAll) { + if (value === result && isObject(result)) { + return this; + } + result = new ctor(result); + result.__chain__ = chainAll; + } + return result; + }; + } + }); + } + + /** + * Reverts the '_' variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @memberOf _ + * @category Utilities + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + context._ = oldDash; + return this; + } + + /** + * A no-operation function. + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var object = { 'name': 'fred' }; + * _.noop(object) === undefined; + * // => true + */ + function noop() { + // no operation performed + } + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var stamp = _.now(); + * _.defer(function() { console.log(_.now() - stamp); }); + * // => logs the number of milliseconds it took for the deferred function to be called + */ + var now = isNative(now = Date.now) && now || function() { + return new Date().getTime(); + }; + + /** + * Converts the given value into an integer of the specified radix. + * If `radix` is `undefined` or `0` a `radix` of `10` is used unless the + * `value` is a hexadecimal, in which case a `radix` of `16` is used. + * + * Note: This method avoids differences in native ES3 and ES5 `parseInt` + * implementations. See http://es5.github.io/#E. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. + * @example + * + * _.parseInt('08'); + * // => 8 + */ + var parseInt = nativeParseInt(whitespace + '08') == 8 ? nativeParseInt : function(value, radix) { + // Firefox < 21 and Opera < 15 follow the ES3 specified implementation of `parseInt` + return nativeParseInt(isString(value) ? value.replace(reLeadingSpacesAndZeros, '') : value, radix || 0); + }; + + /** + * Creates a "_.pluck" style function, which returns the `key` value of a + * given object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} key The name of the property to retrieve. + * @returns {Function} Returns the new function. + * @example + * + * var characters = [ + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 36 } + * ]; + * + * var getName = _.property('name'); + * + * _.map(characters, getName); + * // => ['barney', 'fred'] + * + * _.sortBy(characters, getName); + * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] + */ + function property(key) { + return function(object) { + return object[key]; + }; + } + + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number will be + * returned. If `floating` is truey or either `min` or `max` are floats a + * floating-point number will be returned instead of an integer. + * + * @static + * @memberOf _ + * @category Utilities + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating=false] Specify returning a floating-point number. + * @returns {number} Returns a random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(min, max, floating) { + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (typeof min == 'boolean' && noMax) { + floating = min; + min = 1; + } + else if (!noMax && typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand +'').length - 1)))), max); + } + return baseRandom(min, max); + } + + /** + * Resolves the value of property `key` on `object`. If `key` is a function + * it will be invoked with the `this` binding of `object` and its result returned, + * else the property value is returned. If `object` is falsey then `undefined` + * is returned. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to resolve. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { + * 'cheese': 'crumpets', + * 'stuff': function() { + * return 'nonsense'; + * } + * }; + * + * _.result(object, 'cheese'); + * // => 'crumpets' + * + * _.result(object, 'stuff'); + * // => 'nonsense' + */ + function result(object, key) { + if (object) { + var value = object[key]; + return isFunction(value) ? object[key]() : value; + } + } + + /** + * 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('<%- value %>', { 'value': '\n```\n\nUsing [`npm`](http://npmjs.org/):\n\n```bash\nnpm i --save lodash\n\n{sudo} npm i -g lodash\nnpm ln lodash\n```\n\nIn [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/):\n\n```js\nvar _ = require('lodash');\n// or as Underscore\nvar _ = require('lodash/dist/lodash.underscore');\n```\n\n**Notes:**\n * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL\n * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('lodash.js');\n```\n\nIn an AMD loader:\n\n```js\nrequire({\n 'packages': [\n { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }\n ]\n},\n['lodash'], function(_) {\n console.log(_.VERSION);\n});\n```\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\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", + "readmeFilename": "README.md", + "_id": "lodash@2.4.1", + "_from": "lodash@^2.4.1", + "scripts": {} +} diff --git a/node_modules/gulp-watch/node_modules/vinyl/package.json b/node_modules/gulp-watch/node_modules/vinyl/package.json index 6f676bb..3f8b965 100644 --- a/node_modules/gulp-watch/node_modules/vinyl/package.json +++ b/node_modules/gulp-watch/node_modules/vinyl/package.json @@ -1,7 +1,7 @@ { "name": "vinyl", "description": "A virtual file format", - "version": "0.2.3", + "version": "0.3.3", "homepage": "http://github.com/wearefractal/vinyl", "repository": { "type": "git", @@ -14,22 +14,23 @@ }, "main": "./index.js", "dependencies": { - "clone-stats": "~0.0.1" + "clone-stats": "^0.0.1", + "lodash": "^2.4.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" + "mocha": "^1.17.0", + "should": "^4.0.4", + "mocha-lcov-reporter": "^0.0.1", + "coveralls": "^2.6.1", + "istanbul": "^0.3.0", + "rimraf": "^2.2.5", + "jshint": "^2.4.1", + "buffer-equal": "0.0.1", + "lodash.templatesettings": "^2.4.1", + "event-stream": "^3.1.0" }, "scripts": { - "test": "mocha --reporter spec && jshint", + "test": "mocha --reporter spec && jshint . --exclude node_modules", "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" }, "engines": { @@ -41,16 +42,14 @@ "url": "http://github.com/wearefractal/vinyl/raw/master/LICENSE" } ], + "gitHead": "c801d3dc354383cf2656338d63908ec2983e3612", "bugs": { "url": "https://github.com/wearefractal/vinyl/issues" }, - "_id": "vinyl@0.2.3", - "dist": { - "shasum": "bca938209582ec5a49ad538a00fa1f125e513252", - "tarball": "http://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz" - }, - "_from": "vinyl@^0.2.3", - "_npmVersion": "1.3.23", + "_id": "vinyl@0.3.3", + "_shasum": "45b2517a6ba6b53940d29c691ddbc92de50c2bf3", + "_from": "vinyl@^0.3.0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -61,8 +60,11 @@ "email": "contact@wearefractal.com" } ], + "dist": { + "shasum": "45b2517a6ba6b53940d29c691ddbc92de50c2bf3", + "tarball": "http://registry.npmjs.org/vinyl/-/vinyl-0.3.3.tgz" + }, "directories": {}, - "_shasum": "bca938209582ec5a49ad538a00fa1f125e513252", - "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz", + "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.3.3.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp-watch/node_modules/vinyl/test/File.js b/node_modules/gulp-watch/node_modules/vinyl/test/File.js index 1f2a83a..0dd7957 100644 --- a/node_modules/gulp-watch/node_modules/vinyl/test/File.js +++ b/node_modules/gulp-watch/node_modules/vinyl/test/File.js @@ -1,6 +1,7 @@ var File = require('../'); var Stream = require('stream'); var fs = require('fs'); +var path = require('path'); var should = require('should'); require('mocha'); @@ -80,7 +81,7 @@ describe('File', function() { done(); }); }); - + describe('isBuffer()', function() { it('should return true when the contents are a Buffer', function(done) { var val = new Buffer("test"); @@ -243,10 +244,33 @@ describe('File', function() { 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; + copy.stat.isFile().should.equal(true); + copy.stat.isDirectory().should.equal(false); + should(file.stat instanceof fs.Stats).equal(true); + should(copy.stat instanceof fs.Stats).equal(true); + + done(); + }); + + it('should copy custom properties', function(done) { + var options = { + cwd: "/", + base: "/test/", + path: "/test/test.coffee", + contents: null + }; + + var file = new File(options); + file.custom = { a: 'custom property' }; + + 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.custom.should.not.equal(file.custom); + file2.custom.a.should.equal(file.custom.a); done(); }); @@ -382,7 +406,7 @@ describe('File', function() { process.nextTick(done); }); }); - + describe('inspect()', function() { it('should return correct format when no contents and no path', function(done) { var file = new File(); @@ -445,7 +469,7 @@ describe('File', function() { done(); }); }); - + describe('contents get/set', function() { it('should work with Buffer', function(done) { var val = new Buffer("test"); @@ -532,9 +556,68 @@ describe('File', function() { cwd: "/", path: "/test/test.coffee" }); - file.relative.should.equal("test/test.coffee"); + file.relative.should.equal(path.join("test","test.coffee")); done(); }); }); + describe('path get/set', function() { + + it('should record history when instantiation', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should record history when path change', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.js'; + file.path.should.eql('/test/test.js'); + file.history.should.eql(['/test/test.coffee', '/test/test.js']); + + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee', '/test/test.js', '/test/test.coffee']); + }); + + it('should not record history when set the same path', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.coffee'; + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + + // ignore when set empty string + file.path = ''; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should throw when set path null', function() { + var file = new File({ + cwd: '/', + path: null + }); + + should.not.exist(file.path); + file.history.should.eql([]); + + (function() { + file.path = null; + }).should.throw('path should be string'); + }); + }); + }); diff --git a/node_modules/gulp-watch/package.json b/node_modules/gulp-watch/package.json index 861639c..2b1207d 100644 --- a/node_modules/gulp-watch/package.json +++ b/node_modules/gulp-watch/package.json @@ -1,6 +1,6 @@ { "name": "gulp-watch", - "version": "0.6.8", + "version": "0.6.10", "description": "Watch, that actually is an endless stream", "main": "index.js", "keywords": [ @@ -26,19 +26,13 @@ }, "devDependencies": { "coveralls": "~2.6.0", - "event-stream": "~3.0.20", - "glob-stream": "~3.1.7", + "event-stream": "^3.1.7", "gulp": "~3.3.4", - "gulp-grep-stream": "0.0.1", - "gulp-mocha": "~0.2.0", - "gulp-plumber": "~0.2.3", - "gulp-sass": "~0.4.0", "istanbul": "~0.1.44", "jshint": "^2.5.0", - "longjohn": "~0.2.2", "mocha": "~1.14.0", "mocha-lcov-reporter": "0.0.1", - "proxyquire": "^0.6.0", + "proxyquire": "^1.0.1", "should": "~3.0.1", "sinon": "^1.9.1", "strip-ansi": "^0.2.1", @@ -49,18 +43,17 @@ "glob": "^4.0.2", "glob2base": "~0.0.8", "gulp-batch": "~0.4", - "gulp-util": "~2.2.6", - "minimatch": "~0.3", - "vinyl": "^0.2.3", + "gulp-util": "~3.0.0", + "minimatch": "~0.4", + "vinyl": "^0.3.0", "vinyl-fs": "~0.3.0" }, "engine": "node >= 0.10", - "gitHead": "173857240c82748b56bb5eb6019e90531d1a7b63", "homepage": "https://github.com/floatdrop/gulp-watch", - "_id": "gulp-watch@0.6.8", - "_shasum": "4bdf185bb5022389e46667fc3dbf43ea313fba58", - "_from": "gulp-watch@", - "_npmVersion": "1.4.15", + "_id": "gulp-watch@0.6.10", + "_shasum": "a3592cb8f2354430fb288ef85dfdd61d2094b924", + "_from": "gulp-watch@0.6.10", + "_npmVersion": "1.4.9", "_npmUser": { "name": "floatdrop", "email": "floatdrop@gmail.com" @@ -72,9 +65,10 @@ } ], "dist": { - "shasum": "4bdf185bb5022389e46667fc3dbf43ea313fba58", - "tarball": "http://registry.npmjs.org/gulp-watch/-/gulp-watch-0.6.8.tgz" + "shasum": "a3592cb8f2354430fb288ef85dfdd61d2094b924", + "tarball": "http://registry.npmjs.org/gulp-watch/-/gulp-watch-0.6.10.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/gulp-watch/-/gulp-watch-0.6.8.tgz" + "_resolved": "https://registry.npmjs.org/gulp-watch/-/gulp-watch-0.6.10.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/README.md b/node_modules/gulp/README.md index 2c8e532..1127075 100644 --- a/node_modules/gulp/README.md +++ b/node_modules/gulp/README.md @@ -26,7 +26,7 @@ var coffee = require('gulp-coffee'); var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var imagemin = require('gulp-imagemin'); - +var sourcemaps = require('gulp-sourcemaps'); var del = require('del'); var paths = { @@ -43,10 +43,13 @@ gulp.task('clean', function(cb) { gulp.task('scripts', ['clean'], function() { // Minify and copy all JavaScript (except vendor scripts) + // with sourcemaps all the way down return gulp.src(paths.scripts) - .pipe(coffee()) - .pipe(uglify()) - .pipe(concat('all.min.js')) + .pipe(sourcemaps.init()) + .pipe(coffee()) + .pipe(uglify()) + .pipe(concat('all.min.js')) + .pipe(sourcemaps.write()) .pipe(gulp.dest('build/js')); }); diff --git a/node_modules/gulp/bin/gulp.js b/node_modules/gulp/bin/gulp.js index 1c1f589..0f3fd37 100755 --- a/node_modules/gulp/bin/gulp.js +++ b/node_modules/gulp/bin/gulp.js @@ -147,22 +147,24 @@ function formatError(e) { return e.message; } - if (typeof e.err === 'string') { - return new Error(e.err).stack; - } - // PluginError if (typeof e.err.showStack === 'boolean') { return e.err.toString(); - } else { + } + + // normal error + if (e.err.stack) { return e.err.stack; } + + // unknown (string, number, etc.) + return new Error(String(e.err)).stack; } // wire up logging events function logEvents(gulpInst) { - // total hack due to fucked up error management in orchestrator + // total hack due to poor error management in orchestrator gulpInst.on('err', function () { failed = true; }); diff --git a/node_modules/gulp/node_modules/archy/package.json b/node_modules/gulp/node_modules/archy/package.json index 33d2702..c394bd3 100644 --- a/node_modules/gulp/node_modules/archy/package.json +++ b/node_modules/gulp/node_modules/archy/package.json @@ -16,7 +16,7 @@ }, "repository": { "type": "git", - "url": "http://github.com/substack/node-archy.git" + "url": "git://github.com/substack/node-archy.git" }, "keywords": [ "hierarchy", @@ -34,12 +34,30 @@ "engine": { "node": ">=0.4" }, - "readme": "archy\n=====\n\nRender nested hierarchies `npm ls` style with unicode pipes.\n\n[![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy)\n\nexample\n=======\n\n``` js\nvar archy = require('archy');\nvar s = archy({\n label : 'beep',\n nodes : [\n 'ity',\n {\n label : 'boop',\n nodes : [\n {\n label : 'o_O',\n nodes : [\n {\n label : 'oh',\n nodes : [ 'hello', 'puny' ]\n },\n 'human'\n ]\n },\n 'party\\ntime!'\n ]\n }\n ]\n});\nconsole.log(s);\n```\n\noutput\n\n```\nbeep\n├── ity\n└─┬ boop\n ├─┬ o_O\n │ ├─┬ oh\n │ │ ├── hello\n │ │ └── puny\n │ └── human\n └── party\n time!\n```\n\nmethods\n=======\n\nvar archy = require('archy')\n\narchy(obj, prefix='', opts={})\n------------------------------\n\nReturn a string representation of `obj` with unicode pipe characters like how\n`npm ls` looks.\n\n`obj` should be a tree of nested objects with `'label'` and `'nodes'` fields.\n`'label'` is a string of text to display at a node level and `'nodes'` is an\narray of the descendents of the current node.\n\nIf a node is a string, that string will be used as the `'label'` and an empty\narray of `'nodes'` will be used.\n\n`prefix` gets prepended to all the lines and is used by the algorithm to\nrecursively update.\n\nIf `'label'` has newlines they will be indented at the present indentation level\nwith the current prefix.\n\nTo disable unicode results in favor of all-ansi output set `opts.unicode` to\n`false`.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install archy\n```\n\nlicense\n=======\n\nMIT/X11\n", - "readmeFilename": "README.markdown", - "bugs": { - "url": "https://github.com/substack/node-archy/issues" + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" }, - "homepage": "https://github.com/substack/node-archy", "_id": "archy@0.0.2", - "_from": "archy@^0.0.2" + "dependencies": {}, + "engines": { + "node": "*" + }, + "_engineSupported": true, + "_npmVersion": "1.0.106", + "_nodeVersion": "v0.4.12", + "_defaultsLoaded": true, + "dist": { + "shasum": "910f43bf66141fc335564597abc189df44b3d35e", + "tarball": "http://registry.npmjs.org/archy/-/archy-0.0.2.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "_shasum": "910f43bf66141fc335564597abc189df44b3d35e", + "_from": "archy@=0.0.2", + "_resolved": "https://registry.npmjs.org/archy/-/archy-0.0.2.tgz" } diff --git a/node_modules/gulp/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp/node_modules/chalk/node_modules/ansi-styles/package.json index 0daffe5..331c874 100644 --- a/node_modules/gulp/node_modules/chalk/node_modules/ansi-styles/package.json +++ b/node_modules/gulp/node_modules/chalk/node_modules/ansi-styles/package.json @@ -52,7 +52,7 @@ "homepage": "https://github.com/sindresorhus/ansi-styles", "_id": "ansi-styles@1.1.0", "_shasum": "eaecbf66cd706882760b2f4691582b8f55d7a7de", - "_from": "ansi-styles@^1.1.0", + "_from": "ansi-styles@>=1.1.0-0 <2.0.0-0", "_npmVersion": "1.4.9", "_npmUser": { "name": "sindresorhus", diff --git a/node_modules/gulp/node_modules/chalk/node_modules/escape-string-regexp/package.json b/node_modules/gulp/node_modules/chalk/node_modules/escape-string-regexp/package.json index 286b957..cb80dc1 100644 --- a/node_modules/gulp/node_modules/chalk/node_modules/escape-string-regexp/package.json +++ b/node_modules/gulp/node_modules/chalk/node_modules/escape-string-regexp/package.json @@ -43,7 +43,7 @@ "homepage": "https://github.com/sindresorhus/escape-string-regexp", "_id": "escape-string-regexp@1.0.1", "_shasum": "78c76393afb84f102230d949a6125c7f3cf65904", - "_from": "escape-string-regexp@^1.0.0", + "_from": "escape-string-regexp@>=1.0.0-0 <2.0.0-0", "_npmVersion": "1.4.14", "_npmUser": { "name": "jbnicolai", diff --git a/node_modules/gulp/node_modules/chalk/node_modules/has-ansi/package.json b/node_modules/gulp/node_modules/chalk/node_modules/has-ansi/package.json index e35467c..3062c46 100644 --- a/node_modules/gulp/node_modules/chalk/node_modules/has-ansi/package.json +++ b/node_modules/gulp/node_modules/chalk/node_modules/has-ansi/package.json @@ -63,7 +63,7 @@ "homepage": "https://github.com/sindresorhus/has-ansi", "_id": "has-ansi@0.1.0", "_shasum": "84f265aae8c0e6a88a12d7022894b7568894c62e", - "_from": "has-ansi@^0.1.0", + "_from": "has-ansi@0.1.0", "_npmVersion": "1.4.9", "_npmUser": { "name": "sindresorhus", diff --git a/node_modules/gulp/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/node_modules/gulp/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json index 111dbbb..716ae00 100644 --- a/node_modules/gulp/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json +++ b/node_modules/gulp/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json @@ -57,7 +57,7 @@ "homepage": "https://github.com/sindresorhus/ansi-regex", "_id": "ansi-regex@0.2.1", "_shasum": "0d8e946967a3d8143f93e24e298525fc1b2235f9", - "_from": "ansi-regex@^0.2.0", + "_from": "ansi-regex@^0.2.1", "_npmVersion": "1.4.9", "_npmUser": { "name": "sindresorhus", diff --git a/node_modules/gulp/node_modules/chalk/node_modules/strip-ansi/package.json b/node_modules/gulp/node_modules/chalk/node_modules/strip-ansi/package.json index e047e50..fbd5fcd 100644 --- a/node_modules/gulp/node_modules/chalk/node_modules/strip-ansi/package.json +++ b/node_modules/gulp/node_modules/chalk/node_modules/strip-ansi/package.json @@ -62,7 +62,7 @@ "homepage": "https://github.com/sindresorhus/strip-ansi", "_id": "strip-ansi@0.3.0", "_shasum": "25f48ea22ca79187f3174a4db8759347bb126220", - "_from": "strip-ansi@^0.3.0", + "_from": "strip-ansi@0.3.0", "_npmVersion": "1.4.9", "_npmUser": { "name": "sindresorhus", diff --git a/node_modules/gulp/node_modules/chalk/node_modules/supports-color/package.json b/node_modules/gulp/node_modules/chalk/node_modules/supports-color/package.json index 2050975..3e68625 100644 --- a/node_modules/gulp/node_modules/chalk/node_modules/supports-color/package.json +++ b/node_modules/gulp/node_modules/chalk/node_modules/supports-color/package.json @@ -56,7 +56,7 @@ "homepage": "https://github.com/sindresorhus/supports-color", "_id": "supports-color@0.2.0", "_shasum": "d92de2694eb3f67323973d7ae3d8b55b4c22190a", - "_from": "supports-color@^0.2.0", + "_from": "supports-color@0.2.0", "_npmVersion": "1.4.9", "_npmUser": { "name": "sindresorhus", diff --git a/node_modules/gulp/node_modules/chalk/package.json b/node_modules/gulp/node_modules/chalk/package.json index f6428c2..c9b826f 100644 --- a/node_modules/gulp/node_modules/chalk/package.json +++ b/node_modules/gulp/node_modules/chalk/package.json @@ -66,7 +66,7 @@ "homepage": "https://github.com/sindresorhus/chalk", "_id": "chalk@0.5.1", "_shasum": "663b3a648b68b55d04690d49167aa837858f2174", - "_from": "chalk@^0.5.0", + "_from": "chalk@>=0.5.0-0 <0.6.0-0", "_npmVersion": "1.4.14", "_npmUser": { "name": "jbnicolai", diff --git a/node_modules/gulp/node_modules/deprecated/package.json b/node_modules/gulp/node_modules/deprecated/package.json index 7e4a57d..deea3ce 100644 --- a/node_modules/gulp/node_modules/deprecated/package.json +++ b/node_modules/gulp/node_modules/deprecated/package.json @@ -44,7 +44,7 @@ "shasum": "f9c9af5464afa1e7a971458a8bdef2aa94d5bb19", "tarball": "http://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz" }, - "_from": "deprecated@^0.0.1", + "_from": "deprecated@=0.0.1", "_npmVersion": "1.3.24", "_npmUser": { "name": "fractal", @@ -58,6 +58,5 @@ ], "directories": {}, "_shasum": "f9c9af5464afa1e7a971458a8bdef2aa94d5bb19", - "_resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz" } diff --git a/node_modules/gulp/node_modules/gulp-util/README.md b/node_modules/gulp/node_modules/gulp-util/README.md index a8d9b19..bc57626 100644 --- a/node_modules/gulp/node_modules/gulp-util/README.md +++ b/node_modules/gulp/node_modules/gulp-util/README.md @@ -64,9 +64,9 @@ This is just [vinyl](https://github.com/wearefractal/vinyl) ```javascript var file = new gutil.File({ - base: join(__dirname, './fixtures/'), + base: path.join(__dirname, './fixtures/'), cwd: __dirname, - path: join(__dirname, './fixtures/test.coffee') + path: path.join(__dirname, './fixtures/test.coffee') }); ``` @@ -109,6 +109,7 @@ gulp.src('stuff/*.js') - 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. - Note that if you pass in a custom stack string you need to include the message along with that. +- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options. These are all acceptable forms of instantiation: diff --git a/node_modules/gulp/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp/node_modules/gulp-util/lib/PluginError.js index 6640346..0cdabd3 100644 --- a/node_modules/gulp/node_modules/gulp-util/lib/PluginError.js +++ b/node_modules/gulp/node_modules/gulp-util/lib/PluginError.js @@ -1,21 +1,31 @@ var util = require('util'); var colors = require('./colors'); +var _ = require('lodash'); + +var nonEnumberableProperties = ['name', 'message', 'stack']; +var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']); // 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.error = message; - opt.plugin = plugin; - } else if (typeof message === 'object') { - opt = message; - opt.plugin = plugin; - } else if (typeof opt === 'object') { + } else { + if (message instanceof Error) { + opt.error = message; + } else if (typeof message === 'object') { + opt = message; + } else { + opt.message = message; + } opt.plugin = plugin; - opt.message = message; } + + _.defaults(opt, { + showStack: false, + showProperties: true + }) + return opt; }; @@ -26,18 +36,17 @@ function PluginError(plugin, message, opt) { var options = parseOptions(plugin, message, opt); - this.plugin = options.plugin; - this.showStack = options.showStack === true; - - var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack']; - // if options has an error, grab details from it if (options.error) { - properties.forEach(function(prop) { - if (prop in options.error) this[prop] = options.error[prop]; - }, this); + // These properties are not enumerable, so we have to add them explicitly. + _.uniq(Object.keys(options.error).concat(nonEnumberableProperties)) + .forEach(function(prop) { + this[prop] = options.error[prop]; + }, this); } + var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin']; + // options object can override properties.forEach(function(prop) { if (prop in options) this[prop] = options[prop]; @@ -46,8 +55,18 @@ function PluginError(plugin, message, opt) { // 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.stack) { + // Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to. + // Since we are using our own toString method which controls when to display the stack trace if we don't go through this + // safety object, then we'll get stack overflow problems. + var safety = { + toString: function() { + return this._messageWithDetails() + '\nStack:'; + }.bind(this) + }; + Error.captureStackTrace(safety, arguments.callee || this.constructor); + this.__safety = safety; + } if (!this.plugin) throw new Error('Missing plugin name'); if (!this.message) throw new Error('Missing error message'); @@ -55,9 +74,46 @@ function PluginError(plugin, message, opt) { util.inherits(PluginError, Error); +PluginError.prototype._messageWithDetails = function() { + var messageWithDetails = 'Message:\n ' + this.message; + var details = this._messageDetails(); + + if (details !== '') { + messageWithDetails += '\n' + details; + } + + return messageWithDetails; +}; + +PluginError.prototype._messageDetails = function() { + var properties; + if (this.showProperties) { + var properties = _(Object.keys(this)) + .filter(function(prop) { return propertiesNotToDisplay.indexOf(prop) === -1; }) + .map(function(prop) { return '\n ' + prop + ': ' + this[prop]; }, this) + .reduce(function(properties, next) { return properties + next; }); + } + return properties === undefined ? '' : ('Details:' + properties) +}; + PluginError.prototype.toString = function () { - var sig = this.name+' in plugin \''+colors.cyan(this.plugin)+'\''; - var msg = this.showStack ? (this._stack || this.stack) : this.message; + var sig = colors.red(this.name) + ' in plugin \'' + colors.cyan(this.plugin) + '\''; + var detailsWithStack = function(stack) { + return this._messageWithDetails() + '\nStack:\n' + stack; + }.bind(this); + + if (this.showStack) { + if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor + msg = this.__safety.stack; + } else if (this._stack) { + msg = detailsWithStack(this._stack); + } else { // Stack from wrapped error + msg = detailsWithStack(this.stack); + } + } else { + msg = this._messageWithDetails(); + } + return sig+'\n'+msg; }; diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/dateformat/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/dateformat/package.json index e5a5076..1a2d4ca 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/dateformat/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/dateformat/package.json @@ -47,7 +47,7 @@ "shasum": "5d60c5d574dc778a7f98139156c6cfc9d851d1e7", "tarball": "http://registry.npmjs.org/dateformat/-/dateformat-1.0.8-1.2.3.tgz" }, - "_from": "dateformat@^1.0.7-1.2.3", + "_from": "dateformat@>=1.0.7-1.2.3 <2.0.0-0", "_npmVersion": "1.3.24", "_npmUser": { "name": "ctavan", @@ -56,5 +56,6 @@ "directories": {}, "_shasum": "5d60c5d574dc778a7f98139156c6cfc9d851d1e7", "_resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.8-1.2.3.tgz", - "readme": "ERROR: No README data found!" + "readme": "ERROR: No README data found!", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json index 0836ea4..c234a6d 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json @@ -45,7 +45,7 @@ "shasum": "4f1227aa5a8711fc632f5b07a1f4607aab8b3222", "tarball": "http://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz" }, - "_from": "lodash._reinterpolate@^2.4.1", + "_from": "lodash._reinterpolate@>=2.4.1-0 <3.0.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "4f1227aa5a8711fc632f5b07a1f4607aab8b3222", - "_resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json index 3710c16..c5e0967 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json @@ -45,7 +45,7 @@ "shasum": "ecfe22618a2ade50bfeea43937e51df66f0edb72", "tarball": "http://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz" }, - "_from": "lodash._escapestringchar@~2.4.1", + "_from": "lodash._escapestringchar@>=2.4.1-0 <2.5.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "ecfe22618a2ade50bfeea43937e51df66f0edb72", - "_resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json index 21b0fd8..6cd6aa9 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json @@ -41,6 +41,6 @@ "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", + "_from": "lodash._objecttypes@>=2.4.1-0 <2.5.0-0", "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json index 7d395e5..8a274a5 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json @@ -56,7 +56,7 @@ "shasum": "a7e8885f05e68851144b6e12a8f3678026bc4c54", "tarball": "http://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz" }, - "_from": "lodash.defaults@~2.4.1", + "_from": "lodash.defaults@>=2.4.1-0 <2.5.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", diff --git a/node_modules/gulp/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/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json index e35b071..5d5ce04 100644 --- a/node_modules/gulp/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/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json @@ -45,7 +45,7 @@ "shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb", "tarball": "http://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz" }, - "_from": "lodash._htmlescapes@~2.4.1", + "_from": "lodash._htmlescapes@>=2.4.1-0 <2.5.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb", - "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json index f61df3b..8bbb955 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json @@ -48,7 +48,7 @@ "shasum": "df67c3bb6b7e8e1e831ab48bfa0795b92afe899d", "tarball": "http://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz" }, - "_from": "lodash._escapehtmlchar@~2.4.1", + "_from": "lodash._escapehtmlchar@>=2.4.1-0 <2.5.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -74,5 +74,6 @@ ], "directories": {}, "_shasum": "df67c3bb6b7e8e1e831ab48bfa0795b92afe899d", - "_resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp/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/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json index e35b071..5d5ce04 100644 --- a/node_modules/gulp/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/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json @@ -45,7 +45,7 @@ "shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb", "tarball": "http://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz" }, - "_from": "lodash._htmlescapes@~2.4.1", + "_from": "lodash._htmlescapes@>=2.4.1-0 <2.5.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -71,5 +71,6 @@ ], "directories": {}, "_shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb", - "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json index a0ddcbf..1940c94 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json @@ -49,7 +49,7 @@ "shasum": "747c4fc40103eb3bb8a0976e571f7a2659e93ba7", "tarball": "http://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz" }, - "_from": "lodash._reunescapedhtml@~2.4.1", + "_from": "lodash._reunescapedhtml@>=2.4.1-0 <2.5.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -75,5 +75,6 @@ ], "directories": {}, "_shasum": "747c4fc40103eb3bb8a0976e571f7a2659e93ba7", - "_resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json index a88e9fb..45a0bba 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json @@ -57,7 +57,7 @@ "shasum": "2ce12c5e084db0a57dda5e5d1eeeb9f5d175a3b4", "tarball": "http://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz" }, - "_from": "lodash.escape@~2.4.1", + "_from": "lodash.escape@>=2.4.1-0 <2.5.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -83,5 +83,6 @@ ], "directories": {}, "_shasum": "2ce12c5e084db0a57dda5e5d1eeeb9f5d175a3b4", - "_resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json index 0dadd03..e898e56 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json @@ -41,6 +41,6 @@ "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", + "_from": "lodash._isnative@>=2.4.1-0 <2.5.0-0", "scripts": {} } diff --git a/node_modules/gulp/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/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json index 21b0fd8..6cd6aa9 100644 --- a/node_modules/gulp/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/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json @@ -41,6 +41,6 @@ "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", + "_from": "lodash._objecttypes@>=2.4.1-0 <2.5.0-0", "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json index 467f461..48a193d 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json @@ -48,7 +48,7 @@ "shasum": "6e9cc9666ff081f0b5a6c978b83e242e6949d203", "tarball": "http://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz" }, - "_from": "lodash._shimkeys@~2.4.1", + "_from": "lodash._shimkeys@>=2.4.1-0 <2.5.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -74,5 +74,6 @@ ], "directories": {}, "_shasum": "6e9cc9666ff081f0b5a6c978b83e242e6949d203", - "_resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp/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/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json index 21b0fd8..6cd6aa9 100644 --- a/node_modules/gulp/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/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json @@ -41,6 +41,6 @@ "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", + "_from": "lodash._objecttypes@>=2.4.1-0 <2.5.0-0", "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json index adfee42..0475d9d 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json @@ -51,6 +51,6 @@ "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", + "_from": "lodash.isobject@>=2.4.1-0 <2.5.0-0", "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json index 76a7e22..bac02b6 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json @@ -57,7 +57,7 @@ "shasum": "48dea46df8ff7632b10d706b8acb26591e2b3727", "tarball": "http://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz" }, - "_from": "lodash.keys@~2.4.1", + "_from": "lodash.keys@>=2.4.1-0 <2.5.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -83,5 +83,6 @@ ], "directories": {}, "_shasum": "48dea46df8ff7632b10d706b8acb26591e2b3727", - "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json index 2741238..efe2330 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json @@ -56,7 +56,7 @@ "shasum": "ea76c75d11eb86d4dbe89a83893bb861929ac699", "tarball": "http://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz" }, - "_from": "lodash.templatesettings@~2.4.1", + "_from": "lodash.templatesettings@>=2.4.1-0 <2.5.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -82,5 +82,6 @@ ], "directories": {}, "_shasum": "ea76c75d11eb86d4dbe89a83893bb861929ac699", - "_resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json index 679515e..d6fadeb 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json @@ -55,7 +55,7 @@ "shasum": "abf514436b3cb705001627978cbcf30b1280eea4", "tarball": "http://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz" }, - "_from": "lodash.values@~2.4.1", + "_from": "lodash.values@>=2.4.1-0 <2.5.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -81,5 +81,6 @@ ], "directories": {}, "_shasum": "abf514436b3cb705001627978cbcf30b1280eea4", - "_resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/package.json index f2a918e..07daeb0 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/package.json @@ -61,7 +61,7 @@ "shasum": "9e611007edf629129a974ab3c48b817b3e1cf20d", "tarball": "http://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz" }, - "_from": "lodash.template@^2.4.1", + "_from": "lodash.template@>=2.4.1-0 <3.0.0-0", "_npmVersion": "1.3.14", "_npmUser": { "name": "jdalton", @@ -87,5 +87,6 @@ ], "directories": {}, "_shasum": "9e611007edf629129a974ab3c48b817b3e1cf20d", - "_resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz" + "_resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz", + "scripts": {} } diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/LICENSE.txt b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash/LICENSE.txt similarity index 100% rename from node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/LICENSE.txt rename to node_modules/gulp/node_modules/gulp-util/node_modules/lodash/LICENSE.txt diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash/README.md b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash/README.md new file mode 100644 index 0000000..6f9598e --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash/README.md @@ -0,0 +1,163 @@ +# Lo-Dash v2.4.1 +A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features). + +## Download + +Check out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences]) for details over the differences between builds. + +* Modern builds perfect for newer browsers/environments:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.min.js) + +* Compatibility builds for older environment support too:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.min.js) + +* Underscore builds to use as a drop-in replacement:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.min.js) + +CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed. + +Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method. + +## Dive in + +There’s plenty of **[documentation](http://lodash.com/docs)**, [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).
+Check out DevDocs as a fast, organized, & searchable interface for our documentation. + +The full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).
+A list of upcoming features is available on our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap). + +## Features *not* in Underscore + + * AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.) + * [_(…)](http://lodash.com/docs#_) supports intuitive chaining + * [_.at](http://lodash.com/docs#at) for cherry-picking collection values + * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.constant](http://lodash.com/docs#constant) & [_.property](http://lodash.com/docs#property) function generators for composing functions + * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` + * [_.create](http://lodash.com/docs#create) for easier object inheritance + * [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins + * [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions + * [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control + * [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys + * [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early + * [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties + * [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties + * [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object` + * [_.mapValues](http://lodash.com/docs#mapValues) for [mapping](http://lodash.com/docs#map) values to an object + * [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions + * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend) + * [_.noop](http://lodash.com/docs#noop) for function placeholders + * [_.now](http://lodash.com/docs#now) as a cross-browser `Date.now` alternative + * [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior + * [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays + * [_.random](http://lodash.com/docs#random) supports returning floating-point numbers + * [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking + * [_.sortBy](http://lodash.com/docs#sortBy) supports sorting by multiple properties + * [_.support](http://lodash.com/docs#support) for flagging environment features + * [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals) + * [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects + * [_.where](http://lodash.com/docs#where) supports deep object comparisons + * [_.xor](http://lodash.com/docs#xor) as a companion to [_.difference](http://lodash.com/docs#difference), [_.intersection](http://lodash.com/docs#intersection), & [_.union](http://lodash.com/docs#union) + * [_.zip](http://lodash.com/docs#zip) is capable of unzipping values + * [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), & + [more](http://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks + * [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), & + [more](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings + * [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), & + [more](http://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands + * [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), & + [more](http://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight") right-associative methods + +## Resources + + * Podcasts + - [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/) + + * Posts + - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/) + - [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/) + + * Videos + - [Introduction](https://vimeo.com/44154599) + - [Origins](https://vimeo.com/44154600) + - [Optimizations & builds](https://vimeo.com/44154601) + - [Native method use](https://vimeo.com/48576012) + - [Testing](https://vimeo.com/45865290) + - [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk) + + A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources). + +## Support + +Tested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.21~0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
+Automated browser test results [are available](https://saucelabs.com/u/lodash) as well as [Travis CI](https://travis-ci.org/) builds for [lodash](https://travis-ci.org/lodash/lodash/), [lodash-cli](https://travis-ci.org/lodash/lodash-cli/), [lodash-amd](https://travis-ci.org/lodash/lodash-amd/), [lodash-node](https://travis-ci.org/lodash/lodash-node/), & [grunt-lodash](https://travis-ci.org/lodash/grunt-lodash). + +Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
+[![Sauce Labs](http://lodash.com/_img/sauce.png)](https://saucelabs.com/ "Sauce Labs: Selenium Testing & More") + +## Installation & usage + +In browsers: + +```html + +``` + +Using [`npm`](http://npmjs.org/): + +```bash +npm i --save lodash + +{sudo} npm i -g lodash +npm ln lodash +``` + +In [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/): + +```js +var _ = require('lodash'); +// or as Underscore +var _ = require('lodash/dist/lodash.underscore'); +``` + +**Notes:** + * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL + * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it + +In [Rhino](http://www.mozilla.org/rhino/): + +```js +load('lodash.js'); +``` + +In an AMD loader: + +```js +require({ + 'packages': [ + { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' } + ] +}, +['lodash'], function(_) { + console.log(_.VERSION); +}); +``` + +## 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/) | + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js new file mode 100644 index 0000000..23798ba --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/lodash/dist/lodash.compat.js @@ -0,0 +1,7157 @@ +/** + * @license + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash -o ./dist/lodash.compat.js` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre ES5 environments */ + var undefined; + + /** Used to pool arrays and objects used internally */ + var arrayPool = [], + objectPool = []; + + /** Used to generate unique IDs */ + var idCounter = 0; + + /** Used internally to indicate various things */ + var indicatorObject = {}; + + /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */ + var keyPrefix = +new Date + ''; + + /** Used as the size when optimizations are enabled for large arrays */ + var largeArraySize = 75; + + /** Used as the max size of the `arrayPool` and `objectPool` */ + var maxPoolSize = 40; + + /** Used to detect and test whitespace */ + var whitespace = ( + // whitespace + ' \t\x0B\f\xA0\ufeff' + + + // line terminators + '\n\r\u2028\u2029' + + + // unicode category "Zs" space separators + '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' + ); + + /** 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 match regexp flags from their coerced string values */ + var reFlags = /\w*$/; + + /** Used to detected named functions */ + var reFuncName = /^\s*function[ \n\r\t]+\w/; + + /** Used to match "interpolate" template delimiters */ + var reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match leading whitespace and zeros to be removed */ + var reLeadingSpacesAndZeros = RegExp('^[' + whitespace + ']*0+(?=.$)'); + + /** Used to ensure capturing order of template delimiters */ + var reNoMatch = /($^)/; + + /** Used to detect functions containing a `this` reference */ + var reThis = /\bthis\b/; + + /** Used to match unescaped characters in compiled string literals */ + var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; + + /** Used to assign default `context` object properties */ + var contextProps = [ + 'Array', 'Boolean', 'Date', 'Error', 'Function', 'Math', 'Number', 'Object', + 'RegExp', 'String', '_', 'attachEvent', 'clearTimeout', 'isFinite', 'isNaN', + 'parseInt', 'setTimeout' + ]; + + /** Used to fix the JScript [[DontEnum]] bug */ + var shadowedProps = [ + 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', + 'toLocaleString', 'toString', 'valueOf' + ]; + + /** Used to make template sourceURLs easier to identify */ + var templateCounter = 0; + + /** `Object#toString` result shortcuts */ + var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + boolClass = '[object Boolean]', + dateClass = '[object Date]', + errorClass = '[object Error]', + funcClass = '[object Function]', + numberClass = '[object Number]', + objectClass = '[object Object]', + regexpClass = '[object RegExp]', + stringClass = '[object String]'; + + /** Used to identify object classifications that `_.clone` supports */ + var cloneableClasses = {}; + cloneableClasses[funcClass] = false; + cloneableClasses[argsClass] = cloneableClasses[arrayClass] = + cloneableClasses[boolClass] = cloneableClasses[dateClass] = + cloneableClasses[numberClass] = cloneableClasses[objectClass] = + cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true; + + /** Used as an internal `_.debounce` options object */ + var debounceOptions = { + 'leading': false, + 'maxWait': 0, + 'trailing': false + }; + + /** Used as the property descriptor for `__bindData__` */ + var descriptor = { + 'configurable': false, + 'enumerable': false, + 'value': null, + 'writable': false + }; + + /** Used as the data object for `iteratorTemplate` */ + var iteratorData = { + 'args': '', + 'array': null, + 'bottom': '', + 'firstArg': '', + 'init': '', + 'keys': null, + 'loop': '', + 'shadowedProps': null, + 'support': null, + 'top': '', + 'useHas': false + }; + + /** 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 + }; + + /** Used to escape characters for inclusion in compiled string literals */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\t': 't', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Used as a reference to the global object */ + var root = (objectTypes[typeof window] && window) || this; + + /** Detect free variable `exports` */ + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports` */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + + /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ + var freeGlobal = objectTypes[typeof global] && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.indexOf` without support for binary searches + * or `fromIndex` constraints. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * An implementation of `_.contains` for cache objects that mimics the return + * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var type = typeof value; + cache = cache.cache; + + if (type == 'boolean' || value == null) { + return cache[value] ? 0 : -1; + } + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value; + cache = (cache = cache[type]) && cache[key]; + + return type == 'object' + ? (cache && baseIndexOf(cache, value) > -1 ? 0 : -1) + : (cache ? 0 : -1); + } + + /** + * Adds a given value to the corresponding cache object. + * + * @private + * @param {*} value The value to add to the cache. + */ + function cachePush(value) { + var cache = this.cache, + type = typeof value; + + if (type == 'boolean' || value == null) { + cache[value] = true; + } else { + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value, + typeCache = cache[type] || (cache[type] = {}); + + if (type == 'object') { + (typeCache[key] || (typeCache[key] = [])).push(value); + } else { + typeCache[key] = true; + } + } + } + + /** + * Used by `_.max` and `_.min` as the default callback when a given + * collection is a string value. + * + * @private + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. + */ + function charAtCallback(value) { + return value.charCodeAt(0); + } + + /** + * Used by `sortBy` to compare transformed `collection` elements, stable sorting + * them in ascending order. + * + * @private + * @param {Object} a The object to compare to `b`. + * @param {Object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. + */ + function compareAscending(a, b) { + var ac = a.criteria, + bc = b.criteria, + index = -1, + length = ac.length; + + while (++index < length) { + var value = ac[index], + other = bc[index]; + + if (value !== other) { + if (value > other || typeof value == 'undefined') { + return 1; + } + if (value < other || typeof other == 'undefined') { + return -1; + } + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to return the same value for + // `a` and `b`. See https://github.com/jashkenas/underscore/pull/1247 + // + // This also ensures a stable sort in V8 and other engines. + // See http://code.google.com/p/v8/issues/detail?id=90 + return a.index - b.index; + } + + /** + * Creates a cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [array=[]] The array to search. + * @returns {null|Object} Returns the cache object or `null` if caching should not be used. + */ + function createCache(array) { + var index = -1, + length = array.length, + first = array[0], + mid = array[(length / 2) | 0], + last = array[length - 1]; + + if (first && typeof first == 'object' && + mid && typeof mid == 'object' && last && typeof last == 'object') { + return false; + } + var cache = getObject(); + cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false; + + var result = getObject(); + result.array = array; + result.cache = cache; + result.push = cachePush; + + while (++index < length) { + result.push(array[index]); + } + return result; + } + + /** + * 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]; + } + + /** + * Gets an array from the array pool or creates a new one if the pool is empty. + * + * @private + * @returns {Array} The array from the pool. + */ + function getArray() { + return arrayPool.pop() || []; + } + + /** + * Gets an object from the object pool or creates a new one if the pool is empty. + * + * @private + * @returns {Object} The object from the pool. + */ + function getObject() { + return objectPool.pop() || { + 'array': null, + 'cache': null, + 'criteria': null, + 'false': false, + 'index': 0, + 'null': false, + 'number': null, + 'object': null, + 'push': null, + 'string': null, + 'true': false, + 'undefined': false, + 'value': null + }; + } + + /** + * Checks if `value` is a DOM node in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM node, else `false`. + */ + function isNode(value) { + // IE < 9 presents DOM nodes as `Object` objects except they have `toString` + // methods that are `typeof` "string" and still can coerce nodes to strings + return typeof value.toString != 'function' && typeof (value + '') == 'string'; + } + + /** + * Releases the given array back to the array pool. + * + * @private + * @param {Array} [array] The array to release. + */ + function releaseArray(array) { + array.length = 0; + if (arrayPool.length < maxPoolSize) { + arrayPool.push(array); + } + } + + /** + * Releases the given object back to the object pool. + * + * @private + * @param {Object} [object] The object to release. + */ + function releaseObject(object) { + var cache = object.cache; + if (cache) { + releaseObject(cache); + } + object.array = object.cache = object.criteria = object.object = object.number = object.string = object.value = null; + if (objectPool.length < maxPoolSize) { + objectPool.push(object); + } + } + + /** + * Slices the `collection` from the `start` index up to, but not including, + * the `end` index. + * + * Note: This function is used instead of `Array#slice` to support node lists + * in IE < 9 and to ensure dense arrays are returned. + * + * @private + * @param {Array|Object|string} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {Array} Returns the new array. + */ + function slice(array, start, end) { + start || (start = 0); + if (typeof end == 'undefined') { + end = array ? array.length : 0; + } + var index = -1, + length = end - start || 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = array[start + index]; + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new `lodash` function using the given context object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} [context=root] The context object. + * @returns {Function} Returns the `lodash` function. + */ + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See http://es5.github.io/#x11.1.5. + context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; + + /** Native constructor references */ + var Array = context.Array, + Boolean = context.Boolean, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ + var arrayRef = []; + + /** Used for native method references */ + var errorProto = Error.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + + /** Used to restore the original `_` reference in `noConflict` */ + var oldDash = context._; + + /** 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, '.*?') + '$' + ); + + /** Native method shortcuts */ + var ceil = Math.ceil, + clearTimeout = context.clearTimeout, + floor = Math.floor, + fnToString = Function.prototype.toString, + getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf, + hasOwnProperty = objectProto.hasOwnProperty, + push = arrayRef.push, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + setTimeout = context.setTimeout, + splice = arrayRef.splice, + unshift = arrayRef.unshift; + + /** Used to set meta data on functions */ + var defineProperty = (function() { + // IE 8 only accepts DOM elements + try { + var o = {}, + func = isNative(func = Object.defineProperty) && func, + result = func(o, o, o) && func; + } catch(e) { } + return result; + }()); + + /* Native method shortcuts for methods with the same name as other `lodash` methods */ + var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate, + nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray, + nativeIsFinite = context.isFinite, + nativeIsNaN = context.isNaN, + nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys, + nativeMax = Math.max, + nativeMin = Math.min, + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + + /** Used to lookup a built-in constructor by [[Class]] */ + var ctorByClass = {}; + ctorByClass[arrayClass] = Array; + ctorByClass[boolClass] = Boolean; + ctorByClass[dateClass] = Date; + ctorByClass[funcClass] = Function; + ctorByClass[objectClass] = Object; + ctorByClass[numberClass] = Number; + ctorByClass[regexpClass] = RegExp; + ctorByClass[stringClass] = String; + + /** Used to avoid iterating non-enumerable properties in IE < 9 */ + var nonEnumProps = {}; + nonEnumProps[arrayClass] = nonEnumProps[dateClass] = nonEnumProps[numberClass] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; + nonEnumProps[boolClass] = nonEnumProps[stringClass] = { 'constructor': true, 'toString': true, 'valueOf': true }; + nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true }; + nonEnumProps[objectClass] = { 'constructor': true }; + + (function() { + var length = shadowedProps.length; + while (length--) { + var key = shadowedProps[length]; + for (var className in nonEnumProps) { + if (hasOwnProperty.call(nonEnumProps, className) && !hasOwnProperty.call(nonEnumProps[className], key)) { + nonEnumProps[className][key] = false; + } + } + } + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps the given value to enable intuitive + * method chaining. + * + * In addition to Lo-Dash methods, wrappers also have the following `Array` methods: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, + * and `unshift` + * + * Chaining is supported in custom builds as long as the `value` method is + * implicitly or explicitly included in the build. + * + * The chainable wrapper functions are: + * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, + * `compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`, + * `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, + * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`, + * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, + * `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, + * `union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, + * and `zip` + * + * The non-chainable wrapper functions are: + * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`, + * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, + * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, + * `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, + * `template`, `unescape`, `uniqueId`, and `value` + * + * The wrapper functions `first` and `last` return wrapped values when `n` is + * provided, otherwise they return unwrapped values. + * + * Explicit chaining can be enabled by using the `_.chain` method. + * + * @name _ + * @constructor + * @category Chaining + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(num) { + * return num * num; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + // don't wrap if already wrapped, even if wrapped by a different `lodash` constructor + return (value && typeof value == 'object' && !isArray(value) && hasOwnProperty.call(value, '__wrapped__')) + ? value + : new lodashWrapper(value); + } + + /** + * A fast path for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {Object} Returns a `lodash` instance. + */ + function lodashWrapper(value, chainAll) { + this.__chain__ = !!chainAll; + this.__wrapped__ = value; + } + // ensure `new lodashWrapper` is an instance of `lodash` + lodashWrapper.prototype = lodash.prototype; + + /** + * An object used to flag environments features. + * + * @static + * @memberOf _ + * @type Object + */ + var support = lodash.support = {}; + + (function() { + var ctor = function() { this.x = 1; }, + object = { '0': 1, 'length': 1 }, + props = []; + + ctor.prototype = { 'valueOf': 1, 'y': 1 }; + for (var key in new ctor) { props.push(key); } + for (key in arguments) { } + + /** + * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.argsClass = toString.call(arguments) == argsClass; + + /** + * Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5). + * + * @memberOf _.support + * @type boolean + */ + support.argsObject = arguments.constructor == Object && !(arguments instanceof Array); + + /** + * Detect if `name` or `message` properties of `Error.prototype` are + * enumerable by default. (IE < 9, Safari < 5.1) + * + * @memberOf _.support + * @type boolean + */ + support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); + + /** + * Detect if `prototype` properties are enumerable by default. + * + * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 + * (if the prototype or a property on the prototype has been set) + * incorrectly sets a function's `prototype` property [[Enumerable]] + * value to `true`. + * + * @memberOf _.support + * @type boolean + */ + support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); + + /** + * Detect if functions can be decompiled by `Function#toString` + * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). + * + * @memberOf _.support + * @type boolean + */ + support.funcDecomp = !isNative(context.WinRTError) && reThis.test(runInContext); + + /** + * Detect if `Function#name` is supported (all but IE). + * + * @memberOf _.support + * @type boolean + */ + support.funcNames = typeof Function.name == 'string'; + + /** + * Detect if `arguments` object indexes are non-enumerable + * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumArgs = key != 0; + + /** + * Detect if properties shadowing those on `Object.prototype` are non-enumerable. + * + * In IE < 9 an objects own properties, shadowing non-enumerable ones, are + * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumShadows = !/valueOf/.test(props); + + /** + * Detect if own properties are iterated after inherited properties (all but IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.ownLast = props[0] != 'x'; + + /** + * Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. + * + * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` + * and `splice()` functions that fail to remove the last element, `value[0]`, + * of array-like objects even though the `length` property is set to `0`. + * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` + * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. + * + * @memberOf _.support + * @type boolean + */ + support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); + + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index and IE 8 can only access + * characters by index on string literals. + * + * @memberOf _.support + * @type boolean + */ + support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; + + /** + * Detect if a DOM node's [[Class]] is resolvable (all but IE < 9) + * and that the JS engine errors when attempting to coerce an object to + * a string without a `toString` function. + * + * @memberOf _.support + * @type boolean + */ + try { + support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); + } catch(e) { + support.nodeClass = true; + } + }(1)); + + /** + * 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 + */ + lodash.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 + */ + '_': lodash + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The template used to create iterator functions. + * + * @private + * @param {Object} data The data object used to populate the text. + * @returns {string} Returns the interpolated text. + */ + var iteratorTemplate = function(obj) { + + var __p = 'var index, iterable = ' + + (obj.firstArg) + + ', result = ' + + (obj.init) + + ';\nif (!iterable) return result;\n' + + (obj.top) + + ';'; + if (obj.array) { + __p += '\nvar length = iterable.length; index = -1;\nif (' + + (obj.array) + + ') { '; + if (support.unindexedChars) { + __p += '\n if (isString(iterable)) {\n iterable = iterable.split(\'\')\n } '; + } + __p += '\n while (++index < length) {\n ' + + (obj.loop) + + ';\n }\n}\nelse { '; + } else if (support.nonEnumArgs) { + __p += '\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += \'\';\n ' + + (obj.loop) + + ';\n }\n } else { '; + } + + if (support.enumPrototypes) { + __p += '\n var skipProto = typeof iterable == \'function\';\n '; + } + + if (support.enumErrorProps) { + __p += '\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n '; + } + + var conditions = []; if (support.enumPrototypes) { conditions.push('!(skipProto && index == "prototype")'); } if (support.enumErrorProps) { conditions.push('!(skipErrorProps && (index == "message" || index == "name"))'); } + + if (obj.useHas && obj.keys) { + __p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n'; + if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + } else { + __p += '\n for (index in iterable) {\n'; + if (obj.useHas) { conditions.push("hasOwnProperty.call(iterable, index)"); } if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + if (support.nonEnumShadows) { + __p += '\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n '; + for (k = 0; k < 7; k++) { + __p += '\n index = \'' + + (obj.shadowedProps[k]) + + '\';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))'; + if (!obj.useHas) { + __p += ' || (!nonEnum[index] && iterable[index] !== objectProto[index])'; + } + __p += ') {\n ' + + (obj.loop) + + ';\n } '; + } + __p += '\n } '; + } + + } + + if (obj.array || support.nonEnumArgs) { + __p += '\n}'; + } + __p += + (obj.bottom) + + ';\nreturn result'; + + return __p + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.bind` that creates the bound function and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new bound function. + */ + function baseBind(bindData) { + var func = bindData[0], + partialArgs = bindData[2], + thisArg = bindData[4]; + + function bound() { + // `Function#bind` spec + // http://es5.github.io/#x15.3.4.5 + if (partialArgs) { + // avoid `arguments` object deoptimizations by using `slice` instead + // of `Array.prototype.slice.call` and not assigning `arguments` to a + // variable as a ternary expression + var args = slice(partialArgs); + push.apply(args, arguments); + } + // mimic the constructor's `return` behavior + // http://es5.github.io/#x13.2.2 + if (this instanceof bound) { + // ensure `new bound` is an instance of `func` + var thisBinding = baseCreate(func.prototype), + result = func.apply(thisBinding, args || arguments); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisArg, args || arguments); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.clone` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, callback, stackA, stackB) { + if (callback) { + var result = callback(value); + if (typeof result != 'undefined') { + return result; + } + } + // inspect [[Class]] + var isObj = isObject(value); + if (isObj) { + var className = toString.call(value); + if (!cloneableClasses[className] || (!support.nodeClass && isNode(value))) { + return value; + } + var ctor = ctorByClass[className]; + switch (className) { + case boolClass: + case dateClass: + return new ctor(+value); + + case numberClass: + case stringClass: + return new ctor(value); + + case regexpClass: + result = ctor(value.source, reFlags.exec(value)); + result.lastIndex = value.lastIndex; + return result; + } + } else { + return value; + } + var isArr = isArray(value); + if (isDeep) { + // check for circular references and return corresponding clone + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + result = isArr ? ctor(value.length) : {}; + } + else { + result = isArr ? slice(value) : assign({}, value); + } + // add array properties assigned by `RegExp#exec` + if (isArr) { + if (hasOwnProperty.call(value, 'index')) { + result.index = value.index; + } + if (hasOwnProperty.call(value, 'input')) { + result.input = value.input; + } + } + // exit for shallow clone + if (!isDeep) { + return result; + } + // add the source value to the stack of traversed objects + // and associate it with its clone + stackA.push(value); + stackB.push(result); + + // recursively populate clone (susceptible to call stack limits) + (isArr ? baseEach : forOwn)(value, function(objValue, key) { + result[key] = baseClone(objValue, isDeep, callback, stackA, stackB); + }); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + function baseCreate(prototype, properties) { + return isObject(prototype) ? nativeCreate(prototype) : {}; + } + // fallback for browsers without `Object.create` + if (!nativeCreate) { + baseCreate = (function() { + function Object() {} + return function(prototype) { + if (isObject(prototype)) { + Object.prototype = prototype; + var result = new Object; + Object.prototype = null; + } + return result || context.Object(); + }; + }()); + } + + /** + * The base implementation of `_.createCallback` without support for creating + * "_.pluck" or "_.where" style callbacks. + * + * @private + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + */ + function baseCreateCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + // exit early for no `thisArg` or already bound by `Function#bind` + if (typeof thisArg == 'undefined' || !('prototype' in func)) { + return func; + } + var bindData = func.__bindData__; + if (typeof bindData == 'undefined') { + if (support.funcNames) { + bindData = !func.name; + } + bindData = bindData || !support.funcDecomp; + if (!bindData) { + var source = fnToString.call(func); + if (!support.funcNames) { + bindData = !reFuncName.test(source); + } + if (!bindData) { + // checks if `func` references the `this` keyword and stores the result + bindData = reThis.test(source); + setBindData(func, bindData); + } + } + } + // exit early if there are no `this` references or `func` is bound + if (bindData === false || (bindData !== true && bindData[1] & 1)) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 2: return function(a, b) { + return func.call(thisArg, a, b); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + } + return bind(func, thisArg); + } + + /** + * The base implementation of `createWrapper` that creates the wrapper and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new function. + */ + function baseCreateWrapper(bindData) { + var func = bindData[0], + bitmask = bindData[1], + partialArgs = bindData[2], + partialRightArgs = bindData[3], + thisArg = bindData[4], + arity = bindData[5]; + + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + key = func; + + function bound() { + var thisBinding = isBind ? thisArg : this; + if (partialArgs) { + var args = slice(partialArgs); + push.apply(args, arguments); + } + if (partialRightArgs || isCurry) { + args || (args = slice(arguments)); + if (partialRightArgs) { + push.apply(args, partialRightArgs); + } + if (isCurry && args.length < arity) { + bitmask |= 16 & ~32; + return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]); + } + } + args || (args = arguments); + if (isBindKey) { + func = thisBinding[key]; + } + if (this instanceof bound) { + thisBinding = baseCreate(func.prototype); + var result = func.apply(thisBinding, args); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisBinding, args); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.difference` that accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to process. + * @param {Array} [values] The array of values to exclude. + * @returns {Array} Returns a new array of filtered values. + */ + function baseDifference(array, values) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + isLarge = length >= largeArraySize && indexOf === baseIndexOf, + result = []; + + if (isLarge) { + var cache = createCache(values); + if (cache) { + indexOf = cacheIndexOf; + values = cache; + } else { + isLarge = false; + } + } + while (++index < length) { + var value = array[index]; + if (indexOf(values, value) < 0) { + result.push(value); + } + } + if (isLarge) { + releaseObject(values); + } + return result; + } + + /** + * The base implementation of `_.flatten` without support for callback + * shorthands or `thisArg` binding. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isStrict=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {Array} Returns a new flattened array. + */ + function baseFlatten(array, isShallow, isStrict, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (value && typeof value == 'object' && typeof value.length == 'number' + && (isArray(value) || isArguments(value))) { + // recursively flatten arrays (susceptible to call stack limits) + if (!isShallow) { + value = baseFlatten(value, isShallow, isStrict); + } + var valIndex = -1, + valLength = value.length, + resIndex = result.length; + + result.length += valLength; + while (++valIndex < valLength) { + result[resIndex++] = value[valIndex]; + } + } else if (!isStrict) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.isEqual`, without support for `thisArg` binding, + * that allows partial "_.where" style comparisons. + * + * @private + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `a` objects. + * @param {Array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { + // used to indicate that when comparing objects, `a` has at least the properties of `b` + if (callback) { + var result = callback(a, b); + if (typeof result != 'undefined') { + return !!result; + } + } + // exit early for identical values + if (a === b) { + // treat `+0` vs. `-0` as not equal + return a !== 0 || (1 / a == 1 / b); + } + var type = typeof a, + otherType = typeof b; + + // exit early for unlike primitive values + if (a === a && + !(a && objectTypes[type]) && + !(b && objectTypes[otherType])) { + return false; + } + // exit early for `null` and `undefined` avoiding ES3's Function#call behavior + // http://es5.github.io/#x15.3.4.4 + if (a == null || b == null) { + return a === b; + } + // compare [[Class]] names + var className = toString.call(a), + otherClass = toString.call(b); + + if (className == argsClass) { + className = objectClass; + } + if (otherClass == argsClass) { + otherClass = objectClass; + } + if (className != otherClass) { + return false; + } + switch (className) { + case boolClass: + case dateClass: + // coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal + return +a == +b; + + case numberClass: + // treat `NaN` vs. `NaN` as equal + return (a != +a) + ? b != +b + // but treat `+0` vs. `-0` as not equal + : (a == 0 ? (1 / a == 1 / b) : a == +b); + + case regexpClass: + case stringClass: + // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) + // treat string primitives and their corresponding object instances as equal + return a == String(b); + } + var isArr = className == arrayClass; + if (!isArr) { + // unwrap any `lodash` wrapped values + var aWrapped = hasOwnProperty.call(a, '__wrapped__'), + bWrapped = hasOwnProperty.call(b, '__wrapped__'); + + if (aWrapped || bWrapped) { + return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB); + } + // exit for functions and DOM nodes + if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) { + return false; + } + // in older versions of Opera, `arguments` objects have `Array` constructors + var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor, + ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor; + + // non `Object` object instances with different constructors are not equal + if (ctorA != ctorB && + !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && + ('constructor' in a && 'constructor' in b) + ) { + return false; + } + } + // assume cyclic structures are equal + // the algorithm for detecting cyclic structures is adapted from ES 5.1 + // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == a) { + return stackB[length] == b; + } + } + var size = 0; + result = true; + + // add `a` and `b` to the stack of traversed objects + stackA.push(a); + stackB.push(b); + + // recursively compare objects and arrays (susceptible to call stack limits) + if (isArr) { + // compare lengths to determine if a deep comparison is necessary + length = a.length; + size = b.length; + result = size == length; + + if (result || isWhere) { + // deep compare the contents, ignoring non-numeric properties + while (size--) { + var index = length, + value = b[size]; + + if (isWhere) { + while (index--) { + if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } + } + else { + // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` + // which, in this case, is more costly + forIn(b, function(value, key, b) { + if (hasOwnProperty.call(b, key)) { + // count the number of properties. + size++; + // deep compare each property value. + return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB)); + } + }); + + if (result && !isWhere) { + // ensure both objects have the same number of properties + forIn(a, function(value, key, a) { + if (hasOwnProperty.call(a, key)) { + // `size` will be `-1` if `a` has more properties than `b` + return (result = --size > -1); + } + }); + } + } + stackA.pop(); + stackB.pop(); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.merge` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [callback] The function to customize merging properties. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + */ + function baseMerge(object, source, callback, stackA, stackB) { + (isArray(source) ? forEach : forOwn)(source, function(source, key) { + var found, + isArr, + result = source, + value = object[key]; + + if (source && ((isArr = isArray(source)) || isPlainObject(source))) { + // avoid merging previously merged cyclic sources + var stackLength = stackA.length; + while (stackLength--) { + if ((found = stackA[stackLength] == source)) { + value = stackB[stackLength]; + break; + } + } + if (!found) { + var isShallow; + if (callback) { + result = callback(value, source); + if ((isShallow = typeof result != 'undefined')) { + value = result; + } + } + if (!isShallow) { + value = isArr + ? (isArray(value) ? value : []) + : (isPlainObject(value) ? value : {}); + } + // add `source` and associated `value` to the stack of traversed objects + stackA.push(source); + stackB.push(value); + + // recursively merge objects and arrays (susceptible to call stack limits) + if (!isShallow) { + baseMerge(value, source, callback, stackA, stackB); + } + } + } + else { + if (callback) { + result = callback(value, source); + if (typeof result == 'undefined') { + result = source; + } + } + if (typeof result != 'undefined') { + value = result; + } + } + object[key] = value; + }); + } + + /** + * The base implementation of `_.random` without argument juggling or support + * for returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns a random number. + */ + function baseRandom(min, max) { + return min + floor(nativeRandom() * (max - min + 1)); + } + + /** + * The base implementation of `_.uniq` without support for callback shorthands + * or `thisArg` binding. + * + * @private + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. + */ + function baseUniq(array, isSorted, callback) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + result = []; + + var isLarge = !isSorted && length >= largeArraySize && indexOf === baseIndexOf, + seen = (callback || isLarge) ? getArray() : result; + + if (isLarge) { + var cache = createCache(seen); + indexOf = cacheIndexOf; + seen = cache; + } + while (++index < length) { + var value = array[index], + computed = callback ? callback(value, index, array) : value; + + if (isSorted + ? !index || seen[seen.length - 1] !== computed + : indexOf(seen, computed) < 0 + ) { + if (callback || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + if (isLarge) { + releaseArray(seen.array); + releaseObject(seen); + } else if (callback) { + releaseArray(seen); + } + return result; + } + + /** + * Creates a function that aggregates a collection, creating an object composed + * of keys generated from the results of running each element of the collection + * through a callback. The given `setter` function sets the keys and values + * of the composed object. + * + * @private + * @param {Function} setter The setter function. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter) { + return function(collection, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, callback(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, callback(value, key, collection), collection); + }); + } + return result; + }; + } + + /** + * Creates a function that, when called, either curries or invokes `func` + * with an optional `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` + * 8 - `_.curry` (bound) + * 16 - `_.partial` + * 32 - `_.partialRight` + * @param {Array} [partialArgs] An array of arguments to prepend to those + * provided to the new function. + * @param {Array} [partialRightArgs] An array of arguments to append to those + * provided to the new function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new function. + */ + function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + isPartial = bitmask & 16, + isPartialRight = bitmask & 32; + + if (!isBindKey && !isFunction(func)) { + throw new TypeError; + } + if (isPartial && !partialArgs.length) { + bitmask &= ~16; + isPartial = partialArgs = false; + } + if (isPartialRight && !partialRightArgs.length) { + bitmask &= ~32; + isPartialRight = partialRightArgs = false; + } + var bindData = func && func.__bindData__; + if (bindData && bindData !== true) { + // clone `bindData` + bindData = slice(bindData); + if (bindData[2]) { + bindData[2] = slice(bindData[2]); + } + if (bindData[3]) { + bindData[3] = slice(bindData[3]); + } + // set `thisBinding` is not previously bound + if (isBind && !(bindData[1] & 1)) { + bindData[4] = thisArg; + } + // set if previously bound but not currently (subsequent curried functions) + if (!isBind && bindData[1] & 1) { + bitmask |= 8; + } + // set curried arity if not yet set + if (isCurry && !(bindData[1] & 4)) { + bindData[5] = arity; + } + // append partial left arguments + if (isPartial) { + push.apply(bindData[2] || (bindData[2] = []), partialArgs); + } + // append partial right arguments + if (isPartialRight) { + unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs); + } + // merge flags + bindData[1] |= bitmask; + return createWrapper.apply(null, bindData); + } + // fast path for `_.bind` + var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper; + return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]); + } + + /** + * Creates compiled iteration functions. + * + * @private + * @param {...Object} [options] The compile options object(s). + * @param {string} [options.array] Code to determine if the iterable is an array or array-like. + * @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop. + * @param {Function} [options.keys] A reference to `_.keys` for use in own property iteration. + * @param {string} [options.args] A comma separated string of iteration function arguments. + * @param {string} [options.top] Code to execute before the iteration branches. + * @param {string} [options.loop] Code to execute in the object loop. + * @param {string} [options.bottom] Code to execute after the iteration branches. + * @returns {Function} Returns the compiled function. + */ + function createIterator() { + // data properties + iteratorData.shadowedProps = shadowedProps; + + // iterator options + iteratorData.array = iteratorData.bottom = iteratorData.loop = iteratorData.top = ''; + iteratorData.init = 'iterable'; + iteratorData.useHas = true; + + // merge options into a template data object + for (var object, index = 0; object = arguments[index]; index++) { + for (var key in object) { + iteratorData[key] = object[key]; + } + } + var args = iteratorData.args; + iteratorData.firstArg = /^[^,]+/.exec(args)[0]; + + // create the function factory + var factory = Function( + 'baseCreateCallback, errorClass, errorProto, hasOwnProperty, ' + + 'indicatorObject, isArguments, isArray, isString, keys, objectProto, ' + + 'objectTypes, nonEnumProps, stringClass, stringProto, toString', + 'return function(' + args + ') {\n' + iteratorTemplate(iteratorData) + '\n}' + ); + + // return the compiled function + return factory( + baseCreateCallback, errorClass, errorProto, hasOwnProperty, + indicatorObject, isArguments, isArray, isString, iteratorData.keys, objectProto, + objectTypes, nonEnumProps, stringClass, stringProto, toString + ); + } + + /** + * 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]; + } + + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized, this method returns the custom method, otherwise it returns + * the `baseIndexOf` function. + * + * @private + * @returns {Function} Returns the "indexOf" function. + */ + function getIndexOf() { + var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result; + return result; + } + + /** + * 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); + } + + /** + * Sets `this` binding data on a given function. + * + * @private + * @param {Function} func The function to set data on. + * @param {Array} value The data array to set. + */ + var setBindData = !defineProperty ? noop : function(func, value) { + descriptor.value = value; + defineProperty(func, '__bindData__', descriptor); + }; + + /** + * A fallback implementation of `isPlainObject` which checks if a given value + * is an object created by the `Object` constructor, assuming objects created + * by the `Object` constructor have no inherited enumerable properties and that + * there are no `Object.prototype` extensions. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + */ + function shimIsPlainObject(value) { + var ctor, + result; + + // avoid non Object objects, `arguments` objects, and DOM elements + if (!(value && toString.call(value) == objectClass) || + (ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor)) || + (!support.argsClass && isArguments(value)) || + (!support.nodeClass && isNode(value))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + if (support.ownLast) { + forIn(value, function(value, key, object) { + result = hasOwnProperty.call(object, key); + return false; + }); + return result !== false; + } + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + forIn(value, function(value, key) { + result = key; + }); + return typeof result == 'undefined' || hasOwnProperty.call(value, result); + } + + /** + * Used by `unescape` to convert HTML entities to characters. + * + * @private + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + function unescapeHtmlChar(match) { + return htmlUnescapes[match]; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Checks if `value` is an `arguments` object. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @example + * + * (function() { return _.isArguments(arguments); })(1, 2, 3); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == argsClass || false; + } + // fallback for browsers that can't detect `arguments` objects by [[Class]] + if (!support.argsClass) { + isArguments = function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee') || false; + }; + } + + /** + * Checks if `value` is an array. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. + * @example + * + * (function() { return _.isArray(arguments); })(); + * // => false + * + * _.isArray([1, 2, 3]); + * // => true + */ + var isArray = nativeIsArray || function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == arrayClass || false; + }; + + /** + * 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 = createIterator({ + 'args': 'object', + 'init': '[]', + 'top': 'if (!(objectTypes[typeof object])) return result', + 'loop': 'result.push(index)' + }); + + /** + * 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 []; + } + if ((support.enumPrototypes && typeof object == 'function') || + (support.nonEnumArgs && object.length && isArguments(object))) { + return shimKeys(object); + } + return nativeKeys(object); + }; + + /** Reusable iterator options shared by `each`, `forIn`, and `forOwn` */ + var eachIteratorOptions = { + 'args': 'collection, callback, thisArg', + 'top': "callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)", + 'array': "typeof length == 'number'", + 'keys': keys, + 'loop': 'if (callback(iterable[index], index, collection) === false) return result' + }; + + /** Reusable iterator options for `assign` and `defaults` */ + var defaultsIteratorOptions = { + 'args': 'object, source, guard', + 'top': + 'var args = arguments,\n' + + ' argsIndex = 0,\n' + + " argsLength = typeof guard == 'number' ? 2 : args.length;\n" + + 'while (++argsIndex < argsLength) {\n' + + ' iterable = args[argsIndex];\n' + + ' if (iterable && objectTypes[typeof iterable]) {', + 'keys': keys, + 'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]", + 'bottom': ' }\n}' + }; + + /** Reusable iterator options for `forIn` and `forOwn` */ + var forOwnIteratorOptions = { + 'top': 'if (!objectTypes[typeof iterable]) return result;\n' + eachIteratorOptions.top, + 'array': false + }; + + /** + * 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 = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to convert HTML entities to characters */ + var htmlUnescapes = invert(htmlEscapes); + + /** Used to match HTML entities and HTML characters */ + var reEscapedHtml = RegExp('(' + keys(htmlUnescapes).join('|') + ')', 'g'), + reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); + + /** + * A function compiled to iterate `arguments` objects, arrays, objects, and + * strings consistenly across environments, executing the callback for each + * element in the collection. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index|key, collection). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @private + * @type Function + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEach = createIterator(eachIteratorOptions); + + /*--------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources will overwrite property assignments of previous + * sources. If a callback is provided it will be executed to produce the + * assigned values. The callback is bound to `thisArg` and invoked with two + * arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @type Function + * @alias extend + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * _.assign({ 'name': 'fred' }, { 'employer': 'slate' }); + * // => { 'name': 'fred', 'employer': 'slate' } + * + * var defaults = _.partialRight(_.assign, function(a, b) { + * return typeof a == 'undefined' ? b : a; + * }); + * + * var object = { 'name': 'barney' }; + * defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ + var assign = createIterator(defaultsIteratorOptions, { + 'top': + defaultsIteratorOptions.top.replace(';', + ';\n' + + "if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n" + + ' var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n' + + "} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n" + + ' callback = args[--argsLength];\n' + + '}' + ), + 'loop': 'result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]' + }); + + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects will also + * be cloned, otherwise they will be assigned by reference. If a callback + * is provided it will be executed to produce the cloned values. If the + * callback returns `undefined` cloning will be handled by the method instead. + * The callback is bound to `thisArg` and invoked with one argument; (value). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var shallow = _.clone(characters); + * shallow[0] === characters[0]; + * // => true + * + * var deep = _.clone(characters, true); + * deep[0] === characters[0]; + * // => false + * + * _.mixin({ + * 'clone': _.partialRight(_.clone, function(value) { + * return _.isElement(value) ? value.cloneNode(false) : undefined; + * }) + * }); + * + * var clone = _.clone(document.body); + * clone.childNodes.length; + * // => 0 + */ + function clone(value, isDeep, callback, thisArg) { + // allows working with "Collections" methods without using their `index` + // and `collection` arguments for `isDeep` and `callback` + if (typeof isDeep != 'boolean' && isDeep != null) { + thisArg = callback; + callback = isDeep; + isDeep = false; + } + return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates a deep clone of `value`. If a callback is provided it will be + * executed to produce the cloned values. If the callback returns `undefined` + * cloning will be handled by the method instead. The callback is bound to + * `thisArg` and invoked with one argument; (value). + * + * Note: This method is loosely based on the structured clone algorithm. Functions + * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and + * objects created by constructors other than `Object` are cloned to plain `Object` objects. + * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var deep = _.cloneDeep(characters); + * deep[0] === characters[0]; + * // => false + * + * var view = { + * 'label': 'docs', + * 'node': element + * }; + * + * var clone = _.cloneDeep(view, function(value) { + * return _.isElement(value) ? value.cloneNode(true) : undefined; + * }); + * + * clone.node == view.node; + * // => false + */ + function cloneDeep(value, callback, thisArg) { + return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { 'constructor': Circle }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties ? assign(result, properties) : result; + } + + /** + * 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 = createIterator(defaultsIteratorOptions); + + /** + * This method is like `_.findIndex` except that it returns the key of the + * first element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': false }, + * 'fred': { 'age': 40, 'blocked': true }, + * 'pebbles': { 'age': 1, 'blocked': false } + * }; + * + * _.findKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (property order is not guaranteed across environments) + * + * // using "_.where" callback shorthand + * _.findKey(characters, { 'age': 1 }); + * // => 'pebbles' + * + * // using "_.pluck" callback shorthand + * _.findKey(characters, 'blocked'); + * // => 'fred' + */ + function findKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwn(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * This method is like `_.findKey` except that it iterates over elements + * of a `collection` in the opposite order. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': true }, + * 'fred': { 'age': 40, 'blocked': false }, + * 'pebbles': { 'age': 1, 'blocked': true } + * }; + * + * _.findLastKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles`, assuming `_.findKey` returns `barney` + * + * // using "_.where" callback shorthand + * _.findLastKey(characters, { 'age': 40 }); + * // => 'fred' + * + * // using "_.pluck" callback shorthand + * _.findLastKey(characters, 'blocked'); + * // => 'pebbles' + */ + function findLastKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwnRight(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * Iterates over own and inherited enumerable properties of an object, + * executing the callback for each property. The callback is bound to `thisArg` + * and invoked with three arguments; (value, key, object). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forIn(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) + */ + var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, { + 'useHas': false + }); + + /** + * This method is like `_.forIn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forInRight(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'move', 'y', and 'x' assuming `_.forIn ` logs 'x', 'y', and 'move' + */ + function forInRight(object, callback, thisArg) { + var pairs = []; + + forIn(object, function(value, key) { + pairs.push(key, value); + }); + + var length = pairs.length; + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + if (callback(pairs[length--], pairs[length], object) === false) { + break; + } + } + return object; + } + + /** + * Iterates over own enumerable properties of an object, executing the callback + * for each property. The callback is bound to `thisArg` and invoked with three + * arguments; (value, key, object). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs '0', '1', and 'length' (property order is not guaranteed across environments) + */ + var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions); + + /** + * This method is like `_.forOwn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs 'length', '1', and '0' assuming `_.forOwn` logs '0', '1', and 'length' + */ + function forOwnRight(object, callback, thisArg) { + var props = keys(object), + length = props.length; + + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + var key = props[length]; + if (callback(object[key], key, object) === false) { + break; + } + } + return object; + } + + /** + * Creates a sorted array of property names of all enumerable properties, + * own and inherited, of `object` that have function values. + * + * @static + * @memberOf _ + * @alias methods + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names that have function values. + * @example + * + * _.functions(_); + * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] + */ + function functions(object) { + var result = []; + forIn(object, function(value, key) { + if (isFunction(value)) { + result.push(key); + } + }); + return result.sort(); + } + + /** + * Checks if the specified property name exists as a direct property of `object`, + * instead of an inherited property. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to check. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. + * @example + * + * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + * // => true + */ + function has(object, key) { + return object ? hasOwnProperty.call(object, key) : false; + } + + /** + * Creates an object composed of the inverted keys and values of the given object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to invert. + * @returns {Object} Returns the created inverted object. + * @example + * + * _.invert({ 'first': 'fred', 'second': 'barney' }); + * // => { 'fred': 'first', 'barney': 'second' } + */ + function invert(object) { + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + result[object[key]] = key; + } + return result; + } + + /** + * Checks if `value` is a boolean value. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @example + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + value && typeof value == 'object' && toString.call(value) == boolClass || false; + } + + /** + * Checks if `value` is a date. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + */ + function isDate(value) { + return value && typeof value == 'object' && toString.call(value) == dateClass || false; + } + + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + */ + function isElement(value) { + return value && value.nodeType === 1 || false; + } + + /** + * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a + * length of `0` and objects with no own enumerable properties are considered + * "empty". + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. + * @example + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({}); + * // => true + * + * _.isEmpty(''); + * // => true + */ + function isEmpty(value) { + var result = true; + if (!value) { + return result; + } + var className = toString.call(value), + length = value.length; + + if ((className == arrayClass || className == stringClass || + (support.argsClass ? className == argsClass : isArguments(value))) || + (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { + return !length; + } + forOwn(value, function() { + return (result = false); + }); + return result; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent to each other. If a callback is provided it will be executed + * to compare values. If the callback returns `undefined` comparisons will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (a, b). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'name': 'fred' }; + * var copy = { 'name': 'fred' }; + * + * object == copy; + * // => false + * + * _.isEqual(object, copy); + * // => true + * + * var words = ['hello', 'goodbye']; + * var otherWords = ['hi', 'goodbye']; + * + * _.isEqual(words, otherWords, function(a, b) { + * var reGreet = /^(?:hello|hi)$/i, + * aGreet = _.isString(a) && reGreet.test(a), + * bGreet = _.isString(b) && reGreet.test(b); + * + * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; + * }); + * // => true + */ + function isEqual(a, b, callback, thisArg) { + return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2)); + } + + /** + * Checks if `value` is, or can be coerced to, a finite number. + * + * Note: This is not the same as native `isFinite` which will return true for + * booleans and empty strings. See http://es5.github.io/#x15.1.2.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. + * @example + * + * _.isFinite(-101); + * // => true + * + * _.isFinite('10'); + * // => true + * + * _.isFinite(true); + * // => false + * + * _.isFinite(''); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + function isFinite(value) { + return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); + } + + /** + * Checks if `value` is a function. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + */ + function isFunction(value) { + return typeof value == 'function'; + } + // fallback for older versions of Chrome and Safari + if (isFunction(/x/)) { + isFunction = function(value) { + return typeof value == 'function' && toString.call(value) == funcClass; + }; + } + + /** + * 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]); + } + + /** + * Checks if `value` is `NaN`. + * + * Note: This is not the same as native `isNaN` which will return `true` for + * `undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // `NaN` as a primitive is the only value that is not equal to itself + // (perform the [[Class]] check first to avoid errors with some host objects in IE) + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(undefined); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is a number. + * + * Note: `NaN` is considered a number. See http://es5.github.io/#x8.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. + * @example + * + * _.isNumber(8.4 * 5); + * // => true + */ + function isNumber(value) { + return typeof value == 'number' || + value && typeof value == 'object' && toString.call(value) == numberClass || false; + } + + /** + * Checks if `value` is an object created by the `Object` constructor. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * _.isPlainObject(new Shape); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + */ + var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { + if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) { + return false; + } + var valueOf = value.valueOf, + objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); + + return objProto + ? (value == objProto || getPrototypeOf(value) == objProto) + : shimIsPlainObject(value); + }; + + /** + * Checks if `value` is a regular expression. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @example + * + * _.isRegExp(/fred/); + * // => true + */ + function isRegExp(value) { + return value && objectTypes[typeof value] && toString.call(value) == regexpClass || false; + } + + /** + * Checks if `value` is a string. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. + * @example + * + * _.isString('fred'); + * // => true + */ + function isString(value) { + return typeof value == 'string' || + value && typeof value == 'object' && toString.call(value) == stringClass || false; + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + */ + function isUndefined(value) { + return typeof value == 'undefined'; + } + + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new object with values of the results of each `callback` execution. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + * + * var characters = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // using "_.pluck" callback shorthand + * _.mapValues(characters, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } + */ + function mapValues(object, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + forOwn(object, function(value, key, object) { + result[key] = callback(value, key, object); + }); + return result; + } + + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * will overwrite property assignments of previous sources. If a callback is + * provided it will be executed to produce the merged values of the destination + * and source properties. If the callback returns `undefined` merging will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * var names = { + * 'characters': [ + * { 'name': 'barney' }, + * { 'name': 'fred' } + * ] + * }; + * + * var ages = { + * 'characters': [ + * { 'age': 36 }, + * { 'age': 40 } + * ] + * }; + * + * _.merge(names, ages); + * // => { 'characters': [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] } + * + * var food = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var otherFood = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(food, otherFood, function(a, b) { + * return _.isArray(a) ? a.concat(b) : undefined; + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } + */ + function merge(object) { + var args = arguments, + length = 2; + + if (!isObject(object)) { + return object; + } + // allows working with `_.reduce` and `_.reduceRight` without using + // their `index` and `collection` arguments + if (typeof args[2] != 'number') { + length = args.length; + } + if (length > 3 && typeof args[length - 2] == 'function') { + var callback = baseCreateCallback(args[--length - 1], args[length--], 2); + } else if (length > 2 && typeof args[length - 1] == 'function') { + callback = args[--length]; + } + var sources = slice(arguments, 1, length), + index = -1, + stackA = getArray(), + stackB = getArray(); + + while (++index < length) { + baseMerge(object, sources[index], callback, stackA, stackB); + } + releaseArray(stackA); + releaseArray(stackB); + return object; + } + + /** + * Creates a shallow clone of `object` excluding the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` omitting the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object without the omitted properties. + * @example + * + * _.omit({ 'name': 'fred', 'age': 40 }, 'age'); + * // => { 'name': 'fred' } + * + * _.omit({ 'name': 'fred', 'age': 40 }, function(value) { + * return typeof value == 'number'; + * }); + * // => { 'name': 'fred' } + */ + function omit(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var props = []; + forIn(object, function(value, key) { + props.push(key); + }); + props = baseDifference(props, baseFlatten(arguments, true, false, 1)); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + result[key] = object[key]; + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (!callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * Creates a two dimensional array of an object's key-value pairs, + * i.e. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments) + */ + function pairs(object) { + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; + } + + /** + * Creates a shallow clone of `object` composed of the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` picking the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object composed of the picked properties. + * @example + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, 'name'); + * // => { 'name': 'fred' } + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) { + * return key.charAt(0) != '_'; + * }); + * // => { 'name': 'fred' } + */ + function pick(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var index = -1, + props = baseFlatten(arguments, true, false, 1), + length = isObject(object) ? props.length : 0; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * An alternative to `_.reduce` this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable properties through a callback, with each callback execution + * potentially mutating the `accumulator` object. The callback is bound to + * `thisArg` and invoked with four arguments; (accumulator, value, key, object). + * Callbacks may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { + * num *= num; + * if (num % 2) { + * return result.push(num) < 3; + * } + * }); + * // => [1, 9, 25] + * + * var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function transform(object, callback, accumulator, thisArg) { + var isArr = isArray(object); + if (accumulator == null) { + if (isArr) { + accumulator = []; + } else { + var ctor = object && object.constructor, + proto = ctor && ctor.prototype; + + accumulator = baseCreate(proto); + } + } + if (callback) { + callback = lodash.createCallback(callback, thisArg, 4); + (isArr ? baseEach : forOwn)(object, function(value, index, object) { + return callback(accumulator, value, index, object); + }); + } + return accumulator; + } + + /** + * 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; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array of elements from the specified indexes, or keys, of the + * `collection`. Indexes may be specified as individual arguments or as arrays + * of indexes. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` + * to retrieve, specified as individual indexes or arrays of indexes. + * @returns {Array} Returns a new array of elements corresponding to the + * provided indexes. + * @example + * + * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); + * // => ['a', 'c', 'e'] + * + * _.at(['fred', 'barney', 'pebbles'], 0, 2); + * // => ['fred', 'pebbles'] + */ + function at(collection) { + var args = arguments, + index = -1, + props = baseFlatten(args, true, false, 1), + length = (args[2] && args[2][args[1]] === collection) ? 1 : props.length, + result = Array(length); + + if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + while(++index < length) { + result[index] = collection[props[index]]; + } + return result; + } + + /** + * Checks if a given value is present in a collection using strict equality + * for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the + * offset from the end of the collection. + * + * @static + * @memberOf _ + * @alias include + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. + * @example + * + * _.contains([1, 2, 3], 1); + * // => true + * + * _.contains([1, 2, 3], 1, 2); + * // => false + * + * _.contains({ 'name': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.contains('pebbles', 'eb'); + * // => true + */ + function contains(collection, target, fromIndex) { + var index = -1, + indexOf = getIndexOf(), + length = collection ? collection.length : 0, + result = false; + + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; + if (isArray(collection)) { + result = indexOf(collection, target, fromIndex) > -1; + } else if (typeof length == 'number') { + result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1; + } else { + baseEach(collection, function(value) { + if (++index >= fromIndex) { + return !(result = value === target); + } + }); + } + return result; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through the callback. The corresponding value + * of each key is the number of times the key was returned by the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1); + }); + + /** + * Checks if the given callback returns truey value for **all** elements of + * a collection. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes']); + * // => false + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.every(characters, 'age'); + * // => true + * + * // using "_.where" callback shorthand + * _.every(characters, { 'age': 36 }); + * // => false + */ + function every(collection, callback, thisArg) { + var result = true; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (!(result = !!callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return (result = !!callback(value, index, collection)); + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning an array of all elements + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that passed the callback check. + * @example + * + * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [2, 4, 6] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.filter(characters, 'blocked'); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + * + * // using "_.where" callback shorthand + * _.filter(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + */ + function filter(collection, callback, thisArg) { + var result = []; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + result.push(value); + } + } + } else { + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result.push(value); + } + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning the first element that + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias detect, findWhere + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.find(characters, function(chr) { + * return chr.age < 40; + * }); + * // => { 'name': 'barney', 'age': 36, 'blocked': false } + * + * // using "_.where" callback shorthand + * _.find(characters, { 'age': 1 }); + * // => { 'name': 'pebbles', 'age': 1, 'blocked': false } + * + * // using "_.pluck" callback shorthand + * _.find(characters, 'blocked'); + * // => { 'name': 'fred', 'age': 40, 'blocked': true } + */ + function find(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + return value; + } + } + } else { + var result; + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + } + + /** + * This method is like `_.find` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(num) { + * return num % 2 == 1; + * }); + * // => 3 + */ + function findLast(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forEachRight(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + + /** + * Iterates over elements of a collection, executing the callback for each + * element. The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * Note: As with other "Collections" methods, objects with a `length` property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); + * // => logs each number and returns '1,2,3' + * + * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); }); + * // => logs each number and returns the object (property order is not guaranteed across environments) + */ + function forEach(collection, callback, thisArg) { + if (callback && typeof thisArg == 'undefined' && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (callback(collection[index], index, collection) === false) { + break; + } + } + } else { + baseEach(collection, callback, thisArg); + } + return collection; + } + + /** + * This method is like `_.forEach` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); + * // => logs each number from right to left and returns '3,2,1' + */ + function forEachRight(collection, callback, thisArg) { + var iterable = collection, + length = collection ? collection.length : 0; + + callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (length--) { + if (callback(collection[length], length, collection) === false) { + break; + } + } + } else { + if (typeof length != 'number') { + var props = keys(collection); + length = props.length; + } else if (support.unindexedChars && isString(collection)) { + iterable = collection.split(''); + } + baseEach(collection, function(value, key, collection) { + key = props ? props[--length] : --length; + return callback(iterable[key], key, collection); + }); + } + return collection; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of a collection through the callback. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false` + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using "_.pluck" callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value); + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of the collection through the given callback. The corresponding + * value of each key is the last element responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keys = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keys, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keys, function(key) { return String.fromCharCode(key.code); }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + + /** + * Invokes the method named by `methodName` on each element in the `collection` + * returning an array of the results of each invoked method. Additional arguments + * will be provided to each invoked method. If `methodName` is a function it + * will be invoked for, and `this` bound to, each element in the `collection`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|string} methodName The name of the method to invoke or + * the function invoked per iteration. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {Array} Returns a new array of the results of each invoked method. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + function invoke(collection, methodName) { + var args = slice(arguments, 2), + index = -1, + isFunc = typeof methodName == 'function', + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args); + }); + return result; + } + + /** + * Creates an array of values by running each element in the collection + * through the callback. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias collect + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of the results of each `callback` execution. + * @example + * + * _.map([1, 2, 3], function(num) { return num * 3; }); + * // => [3, 6, 9] + * + * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); + * // => [3, 6, 9] (property order is not guaranteed across environments) + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(characters, 'name'); + * // => ['barney', 'fred'] + */ + function map(collection, callback, thisArg) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + callback = lodash.createCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (++index < length) { + result[index] = callback(collection[index], index, collection); + } + } else { + baseEach(collection, function(value, key, collection) { + result[++index] = callback(value, key, collection); + }); + } + return result; + } + + /** + * Retrieves the maximum value of a collection. If the collection is empty or + * falsey `-Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.max(characters, function(chr) { return chr.age; }); + * // => { 'name': 'fred', 'age': 40 }; + * + * // using "_.pluck" callback shorthand + * _.max(characters, 'age'); + * // => { 'name': 'fred', 'age': 40 }; + */ + function max(collection, callback, thisArg) { + var computed = -Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value > result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current > computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the minimum value of a collection. If the collection is empty or + * falsey `Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.min(characters, function(chr) { return chr.age; }); + * // => { 'name': 'barney', 'age': 36 }; + * + * // using "_.pluck" callback shorthand + * _.min(characters, 'age'); + * // => { 'name': 'barney', 'age': 36 }; + */ + function min(collection, callback, thisArg) { + var computed = Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value < result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current < computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the value of a specified property from all elements in the collection. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {string} property The name of the property to pluck. + * @returns {Array} Returns a new array of property values. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.pluck(characters, 'name'); + * // => ['barney', 'fred'] + */ + var pluck = map; + + /** + * Reduces a collection to a value which is the accumulated result of running + * each element in the collection through the callback, where each successive + * callback execution consumes the return value of the previous execution. If + * `accumulator` is not provided the first element of the collection will be + * used as the initial `accumulator` value. The callback is bound to `thisArg` + * and invoked with four arguments; (accumulator, value, index|key, collection). + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var sum = _.reduce([1, 2, 3], function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function reduce(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + if (noaccum) { + accumulator = collection[++index]; + } + while (++index < length) { + accumulator = callback(accumulator, collection[index], index, collection); + } + } else { + baseEach(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection) + }); + } + return accumulator; + } + + /** + * This method is like `_.reduce` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var list = [[0, 1], [2, 3], [4, 5]]; + * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + forEachRight(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The opposite of `_.filter` this method returns the elements of a + * collection that the callback does **not** return truey for. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that failed the callback check. + * @example + * + * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [1, 3, 5] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.reject(characters, 'blocked'); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + * + * // using "_.where" callback shorthand + * _.reject(characters, { 'age': 36 }); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + */ + function reject(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + return filter(collection, function(value, index, collection) { + return !callback(value, index, collection); + }); + } + + /** + * Retrieves a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Allows working with functions like `_.map` + * without using their `index` arguments as `n`. + * @returns {Array} Returns the random sample(s) of `collection`. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + function sample(collection, n, guard) { + if (collection && typeof collection.length != 'number') { + collection = values(collection); + } else if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + if (n == null || guard) { + return collection ? collection[baseRandom(0, collection.length - 1)] : undefined; + } + var result = shuffle(collection); + result.length = nativeMin(nativeMax(0, n), result.length); + return result; + } + + /** + * Creates an array of shuffled values, using a version of the Fisher-Yates + * shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns a new shuffled collection. + * @example + * + * _.shuffle([1, 2, 3, 4, 5, 6]); + * // => [4, 1, 6, 3, 5, 2] + */ + function shuffle(collection) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + var rand = baseRandom(0, ++index); + result[index] = result[rand]; + result[rand] = value; + }); + return result; + } + + /** + * Gets the size of the `collection` by returning `collection.length` for arrays + * and array-like objects or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. + * @example + * + * _.size([1, 2]); + * // => 2 + * + * _.size({ 'one': 1, 'two': 2, 'three': 3 }); + * // => 3 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + var length = collection ? collection.length : 0; + return typeof length == 'number' ? length : keys(collection).length; + } + + /** + * Checks if the callback returns a truey value for **any** element of a + * collection. The function returns as soon as it finds a passing value and + * does not iterate over the entire collection. The callback is bound to + * `thisArg` and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.some(characters, 'blocked'); + * // => true + * + * // using "_.where" callback shorthand + * _.some(characters, { 'age': 1 }); + * // => false + */ + function some(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if ((result = callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return !(result = callback(value, index, collection)); + }); + } + return !!result; + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through the callback. This method + * performs a stable sort, that is, it will preserve the original sort order + * of equal elements. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an array of property names is provided for `callback` the collection + * will be sorted by each property value. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of sorted elements. + * @example + * + * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); + * // => [3, 1, 2] + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 26 }, + * { 'name': 'fred', 'age': 30 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(_.sortBy(characters, 'age'), _.values); + * // => [['barney', 26], ['fred', 30], ['barney', 36], ['fred', 40]] + * + * // sorting by multiple properties + * _.map(_.sortBy(characters, ['name', 'age']), _.values); + * // = > [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]] + */ + function sortBy(collection, callback, thisArg) { + var index = -1, + isArr = isArray(callback), + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + if (!isArr) { + callback = lodash.createCallback(callback, thisArg, 3); + } + forEach(collection, function(value, key, collection) { + var object = result[++index] = getObject(); + if (isArr) { + object.criteria = map(callback, function(key) { return value[key]; }); + } else { + (object.criteria = getArray())[0] = callback(value, key, collection); + } + object.index = index; + object.value = value; + }); + + length = result.length; + result.sort(compareAscending); + while (length--) { + var object = result[length]; + result[length] = object.value; + if (!isArr) { + releaseArray(object.criteria); + } + releaseObject(object); + } + return result; + } + + /** + * Converts the `collection` to an array. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to convert. + * @returns {Array} Returns the new converted array. + * @example + * + * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); + * // => [2, 3, 4] + */ + function toArray(collection) { + if (collection && typeof collection.length == 'number') { + return (support.unindexedChars && isString(collection)) + ? collection.split('') + : slice(collection); + } + return values(collection); + } + + /** + * Performs a deep comparison of each element in a `collection` to the given + * `properties` object, returning an array of all elements that have equivalent + * property values. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Object} props The object of property values to filter by. + * @returns {Array} Returns a new array of elements that have the given properties. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.where(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }] + * + * _.where(characters, { 'pets': ['dino'] }); + * // => [{ 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] }] + */ + var where = filter; + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are all falsey. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to compact. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result.push(value); + } + } + return result; + } + + /** + * Creates an array excluding all values of the provided arrays using strict + * equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to process. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); + * // => [1, 3, 4] + */ + function difference(array) { + return baseDifference(array, baseFlatten(arguments, true, true, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.findIndex(characters, function(chr) { + * return chr.age < 20; + * }); + * // => 2 + * + * // using "_.where" callback shorthand + * _.findIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findIndex(characters, 'blocked'); + * // => 1 + */ + function findIndex(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + if (callback(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of a `collection` from right to left. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': true }, + * { 'name': 'fred', 'age': 40, 'blocked': false }, + * { 'name': 'pebbles', 'age': 1, 'blocked': true } + * ]; + * + * _.findLastIndex(characters, function(chr) { + * return chr.age > 30; + * }); + * // => 1 + * + * // using "_.where" callback shorthand + * _.findLastIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findLastIndex(characters, 'blocked'); + * // => 2 + */ + function findLastIndex(array, callback, thisArg) { + var length = array ? array.length : 0; + callback = lodash.createCallback(callback, thisArg, 3); + while (length--) { + if (callback(array[length], length, array)) { + return length; + } + } + return -1; + } + + /** + * Gets the first element or first `n` elements of an array. If a callback + * is provided elements at the beginning of the array are returned as long + * as the callback returns truey. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias head, take + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([1, 2, 3], 2); + * // => [1, 2] + * + * _.first([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [1, 2] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.first(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': true, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.first(characters, { 'employer': 'slate' }), 'name'); + * // => ['barney', 'fred'] + */ + function first(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = -1; + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[0] : undefined; + } + } + return slice(array, 0, nativeMin(nativeMax(0, n), length)); + } + + /** + * Flattens a nested array (the nesting can be to any depth). If `isShallow` + * is truey, the array will only be flattened a single level. If a callback + * is provided each element of the array is passed through the callback before + * flattening. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new flattened array. + * @example + * + * _.flatten([1, [2], [3, [[4]]]]); + * // => [1, 2, 3, 4]; + * + * _.flatten([1, [2], [3, [[4]]]], true); + * // => [1, 2, 3, [[4]]]; + * + * var characters = [ + * { 'name': 'barney', 'age': 30, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * // using "_.pluck" callback shorthand + * _.flatten(characters, 'pets'); + * // => ['hoppy', 'baby puss', 'dino'] + */ + function flatten(array, isShallow, callback, thisArg) { + // juggle arguments + if (typeof isShallow != 'boolean' && isShallow != null) { + thisArg = callback; + callback = (typeof isShallow != 'function' && thisArg && thisArg[isShallow] === array) ? null : isShallow; + isShallow = false; + } + if (callback != null) { + array = map(array, callback, thisArg); + } + return baseFlatten(array, isShallow); + } + + /** + * Gets the index at which the first occurrence of `value` is found using + * strict equality for comparisons, i.e. `===`. If the array is already sorted + * providing `true` for `fromIndex` will run a faster binary search. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2); + * // => 1 + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 4 + * + * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); + * // => 2 + */ + function indexOf(array, value, fromIndex) { + if (typeof fromIndex == 'number') { + var length = array ? array.length : 0; + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0); + } else if (fromIndex) { + var index = sortedIndex(array, value); + return array[index] === value ? index : -1; + } + return baseIndexOf(array, value, fromIndex); + } + + /** + * Gets all but the last element or last `n` elements of an array. If a + * callback is provided elements at the end of the array are excluded from + * the result as long as the callback returns truey. The callback is bound + * to `thisArg` and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + * + * _.initial([1, 2, 3], 2); + * // => [1] + * + * _.initial([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [1] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.initial(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': false, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.initial(characters, { 'employer': 'na' }), 'name'); + * // => ['barney', 'fred'] + */ + function initial(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : callback || n; + } + return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); + } + + /** + * Creates an array of unique values present in all provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of shared values. + * @example + * + * _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2] + */ + function intersection() { + var args = [], + argsIndex = -1, + argsLength = arguments.length, + caches = getArray(), + indexOf = getIndexOf(), + trustIndexOf = indexOf === baseIndexOf, + seen = getArray(); + + while (++argsIndex < argsLength) { + var value = arguments[argsIndex]; + if (isArray(value) || isArguments(value)) { + args.push(value); + caches.push(trustIndexOf && value.length >= largeArraySize && + createCache(argsIndex ? args[argsIndex] : seen)); + } + } + var array = args[0], + index = -1, + length = array ? array.length : 0, + result = []; + + outer: + while (++index < length) { + var cache = caches[0]; + value = array[index]; + + if ((cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0) { + argsIndex = argsLength; + (cache || seen).push(value); + while (--argsIndex) { + cache = caches[argsIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) { + continue outer; + } + } + result.push(value); + } + } + while (argsLength--) { + cache = caches[argsLength]; + if (cache) { + releaseObject(cache); + } + } + releaseArray(caches); + releaseArray(seen); + return result; + } + + /** + * Gets the last element or last `n` elements of an array. If a callback is + * provided elements at the end of the array are returned as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + * + * _.last([1, 2, 3], 2); + * // => [2, 3] + * + * _.last([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [2, 3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.last(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.last(characters, { 'employer': 'na' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function last(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[length - 1] : undefined; + } + } + return slice(array, nativeMax(0, length - n)); + } + + /** + * Gets the index at which the last occurrence of `value` is found using strict + * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used + * as the offset from the end of the collection. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); + * // => 4 + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var index = array ? array.length : 0; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * Removes all provided values from the given array using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + function pull(array) { + var args = arguments, + argsIndex = 0, + argsLength = args.length, + length = array ? array.length : 0; + + while (++argsIndex < argsLength) { + var index = -1, + value = args[argsIndex]; + while (++index < length) { + if (array[index] === value) { + splice.call(array, index--, 1); + length--; + } + } + } + return array; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to but not including `end`. If `start` is less than `stop` a + * zero-length range is created unless a negative `step` is specified. + * + * @static + * @memberOf _ + * @category Arrays + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns a new range array. + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + function range(start, end, step) { + start = +start || 0; + step = typeof step == 'number' ? step : (+step || 1); + + if (end == null) { + end = start; + start = 0; + } + // use `Array(length)` so engines like Chakra and V8 avoid slower modes + // http://youtu.be/XAqIpGU8ZZk#t=17m25s + var index = -1, + length = nativeMax(0, ceil((end - start) / (step || 1))), + result = Array(length); + + while (++index < length) { + result[index] = start; + start += step; + } + return result; + } + + /** + * Removes all elements from an array that the callback returns truey for + * and returns an array of removed elements. The callback is bound to `thisArg` + * and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4, 5, 6]; + * var evens = _.remove(array, function(num) { return num % 2 == 0; }); + * + * console.log(array); + * // => [1, 3, 5] + * + * console.log(evens); + * // => [2, 4, 6] + */ + function remove(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0, + result = []; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (callback(value, index, array)) { + result.push(value); + splice.call(array, index--, 1); + length--; + } + } + return result; + } + + /** + * The opposite of `_.initial` this method gets all but the first element or + * first `n` elements of an array. If a callback function is provided elements + * at the beginning of the array are excluded from the result as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias drop, tail + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + * + * _.rest([1, 2, 3], 2); + * // => [3] + * + * _.rest([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.rest(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.rest(characters, { 'employer': 'slate' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function rest(array, callback, thisArg) { + if (typeof callback != 'number' && callback != null) { + var n = 0, + index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : nativeMax(0, callback); + } + return slice(array, n); + } + + /** + * Uses a binary search to determine the smallest index at which a value + * should be inserted into a given sorted array in order to maintain the sort + * order of the array. If a callback is provided it will be executed for + * `value` and each element of `array` to compute their sort ranking. The + * callback is bound to `thisArg` and invoked with one argument; (value). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([20, 30, 50], 40); + * // => 2 + * + * // using "_.pluck" callback shorthand + * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 2 + * + * var dict = { + * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } + * }; + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return dict.wordToNumber[word]; + * }); + * // => 2 + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return this.wordToNumber[word]; + * }, dict); + * // => 2 + */ + function sortedIndex(array, value, callback, thisArg) { + var low = 0, + high = array ? array.length : low; + + // explicitly reference `identity` for better inlining in Firefox + callback = callback ? lodash.createCallback(callback, thisArg, 1) : identity; + value = callback(value); + + while (low < high) { + var mid = (low + high) >>> 1; + (callback(array[mid]) < value) + ? low = mid + 1 + : high = mid; + } + return low; + } + + /** + * Creates an array of unique values, in order, of the provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of combined values. + * @example + * + * _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2, 3, 5, 4] + */ + function union() { + return baseUniq(baseFlatten(arguments, true, true)); + } + + /** + * Creates a duplicate-value-free version of an array using strict equality + * for comparisons, i.e. `===`. If the array is sorted, providing + * `true` for `isSorted` will use a faster algorithm. If a callback is provided + * each element of `array` is passed through the callback before uniqueness + * is computed. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Arrays + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a duplicate-value-free array. + * @example + * + * _.uniq([1, 2, 1, 3, 1]); + * // => [1, 2, 3] + * + * _.uniq([1, 1, 2, 2, 3], true); + * // => [1, 2, 3] + * + * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); }); + * // => ['A', 'b', 'C'] + * + * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math); + * // => [1, 2.5, 3] + * + * // using "_.pluck" callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniq(array, isSorted, callback, thisArg) { + // juggle arguments + if (typeof isSorted != 'boolean' && isSorted != null) { + thisArg = callback; + callback = (typeof isSorted != 'function' && thisArg && thisArg[isSorted] === array) ? null : isSorted; + isSorted = false; + } + if (callback != null) { + callback = lodash.createCallback(callback, thisArg, 3); + } + return baseUniq(array, isSorted, callback); + } + + /** + * Creates an array excluding all provided values using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); + * // => [2, 3, 4] + */ + function without(array) { + return baseDifference(array, slice(arguments, 1)); + } + + /** + * Creates an array that is the symmetric difference of the provided arrays. + * See http://en.wikipedia.org/wiki/Symmetric_difference. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of values. + * @example + * + * _.xor([1, 2, 3], [5, 2, 1, 4]); + * // => [3, 5, 4] + * + * _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); + * // => [1, 4, 5] + */ + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArray(array) || isArguments(array)) { + var result = result + ? baseUniq(baseDifference(result, array).concat(baseDifference(array, result))) + : array; + } + } + return result || []; + } + + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second + * elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @alias unzip + * @category Arrays + * @param {...Array} [array] Arrays to process. + * @returns {Array} Returns a new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + function zip() { + var array = arguments.length > 1 ? arguments : arguments[0], + index = -1, + length = array ? max(pluck(array, 'length')) : 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = pluck(array, index); + } + return result; + } + + /** + * Creates an object composed from arrays of `keys` and `values`. Provide + * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` + * or two arrays, one of `keys` and one of corresponding `values`. + * + * @static + * @memberOf _ + * @alias object + * @category Arrays + * @param {Array} keys The array of keys. + * @param {Array} [values=[]] The array of values. + * @returns {Object} Returns an object composed of the given keys and + * corresponding values. + * @example + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + function zipObject(keys, values) { + var index = -1, + length = keys ? keys.length : 0, + result = {}; + + if (!values && length && !isArray(keys[0])) { + values = []; + } + while (++index < length) { + var key = keys[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that executes `func`, with the `this` binding and + * arguments of the created function, only after being called `n` times. + * + * @static + * @memberOf _ + * @category Functions + * @param {number} n The number of times the function must be called before + * `func` is executed. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('Done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'Done saving!', after all saves have completed + */ + function after(n, func) { + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that, when called, invokes `func` with the `this` + * binding of `thisArg` and prepends any additional `bind` arguments to those + * provided to the bound function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var func = function(greeting) { + * return greeting + ' ' + this.name; + * }; + * + * func = _.bind(func, { 'name': 'fred' }, 'hi'); + * func(); + * // => 'hi fred' + */ + function bind(func, thisArg) { + return arguments.length > 2 + ? createWrapper(func, 17, slice(arguments, 2), null, thisArg) + : createWrapper(func, 1, null, null, thisArg); + } + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all the function properties + * of `object` will be bound. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to + * bind, specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { console.log('clicked ' + this.label); } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs', when the button is clicked + */ + function bindAll(object) { + var funcs = arguments.length > 1 ? baseFlatten(arguments, true, false, 1) : functions(object), + index = -1, + length = funcs.length; + + while (++index < length) { + var key = funcs[index]; + object[key] = createWrapper(object[key], 1, null, null, object); + } + return object; + } + + /** + * Creates a function that, when called, invokes the method at `object[key]` + * and prepends any additional `bindKey` arguments to those provided to the bound + * function. This method differs from `_.bind` by allowing bound functions to + * reference methods that will be redefined or don't yet exist. + * See http://michaux.ca/articles/lazy-function-definition-pattern. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'name': 'fred', + * 'greet': function(greeting) { + * return greeting + ' ' + this.name; + * } + * }; + * + * var func = _.bindKey(object, 'greet', 'hi'); + * func(); + * // => 'hi fred' + * + * object.greet = function(greeting) { + * return greeting + 'ya ' + this.name + '!'; + * }; + * + * func(); + * // => 'hiya fred!' + */ + function bindKey(object, key) { + return arguments.length > 2 + ? createWrapper(key, 19, slice(arguments, 2), null, object) + : createWrapper(key, 3, null, null, object); + } + + /** + * Creates a function that is the composition of the provided functions, + * where each function consumes the return value of the function that follows. + * For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + * Each function is executed with the `this` binding of the composed function. + * + * @static + * @memberOf _ + * @category Functions + * @param {...Function} [func] Functions to compose. + * @returns {Function} Returns the new composed function. + * @example + * + * var realNameMap = { + * 'pebbles': 'penelope' + * }; + * + * var format = function(name) { + * name = realNameMap[name.toLowerCase()] || name; + * return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase(); + * }; + * + * var greet = function(formatted) { + * return 'Hiya ' + formatted + '!'; + * }; + * + * var welcome = _.compose(greet, format); + * welcome('pebbles'); + * // => 'Hiya Penelope!' + */ + function compose() { + var funcs = arguments, + length = funcs.length; + + while (length--) { + if (!isFunction(funcs[length])) { + throw new TypeError; + } + } + return function() { + var args = arguments, + length = funcs.length; + + while (length--) { + args = [funcs[length].apply(this, args)]; + } + return args[0]; + }; + } + + /** + * Creates a function which accepts one or more arguments of `func` that when + * invoked either executes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` can be specified + * if `func.length` is not sufficient. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {Function} Returns the new curried function. + * @example + * + * var curried = _.curry(function(a, b, c) { + * console.log(a + b + c); + * }); + * + * curried(1)(2)(3); + * // => 6 + * + * curried(1, 2)(3); + * // => 6 + * + * curried(1, 2, 3); + * // => 6 + */ + function curry(func, arity) { + arity = typeof arity == 'number' ? arity : (+arity || func.length); + return createWrapper(func, 4, null, null, null, arity); + } + + /** + * Creates a function that will delay the execution of `func` until after + * `wait` milliseconds have elapsed since the last time it was invoked. + * Provide an options object to indicate that `func` should be invoked on + * the leading and/or trailing edge of the `wait` timeout. Subsequent calls + * to the debounced function will return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * var lazyLayout = _.debounce(calculateLayout, 150); + * jQuery(window).on('resize', lazyLayout); + * + * // execute `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * }); + * + * // ensure `batchLog` is executed once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * source.addEventListener('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * }, false); + */ + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + wait = nativeMax(0, wait) || 0; + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = options.leading; + maxWait = 'maxWait' in options && (nativeMax(wait, options.maxWait) || 0); + trailing = 'trailing' in options ? options.trailing : trailing; + } + var delayed = function() { + var remaining = wait - (now() - stamp); + if (remaining <= 0) { + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + var isCalled = trailingCall; + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + } else { + timeoutId = setTimeout(delayed, remaining); + } + }; + + var maxDelayed = function() { + if (timeoutId) { + clearTimeout(timeoutId); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (trailing || (maxWait !== wait)) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + }; + + return function() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + return result; + }; + } + + /** + * Defers executing the `func` function until the current call stack has cleared. + * Additional arguments will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { console.log(text); }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + function defer(func) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 1); + return setTimeout(function() { func.apply(undefined, args); }, 1); + } + + /** + * Executes the `func` function after `wait` milliseconds. Additional arguments + * will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { console.log(text); }, 1000, 'later'); + * // => logs 'later' after one second + */ + function delay(func, wait) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 2); + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it will be used to determine the cache key for storing the result + * based on the arguments provided to the memoized function. By default, the + * first argument provided to the memoized function is used as the cache key. + * The `func` is executed with the `this` binding of the memoized function. + * The result cache is exposed as the `cache` property on the memoized function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] A function used to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var fibonacci = _.memoize(function(n) { + * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); + * }); + * + * fibonacci(9) + * // => 34 + * + * var data = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // modifying the result cache + * var get = _.memoize(function(name) { return data[name]; }, _.identity); + * get('pebbles'); + * // => { 'name': 'pebbles', 'age': 1 } + * + * get.cache.pebbles.name = 'penelope'; + * get('pebbles'); + * // => { 'name': 'penelope', 'age': 1 } + */ + function memoize(func, resolver) { + if (!isFunction(func)) { + throw new TypeError; + } + var memoized = function() { + var cache = memoized.cache, + key = resolver ? resolver.apply(this, arguments) : keyPrefix + arguments[0]; + + return hasOwnProperty.call(cache, key) + ? cache[key] + : (cache[key] = func.apply(this, arguments)); + } + memoized.cache = {}; + return memoized; + } + + /** + * Creates a function that is restricted to execute `func` once. Repeat calls to + * the function will return the value of the first call. The `func` is executed + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` executes `createApplication` once + */ + function once(func) { + var ran, + result; + + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (ran) { + return result; + } + ran = true; + result = func.apply(this, arguments); + + // clear the `func` variable so the function may be garbage collected + func = null; + return result; + }; + } + + /** + * Creates a function that, when called, invokes `func` with any additional + * `partial` arguments prepended to those provided to the new function. This + * method is similar to `_.bind` except it does **not** alter the `this` binding. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { return greeting + ' ' + name; }; + * var hi = _.partial(greet, 'hi'); + * hi('fred'); + * // => 'hi fred' + */ + function partial(func) { + return createWrapper(func, 16, slice(arguments, 1)); + } + + /** + * This method is like `_.partial` except that `partial` arguments are + * appended to those provided to the new function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var defaultsDeep = _.partialRight(_.merge, _.defaults); + * + * var options = { + * 'variable': 'data', + * 'imports': { 'jq': $ } + * }; + * + * defaultsDeep(options, _.templateSettings); + * + * options.variable + * // => 'data' + * + * options.imports + * // => { '_': _, 'jq': $ } + */ + function partialRight(func) { + return createWrapper(func, 32, null, slice(arguments, 1)); + } + + /** + * Creates a function that, when executed, will only call the `func` function + * at most once per every `wait` milliseconds. Provide an options object to + * indicate that `func` should be invoked on the leading and/or trailing edge + * of the `wait` timeout. Subsequent calls to the throttled function will + * return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * var throttled = _.throttle(updatePosition, 100); + * jQuery(window).on('scroll', throttled); + * + * // execute `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? options.leading : leading; + trailing = 'trailing' in options ? options.trailing : trailing; + } + debounceOptions.leading = leading; + debounceOptions.maxWait = wait; + debounceOptions.trailing = trailing; + + return debounce(func, wait, debounceOptions); + } + + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Additional arguments provided to the function are appended + * to those provided to the wrapper function. The wrapper is executed with + * the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('Fred, Wilma, & Pebbles'); + * // => '

Fred, Wilma, & Pebbles

' + */ + function wrap(value, wrapper) { + return createWrapper(wrapper, 16, [value]); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'name': 'fred' }; + * var getter = _.constant(object); + * getter() === object; + * // => true + */ + function constant(value) { + return function() { + return value; + }; + } + + /** + * Produces a callback bound to an optional `thisArg`. If `func` is a property + * name the created callback will return the property value for a given element. + * If `func` is an object the created callback will return `true` for elements + * that contain the equivalent object properties, otherwise it will return `false`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // wrap to create custom callback shorthands + * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { + * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); + * return !match ? func(callback, thisArg) : function(object) { + * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; + * }; + * }); + * + * _.filter(characters, 'age__gt38'); + * // => [{ 'name': 'fred', 'age': 40 }] + */ + function createCallback(func, thisArg, argCount) { + var type = typeof func; + if (func == null || type == 'function') { + return baseCreateCallback(func, thisArg, argCount); + } + // handle "_.pluck" style callback shorthands + if (type != 'object') { + return property(func); + } + var props = keys(func), + key = props[0], + a = func[key]; + + // handle "_.where" style callback shorthands + if (props.length == 1 && a === a && !isObject(a)) { + // fast path the common case of providing an object with a single + // property containing a primitive value + return function(object) { + var b = object[key]; + return a === b && (a !== 0 || (1 / a == 1 / b)); + }; + } + return function(object) { + var length = props.length, + result = false; + + while (length--) { + if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) { + break; + } + } + return result; + }; + } + + /** + * 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); + } + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'name': 'fred' }; + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + /** + * Adds function properties of a source object to the destination object. + * If `object` is a function methods will be added to its prototype as well. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Function|Object} [object=lodash] object The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options] The options object. + * @param {boolean} [options.chain=true] Specify whether the functions added are chainable. + * @example + * + * function capitalize(string) { + * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); + * } + * + * _.mixin({ 'capitalize': capitalize }); + * _.capitalize('fred'); + * // => 'Fred' + * + * _('fred').capitalize().value(); + * // => 'Fred' + * + * _.mixin({ 'capitalize': capitalize }, { 'chain': false }); + * _('fred').capitalize(); + * // => 'Fred' + */ + function mixin(object, source, options) { + var chain = true, + methodNames = source && functions(source); + + if (!source || (!options && !methodNames.length)) { + if (options == null) { + options = source; + } + ctor = lodashWrapper; + source = object; + object = lodash; + methodNames = functions(source); + } + if (options === false) { + chain = false; + } else if (isObject(options) && 'chain' in options) { + chain = options.chain; + } + var ctor = object, + isFunc = isFunction(ctor); + + forEach(methodNames, function(methodName) { + var func = object[methodName] = source[methodName]; + if (isFunc) { + ctor.prototype[methodName] = function() { + var chainAll = this.__chain__, + value = this.__wrapped__, + args = [value]; + + push.apply(args, arguments); + var result = func.apply(object, args); + if (chain || chainAll) { + if (value === result && isObject(result)) { + return this; + } + result = new ctor(result); + result.__chain__ = chainAll; + } + return result; + }; + } + }); + } + + /** + * Reverts the '_' variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @memberOf _ + * @category Utilities + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + context._ = oldDash; + return this; + } + + /** + * A no-operation function. + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var object = { 'name': 'fred' }; + * _.noop(object) === undefined; + * // => true + */ + function noop() { + // no operation performed + } + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var stamp = _.now(); + * _.defer(function() { console.log(_.now() - stamp); }); + * // => logs the number of milliseconds it took for the deferred function to be called + */ + var now = isNative(now = Date.now) && now || function() { + return new Date().getTime(); + }; + + /** + * Converts the given value into an integer of the specified radix. + * If `radix` is `undefined` or `0` a `radix` of `10` is used unless the + * `value` is a hexadecimal, in which case a `radix` of `16` is used. + * + * Note: This method avoids differences in native ES3 and ES5 `parseInt` + * implementations. See http://es5.github.io/#E. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. + * @example + * + * _.parseInt('08'); + * // => 8 + */ + var parseInt = nativeParseInt(whitespace + '08') == 8 ? nativeParseInt : function(value, radix) { + // Firefox < 21 and Opera < 15 follow the ES3 specified implementation of `parseInt` + return nativeParseInt(isString(value) ? value.replace(reLeadingSpacesAndZeros, '') : value, radix || 0); + }; + + /** + * Creates a "_.pluck" style function, which returns the `key` value of a + * given object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} key The name of the property to retrieve. + * @returns {Function} Returns the new function. + * @example + * + * var characters = [ + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 36 } + * ]; + * + * var getName = _.property('name'); + * + * _.map(characters, getName); + * // => ['barney', 'fred'] + * + * _.sortBy(characters, getName); + * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] + */ + function property(key) { + return function(object) { + return object[key]; + }; + } + + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number will be + * returned. If `floating` is truey or either `min` or `max` are floats a + * floating-point number will be returned instead of an integer. + * + * @static + * @memberOf _ + * @category Utilities + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating=false] Specify returning a floating-point number. + * @returns {number} Returns a random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(min, max, floating) { + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (typeof min == 'boolean' && noMax) { + floating = min; + min = 1; + } + else if (!noMax && typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand +'').length - 1)))), max); + } + return baseRandom(min, max); + } + + /** + * Resolves the value of property `key` on `object`. If `key` is a function + * it will be invoked with the `this` binding of `object` and its result returned, + * else the property value is returned. If `object` is falsey then `undefined` + * is returned. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to resolve. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { + * 'cheese': 'crumpets', + * 'stuff': function() { + * return 'nonsense'; + * } + * }; + * + * _.result(object, 'cheese'); + * // => 'crumpets' + * + * _.result(object, 'stuff'); + * // => 'nonsense' + */ + function result(object, key) { + if (object) { + var value = object[key]; + return isFunction(value) ? object[key]() : value; + } + } + + /** + * 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('<%- value %>', { 'value': '\n```\n\nUsing [`npm`](http://npmjs.org/):\n\n```bash\nnpm i --save lodash\n\n{sudo} npm i -g lodash\nnpm ln lodash\n```\n\nIn [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/):\n\n```js\nvar _ = require('lodash');\n// or as Underscore\nvar _ = require('lodash/dist/lodash.underscore');\n```\n\n**Notes:**\n * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL\n * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('lodash.js');\n```\n\nIn an AMD loader:\n\n```js\nrequire({\n 'packages': [\n { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }\n ]\n},\n['lodash'], function(_) {\n console.log(_.VERSION);\n});\n```\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\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", + "readmeFilename": "README.md", + "_id": "lodash@2.4.1", + "_from": "lodash@>=2.4.1-0 <3.0.0-0", + "scripts": {} +} diff --git a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/.travis.yml similarity index 82% rename from node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml rename to node_modules/gulp/node_modules/gulp-util/node_modules/minimist/.travis.yml index 60d00ce..cc4dba2 100644 --- a/node_modules/gulp-uglify/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/.travis.yml @@ -1,5 +1,4 @@ language: node_js node_js: - - "0.10" - "0.8" - - "0.6" + - "0.10" diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/LICENSE b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/LICENSE @@ -0,0 +1,18 @@ +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/node_modules/gulp-util/node_modules/minimist/example/parse.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/example/parse.js new file mode 100644 index 0000000..abff3e8 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/example/parse.js @@ -0,0 +1,2 @@ +var argv = require('../')(process.argv.slice(2)); +console.dir(argv); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/index.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/index.js new file mode 100644 index 0000000..cb0afc2 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/index.js @@ -0,0 +1,219 @@ +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {}, unknownFn: null }; + + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } + + if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { + flags.allBools = true; + } else { + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[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; + })); + }); + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + if (aliases[key]) { + flags.strings[aliases[key]] = true; + } + }); + + 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 argDefined(key, arg) { + return (flags.allBools && /^--[^=]+$/.test(arg)) || + flags.strings[key] || flags.bools[key] || aliases[key]; + } + + function setArg (key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } + + 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], arg); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false, arg); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && !flags.allBools + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, next, arg); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + 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, arg) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next, arg); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2), arg); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + } + } + + 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], arg); + i++; + } + else if (args[i+1] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + } + else { + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + } + } + + 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]); + }); + } + }); + + if (opts['--']) { + argv['--'] = new Array(); + notFlags.forEach(function(key) { + argv['--'].push(key); + }); + } + else { + 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); +} + diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/package.json new file mode 100644 index 0000000..7a68dcc --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/package.json @@ -0,0 +1,70 @@ +{ + "name": "minimist", + "version": "1.1.0", + "description": "parse argument options", + "main": "index.js", + "devDependencies": { + "tape": "~1.0.4", + "tap": "~0.4.0", + "covert": "^1.0.0" + }, + "scripts": { + "test": "tap test/*.js", + "coverage": "covert 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", + "gitHead": "e2563e462be40c344c6c65b7cde85091fe261976", + "bugs": { + "url": "https://github.com/substack/minimist/issues" + }, + "_id": "minimist@1.1.0", + "_shasum": "cdf225e8898f840a258ded44fc91776770afdc93", + "_from": "minimist@>=1.1.0-0 <2.0.0-0", + "_npmVersion": "1.4.21", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "dist": { + "shasum": "cdf225e8898f840a258ded44fc91776770afdc93", + "tarball": "http://registry.npmjs.org/minimist/-/minimist-1.1.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/readme.markdown b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/readme.markdown new file mode 100644 index 0000000..30a74cf --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/readme.markdown @@ -0,0 +1,91 @@ +# 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 boolean, string or array of strings to always treat as +booleans. if `true` will treat all double hyphenated arguments without equal signs +as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) +* `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 +* `opts.stopEarly` - when true, populate `argv._` with everything after the +first non-option +* `opts['--']` - when true, populate `argv._` with everything before the `--` +and `argv['--']` with everything after the `--`. Here's an example: +* `opts.unknown` - a function which is invoked with a command line parameter not +defined in the `opts` configuration object. If the function returns `false`, the +unknown option is not added to `argv`. + +``` +> require('./')('one two three -- four five --six'.split(' '), { '--': true }) +{ _: [ 'one', 'two', 'three' ], + '--': [ 'four', 'five', '--six' ] } +``` + +Note that with `opts['--']` set, parsing for arguments still stops after the +`--`. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install minimist +``` + +# license + +MIT diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/all_bool.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/all_bool.js new file mode 100644 index 0000000..4575ec0 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/all_bool.js @@ -0,0 +1,32 @@ +var parse = require('../'); +var test = require('tape'); + +test('flag boolean true (default all --args to boolean)', function (t) { + var argv = parse(['moo', '--honk', 'cow'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); + +test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { + var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + tacos: 'good', + p: '55', + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/bool.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/bool.js new file mode 100644 index 0000000..749e083 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/bool.js @@ -0,0 +1,119 @@ +var parse = require('../'); +var test = require('tape'); + +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('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/node_modules/gulp-util/node_modules/minimist/test/dash.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/dash.js new file mode 100644 index 0000000..5a4fa5b --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/dash.js @@ -0,0 +1,31 @@ +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' ] }); +}); + +test('move arguments after the -- into their own `--` array', function(t) { + t.plan(1); + t.deepEqual( + parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), + { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); +}); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/default_bool.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/default_bool.js new file mode 100644 index 0000000..f0041ee --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/default_bool.js @@ -0,0 +1,20 @@ +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/node_modules/gulp-util/node_modules/minimist/test/dotted.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/dotted.js new file mode 100644 index 0000000..d8b3e85 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/dotted.js @@ -0,0 +1,22 @@ +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(); +}); + +test('dotted default with no alias', function (t) { + var argv = parse('', {default: {'a.b': 11}}); + t.equal(argv.a.b, 11); + t.end(); +}); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/long.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/long.js new file mode 100644 index 0000000..5d3a1e0 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/long.js @@ -0,0 +1,31 @@ +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/node_modules/gulp-util/node_modules/minimist/test/num.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/num.js new file mode 100644 index 0000000..2cc77f4 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/num.js @@ -0,0 +1,36 @@ +var parse = require('../'); +var test = require('tape'); + +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('already a number', function (t) { + var argv = parse([ '-x', 1234, 789 ]); + t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/parse.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/parse.js new file mode 100644 index 0000000..7b4a2a1 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/parse.js @@ -0,0 +1,197 @@ +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('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('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('string and alias', function(t) { + var x = parse([ '--str', '000123' ], { + string: 's', + alias: { s: 'str' } + }); + + t.equal(x.str, '000123'); + t.equal(typeof x.str, 'string'); + t.equal(x.s, '000123'); + t.equal(typeof x.s, 'string'); + + var y = parse([ '-s', '000123' ], { + string: 'str', + alias: { str: 's' } + }); + + t.equal(y.str, '000123'); + t.equal(typeof y.str, 'string'); + t.equal(y.s, '000123'); + t.equal(typeof y.s, 'string'); + 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(); +}); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js new file mode 100644 index 0000000..21851b0 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js @@ -0,0 +1,9 @@ +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/node_modules/gulp-util/node_modules/minimist/test/short.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/short.js new file mode 100644 index 0000000..d513a1c --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/short.js @@ -0,0 +1,67 @@ +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/node_modules/gulp-util/node_modules/minimist/test/stop_early.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/stop_early.js new file mode 100644 index 0000000..bdf9fbc --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/stop_early.js @@ -0,0 +1,15 @@ +var parse = require('../'); +var test = require('tape'); + +test('stops parsing on the first non-option when stopEarly is set', function (t) { + var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { + stopEarly: true + }); + + t.deepEqual(argv, { + aaa: 'bbb', + _: ['ccc', '--ddd'] + }); + + t.end(); +}); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/unknown.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/unknown.js new file mode 100644 index 0000000..462a36b --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/unknown.js @@ -0,0 +1,102 @@ +var parse = require('../'); +var test = require('tape'); + +test('boolean and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'true', '--derp', 'true' ]; + var regular = [ '--herp', 'true', '-d', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('flag boolean true any double hyphen argument is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { + boolean: true, + unknown: unknownFn + }); + t.same(unknown, ['--tacos=good', 'cow', '-p']); + t.same(argv, { + honk: true, + _: [] + }); + t.end(); +}); + +test('string and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; + var regular = [ '--herp', 'hello', '-d', 'moon' ]; + var opts = { + alias: { h: 'herp' }, + string: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('default and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello' ]; + var regular = [ '--herp', 'hello' ]; + var opts = { + default: { 'h': 'bar' }, + alias: { 'h': 'herp' }, + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, []); + t.end(); + unknownFn(); // exercise fn for 100% coverage +}); + +test('value following -- is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '--bad', '--', 'good', 'arg' ]; + var opts = { + '--': true, + unknown: unknownFn + }; + var argv = parse(aliased, opts); + + t.same(unknown, ['--bad']); + t.same(argv, { + '--': ['good', 'arg'], + '_': [] + }) + t.end(); +}); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/whitespace.js b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/whitespace.js new file mode 100644 index 0000000..8a52a58 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/minimist/test/whitespace.js @@ -0,0 +1,8 @@ +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/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md index 34c1189..e46b823 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/README.md @@ -2,8 +2,8 @@ ***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/) +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/) This package is a mirror of the Streams2 and Streams3 implementations in Node-core. diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js index 7f4e3b8..19ab358 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js @@ -63,6 +63,8 @@ if (debug && debug.debuglog) { util.inherits(Readable, Stream); function ReadableState(options, stream) { + var Duplex = require('./_stream_duplex'); + options = options || {}; // the point at which it stops calling _read() to fill the buffer @@ -100,6 +102,9 @@ function ReadableState(options, stream) { // make all the buffer merging and length checks go away this.objectMode = !!options.objectMode; + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; + // 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. @@ -126,6 +131,8 @@ function ReadableState(options, stream) { } function Readable(options) { + var Duplex = require('./_stream_duplex'); + if (!(this instanceof Readable)) return new Readable(options); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js index 9ea2829..db8539c 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js @@ -48,6 +48,8 @@ function WriteReq(chunk, encoding, cb) { } function WritableState(options, stream) { + var Duplex = require('./_stream_duplex'); + options = options || {}; // the point at which write() starts returning false @@ -61,6 +63,9 @@ function WritableState(options, stream) { // contains buffers or objects. this.objectMode = !!options.objectMode; + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.writableObjectMode; + // cast to ints. this.highWaterMark = ~~this.highWaterMark; diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/core-util-is/package.json index ddeef3f..d28ffc4 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/core-util-is/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/core-util-is/package.json @@ -31,6 +31,6 @@ "readmeFilename": "README.md", "homepage": "https://github.com/isaacs/core-util-is", "_id": "core-util-is@1.0.1", - "_from": "core-util-is@1.0.1", + "_from": "core-util-is@~1.0.0", "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js index 2e44a03..b00e54f 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -36,6 +36,14 @@ function assertEncoding(encoding) { } } +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. var StringDecoder = exports.StringDecoder = function(encoding) { this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); assertEncoding(encoding); @@ -60,37 +68,50 @@ var StringDecoder = exports.StringDecoder = function(encoding) { return; } + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. this.charLength = 0; }; +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . 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; + var available = (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; + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; if (this.charReceived < this.charLength) { // still not enough chars in this buffer? wait for more ... return ''; } + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + // 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 + // CESU-8: 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; @@ -100,34 +121,33 @@ StringDecoder.prototype.write = function(buffer) { 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); + if (buffer.length === 0) { + return charStr; + } break; } - var lenIncomplete = this.detectIncompleteChar(buffer); + // determine and set charLength / charReceived + 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; + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } 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 + // CESU-8: 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); + buffer.copy(this.charBuffer, 0, 0, size); return charStr.substring(0, end); } @@ -135,6 +155,10 @@ StringDecoder.prototype.write = function(buffer) { return charStr; }; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. 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; @@ -164,8 +188,7 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { break; } } - - return i; + this.charReceived = i; }; StringDecoder.prototype.end = function(buffer) { @@ -188,13 +211,11 @@ function passThroughWrite(buffer) { } function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json index 7f5d001..a8c586b 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,6 +1,6 @@ { "name": "string_decoder", - "version": "0.10.25-1", + "version": "0.10.31", "description": "The string_decoder module from Node core", "main": "index.js", "dependencies": {}, @@ -22,11 +22,33 @@ "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", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@~0.10.x", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json index e760eff..bd72748 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.1.13-1", + "version": "1.1.13", "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", "main": "readable.js", "dependencies": { @@ -33,12 +33,38 @@ "url": "http://blog.izs.me/" }, "license": "MIT", - "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", + "gitHead": "3b672fd7ae92acf5b4ffdbabf74b372a0a56b051", "bugs": { "url": "https://github.com/isaacs/readable-stream/issues" }, "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.1.13-1", - "_from": "readable-stream@~1.1.9" + "_id": "readable-stream@1.1.13", + "_shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "_from": "readable-stream@1.1.13", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/package.json index e0e5607..5d2d6bb 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/package.json @@ -21,7 +21,7 @@ "homepage": "https://github.com/segmentio/multipipe", "_id": "multipipe@0.1.1", "_shasum": "bc271fbb2bf3a5ed3e43cc6ba3d7dbc1c4eb07fb", - "_from": "multipipe@^0.1.0", + "_from": "multipipe@>=0.1.0-0 <0.2.0-0", "_npmVersion": "1.4.9", "_npmUser": { "name": "juliangruber", diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/README.md b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/README.md index 33aa01e..ec74569 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/README.md +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/README.md @@ -100,7 +100,9 @@ The `transformFunction` must have the following signature: `function (chunk, enc 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. +Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. + +If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. ### flushFunction diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js index 0ca7705..6307220 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js @@ -240,7 +240,7 @@ function howMuchToRead(n, state) { if (state.objectMode) return n === 0 ? 0 : 1; - if (isNaN(n) || n === null) { + if (n === null || isNaN(n)) { // only flow one buffer at a time if (state.flowing && state.buffer.length) return state.buffer[0].length; @@ -275,6 +275,7 @@ Readable.prototype.read = function(n) { var state = this._readableState; state.calledRead = true; var nOrig = n; + var ret; if (typeof n !== 'number' || n > 0) state.emittedReadable = false; @@ -293,9 +294,28 @@ Readable.prototype.read = function(n) { // if we've ended, and we're now clear, then finish it up. if (n === 0 && state.ended) { + ret = null; + + // In cases where the decoder did not receive enough data + // to produce a full chunk, then immediately received an + // EOF, state.buffer will contain [, ]. + // howMuchToRead will see this and coerce the amount to + // read to zero (because it's looking at the length of the + // first in state.buffer), and we'll end up here. + // + // This can only happen via state.decoder -- no other venue + // exists for pushing a zero-length chunk into state.buffer + // and triggering this behavior. In this case, we return our + // remaining data and end the stream, if appropriate. + if (state.length > 0 && state.decoder) { + ret = fromList(n, state); + state.length -= ret.length; + } + if (state.length === 0) endReadable(this); - return null; + + return ret; } // All the actual chunk generation logic needs to be @@ -349,7 +369,6 @@ Readable.prototype.read = function(n) { if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - var ret; if (n > 0) ret = fromList(n, state); else @@ -382,8 +401,7 @@ function chunkInvalid(state, chunk) { 'string' !== typeof chunk && chunk !== null && chunk !== undefined && - !state.objectMode && - !er) { + !state.objectMode) { er = new TypeError('Invalid non-string/buffer chunk'); } return er; @@ -814,7 +832,12 @@ Readable.prototype.wrap = function(stream) { stream.on('data', function(chunk) { if (state.decoder) chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) + + // don't skip over falsy values in objectMode + //if (state.objectMode && util.isNullOrUndefined(chunk)) + if (state.objectMode && (chunk === null || chunk === undefined)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) return; var ret = self.push(chunk); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js index d0254d5..4bdaa4f 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js @@ -37,7 +37,6 @@ var util = require('core-util-is'); util.inherits = require('inherits'); /**/ - var Stream = require('stream'); util.inherits(Writable, Stream); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json index cb9aa92..e59d249 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json @@ -31,5 +31,6 @@ "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" + "_from": "core-util-is@>=1.0.0-0 <1.1.0-0", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json index c532ca6..3f828f9 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json @@ -29,5 +29,5 @@ }, "homepage": "https://github.com/isaacs/inherits", "_id": "inherits@2.0.1", - "_from": "inherits@~2.0.1" + "_from": "inherits@>=2.0.1-0 <2.1.0-0" } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json index fc7904b..04d6a3f 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json @@ -47,8 +47,5 @@ ], "directories": {}, "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - } + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js index 2e44a03..b00e54f 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -36,6 +36,14 @@ function assertEncoding(encoding) { } } +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. var StringDecoder = exports.StringDecoder = function(encoding) { this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); assertEncoding(encoding); @@ -60,37 +68,50 @@ var StringDecoder = exports.StringDecoder = function(encoding) { return; } + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. this.charLength = 0; }; +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . 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; + var available = (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; + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; if (this.charReceived < this.charLength) { // still not enough chars in this buffer? wait for more ... return ''; } + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + // 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 + // CESU-8: 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; @@ -100,34 +121,33 @@ StringDecoder.prototype.write = function(buffer) { 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); + if (buffer.length === 0) { + return charStr; + } break; } - var lenIncomplete = this.detectIncompleteChar(buffer); + // determine and set charLength / charReceived + 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; + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } 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 + // CESU-8: 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); + buffer.copy(this.charBuffer, 0, 0, size); return charStr.substring(0, end); } @@ -135,6 +155,10 @@ StringDecoder.prototype.write = function(buffer) { return charStr; }; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. 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; @@ -164,8 +188,7 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { break; } } - - return i; + this.charReceived = i; }; StringDecoder.prototype.end = function(buffer) { @@ -188,13 +211,11 @@ function passThroughWrite(buffer) { } function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json index 7f5d001..752eab6 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,6 +1,6 @@ { "name": "string_decoder", - "version": "0.10.25-1", + "version": "0.10.31", "description": "The string_decoder module from Node core", "main": "index.js", "dependencies": {}, @@ -22,11 +22,33 @@ "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", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@>=0.10.0-0 <0.11.0-0", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json index afdd6ef..15c84e6 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.0.27-1", + "version": "1.0.31", "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", "main": "readable.js", "dependencies": { @@ -37,13 +37,10 @@ "url": "https://github.com/isaacs/readable-stream/issues" }, "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.27-1", - "dist": { - "shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz" - }, - "_from": "readable-stream@~1.0.17", - "_npmVersion": "1.4.3", + "_id": "readable-stream@1.0.31", + "_shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "_from": "readable-stream@>=1.0.27-1 <1.1.0-0", + "_npmVersion": "1.4.9", "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" @@ -62,8 +59,11 @@ "email": "rod@vagg.org" } ], + "dist": { + "shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz" + }, "directories": {}, - "_shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md index e754831..093cb29 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md @@ -2,9 +2,11 @@ [![browser support][3]][4] +[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + 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. +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 precedence. ## Examples @@ -13,13 +15,15 @@ var extend = require("xtend") // extend returns a new object. Does not mutate arguments var combination = extend({ - a: "a" + a: "a", + b: 'c' }, { b: "b" }) // { a: "a", b: "b" } ``` +## Stability status: Locked ## MIT Licenced diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/immutable.js similarity index 100% rename from node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js rename to node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/immutable.js diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json index 99147b6..d90698e 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json @@ -1,6 +1,6 @@ { "name": "xtend", - "version": "3.0.0", + "version": "4.0.0", "description": "extend like a boss", "keywords": [ "extend", @@ -18,7 +18,7 @@ "type": "git", "url": "git://github.com/Raynos/xtend.git" }, - "main": "index", + "main": "immutable", "scripts": { "test": "node test" }, @@ -63,13 +63,11 @@ "engines": { "node": ">=0.4" }, - "_id": "xtend@3.0.0", - "dist": { - "shasum": "5cce7407baf642cba7becda568111c493f59665a", - "tarball": "http://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" - }, - "_from": "xtend@~3.0.0", - "_npmVersion": "1.4.6", + "gitHead": "94a95d76154103290533b2c55ffa0fe4be16bfef", + "_id": "xtend@4.0.0", + "_shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", + "_from": "xtend@>=4.0.0 <4.1.0-0", + "_npmVersion": "1.4.15", "_npmUser": { "name": "raynos", "email": "raynos2@gmail.com" @@ -80,8 +78,11 @@ "email": "raynos2@gmail.com" } ], + "dist": { + "shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", + "tarball": "http://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz" + }, "directories": {}, - "_shasum": "5cce7407baf642cba7becda568111c493f59665a", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/package.json index 673a482..f763af0 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/package.json @@ -1,6 +1,6 @@ { "name": "through2", - "version": "0.5.1", + "version": "0.6.1", "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", "main": "through2.js", "scripts": { @@ -24,26 +24,23 @@ }, "license": "MIT", "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~3.0.0" + "readable-stream": ">=1.0.27-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" }, "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" + "bl": ">=0.9.0 <0.10.0-0", + "stream-spigot": ">=3.0.4 <3.1.0-0", + "tape": ">=2.14.0 <2.15.0-0" }, + "gitHead": "f66daaa2cb5d37b56c401f3b5a4962f709893267", "bugs": { "url": "https://github.com/rvagg/through2/issues" }, "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.5.1", - "dist": { - "shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "tarball": "http://registry.npmjs.org/through2/-/through2-0.5.1.tgz" - }, - "_from": "through2@^0.5.0", - "_npmVersion": "1.4.3", + "_id": "through2@0.6.1", + "_shasum": "f742b32893e8bd26146e789e4fd2ccb2c07a717e", + "_from": "through2@>=0.6.1-0 <0.7.0-0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" @@ -58,8 +55,11 @@ "email": "bryce@ravenwall.com" } ], + "dist": { + "shasum": "f742b32893e8bd26146e789e4fd2ccb2c07a717e", + "tarball": "http://registry.npmjs.org/through2/-/through2-0.6.1.tgz" + }, "directories": {}, - "_shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", + "_resolved": "https://registry.npmjs.org/through2/-/through2-0.6.1.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/through2.js b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/through2.js index d3610aa..5b7a880 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/through2.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/through2.js @@ -2,6 +2,24 @@ var Transform = require('readable-stream/transform') , inherits = require('util').inherits , xtend = require('xtend') +function DestroyableTransform(opts) { + Transform.call(this, opts) + this._destroyed = false +} + +inherits(DestroyableTransform, Transform) + +DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) return + this._destroyed = true + + var self = this + process.nextTick(function() { + if (err) + self.emit('error', err) + self.emit('close') + }) +} // a noop _transform function function noop (chunk, enc, callback) { @@ -32,7 +50,7 @@ function through2 (construct) { // main export, just make me a transform stream! module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) + var t2 = new DestroyableTransform(options) t2._transform = transform @@ -52,10 +70,10 @@ module.exports.ctor = through2(function (options, transform, flush) { this.options = xtend(options, override) - Transform.call(this, this.options) + DestroyableTransform.call(this, this.options) } - inherits(Through2, Transform) + inherits(Through2, DestroyableTransform) Through2.prototype._transform = transform @@ -67,7 +85,7 @@ module.exports.ctor = through2(function (options, transform, flush) { module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true, highWaterMark: 16 }, options)) + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) t2._transform = transform diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.jshintignore b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.jshintignore new file mode 100644 index 0000000..ba2a97b --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.jshintignore @@ -0,0 +1,2 @@ +node_modules +coverage diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.jshintrc b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.jshintrc new file mode 100644 index 0000000..373d6c3 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.jshintrc @@ -0,0 +1,36 @@ +{ + "indent": 2, + "smarttabs": true, + "latedef": "nofunc", + "undef": true, + "unused": true, + "trailing": true, + "laxcomma": false, + "eqeqeq": true, + "eqnull": true, + "boss": true, + "expr": true, + "sub": true, + "newcap": true, + "quotmark": true, + "loopfunc": true, + "lastsemic": true, + "funcscope": true, + "browser": true, + "nonstandard": true, + "jquery": true, + "devel": true, + "node": true, + "esnext": true, + "globals": { + "describe": false, + "xdescribe": false, + "it": false, + "xit": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false, + "define": false + } +} diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.travis.yml b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.travis.yml index 33ad9f8..8b95a9f 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.travis.yml +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/.travis.yml @@ -1,6 +1,5 @@ language: node_js node_js: - - "0.9" - "0.10" after_script: - - npm run coveralls \ No newline at end of file + - npm run coveralls diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/LICENSE b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/LICENSE old mode 100755 new mode 100644 diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/README.md b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/README.md index 3f97efc..ae6f16f 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/README.md +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/README.md @@ -17,6 +17,10 @@ +## What is this? + +Read this for more info about how this plays into the grand scheme of things https://medium.com/@eschoff/3828e8126466 + ## File ```javascript @@ -25,7 +29,7 @@ var File = require('vinyl'); var coffeeFile = new File({ cwd: "/", base: "/test/", - path: "/test/file.coffee" + path: "/test/file.coffee", contents: new Buffer("test = 123") }); ``` @@ -79,7 +83,7 @@ Returns true if file.contents is null. ### clone() -Returns a new File object with all attributes cloned. +Returns a new File object with all attributes cloned. Custom attributes are deep-cloned. ### pipe(stream[, opt]) @@ -89,7 +93,7 @@ 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). +If opt.end is false, the destination stream will not be ended (same as node core). Returns the stream. @@ -120,4 +124,4 @@ console.log(file.relative); // file.coffee [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 +[depstat-image]: https://david-dm.org/wearefractal/vinyl.png diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json new file mode 100644 index 0000000..2bf4c62 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/coverage.json @@ -0,0 +1 @@ +{"/Users/contra/Projects/vinyl/index.js":{"path":"/Users/contra/Projects/vinyl/index.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":73,"12":14,"13":73,"14":73,"15":73,"16":73,"17":73,"18":73,"19":1,"20":26,"21":1,"22":29,"23":1,"24":6,"25":1,"26":3,"27":1,"28":14,"29":2,"30":12,"31":7,"32":5,"33":5,"34":14,"35":14,"36":1,"37":1,"38":13,"39":6,"40":14,"41":14,"42":75,"43":70,"44":5,"45":14,"46":1,"47":6,"48":3,"49":6,"50":3,"51":6,"52":2,"53":4,"54":2,"55":1,"56":1,"57":2,"58":2,"59":1,"60":2,"61":1,"62":6,"63":6,"64":6,"65":4,"66":6,"67":3,"68":6,"69":1,"70":6,"71":1,"72":99,"73":78,"74":1,"75":77,"76":1,"77":7,"78":1,"79":6,"80":1,"81":5,"82":1,"83":1,"84":46,"85":9,"86":1,"87":8,"88":5,"89":1},"b":{"1":[14,59],"2":[25,48],"3":[73,33],"4":[73,32],"5":[73,39],"6":[73,65],"7":[73,44],"8":[3,1,1],"9":[2,12],"10":[7,5],"11":[1,13],"12":[6,7],"13":[5,1],"14":[2,12],"15":[70,5],"16":[75,61,47,33,33,19],"17":[2,3],"18":[3,3],"19":[3,3],"20":[2,4],"21":[2,2],"22":[1,1],"23":[1,1],"24":[3,3],"25":[6,5],"26":[4,2],"27":[3,3],"28":[1,5],"29":[1,77],"30":[78,57,46],"31":[1,6],"32":[1,5],"33":[1,8],"34":[5,3],"35":[8,7]},"f":{"1":73,"2":26,"3":29,"4":6,"5":3,"6":14,"7":75,"8":6,"9":6,"10":99,"11":78,"12":7,"13":1,"14":46,"15":9},"fnMap":{"1":{"name":"File","line":11,"loc":{"start":{"line":11,"column":0},"end":{"line":11,"column":20}}},"2":{"name":"(anonymous_2)","line":30,"loc":{"start":{"line":30,"column":26},"end":{"line":30,"column":37}}},"3":{"name":"(anonymous_3)","line":34,"loc":{"start":{"line":34,"column":26},"end":{"line":34,"column":37}}},"4":{"name":"(anonymous_4)","line":38,"loc":{"start":{"line":38,"column":24},"end":{"line":38,"column":35}}},"5":{"name":"(anonymous_5)","line":43,"loc":{"start":{"line":43,"column":29},"end":{"line":43,"column":40}}},"6":{"name":"(anonymous_6)","line":47,"loc":{"start":{"line":47,"column":23},"end":{"line":47,"column":37}}},"7":{"name":"(anonymous_7)","line":81,"loc":{"start":{"line":81,"column":28},"end":{"line":81,"column":42}}},"8":{"name":"(anonymous_8)","line":93,"loc":{"start":{"line":93,"column":22},"end":{"line":93,"column":44}}},"9":{"name":"(anonymous_9)","line":114,"loc":{"start":{"line":114,"column":25},"end":{"line":114,"column":36}}},"10":{"name":"(anonymous_10)","line":138,"loc":{"start":{"line":138,"column":7},"end":{"line":138,"column":18}}},"11":{"name":"(anonymous_11)","line":141,"loc":{"start":{"line":141,"column":7},"end":{"line":141,"column":21}}},"12":{"name":"(anonymous_12)","line":151,"loc":{"start":{"line":151,"column":7},"end":{"line":151,"column":18}}},"13":{"name":"(anonymous_13)","line":156,"loc":{"start":{"line":156,"column":7},"end":{"line":156,"column":18}}},"14":{"name":"(anonymous_14)","line":162,"loc":{"start":{"line":162,"column":7},"end":{"line":162,"column":18}}},"15":{"name":"(anonymous_15)","line":165,"loc":{"start":{"line":165,"column":7},"end":{"line":165,"column":22}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":27}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":36}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":40}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":47}},"5":{"start":{"line":5,"column":0},"end":{"line":5,"column":41}},"6":{"start":{"line":6,"column":0},"end":{"line":6,"column":41}},"7":{"start":{"line":7,"column":0},"end":{"line":7,"column":37}},"8":{"start":{"line":8,"column":0},"end":{"line":8,"column":51}},"9":{"start":{"line":9,"column":0},"end":{"line":9,"column":31}},"10":{"start":{"line":11,"column":0},"end":{"line":28,"column":1}},"11":{"start":{"line":12,"column":2},"end":{"line":12,"column":23}},"12":{"start":{"line":12,"column":13},"end":{"line":12,"column":23}},"13":{"start":{"line":15,"column":2},"end":{"line":15,"column":55}},"14":{"start":{"line":16,"column":2},"end":{"line":16,"column":31}},"15":{"start":{"line":19,"column":2},"end":{"line":19,"column":39}},"16":{"start":{"line":20,"column":2},"end":{"line":20,"column":36}},"17":{"start":{"line":24,"column":2},"end":{"line":24,"column":32}},"18":{"start":{"line":27,"column":2},"end":{"line":27,"column":40}},"19":{"start":{"line":30,"column":0},"end":{"line":32,"column":2}},"20":{"start":{"line":31,"column":2},"end":{"line":31,"column":33}},"21":{"start":{"line":34,"column":0},"end":{"line":36,"column":2}},"22":{"start":{"line":35,"column":2},"end":{"line":35,"column":33}},"23":{"start":{"line":38,"column":0},"end":{"line":40,"column":2}},"24":{"start":{"line":39,"column":2},"end":{"line":39,"column":31}},"25":{"start":{"line":43,"column":0},"end":{"line":45,"column":2}},"26":{"start":{"line":44,"column":2},"end":{"line":44,"column":63}},"27":{"start":{"line":47,"column":0},"end":{"line":91,"column":2}},"28":{"start":{"line":48,"column":2},"end":{"line":61,"column":3}},"29":{"start":{"line":49,"column":4},"end":{"line":52,"column":6}},"30":{"start":{"line":53,"column":9},"end":{"line":61,"column":3}},"31":{"start":{"line":54,"column":4},"end":{"line":57,"column":6}},"32":{"start":{"line":59,"column":4},"end":{"line":59,"column":33}},"33":{"start":{"line":60,"column":4},"end":{"line":60,"column":42}},"34":{"start":{"line":64,"column":2},"end":{"line":64,"column":15}},"35":{"start":{"line":65,"column":2},"end":{"line":70,"column":3}},"36":{"start":{"line":66,"column":4},"end":{"line":66,"column":60}},"37":{"start":{"line":67,"column":4},"end":{"line":67,"column":65}},"38":{"start":{"line":68,"column":9},"end":{"line":70,"column":3}},"39":{"start":{"line":69,"column":4},"end":{"line":69,"column":73}},"40":{"start":{"line":72,"column":2},"end":{"line":78,"column":5}},"41":{"start":{"line":81,"column":2},"end":{"line":89,"column":11}},"42":{"start":{"line":83,"column":4},"end":{"line":87,"column":5}},"43":{"start":{"line":86,"column":6},"end":{"line":86,"column":13}},"44":{"start":{"line":88,"column":4},"end":{"line":88,"column":62}},"45":{"start":{"line":90,"column":2},"end":{"line":90,"column":14}},"46":{"start":{"line":93,"column":0},"end":{"line":112,"column":2}},"47":{"start":{"line":94,"column":2},"end":{"line":94,"column":21}},"48":{"start":{"line":94,"column":12},"end":{"line":94,"column":21}},"49":{"start":{"line":95,"column":2},"end":{"line":95,"column":53}},"50":{"start":{"line":95,"column":38},"end":{"line":95,"column":53}},"51":{"start":{"line":97,"column":2},"end":{"line":99,"column":3}},"52":{"start":{"line":98,"column":4},"end":{"line":98,"column":43}},"53":{"start":{"line":100,"column":2},"end":{"line":107,"column":3}},"54":{"start":{"line":101,"column":4},"end":{"line":105,"column":5}},"55":{"start":{"line":102,"column":6},"end":{"line":102,"column":32}},"56":{"start":{"line":104,"column":6},"end":{"line":104,"column":34}},"57":{"start":{"line":106,"column":4},"end":{"line":106,"column":18}},"58":{"start":{"line":110,"column":2},"end":{"line":110,"column":28}},"59":{"start":{"line":110,"column":15},"end":{"line":110,"column":28}},"60":{"start":{"line":111,"column":2},"end":{"line":111,"column":16}},"61":{"start":{"line":114,"column":0},"end":{"line":133,"column":2}},"62":{"start":{"line":115,"column":2},"end":{"line":115,"column":19}},"63":{"start":{"line":118,"column":2},"end":{"line":118,"column":70}},"64":{"start":{"line":120,"column":2},"end":{"line":122,"column":3}},"65":{"start":{"line":121,"column":4},"end":{"line":121,"column":35}},"66":{"start":{"line":124,"column":2},"end":{"line":126,"column":3}},"67":{"start":{"line":125,"column":4},"end":{"line":125,"column":42}},"68":{"start":{"line":128,"column":2},"end":{"line":130,"column":3}},"69":{"start":{"line":129,"column":4},"end":{"line":129,"column":47}},"70":{"start":{"line":132,"column":2},"end":{"line":132,"column":40}},"71":{"start":{"line":137,"column":0},"end":{"line":147,"column":3}},"72":{"start":{"line":139,"column":4},"end":{"line":139,"column":26}},"73":{"start":{"line":142,"column":4},"end":{"line":144,"column":5}},"74":{"start":{"line":143,"column":6},"end":{"line":143,"column":80}},"75":{"start":{"line":145,"column":4},"end":{"line":145,"column":25}},"76":{"start":{"line":150,"column":0},"end":{"line":159,"column":3}},"77":{"start":{"line":152,"column":4},"end":{"line":152,"column":80}},"78":{"start":{"line":152,"column":20},"end":{"line":152,"column":80}},"79":{"start":{"line":153,"column":4},"end":{"line":153,"column":80}},"80":{"start":{"line":153,"column":20},"end":{"line":153,"column":80}},"81":{"start":{"line":154,"column":4},"end":{"line":154,"column":47}},"82":{"start":{"line":157,"column":4},"end":{"line":157,"column":103}},"83":{"start":{"line":161,"column":0},"end":{"line":173,"column":3}},"84":{"start":{"line":163,"column":4},"end":{"line":163,"column":49}},"85":{"start":{"line":166,"column":4},"end":{"line":166,"column":75}},"86":{"start":{"line":166,"column":34},"end":{"line":166,"column":75}},"87":{"start":{"line":169,"column":4},"end":{"line":171,"column":5}},"88":{"start":{"line":170,"column":6},"end":{"line":170,"column":30}},"89":{"start":{"line":175,"column":0},"end":{"line":175,"column":22}}},"branchMap":{"1":{"line":12,"type":"if","locations":[{"start":{"line":12,"column":2},"end":{"line":12,"column":2}},{"start":{"line":12,"column":2},"end":{"line":12,"column":2}}]},"2":{"line":15,"type":"cond-expr","locations":[{"start":{"line":15,"column":28},"end":{"line":15,"column":39}},{"start":{"line":15,"column":42},"end":{"line":15,"column":54}}]},"3":{"line":16,"type":"binary-expr","locations":[{"start":{"line":16,"column":17},"end":{"line":16,"column":24}},{"start":{"line":16,"column":28},"end":{"line":16,"column":30}}]},"4":{"line":19,"type":"binary-expr","locations":[{"start":{"line":19,"column":13},"end":{"line":19,"column":21}},{"start":{"line":19,"column":25},"end":{"line":19,"column":38}}]},"5":{"line":20,"type":"binary-expr","locations":[{"start":{"line":20,"column":14},"end":{"line":20,"column":23}},{"start":{"line":20,"column":27},"end":{"line":20,"column":35}}]},"6":{"line":24,"type":"binary-expr","locations":[{"start":{"line":24,"column":14},"end":{"line":24,"column":23}},{"start":{"line":24,"column":27},"end":{"line":24,"column":31}}]},"7":{"line":27,"type":"binary-expr","locations":[{"start":{"line":27,"column":18},"end":{"line":27,"column":31}},{"start":{"line":27,"column":35},"end":{"line":27,"column":39}}]},"8":{"line":44,"type":"binary-expr","locations":[{"start":{"line":44,"column":9},"end":{"line":44,"column":22}},{"start":{"line":44,"column":26},"end":{"line":44,"column":35}},{"start":{"line":44,"column":39},"end":{"line":44,"column":62}}]},"9":{"line":48,"type":"if","locations":[{"start":{"line":48,"column":2},"end":{"line":48,"column":2}},{"start":{"line":48,"column":2},"end":{"line":48,"column":2}}]},"10":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":9},"end":{"line":53,"column":9}},{"start":{"line":53,"column":9},"end":{"line":53,"column":9}}]},"11":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":2},"end":{"line":65,"column":2}},{"start":{"line":65,"column":2},"end":{"line":65,"column":2}}]},"12":{"line":68,"type":"if","locations":[{"start":{"line":68,"column":9},"end":{"line":68,"column":9}},{"start":{"line":68,"column":9},"end":{"line":68,"column":9}}]},"13":{"line":69,"type":"cond-expr","locations":[{"start":{"line":69,"column":30},"end":{"line":69,"column":56}},{"start":{"line":69,"column":59},"end":{"line":69,"column":72}}]},"14":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":23},"end":{"line":75,"column":44}},{"start":{"line":75,"column":47},"end":{"line":75,"column":51}}]},"15":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":4},"end":{"line":83,"column":4}},{"start":{"line":83,"column":4},"end":{"line":83,"column":4}}]},"16":{"line":83,"type":"binary-expr","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":27}},{"start":{"line":83,"column":31},"end":{"line":83,"column":45}},{"start":{"line":84,"column":6},"end":{"line":84,"column":23}},{"start":{"line":84,"column":27},"end":{"line":84,"column":41}},{"start":{"line":85,"column":6},"end":{"line":85,"column":20}},{"start":{"line":85,"column":24},"end":{"line":85,"column":37}}]},"17":{"line":88,"type":"cond-expr","locations":[{"start":{"line":88,"column":27},"end":{"line":88,"column":49}},{"start":{"line":88,"column":52},"end":{"line":88,"column":61}}]},"18":{"line":94,"type":"if","locations":[{"start":{"line":94,"column":2},"end":{"line":94,"column":2}},{"start":{"line":94,"column":2},"end":{"line":94,"column":2}}]},"19":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":2},"end":{"line":95,"column":2}},{"start":{"line":95,"column":2},"end":{"line":95,"column":2}}]},"20":{"line":97,"type":"if","locations":[{"start":{"line":97,"column":2},"end":{"line":97,"column":2}},{"start":{"line":97,"column":2},"end":{"line":97,"column":2}}]},"21":{"line":100,"type":"if","locations":[{"start":{"line":100,"column":2},"end":{"line":100,"column":2}},{"start":{"line":100,"column":2},"end":{"line":100,"column":2}}]},"22":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":4},"end":{"line":101,"column":4}},{"start":{"line":101,"column":4},"end":{"line":101,"column":4}}]},"23":{"line":110,"type":"if","locations":[{"start":{"line":110,"column":2},"end":{"line":110,"column":2}},{"start":{"line":110,"column":2},"end":{"line":110,"column":2}}]},"24":{"line":118,"type":"cond-expr","locations":[{"start":{"line":118,"column":44},"end":{"line":118,"column":57}},{"start":{"line":118,"column":60},"end":{"line":118,"column":69}}]},"25":{"line":118,"type":"binary-expr","locations":[{"start":{"line":118,"column":18},"end":{"line":118,"column":27}},{"start":{"line":118,"column":31},"end":{"line":118,"column":40}}]},"26":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":2},"end":{"line":120,"column":2}},{"start":{"line":120,"column":2},"end":{"line":120,"column":2}}]},"27":{"line":124,"type":"if","locations":[{"start":{"line":124,"column":2},"end":{"line":124,"column":2}},{"start":{"line":124,"column":2},"end":{"line":124,"column":2}}]},"28":{"line":128,"type":"if","locations":[{"start":{"line":128,"column":2},"end":{"line":128,"column":2}},{"start":{"line":128,"column":2},"end":{"line":128,"column":2}}]},"29":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":4},"end":{"line":142,"column":4}},{"start":{"line":142,"column":4},"end":{"line":142,"column":4}}]},"30":{"line":142,"type":"binary-expr","locations":[{"start":{"line":142,"column":8},"end":{"line":142,"column":22}},{"start":{"line":142,"column":26},"end":{"line":142,"column":40}},{"start":{"line":142,"column":44},"end":{"line":142,"column":56}}]},"31":{"line":152,"type":"if","locations":[{"start":{"line":152,"column":4},"end":{"line":152,"column":4}},{"start":{"line":152,"column":4},"end":{"line":152,"column":4}}]},"32":{"line":153,"type":"if","locations":[{"start":{"line":153,"column":4},"end":{"line":153,"column":4}},{"start":{"line":153,"column":4},"end":{"line":153,"column":4}}]},"33":{"line":166,"type":"if","locations":[{"start":{"line":166,"column":4},"end":{"line":166,"column":4}},{"start":{"line":166,"column":4},"end":{"line":166,"column":4}}]},"34":{"line":169,"type":"if","locations":[{"start":{"line":169,"column":4},"end":{"line":169,"column":4}},{"start":{"line":169,"column":4},"end":{"line":169,"column":4}}]},"35":{"line":169,"type":"binary-expr","locations":[{"start":{"line":169,"column":8},"end":{"line":169,"column":12}},{"start":{"line":169,"column":16},"end":{"line":169,"column":34}}]}}},"/Users/contra/Projects/vinyl/lib/cloneBuffer.js":{"path":"/Users/contra/Projects/vinyl/lib/cloneBuffer.js","s":{"1":1,"2":1,"3":7,"4":7,"5":7},"b":{},"f":{"1":7},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":3,"column":0},"end":{"line":7,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":35}},"4":{"start":{"line":5,"column":2},"end":{"line":5,"column":16}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":13}}},"branchMap":{}},"/Users/contra/Projects/vinyl/lib/isBuffer.js":{"path":"/Users/contra/Projects/vinyl/lib/isBuffer.js","s":{"1":1,"2":1,"3":1,"4":108},"b":{"1":[108,107]},"f":{"1":108},"fnMap":{"1":{"name":"(anonymous_1)","line":5,"loc":{"start":{"line":5,"column":17},"end":{"line":5,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":24}},"3":{"start":{"line":5,"column":0},"end":{"line":7,"column":2}},"4":{"start":{"line":6,"column":2},"end":{"line":6,"column":54}}},"branchMap":{"1":{"line":6,"type":"binary-expr","locations":[{"start":{"line":6,"column":9},"end":{"line":6,"column":30}},{"start":{"line":6,"column":34},"end":{"line":6,"column":53}}]}}},"/Users/contra/Projects/vinyl/lib/isStream.js":{"path":"/Users/contra/Projects/vinyl/lib/isStream.js","s":{"1":1,"2":1,"3":99},"b":{"1":[99,40]},"f":{"1":99},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":36}}},"branchMap":{"1":{"line":4,"type":"binary-expr","locations":[{"start":{"line":4,"column":9},"end":{"line":4,"column":12}},{"start":{"line":4,"column":16},"end":{"line":4,"column":35}}]}}},"/Users/contra/Projects/vinyl/lib/isNull.js":{"path":"/Users/contra/Projects/vinyl/lib/isNull.js","s":{"1":1,"2":57},"b":{},"f":{"1":57},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":3,"column":2}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":20}}},"branchMap":{}},"/Users/contra/Projects/vinyl/lib/inspectStream.js":{"path":"/Users/contra/Projects/vinyl/lib/inspectStream.js","s":{"1":1,"2":1,"3":9,"4":2,"5":7,"6":7,"7":1,"8":7},"b":{"1":[2,7],"2":[1,6]},"f":{"1":9},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":34}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":37}},"2":{"start":{"line":3,"column":0},"end":{"line":11,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":32}},"4":{"start":{"line":4,"column":25},"end":{"line":4,"column":32}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":43}},"6":{"start":{"line":8,"column":2},"end":{"line":8,"column":47}},"7":{"start":{"line":8,"column":31},"end":{"line":8,"column":47}},"8":{"start":{"line":10,"column":2},"end":{"line":10,"column":34}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":4,"column":2}},{"start":{"line":4,"column":2},"end":{"line":4,"column":2}}]},"2":{"line":8,"type":"if","locations":[{"start":{"line":8,"column":2},"end":{"line":8,"column":2}},{"start":{"line":8,"column":2},"end":{"line":8,"column":2}}]}}}} \ No newline at end of file diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html new file mode 100644 index 0000000..b875fbd --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/index.html @@ -0,0 +1,363 @@ + + + + Code coverage report for All files + + + + + + + +
+

Code coverage report for All files

+

+ + Statements: 100% (111 / 111)      + + + Branches: 100% (84 / 84)      + + + Functions: 100% (20 / 20)      + + + Lines: 100% (102 / 102)      + + Ignored: none      +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
vinyl/100%(89 / 89)100%(76 / 76)100%(15 / 15)100%(82 / 82)
vinyl/lib/100%(22 / 22)100%(8 / 8)100%(5 / 5)100%(20 / 20)
+
+
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html new file mode 100644 index 0000000..ef3bcc4 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.html @@ -0,0 +1,350 @@ + + + + Code coverage report for vinyl/ + + + + + + + +
+

Code coverage report for vinyl/

+

+ + Statements: 100% (89 / 89)      + + + Branches: 100% (76 / 76)      + + + Functions: 100% (15 / 15)      + + + Lines: 100% (82 / 82)      + + Ignored: none      +

+
All files » vinyl/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js100%(89 / 89)100%(76 / 76)100%(15 / 15)100%(82 / 82)
+
+
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html new file mode 100644 index 0000000..36a4d76 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html @@ -0,0 +1,847 @@ + + + + Code coverage report for vinyl/index.js + + + + + + + +
+

Code coverage report for vinyl/index.js

+

+ + Statements: 100% (89 / 89)      + + + Branches: 100% (76 / 76)      + + + Functions: 100% (15 / 15)      + + + Lines: 100% (82 / 82)      + + Ignored: none      +

+
All files » vinyl/ » index.js
+
+
+

+
+
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 +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 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +1761 +1 +1 +1 +1 +1 +1 +1 +1 +  +1 +73 +  +  +73 +73 +  +  +73 +73 +  +  +  +73 +  +  +73 +  +  +1 +26 +  +  +1 +29 +  +  +1 +6 +  +  +  +1 +3 +  +  +1 +14 +2 +  +  +  +12 +7 +  +  +  +  +5 +5 +  +  +  +14 +14 +1 +1 +13 +6 +  +  +14 +  +  +  +  +  +  +  +  +14 +  +75 +  +  +70 +  +5 +  +14 +  +  +1 +6 +6 +  +6 +2 +  +4 +2 +1 +  +1 +  +2 +  +  +  +2 +2 +  +  +1 +6 +  +  +6 +  +6 +4 +  +  +6 +3 +  +  +6 +1 +  +  +6 +  +  +  +  +1 +  +99 +  +  +78 +1 +  +77 +  +  +  +  +1 +  +7 +6 +5 +  +  +1 +  +  +  +1 +  +46 +  +  +9 +  +  +8 +5 +  +  +  +  +1 + 
var path = require('path');
+var clone = require('lodash').clone;
+var cloneStats = require('clone-stats');
+var cloneBuffer = require('./lib/cloneBuffer');
+var isBuffer = require('./lib/isBuffer');
+var isStream = require('./lib/isStream');
+var isNull = require('./lib/isNull');
+var inspectStream = require('./lib/inspectStream');
+var Stream = require('stream');
+ 
+function File(file) {
+  if (!file) file = {};
+ 
+  // record path change
+  var history = file.path ? [file.path] : file.history;
+  this.history = history || [];
+ 
+  // TODO: should this be moved to vinyl-fs?
+  this.cwd = file.cwd || process.cwd();
+  this.base = file.base || this.cwd;
+ 
+  // 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(opt) {
+  if (typeof opt === 'boolean') {
+    opt = {
+      deep: opt,
+      contents: true
+    };
+  } else if (!opt) {
+    opt = {
+      deep: false,
+      contents: true
+    };
+  } else {
+    opt.deep = opt.deep === true;
+    opt.contents = opt.contents !== false;
+  }
+ 
+  // clone our file contents
+  var contents;
+  if (this.isStream()) {
+    contents = this.contents.pipe(new Stream.PassThrough());
+    this.contents = this.contents.pipe(new Stream.PassThrough());
+  } else if (this.isBuffer()) {
+    contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
+  }
+ 
+  var file = new File({
+    cwd: this.cwd,
+    base: this.base,
+    stat: (this.stat ? cloneStats(this.stat) : null),
+    history: this.history.slice(),
+    contents: contents
+  });
+ 
+  // clone our custom properties
+  Object.keys(this).forEach(function(key) {
+    // ignore built-in fields
+    if (key === '_contents' || key === 'stat' ||
+      key === 'history' || key === 'path' ||
+      key === 'base' || key === 'cwd') {
+      return;
+    }
+    file[key] = opt.deep ? clone(this[key], true) : this[key];
+  }, this);
+  return file;
+};
+ 
+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;
+  }
+ 
+  // isNull
+  if (opt.end) stream.end();
+  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.');
+  }
+});
+ 
+Object.defineProperty(File.prototype, 'path', {
+  get: function() {
+    return this.history[this.history.length - 1];
+  },
+  set: function(path) {
+    if (typeof path !== 'string') throw new Error('path should be string');
+ 
+    // record history only when path changed
+    if (path && path !== this.path) {
+      this.history.push(path);
+    }
+  }
+});
+ 
+module.exports = File;
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html new file mode 100644 index 0000000..39ec92b --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html @@ -0,0 +1,343 @@ + + + + Code coverage report for vinyl/lib/cloneBuffer.js + + + + + + + +
+

Code coverage report for vinyl/lib/cloneBuffer.js

+

+ + Statements: 100% (5 / 5)      + + + Branches: 100% (0 / 0)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (5 / 5)      + + Ignored: none      +

+
All files » vinyl/lib/ » cloneBuffer.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +81 +  +1 +7 +7 +7 +  + 
var Buffer = require('buffer').Buffer;
+ 
+module.exports = function(buf) {
+  var out = new Buffer(buf.length);
+  buf.copy(out);
+  return out;
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html new file mode 100644 index 0000000..5288f5a --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html @@ -0,0 +1,402 @@ + + + + Code coverage report for vinyl/lib/ + + + + + + + +
+

Code coverage report for vinyl/lib/

+

+ + Statements: 100% (22 / 22)      + + + Branches: 100% (8 / 8)      + + + Functions: 100% (5 / 5)      + + + Lines: 100% (20 / 20)      + + Ignored: none      +

+
All files » vinyl/lib/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
cloneBuffer.js100%(5 / 5)100%(0 / 0)100%(1 / 1)100%(5 / 5)
inspectStream.js100%(8 / 8)100%(4 / 4)100%(1 / 1)100%(6 / 6)
isBuffer.js100%(4 / 4)100%(2 / 2)100%(1 / 1)100%(4 / 4)
isNull.js100%(2 / 2)100%(0 / 0)100%(1 / 1)100%(2 / 2)
isStream.js100%(3 / 3)100%(2 / 2)100%(1 / 1)100%(3 / 3)
+
+
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html new file mode 100644 index 0000000..e8e5b36 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html @@ -0,0 +1,355 @@ + + + + Code coverage report for vinyl/lib/inspectStream.js + + + + + + + +
+

Code coverage report for vinyl/lib/inspectStream.js

+

+ + Statements: 100% (8 / 8)      + + + Branches: 100% (4 / 4)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (6 / 6)      + + Ignored: none      +

+
All files » vinyl/lib/ » inspectStream.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +121 +  +1 +9 +  +7 +  +7 +  +7 +  + 
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>';
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html new file mode 100644 index 0000000..a44efe4 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html @@ -0,0 +1,340 @@ + + + + Code coverage report for vinyl/lib/isBuffer.js + + + + + + + +
+

Code coverage report for vinyl/lib/isBuffer.js

+

+ + Statements: 100% (4 / 4)      + + + Branches: 100% (2 / 2)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (4 / 4)      + + Ignored: none      +

+
All files » vinyl/lib/ » isBuffer.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +71 +1 +  +  +1 +108 + 
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;
+};
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html new file mode 100644 index 0000000..010d3e0 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html @@ -0,0 +1,331 @@ + + + + Code coverage report for vinyl/lib/isNull.js + + + + + + + +
+

Code coverage report for vinyl/lib/isNull.js

+

+ + Statements: 100% (2 / 2)      + + + Branches: 100% (0 / 0)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (2 / 2)      + + Ignored: none      +

+
All files » vinyl/lib/ » isNull.js
+
+
+

+
+
1 +2 +3 +41 +57 +  + 
module.exports = function(v) {
+  return v === null;
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html new file mode 100644 index 0000000..511186f --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html @@ -0,0 +1,334 @@ + + + + Code coverage report for vinyl/lib/isStream.js + + + + + + + +
+

Code coverage report for vinyl/lib/isStream.js

+

+ + Statements: 100% (3 / 3)      + + + Branches: 100% (2 / 2)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (3 / 3)      + + Ignored: none      +

+
All files » vinyl/lib/ » isStream.js
+
+
+

+
+
1 +2 +3 +4 +51 +  +1 +99 + 
var Stream = require('stream').Stream;
+ 
+module.exports = function(o) {
+  return !!o && o instanceof Stream;
+};
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info new file mode 100644 index 0000000..bbebe38 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/coverage/lcov.info @@ -0,0 +1,280 @@ +TN: +SF:/Users/contra/Projects/vinyl/index.js +FN:11,File +FN:30,(anonymous_2) +FN:34,(anonymous_3) +FN:38,(anonymous_4) +FN:43,(anonymous_5) +FN:47,(anonymous_6) +FN:81,(anonymous_7) +FN:93,(anonymous_8) +FN:114,(anonymous_9) +FN:138,(anonymous_10) +FN:141,(anonymous_11) +FN:151,(anonymous_12) +FN:156,(anonymous_13) +FN:162,(anonymous_14) +FN:165,(anonymous_15) +FNF:15 +FNH:15 +FNDA:73,File +FNDA:26,(anonymous_2) +FNDA:29,(anonymous_3) +FNDA:6,(anonymous_4) +FNDA:3,(anonymous_5) +FNDA:14,(anonymous_6) +FNDA:75,(anonymous_7) +FNDA:6,(anonymous_8) +FNDA:6,(anonymous_9) +FNDA:99,(anonymous_10) +FNDA:78,(anonymous_11) +FNDA:7,(anonymous_12) +FNDA:1,(anonymous_13) +FNDA:46,(anonymous_14) +FNDA:9,(anonymous_15) +DA:1,1 +DA:2,1 +DA:3,1 +DA:4,1 +DA:5,1 +DA:6,1 +DA:7,1 +DA:8,1 +DA:9,1 +DA:11,1 +DA:12,73 +DA:15,73 +DA:16,73 +DA:19,73 +DA:20,73 +DA:24,73 +DA:27,73 +DA:30,1 +DA:31,26 +DA:34,1 +DA:35,29 +DA:38,1 +DA:39,6 +DA:43,1 +DA:44,3 +DA:47,1 +DA:48,14 +DA:49,2 +DA:53,12 +DA:54,7 +DA:59,5 +DA:60,5 +DA:64,14 +DA:65,14 +DA:66,1 +DA:67,1 +DA:68,13 +DA:69,6 +DA:72,14 +DA:81,14 +DA:83,75 +DA:86,70 +DA:88,5 +DA:90,14 +DA:93,1 +DA:94,6 +DA:95,6 +DA:97,6 +DA:98,2 +DA:100,4 +DA:101,2 +DA:102,1 +DA:104,1 +DA:106,2 +DA:110,2 +DA:111,2 +DA:114,1 +DA:115,6 +DA:118,6 +DA:120,6 +DA:121,4 +DA:124,6 +DA:125,3 +DA:128,6 +DA:129,1 +DA:132,6 +DA:137,1 +DA:139,99 +DA:142,78 +DA:143,1 +DA:145,77 +DA:150,1 +DA:152,7 +DA:153,6 +DA:154,5 +DA:157,1 +DA:161,1 +DA:163,46 +DA:166,9 +DA:169,8 +DA:170,5 +DA:175,1 +LF:82 +LH:82 +BRDA:12,1,0,14 +BRDA:12,1,1,59 +BRDA:15,2,0,25 +BRDA:15,2,1,48 +BRDA:16,3,0,73 +BRDA:16,3,1,33 +BRDA:19,4,0,73 +BRDA:19,4,1,32 +BRDA:20,5,0,73 +BRDA:20,5,1,39 +BRDA:24,6,0,73 +BRDA:24,6,1,65 +BRDA:27,7,0,73 +BRDA:27,7,1,44 +BRDA:44,8,0,3 +BRDA:44,8,1,1 +BRDA:44,8,2,1 +BRDA:48,9,0,2 +BRDA:48,9,1,12 +BRDA:53,10,0,7 +BRDA:53,10,1,5 +BRDA:65,11,0,1 +BRDA:65,11,1,13 +BRDA:68,12,0,6 +BRDA:68,12,1,7 +BRDA:69,13,0,5 +BRDA:69,13,1,1 +BRDA:75,14,0,2 +BRDA:75,14,1,12 +BRDA:83,15,0,70 +BRDA:83,15,1,5 +BRDA:83,16,0,75 +BRDA:83,16,1,61 +BRDA:83,16,2,47 +BRDA:83,16,3,33 +BRDA:83,16,4,33 +BRDA:83,16,5,19 +BRDA:88,17,0,2 +BRDA:88,17,1,3 +BRDA:94,18,0,3 +BRDA:94,18,1,3 +BRDA:95,19,0,3 +BRDA:95,19,1,3 +BRDA:97,20,0,2 +BRDA:97,20,1,4 +BRDA:100,21,0,2 +BRDA:100,21,1,2 +BRDA:101,22,0,1 +BRDA:101,22,1,1 +BRDA:110,23,0,1 +BRDA:110,23,1,1 +BRDA:118,24,0,3 +BRDA:118,24,1,3 +BRDA:118,25,0,6 +BRDA:118,25,1,5 +BRDA:120,26,0,4 +BRDA:120,26,1,2 +BRDA:124,27,0,3 +BRDA:124,27,1,3 +BRDA:128,28,0,1 +BRDA:128,28,1,5 +BRDA:142,29,0,1 +BRDA:142,29,1,77 +BRDA:142,30,0,78 +BRDA:142,30,1,57 +BRDA:142,30,2,46 +BRDA:152,31,0,1 +BRDA:152,31,1,6 +BRDA:153,32,0,1 +BRDA:153,32,1,5 +BRDA:166,33,0,1 +BRDA:166,33,1,8 +BRDA:169,34,0,5 +BRDA:169,34,1,3 +BRDA:169,35,0,8 +BRDA:169,35,1,7 +BRF:76 +BRH:76 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/cloneBuffer.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:7,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,7 +DA:5,7 +DA:6,7 +LF:5 +LH:5 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isBuffer.js +FN:5,(anonymous_1) +FNF:1 +FNH:1 +FNDA:108,(anonymous_1) +DA:1,1 +DA:2,1 +DA:5,1 +DA:6,108 +LF:4 +LH:4 +BRDA:6,1,0,108 +BRDA:6,1,1,107 +BRF:2 +BRH:2 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isStream.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:99,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,99 +LF:3 +LH:3 +BRDA:4,1,0,99 +BRDA:4,1,1,40 +BRF:2 +BRH:2 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isNull.js +FN:1,(anonymous_1) +FNF:1 +FNH:1 +FNDA:57,(anonymous_1) +DA:1,1 +DA:2,57 +LF:2 +LH:2 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/inspectStream.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:9,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,9 +DA:6,7 +DA:8,7 +DA:10,7 +LF:6 +LH:6 +BRDA:4,1,0,2 +BRDA:4,1,1,7 +BRDA:8,2,0,1 +BRDA:8,2,1,6 +BRF:4 +BRH:4 +end_of_record diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/index.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/index.js index 97f5c75..09913c3 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/index.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/index.js @@ -1,22 +1,24 @@ var path = require('path'); - +var clone = require('lodash').clone; var cloneStats = require('clone-stats'); - +var cloneBuffer = require('./lib/cloneBuffer'); 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'); +var Stream = require('stream'); function File(file) { if (!file) file = {}; + // record path change + var history = file.path ? [file.path] : file.history; + this.history = history || []; + // 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; @@ -42,17 +44,50 @@ 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; +File.prototype.clone = function(opt) { + if (typeof opt === 'boolean') { + opt = { + deep: opt, + contents: true + }; + } else if (!opt) { + opt = { + deep: false, + contents: true + }; + } else { + opt.deep = opt.deep === true; + opt.contents = opt.contents !== false; + } - return new File({ + // clone our file contents + var contents; + if (this.isStream()) { + contents = this.contents.pipe(new Stream.PassThrough()); + this.contents = this.contents.pipe(new Stream.PassThrough()); + } else if (this.isBuffer()) { + contents = opt.contents ? cloneBuffer(this.contents) : this.contents; + } + + var file = new File({ cwd: this.cwd, base: this.base, - path: this.path, - stat: clonedStat, - contents: clonedContents + stat: (this.stat ? cloneStats(this.stat) : null), + history: this.history.slice(), + contents: contents }); + + // clone our custom properties + Object.keys(this).forEach(function(key) { + // ignore built-in fields + if (key === '_contents' || key === 'stat' || + key === 'history' || key === 'path' || + key === 'base' || key === 'cwd') { + return; + } + file[key] = opt.deep ? clone(this[key], true) : this[key]; + }, this); + return file; }; File.prototype.pipe = function(stream, opt) { @@ -70,11 +105,9 @@ File.prototype.pipe = function(stream, opt) { } return stream; } - if (this.isNull()) { - if (opt.end) stream.end(); - return stream; - } + // isNull + if (opt.end) stream.end(); return stream; }; @@ -107,7 +140,7 @@ Object.defineProperty(File.prototype, '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."); + throw new Error('File.contents can only be a Buffer, a Stream, or null.'); } this._contents = val; } @@ -125,4 +158,18 @@ Object.defineProperty(File.prototype, 'relative', { } }); +Object.defineProperty(File.prototype, 'path', { + get: function() { + return this.history[this.history.length - 1]; + }, + set: function(path) { + if (typeof path !== 'string') throw new Error('path should be string'); + + // record history only when path changed + if (path && path !== this.path) { + this.history.push(path); + } + } +}); + module.exports = File; diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js index 3a861f2..89f09ed 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js @@ -4,4 +4,4 @@ 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/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js index 2c90678..d36df6f 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js @@ -1,12 +1,11 @@ -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/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js index 403bb30..7f22c63 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js @@ -1,3 +1,3 @@ module.exports = function(v) { return v === null; -}; \ No newline at end of file +}; diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json index 4967bde..e691165 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json @@ -39,7 +39,7 @@ "shasum": "b88f94a82cf38b8791d58046ea4029ad88ca99d1", "tarball": "http://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" }, - "_from": "clone-stats@~0.0.1", + "_from": "clone-stats@^0.0.1", "_npmVersion": "1.3.22", "_npmUser": { "name": "hughsk", diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/package.json index 631b245..77250ce 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/package.json +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/package.json @@ -1,7 +1,7 @@ { "name": "vinyl", "description": "A virtual file format", - "version": "0.2.3", + "version": "0.4.3", "homepage": "http://github.com/wearefractal/vinyl", "repository": { "type": "git", @@ -14,22 +14,23 @@ }, "main": "./index.js", "dependencies": { - "clone-stats": "~0.0.1" + "clone-stats": "^0.0.1", + "lodash": "^2.4.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" + "mocha": "^1.17.0", + "should": "^4.0.4", + "mocha-lcov-reporter": "^0.0.1", + "coveralls": "^2.6.1", + "istanbul": "^0.3.0", + "rimraf": "^2.2.5", + "jshint": "^2.4.1", + "buffer-equal": "0.0.1", + "lodash.templatesettings": "^2.4.1", + "event-stream": "^3.1.0" }, "scripts": { - "test": "mocha --reporter spec && jshint", + "test": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter spec && jshint .", "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" }, "engines": { @@ -41,16 +42,14 @@ "url": "http://github.com/wearefractal/vinyl/raw/master/LICENSE" } ], + "gitHead": "6eae432519b007c313a8df83b093adfb97a2944c", "bugs": { "url": "https://github.com/wearefractal/vinyl/issues" }, - "_id": "vinyl@0.2.3", - "dist": { - "shasum": "bca938209582ec5a49ad538a00fa1f125e513252", - "tarball": "http://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz" - }, - "_from": "vinyl@^0.2.1", - "_npmVersion": "1.3.23", + "_id": "vinyl@0.4.3", + "_shasum": "19f61a1b28e72b4c50697889dbe91d7503943ecf", + "_from": "vinyl@0.4.3", + "_npmVersion": "1.4.21", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -61,8 +60,10 @@ "email": "contact@wearefractal.com" } ], + "dist": { + "shasum": "19f61a1b28e72b4c50697889dbe91d7503943ecf", + "tarball": "http://registry.npmjs.org/vinyl/-/vinyl-0.4.3.tgz" + }, "directories": {}, - "_shasum": "bca938209582ec5a49ad538a00fa1f125e513252", - "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.3.tgz" } diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/perf/clone.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/perf/clone.js new file mode 100644 index 0000000..4df8578 --- /dev/null +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/perf/clone.js @@ -0,0 +1,59 @@ +var File = require('../'); + +var contents = new Buffer('blah blah blah'); + +var originalFile = new File({ + path: 'yo.coffee', + contents: contents +}); + +// simulate some history +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; + +originalFile.ast = { + a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { + + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +}; + +for (var i = 0; i < 10000; i++) { + originalFile.clone(true).ast; +} \ No newline at end of file diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/File.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/File.js index 1f2a83a..419e7aa 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/File.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/File.js @@ -1,12 +1,13 @@ -var File = require('../'); var Stream = require('stream'); var fs = require('fs'); +var path = require('path'); +var es = require('event-stream'); +var File = require('../'); 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(); @@ -15,7 +16,7 @@ describe('File', function() { }); it('should default base to cwd', function(done) { - var cwd = "/"; + var cwd = '/'; var file = new File({cwd: cwd}); file.base.should.equal(cwd); done(); @@ -33,6 +34,12 @@ describe('File', function() { done(); }); + it('should default history to []', function(done) { + var file = new File(); + file.history.should.eql([]); + done(); + }); + it('should default stat to null', function(done) { var file = new File(); should.not.exist(file.stat); @@ -46,23 +53,32 @@ describe('File', function() { }); it('should set base to given value', function(done) { - var val = "/"; + 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 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 val = '/test.coffee'; var file = new File({path: val}); file.path.should.equal(val); + file.history.should.eql([val]); + done(); + }); + + it('should set history to given value', function(done) { + var val = '/test.coffee'; + var file = new File({history: [val]}); + file.path.should.equal(val); + file.history.should.eql([val]); done(); }); @@ -74,16 +90,16 @@ describe('File', function() { }); it('should set contents to given value', function(done) { - var val = new Buffer("test"); + 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 val = new Buffer('test'); var file = new File({contents: val}); file.isBuffer().should.equal(true); done(); @@ -105,7 +121,7 @@ describe('File', function() { describe('isStream()', function() { it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({contents: val}); file.isStream().should.equal(false); done(); @@ -127,7 +143,7 @@ describe('File', function() { describe('isNull()', function() { it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({contents: val}); file.isNull().should.equal(false); done(); @@ -155,7 +171,7 @@ describe('File', function() { }; it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({contents: val, stat: fakeStat}); file.isDirectory().should.equal(false); done(); @@ -178,10 +194,10 @@ describe('File', function() { 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") + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: new Buffer('test') }; var file = new File(options); var file2 = file.clone(); @@ -195,29 +211,65 @@ describe('File', function() { done(); }); + it('should copy buffer\'s reference with option contents: false', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.js', + contents: new Buffer('test') + }; + + var file = new File(options); + + var copy1 = file.clone({ contents: false }); + copy1.contents.should.equal(file.contents); + + var copy2 = file.clone({}); + copy2.contents.should.not.equal(file.contents); + + var copy3 = file.clone({ contents: 'any string' }); + copy3.contents.should.not.equal(file.contents); + + done(); + }); + it('should copy all attributes over with Stream', function(done) { + var contents = new Stream.PassThrough(); var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream() + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: contents }; var file = new File(options); var file2 = file.clone(); + contents.write(new Buffer('wa')); + + process.nextTick(function() { + contents.write(new Buffer('dup')); + contents.end(); + }); + 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'); + file2.contents.should.not.equal(file.contents, 'stream ref should not be the same'); + file.contents.pipe(es.wait(function(err, data) { + file2.contents.pipe(es.wait(function(err, data2) { + data2.should.not.equal(data, 'stream contents ref should not be the same'); + data2.should.eql(data, 'stream contents should be the same'); + })); + })); done(); }); it('should copy all attributes over with null', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: null }; var file = new File(options); @@ -233,20 +285,123 @@ describe('File', function() { it('should properly clone the `stat` property', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.js", - contents: new Buffer("test"), + 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; + copy.stat.isFile().should.equal(true); + copy.stat.isDirectory().should.equal(false); + should(file.stat instanceof fs.Stats).equal(true); + should(copy.stat instanceof fs.Stats).equal(true); + + done(); + }); + + it('should properly clone the `history` 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.history[0].should.equal(options.path); + copy.path = 'lol'; + file.path.should.not.equal(copy.path); + done(); + }); + + it('should copy custom properties', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.custom = { a: 'custom property' }; + + 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.custom.should.equal(file.custom); + file2.custom.a.should.equal(file.custom.a); + + done(); + }); + + it('should copy history', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.path = '/test/test.js'; + file.path = '/test/test-938di2s.js'; + var file2 = file.clone(); + + file2.history.should.eql([ + '/test/test.coffee', + '/test/test.js', + '/test/test-938di2s.js' + ]); + file2.history.should.not.equal([ + '/test/test.coffee', + '/test/test.js', + '/test/test-938di2s.js' + ]); + file2.path.should.eql('/test/test-938di2s.js'); + + done(); + }); + + it('should copy all attributes deeply', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.custom = { a: 'custom property' }; + + var file2 = file.clone(true); + file2.custom.should.eql(file.custom); + file2.custom.should.not.equal(file.custom); + file2.custom.a.should.equal(file.custom.a); + + var file3 = file.clone({ deep: true }); + file3.custom.should.eql(file.custom); + file3.custom.should.not.equal(file.custom); + file3.custom.a.should.equal(file.custom.a); + + var file4 = file.clone(false); + file4.custom.should.eql(file.custom); + file4.custom.should.equal(file.custom); + file4.custom.a.should.equal(file.custom.a); + + var file5 = file.clone({ deep: false }); + file5.custom.should.eql(file.custom); + file5.custom.should.equal(file.custom); + file5.custom.a.should.equal(file.custom.a); done(); }); @@ -255,10 +410,10 @@ describe('File', function() { 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") + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: new Buffer('test') }; var file = new File(options); var stream = new Stream.PassThrough(); @@ -267,7 +422,7 @@ describe('File', function() { (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) { + stream.on('end', function() { done(); }); var ret = file.pipe(stream); @@ -275,11 +430,11 @@ describe('File', function() { }); it('should pipe to stream with Stream', function(done) { - var testChunk = new Buffer("test"); + var testChunk = new Buffer('test'); var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: new Stream.PassThrough() }; var file = new File(options); @@ -298,15 +453,15 @@ describe('File', function() { it('should do nothing with null', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + 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('data', function() { + throw new Error('should not write'); }); stream.on('end', function() { done(); @@ -317,10 +472,10 @@ describe('File', function() { it('should write to stream with Buffer', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: new Buffer('test') }; var file = new File(options); var stream = new Stream.PassThrough(); @@ -330,19 +485,19 @@ describe('File', function() { chunk.toString('utf8').should.equal(options.contents.toString('utf8')); done(); }); - stream.on('end', function(chunk) { - throw new Error("should not end"); + stream.on('end', function() { + 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 testChunk = new Buffer('test'); var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: new Stream.PassThrough() }; var file = new File(options); @@ -353,8 +508,8 @@ describe('File', function() { chunk.toString('utf8').should.equal(testChunk.toString('utf8')); done(); }); - stream.on('end', function(chunk) { - throw new Error("should not end"); + stream.on('end', function() { + throw new Error('should not end'); }); var ret = file.pipe(stream, {end: false}); ret.should.equal(stream, 'should return the stream'); @@ -364,25 +519,25 @@ describe('File', function() { it('should do nothing with null', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + 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('data', function() { + throw new Error('should not write'); }); - stream.on('end', function(chunk) { - throw new Error("should not end"); + stream.on('end', function() { + 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(); @@ -391,7 +546,7 @@ describe('File', function() { }); it('should return correct format when Buffer and no path', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({ contents: val }); @@ -400,11 +555,11 @@ describe('File', function() { }); it('should return correct format when Buffer and relative path', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: val }); file.inspect().should.equal('>'); @@ -412,10 +567,10 @@ describe('File', function() { }); it('should return correct format when Buffer and only path and no base', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({ - cwd: "/", - path: "/test/test.coffee", + cwd: '/', + path: '/test/test.coffee', contents: val }); delete file.base; @@ -425,9 +580,9 @@ describe('File', function() { it('should return correct format when Stream and relative path', function(done) { var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: new Stream.PassThrough() }); file.inspect().should.equal('>'); @@ -436,19 +591,19 @@ describe('File', function() { it('should return correct format when null and relative path', function(done) { var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: null }); file.inspect().should.equal(''); done(); }); }); - + describe('contents get/set', function() { it('should work with Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File(); file.contents = val; file.contents.should.equal(val); @@ -472,7 +627,7 @@ describe('File', function() { }); it('should not work with string', function(done) { - var val = "test"; + var val = 'test'; var file = new File(); try { file.contents = val; @@ -487,7 +642,7 @@ describe('File', function() { it('should error on set', function(done) { var file = new File(); try { - file.relative = "test"; + file.relative = 'test'; } catch (err) { should.exist(err); done(); @@ -519,22 +674,80 @@ describe('File', function() { it('should return a relative path from base', function(done) { var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee" + cwd: '/', + base: '/test/', + path: '/test/test.coffee' }); - file.relative.should.equal("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" + cwd: '/', + path: '/test/test.coffee' }); - file.relative.should.equal("test/test.coffee"); + file.relative.should.equal(path.join('test','test.coffee')); done(); }); }); + describe('path get/set', function() { + + it('should record history when instantiation', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should record history when path change', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.js'; + file.path.should.eql('/test/test.js'); + file.history.should.eql(['/test/test.coffee', '/test/test.js']); + + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee', '/test/test.js', '/test/test.coffee']); + }); + + it('should not record history when set the same path', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.coffee'; + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + + // ignore when set empty string + file.path = ''; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should throw when set path null', function() { + var file = new File({ + cwd: '/', + path: null + }); + + should.not.exist(file.path); + file.history.should.eql([]); + + (function() { + file.path = null; + }).should.throw('path should be string'); + }); + }); }); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js index 7d28681..34b3e7c 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js @@ -1,5 +1,4 @@ var cloneBuffer = require('../lib/cloneBuffer'); -var Stream = require('stream'); var should = require('should'); require('mocha'); @@ -25,4 +24,4 @@ describe('cloneBuffer()', function() { testBuffer2.toString('utf8').should.equal('west', 'new buffer should be modified'); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js index 5bb1cb9..432ad2a 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js @@ -1,6 +1,6 @@ var isBuffer = require('../lib/isBuffer'); var Stream = require('stream'); -var should = require('should'); +require('should'); require('mocha'); describe('isBuffer()', function() { @@ -26,4 +26,4 @@ describe('isBuffer()', function() { isBuffer(testArray).should.equal(false); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isNull.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isNull.js index db70c01..356934a 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isNull.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isNull.js @@ -1,6 +1,5 @@ var isNull = require('../lib/isNull'); -var Stream = require('stream'); -var should = require('should'); +require('should'); require('mocha'); describe('isNull()', function() { @@ -17,7 +16,7 @@ describe('isNull()', function() { it('should return false on defined values', function(done) { isNull(1).should.equal(false); - isNull("test").should.equal(false); + isNull('test').should.equal(false); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isStream.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isStream.js index f22584c..5cc0e0b 100644 --- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isStream.js +++ b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/test/isStream.js @@ -1,6 +1,6 @@ var isStream = require('../lib/isStream'); var Stream = require('stream'); -var should = require('should'); +require('should'); require('mocha'); describe('isStream()', function() { @@ -26,4 +26,4 @@ describe('isStream()', function() { isStream(testArray).should.equal(false); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp/node_modules/gulp-util/package.json b/node_modules/gulp/node_modules/gulp-util/package.json index d3a9a99..f9efe4a 100644 --- a/node_modules/gulp/node_modules/gulp-util/package.json +++ b/node_modules/gulp/node_modules/gulp-util/package.json @@ -1,7 +1,7 @@ { "name": "gulp-util", "description": "Utility functions for gulp plugins", - "version": "2.2.20", + "version": "3.0.1", "homepage": "http://github.com/wearefractal/gulp-util", "repository": { "type": "git", @@ -16,19 +16,20 @@ "dependencies": { "chalk": "^0.5.0", "dateformat": "^1.0.7-1.2.3", + "lodash": "^2.4.1", "lodash._reinterpolate": "^2.4.1", "lodash.template": "^2.4.1", - "minimist": "^0.2.0", + "minimist": "^1.1.0", "multipipe": "^0.1.0", - "through2": "^0.5.0", - "vinyl": "^0.2.1" + "through2": "^0.6.1", + "vinyl": "^0.4.0" }, "devDependencies": { "mocha": "^1.17.0", "should": "^4.0.0", "mocha-lcov-reporter": "^0.0.1", "coveralls": "^2.7.0", - "istanbul": "^0.2.3", + "istanbul": "^0.3.0", "rimraf": "^2.2.5", "jshint": "^2.4.1", "buffer-equal": "~0.0.1", @@ -48,14 +49,14 @@ "url": "http://github.com/wearefractal/gulp-util/raw/master/LICENSE" } ], - "gitHead": "a44e450cfbe65fa4902b198bead4c65722cced0a", + "gitHead": "f6336c8ac9f52930b36ad14002cf267c06f801df", "bugs": { "url": "https://github.com/wearefractal/gulp-util/issues" }, - "_id": "gulp-util@2.2.20", - "_shasum": "d7146e5728910bd8f047a6b0b1e549bc22dbd64c", - "_from": "gulp-util@^2.2.0", - "_npmVersion": "1.5.0-alpha-1", + "_id": "gulp-util@3.0.1", + "_shasum": "8214894d05c2bb6cc7f5544918a51ddf88180f00", + "_from": "gulp-util@>=3.0.0-0 <3.1.0-0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -67,10 +68,9 @@ } ], "dist": { - "shasum": "d7146e5728910bd8f047a6b0b1e549bc22dbd64c", - "tarball": "http://registry.npmjs.org/gulp-util/-/gulp-util-2.2.20.tgz" + "shasum": "8214894d05c2bb6cc7f5544918a51ddf88180f00", + "tarball": "http://registry.npmjs.org/gulp-util/-/gulp-util-3.0.1.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-2.2.20.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.1.tgz" } diff --git a/node_modules/gulp/node_modules/interpret/CHANGELOG b/node_modules/gulp/node_modules/interpret/CHANGELOG index 787588e..0c52a16 100644 --- a/node_modules/gulp/node_modules/interpret/CHANGELOG +++ b/node_modules/gulp/node_modules/interpret/CHANGELOG @@ -1,3 +1,7 @@ +v0.3.6: + date: 2014-08-25 + changes: + - Add support for coffee.md. v0.3.5: date: 2014-07-03 changes: diff --git a/node_modules/gulp/node_modules/interpret/README.md b/node_modules/gulp/node_modules/interpret/README.md index d2c03d5..6640f38 100644 --- a/node_modules/gulp/node_modules/interpret/README.md +++ b/node_modules/gulp/node_modules/interpret/README.md @@ -14,11 +14,13 @@ Map file types to modules which provide a [require.extensions] loader. { '.co': 'coco', '.coffee': 'coffee-script/register', + '.coffee.md': 'coffee-script/register', '.csv': 'require-csv', '.iced': 'iced-coffee-script/register', '.ini': 'require-ini', '.js': null, '.json': null, + '.jsx': 'node-jsx', '.litcoffee': 'coffee-script/register', '.ls': 'livescript', '.toml': 'toml-require', @@ -43,10 +45,12 @@ Extensions which are javascript variants. ```js { + '.js': null, '.co': 'coco', '.coffee': 'coffee-script/register', + '.coffee.md': 'coffee-script/register', '.iced': 'iced-coffee-script/register', - '.js': null, + '.jsx': 'node-jsx', '.litcoffee': 'coffee-script/register', '.ls': 'livescript' } diff --git a/node_modules/gulp/node_modules/interpret/index.js b/node_modules/gulp/node_modules/interpret/index.js index 5073b15..201db4f 100644 --- a/node_modules/gulp/node_modules/interpret/index.js +++ b/node_modules/gulp/node_modules/interpret/index.js @@ -1,6 +1,7 @@ var extensions = { '.co': 'coco', '.coffee': 'coffee-script/register', + '.coffee.md': 'coffee-script/register', '.csv': 'require-csv', '.iced': 'iced-coffee-script/register', '.ini': 'require-ini', @@ -28,6 +29,7 @@ var jsVariantExtensions = [ '.js', '.co', '.coffee', + '.coffee.md', '.iced', '.jsx', '.litcoffee', diff --git a/node_modules/gulp/node_modules/interpret/package.json b/node_modules/gulp/node_modules/interpret/package.json index 778c10d..90cb8c3 100644 --- a/node_modules/gulp/node_modules/interpret/package.json +++ b/node_modules/gulp/node_modules/interpret/package.json @@ -1,7 +1,7 @@ { "name": "interpret", "description": "A dictionary of file extensions and associated module loaders.", - "version": "0.3.5", + "version": "0.3.6", "homepage": "https://github.com/tkellen/node-interpret", "author": { "name": "Tyler Kellen", @@ -35,13 +35,12 @@ "yaml", "yml" ], - "_id": "interpret@0.3.5", - "dist": { - "shasum": "0dc629e6f9d4dc05e429e18a4741880770f56c5d", - "tarball": "http://registry.npmjs.org/interpret/-/interpret-0.3.5.tgz" - }, - "_from": "interpret@^0.3.2", - "_npmVersion": "1.4.3", + "gitHead": "e4d41a6a068961971687a77b85ab258ecea85fcc", + "_id": "interpret@0.3.6", + "scripts": {}, + "_shasum": "51b6927f372a92f1e4a2a5af0d14699de9618799", + "_from": "interpret@>=0.3.2-0 <0.4.0-0", + "_npmVersion": "1.4.14", "_npmUser": { "name": "tkellen", "email": "tyler@sleekcode.net" @@ -52,8 +51,10 @@ "email": "tyler@sleekcode.net" } ], + "dist": { + "shasum": "51b6927f372a92f1e4a2a5af0d14699de9618799", + "tarball": "http://registry.npmjs.org/interpret/-/interpret-0.3.6.tgz" + }, "directories": {}, - "_shasum": "0dc629e6f9d4dc05e429e18a4741880770f56c5d", - "_resolved": "https://registry.npmjs.org/interpret/-/interpret-0.3.5.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/interpret/-/interpret-0.3.6.tgz" } diff --git a/node_modules/gulp/node_modules/liftoff/CHANGELOG b/node_modules/gulp/node_modules/liftoff/CHANGELOG index 71b1676..c395f1e 100644 --- a/node_modules/gulp/node_modules/liftoff/CHANGELOG +++ b/node_modules/gulp/node_modules/liftoff/CHANGELOG @@ -1,3 +1,7 @@ +v0.12.1: + date: 2014-06-27 + changes: + - Support preloading modules for compound extensions like `.coffee.md`. v0.12.0: date: 2014-06-27 changes: diff --git a/node_modules/gulp/node_modules/liftoff/index.js b/node_modules/gulp/node_modules/liftoff/index.js index 5b5f003..bda294e 100644 --- a/node_modules/gulp/node_modules/liftoff/index.js +++ b/node_modules/gulp/node_modules/liftoff/index.js @@ -98,8 +98,11 @@ Liftoff.prototype.buildEnvironment = function (opts) { } } + // get extension of config name, taking anything after the -first- dot + var configExtension = /(\.[^\/]*)?$/.exec(configPath)[0]; + // preload module needed for config if any has been specified. - var requireForExtension = this.extensions[path.extname(configPath)]; + var requireForExtension = this.extensions[configExtension]; if (requireForExtension) { preload.push(requireForExtension); } diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/extend/.travis.yml b/node_modules/gulp/node_modules/liftoff/node_modules/extend/.travis.yml index c99d400..912080a 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/extend/.travis.yml +++ b/node_modules/gulp/node_modules/liftoff/node_modules/extend/.travis.yml @@ -1,5 +1,18 @@ language: node_js node_js: + - "0.11" - "0.10" - - 0.8 - - 0.6 + - "0.9" + - "0.8" + - "0.6" + - "0.4" +before_install: + - '[ "${TRAVIS_NODE_VERSION}" == "0.6" ] || npm install -g npm@~1.4.6' +matrix: + fast_finish: true + allow_failures: + - node_js: "0.11" + - node_js: "0.9" + - node_js: "0.6" + - node_js: "0.4" + diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/LICENSE.txt b/node_modules/gulp/node_modules/liftoff/node_modules/extend/LICENSE similarity index 77% rename from node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/LICENSE.txt rename to node_modules/gulp/node_modules/liftoff/node_modules/extend/LICENSE index 49869bb..e16d6a5 100644 --- a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/LICENSE.txt +++ b/node_modules/gulp/node_modules/liftoff/node_modules/extend/LICENSE @@ -1,6 +1,6 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +The MIT License (MIT) + +Copyright (c) 2014 Stefan Thomas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -19,4 +19,5 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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 +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/extend/README.md b/node_modules/gulp/node_modules/liftoff/node_modules/extend/README.md index ddaee06..715f666 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/extend/README.md +++ b/node_modules/gulp/node_modules/liftoff/node_modules/extend/README.md @@ -14,7 +14,7 @@ npm install extend ## Usage -**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)** +**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)** *Extend one object with one or more others, returning the modified object.* @@ -22,16 +22,17 @@ Keep in mind that the target object will be modified, and will be returned from If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s). Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over. +Warning: passing `false` as the first argument is not supported. ### Arguments -* `deep` *Boolean* (optional) +* `deep` *Boolean* (optional) If set, the merge becomes recursive (i.e. deep copy). -* `target` *Object* +* `target` *Object* The object to extend. -* `object1` *Object* +* `object1` *Object* The object that will be merged into the first. -* `objectN` *Object* (Optional) +* `objectN` *Object* (Optional) More objects to merge into the first. ## License @@ -44,7 +45,7 @@ All credit to the jQuery authors for perfecting this amazing utility. Ported to Node.js by [Stefan Thomas][5] with contributions by [Jonathan Buchanan][6] and [Jordan Harband][7]. -[1]: https://travis-ci.org/justmoon/node-extend.png +[1]: https://travis-ci.org/justmoon/node-extend.svg [2]: https://travis-ci.org/justmoon/node-extend [3]: https://npmjs.org/package/extend [4]: http://opensource.org/licenses/MIT @@ -52,8 +53,8 @@ Ported to Node.js by [Stefan Thomas][5] with contributions by [Jonathan Buchanan [6]: https://github.com/insin [7]: https://github.com/ljharb [8]: http://vb.teelaun.ch/justmoon/node-extend.svg -[9]: https://david-dm.org/justmoon/node-extend.png +[9]: https://david-dm.org/justmoon/node-extend.svg [10]: https://david-dm.org/justmoon/node-extend -[11]: https://david-dm.org/justmoon/node-extend/dev-status.png +[11]: https://david-dm.org/justmoon/node-extend/dev-status.svg [12]: https://david-dm.org/justmoon/node-extend#info=devDependencies diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/extend/component.json b/node_modules/gulp/node_modules/liftoff/node_modules/extend/component.json new file mode 100644 index 0000000..378c7f5 --- /dev/null +++ b/node_modules/gulp/node_modules/liftoff/node_modules/extend/component.json @@ -0,0 +1,31 @@ +{ + "name": "extend", + "author": "Stefan Thomas (http://www.justmoon.net)", + "version": "1.3.0", + "description": "Port of jQuery.extend for node.js and the browser.", + "scripts": [ + "index.js" + ], + "contributors": [ + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "keywords": [ + "extend", + "clone", + "merge" + ], + "repository" : { + "type": "git", + "url": "https://github.com/justmoon/node-extend.git" + }, + "dependencies": { + }, + "devDependencies": { + "tape" : "~2.12.3", + "covert": "~0.4.0" + } +} + diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/extend/index.js b/node_modules/gulp/node_modules/liftoff/node_modules/extend/index.js index be7300b..06f3c12 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/extend/index.js +++ b/node_modules/gulp/node_modules/liftoff/node_modules/extend/index.js @@ -1,73 +1,74 @@ var hasOwn = Object.prototype.hasOwnProperty; var toString = Object.prototype.toString; +var undefined; -function isPlainObject(obj) { - if (!obj || toString.call(obj) !== '[object Object]' || obj.nodeType || obj.setInterval) +var isPlainObject = function isPlainObject(obj) { + "use strict"; + if (!obj || toString.call(obj) !== '[object Object]' || obj.nodeType || obj.setInterval) { return false; + } var has_own_constructor = hasOwn.call(obj, 'constructor'); - var has_is_property_of_method = hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); + var has_is_property_of_method = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); // Not own constructor property must be Object - if (obj.constructor && !has_own_constructor && !has_is_property_of_method) + if (obj.constructor && !has_own_constructor && !has_is_property_of_method) { return false; + } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. var key; - for ( key in obj ) {} + for (key in obj) {} - return key === undefined || hasOwn.call( obj, key ); + return key === undefined || hasOwn.call(obj, key); }; module.exports = function extend() { + "use strict"; var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; + target = arguments[0], + i = 1, + length = arguments.length, + deep = false; // Handle a deep copy situation - if ( typeof target === "boolean" ) { + if (typeof target === "boolean") { deep = target; target = arguments[1] || {}; // skip the boolean and the target i = 2; + } else if (typeof target !== "object" && typeof target !== "function" || target == undefined) { + target = {}; } - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && typeof target !== "function") { - target = {}; - } - - for ( ; i < length; i++ ) { + for (; i < length; ++i) { // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { + if ((options = arguments[i]) != null) { // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; + for (name in options) { + src = target[name]; + copy = options[name]; // Prevent never-ending loop - if ( target === copy ) { + if (target === copy) { continue; } // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( isPlainObject(copy) || (copyIsArray = Array.isArray(copy)) ) ) { - if ( copyIsArray ) { + if (deep && copy && (isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) { + if (copyIsArray) { copyIsArray = false; clone = src && Array.isArray(src) ? src : []; - } else { clone = src && isPlainObject(src) ? src : {}; } // Never move original objects, clone them - target[ name ] = extend( deep, clone, copy ); + target[name] = extend(deep, clone, copy); // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; + } else if (copy !== undefined) { + target[name] = copy; } } } @@ -76,3 +77,4 @@ module.exports = function extend() { // Return the modified object return target; }; + diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/extend/package.json b/node_modules/gulp/node_modules/liftoff/node_modules/extend/package.json index 9be962e..3f686b0 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/extend/package.json +++ b/node_modules/gulp/node_modules/liftoff/node_modules/extend/package.json @@ -5,11 +5,13 @@ "email": "justmoon@members.fsf.org", "url": "http://www.justmoon.net" }, - "version": "1.2.1", - "description": "Port of jQuery.extend for Node.js", + "version": "1.3.0", + "description": "Port of jQuery.extend for node.js and the browser", "main": "index", "scripts": { - "test": "node test/index.js" + "test": "node test/index.js", + "coverage": "covert test/index.js", + "coverage-quiet": "covert test/index.js --quiet" }, "contributors": [ { @@ -28,18 +30,18 @@ }, "dependencies": {}, "devDependencies": { - "tape": "~1.1.0" + "tape": "~2.13.2", + "covert": "~0.4.0" }, + "gitHead": "30bf952975a8551c8aabc3aed5e812455847e37a", "bugs": { "url": "https://github.com/justmoon/node-extend/issues" }, - "_id": "extend@1.2.1", - "dist": { - "shasum": "a0f5fd6cfc83a5fe49ef698d60ec8a624dd4576c", - "tarball": "http://registry.npmjs.org/extend/-/extend-1.2.1.tgz" - }, - "_from": "extend@~1.2.1", - "_npmVersion": "1.3.8", + "homepage": "https://github.com/justmoon/node-extend", + "_id": "extend@1.3.0", + "_shasum": "d1516fb0ff5624d2ebf9123ea1dac5a1994004f8", + "_from": "extend@>=1.3.0-0 <1.4.0-0", + "_npmVersion": "1.4.14", "_npmUser": { "name": "ljharb", "email": "ljharb@gmail.com" @@ -54,9 +56,10 @@ "email": "ljharb@gmail.com" } ], + "dist": { + "shasum": "d1516fb0ff5624d2ebf9123ea1dac5a1994004f8", + "tarball": "http://registry.npmjs.org/extend/-/extend-1.3.0.tgz" + }, "directories": {}, - "_shasum": "a0f5fd6cfc83a5fe49ef698d60ec8a624dd4576c", - "_resolved": "https://registry.npmjs.org/extend/-/extend-1.2.1.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/justmoon/node-extend" + "_resolved": "https://registry.npmjs.org/extend/-/extend-1.3.0.tgz" } diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/package.json b/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/package.json index e0910cd..89895e5 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/package.json +++ b/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/package.json @@ -37,6 +37,6 @@ "homepage": "https://github.com/isaacs/node-glob", "_id": "glob@3.2.11", "_shasum": "4a973f635b9190f715d10987d5c00fd2815ebe3d", - "_from": "glob@~3.2.9", + "_from": "glob@3.2.11", "_resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz" } diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/lodash/package.json b/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/lodash/package.json index 5eaef06..31d33b3 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/lodash/package.json +++ b/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/lodash/package.json @@ -98,5 +98,6 @@ "readme": "# Lo-Dash v2.4.1\nA utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features).\n\n## Download\n\nCheck out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences]) for details over the differences between builds.\n\n* Modern builds perfect for newer browsers/environments:
\n[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.js) &\n[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.min.js)\n\n* Compatibility builds for older environment support too:
\n[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.js) &\n[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.min.js)\n\n* Underscore builds to use as a drop-in replacement:
\n[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.js) &\n[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.min.js)\n\nCDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed.\n\nLove modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method.\n\n## Dive in\n\nThere’s plenty of **[documentation](http://lodash.com/docs)**, [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).
\nCheck out DevDocs as a fast, organized, & searchable interface for our documentation.\n\nThe full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).
\nA list of upcoming features is available on our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap).\n\n## Features *not* in Underscore\n\n * AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.)\n * [_(…)](http://lodash.com/docs#_) supports intuitive chaining\n * [_.at](http://lodash.com/docs#at) for cherry-picking collection values\n * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods\n * [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects\n * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects\n * [_.constant](http://lodash.com/docs#constant) & [_.property](http://lodash.com/docs#property) function generators for composing functions\n * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex`\n * [_.create](http://lodash.com/docs#create) for easier object inheritance\n * [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins\n * [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions\n * [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control\n * [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys\n * [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early\n * [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties\n * [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties\n * [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object`\n * [_.mapValues](http://lodash.com/docs#mapValues) for [mapping](http://lodash.com/docs#map) values to an object\n * [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions\n * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend)\n * [_.noop](http://lodash.com/docs#noop) for function placeholders\n * [_.now](http://lodash.com/docs#now) as a cross-browser `Date.now` alternative\n * [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior\n * [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays\n * [_.random](http://lodash.com/docs#random) supports returning floating-point numbers\n * [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking\n * [_.sortBy](http://lodash.com/docs#sortBy) supports sorting by multiple properties\n * [_.support](http://lodash.com/docs#support) for flagging environment features\n * [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals)\n * [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects\n * [_.where](http://lodash.com/docs#where) supports deep object comparisons\n * [_.xor](http://lodash.com/docs#xor) as a companion to [_.difference](http://lodash.com/docs#difference), [_.intersection](http://lodash.com/docs#intersection), & [_.union](http://lodash.com/docs#union)\n * [_.zip](http://lodash.com/docs#zip) is capable of unzipping values\n * [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), &\n [more](http://lodash.com/docs \"_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest\") accept callbacks\n * [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), &\n [more](http://lodash.com/docs \"_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where\") accept strings\n * [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), &\n [more](http://lodash.com/docs \"_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq\") support *“_.pluck”* & *“_.where”* shorthands\n * [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), &\n [more](http://lodash.com/docs \"_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight\") right-associative methods\n\n## Resources\n\n * Podcasts\n - [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/)\n\n * Posts\n - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/)\n - [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/)\n\n * Videos\n - [Introduction](https://vimeo.com/44154599)\n - [Origins](https://vimeo.com/44154600)\n - [Optimizations & builds](https://vimeo.com/44154601)\n - [Native method use](https://vimeo.com/48576012)\n - [Testing](https://vimeo.com/45865290)\n - [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk)\n\n A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources).\n\n## Support\n\nTested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.21~0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
\nAutomated browser test results [are available](https://saucelabs.com/u/lodash) as well as [Travis CI](https://travis-ci.org/) builds for [lodash](https://travis-ci.org/lodash/lodash/), [lodash-cli](https://travis-ci.org/lodash/lodash-cli/), [lodash-amd](https://travis-ci.org/lodash/lodash-amd/), [lodash-node](https://travis-ci.org/lodash/lodash-node/), & [grunt-lodash](https://travis-ci.org/lodash/grunt-lodash).\n\nSpecial thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
\n[![Sauce Labs](http://lodash.com/_img/sauce.png)](https://saucelabs.com/ \"Sauce Labs: Selenium Testing & More\")\n\n## Installation & usage\n\nIn browsers:\n\n```html\n\n```\n\nUsing [`npm`](http://npmjs.org/):\n\n```bash\nnpm i --save lodash\n\n{sudo} npm i -g lodash\nnpm ln lodash\n```\n\nIn [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/):\n\n```js\nvar _ = require('lodash');\n// or as Underscore\nvar _ = require('lodash/dist/lodash.underscore');\n```\n\n**Notes:**\n * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL\n * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('lodash.js');\n```\n\nIn an AMD loader:\n\n```js\nrequire({\n 'packages': [\n { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }\n ]\n},\n['lodash'], function(_) {\n console.log(_.VERSION);\n});\n```\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\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", "readmeFilename": "README.md", "_id": "lodash@2.4.1", - "_from": "lodash@~2.4.1" + "_from": "lodash@>=2.4.1-0 <2.5.0-0", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/package.json b/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/package.json index c34a130..5038d55 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/package.json +++ b/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/package.json @@ -45,6 +45,6 @@ "readmeFilename": "README.md", "_id": "findup-sync@0.1.3", "_shasum": "7f3e7a97b82392c653bf06589bd85190e93c3683", - "_from": "findup-sync@~0.1.2", + "_from": "findup-sync@>=0.1.2-0 <0.2.0-0", "_resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz" } diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/minimist/index.js b/node_modules/gulp/node_modules/liftoff/node_modules/minimist/index.js index 6bed6e1..9549c96 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/minimist/index.js +++ b/node_modules/gulp/node_modules/liftoff/node_modules/minimist/index.js @@ -2,10 +2,14 @@ module.exports = function (args, opts) { if (!opts) opts = {}; var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); + + if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { + flags.allBools = true; + } else { + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } var aliases = {}; Object.keys(opts.alias || {}).forEach(function (key) { @@ -68,6 +72,7 @@ module.exports = function (args, opts) { var next = args[i + 1]; if (next !== undefined && !/^-/.test(next) && !flags.bools[key] + && !flags.allBools && (aliases[key] ? !flags.bools[aliases[key]] : true)) { setArg(key, next); i++; diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/minimist/package.json b/node_modules/gulp/node_modules/liftoff/node_modules/minimist/package.json index 616d849..ae29cd3 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/minimist/package.json +++ b/node_modules/gulp/node_modules/liftoff/node_modules/minimist/package.json @@ -1,6 +1,6 @@ { "name": "minimist", - "version": "0.1.0", + "version": "0.2.0", "description": "parse argument options", "main": "index.js", "devDependencies": { @@ -40,16 +40,14 @@ "url": "http://substack.net" }, "license": "MIT", + "gitHead": "f904dcc3c28f10eb11840091e9f0bab9d9519b5c", "bugs": { "url": "https://github.com/substack/minimist/issues" }, - "_id": "minimist@0.1.0", - "dist": { - "shasum": "99df657a52574c21c9057497df742790b2b4c0de", - "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz" - }, - "_from": "minimist@~0.1.0", - "_npmVersion": "1.4.3", + "_id": "minimist@0.2.0", + "_shasum": "4dffe525dae2b864c66c2e23c6271d7afdecefce", + "_from": "minimist@0.2.0", + "_npmVersion": "1.4.15", "_npmUser": { "name": "substack", "email": "mail@substack.net" @@ -60,8 +58,11 @@ "email": "mail@substack.net" } ], + "dist": { + "shasum": "4dffe525dae2b864c66c2e23c6271d7afdecefce", + "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz" + }, "directories": {}, - "_shasum": "99df657a52574c21c9057497df742790b2b4c0de", - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz", + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/minimist/readme.markdown b/node_modules/gulp/node_modules/liftoff/node_modules/minimist/readme.markdown index 0dc9394..8253221 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/minimist/readme.markdown +++ b/node_modules/gulp/node_modules/liftoff/node_modules/minimist/readme.markdown @@ -55,7 +55,9 @@ 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.boolean` - a boolean, string or array of strings to always treat as +booleans. if `true` will treat all double hyphenated arguments without equal signs +as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) * `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 diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/minimist/test/all_bool.js b/node_modules/gulp/node_modules/liftoff/node_modules/minimist/test/all_bool.js new file mode 100644 index 0000000..4575ec0 --- /dev/null +++ b/node_modules/gulp/node_modules/liftoff/node_modules/minimist/test/all_bool.js @@ -0,0 +1,32 @@ +var parse = require('../'); +var test = require('tape'); + +test('flag boolean true (default all --args to boolean)', function (t) { + var argv = parse(['moo', '--honk', 'cow'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); + +test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { + var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + tacos: 'good', + p: '55', + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/resolve/lib/async.js b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/lib/async.js index ac679d8..83b2c6c 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/resolve/lib/async.js +++ b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/lib/async.js @@ -10,6 +10,11 @@ module.exports = function resolve (x, opts, cb) { opts = {}; } if (!opts) opts = {}; + if (typeof x !== 'string') { + return process.nextTick(function () { + cb(new Error('path must be a string')); + }); + } var isFile = opts.isFile || function (file, cb) { fs.stat(file, function (err, stat) { @@ -25,8 +30,10 @@ module.exports = function resolve (x, opts, cb) { opts.paths = opts.paths || []; - if (x.match(/^(?:\.\.?\/|\/|([A-Za-z]:)?\\)/)) { - loadAsFile(path.resolve(y, x), function (err, m, pkg) { + if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(x)) { + var res = path.resolve(y, x); + if (x === '..') res += '/'; + loadAsFile(res, function (err, m, pkg) { if (err) cb(err) else if (m) cb(null, m, pkg) else loadAsDirectory(path.resolve(y, x), function (err, d, pkg) { diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/resolve/lib/sync.js b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/lib/sync.js index 49c2625..ef91edd 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/resolve/lib/sync.js +++ b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/lib/sync.js @@ -18,9 +18,10 @@ module.exports = function (x, opts) { opts.paths = opts.paths || []; - if (x.match(/^(?:\.\.?\/|\/|([A-Za-z]:)?\\)/)) { - var m = loadAsFileSync(path.resolve(y, x)) - || loadAsDirectorySync(path.resolve(y, x)); + if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(x)) { + var res = path.resolve(y, x); + if (x === '..') res += '/'; + var m = loadAsFileSync(res) || loadAsDirectorySync(res); if (m) return m; } else { var n = loadNodeModulesSync(x, y); diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/resolve/package.json b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/package.json index 3872b06..8c47626 100644 --- a/node_modules/gulp/node_modules/liftoff/node_modules/resolve/package.json +++ b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/package.json @@ -1,7 +1,7 @@ { "name": "resolve", "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "version": "0.7.1", + "version": "0.7.4", "repository": { "type": "git", "url": "git://github.com/substack/node-resolve.git" @@ -25,17 +25,15 @@ "email": "mail@substack.net", "url": "http://substack.net" }, + "gitHead": "4ad661931ebdd07c3df34bc897c24255705adbff", "bugs": { "url": "https://github.com/substack/node-resolve/issues" }, "homepage": "https://github.com/substack/node-resolve", - "_id": "resolve@0.7.1", - "dist": { - "shasum": "74c73ad05bb62da19391a79c3de63b5cf7aeba51", - "tarball": "http://registry.npmjs.org/resolve/-/resolve-0.7.1.tgz" - }, - "_from": "resolve@~0.7.0", - "_npmVersion": "1.4.3", + "_id": "resolve@0.7.4", + "_shasum": "395a9ef9e873fbfe12bd14408bd91bb936003d69", + "_from": "resolve@0.7.4", + "_npmVersion": "1.4.21", "_npmUser": { "name": "substack", "email": "mail@substack.net" @@ -46,8 +44,11 @@ "email": "mail@substack.net" } ], + "dist": { + "shasum": "395a9ef9e873fbfe12bd14408bd91bb936003d69", + "tarball": "http://registry.npmjs.org/resolve/-/resolve-0.7.4.tgz" + }, "directories": {}, - "_shasum": "74c73ad05bb62da19391a79c3de63b5cf7aeba51", - "_resolved": "https://registry.npmjs.org/resolve/-/resolve-0.7.1.tgz", + "_resolved": "https://registry.npmjs.org/resolve/-/resolve-0.7.4.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot.js b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot.js new file mode 100644 index 0000000..c576dcb --- /dev/null +++ b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot.js @@ -0,0 +1,29 @@ +var path = require('path'); +var test = require('tap').test; +var resolve = require('../'); + +test('dotdot', function (t) { + t.plan(4); + var dir = __dirname + '/dotdot/abc'; + + resolve('..', { basedir : dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, __dirname + '/dotdot/index.js'); + }); + + resolve('.', { basedir : dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, dir + '/index.js'); + }); +}); + +test('dotdot sync', function (t) { + t.plan(2); + var dir = __dirname + '/dotdot/abc'; + + var a = resolve.sync('..', { basedir : dir }); + t.equal(a, __dirname + '/dotdot/index.js'); + + var b = resolve.sync('.', { basedir : dir }); + t.equal(b, dir + '/index.js'); +}); diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot/abc/index.js new file mode 100644 index 0000000..67f2534 --- /dev/null +++ b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot/abc/index.js @@ -0,0 +1,2 @@ +var x = require('..'); +console.log(x); diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot/index.js b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot/index.js new file mode 100644 index 0000000..afec736 --- /dev/null +++ b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot/index.js @@ -0,0 +1 @@ +module.exports = 'whatever' diff --git a/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/nonstring.js b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/nonstring.js new file mode 100644 index 0000000..a146992 --- /dev/null +++ b/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/nonstring.js @@ -0,0 +1,9 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('nonstring', function (t) { + t.plan(1); + resolve(555, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/gulp/node_modules/liftoff/package.json b/node_modules/gulp/node_modules/liftoff/package.json index b835cfb..e30743f 100644 --- a/node_modules/gulp/node_modules/liftoff/package.json +++ b/node_modules/gulp/node_modules/liftoff/package.json @@ -1,7 +1,7 @@ { "name": "liftoff", "description": "Launch your command line tool with ease.", - "version": "0.12.0", + "version": "0.12.1", "homepage": "https://github.com/tkellen/node-liftoff", "author": { "name": "Tyler Kellen", @@ -40,16 +40,14 @@ "dependencies": { "findup-sync": "~0.1.2", "resolve": "~0.7.0", - "minimist": "~0.1.0", - "extend": "~1.2.1" + "minimist": "~0.2.0", + "extend": "~1.3.0" }, - "_id": "liftoff@0.12.0", - "dist": { - "shasum": "8cc991cb362ba60458460d943c0d031605cbe086", - "tarball": "http://registry.npmjs.org/liftoff/-/liftoff-0.12.0.tgz" - }, - "_from": "liftoff@^0.12.0", - "_npmVersion": "1.4.3", + "gitHead": "c02522c2d6e8f2e2880486e8a456ebebb6819a06", + "_id": "liftoff@0.12.1", + "_shasum": "bcaa49759c68396b83b984ad0b2d8cc226f9526d", + "_from": "liftoff@>=0.12.0-0 <0.13.0-0", + "_npmVersion": "1.4.14", "_npmUser": { "name": "tkellen", "email": "tyler@sleekcode.net" @@ -60,8 +58,10 @@ "email": "tyler@sleekcode.net" } ], + "dist": { + "shasum": "bcaa49759c68396b83b984ad0b2d8cc226f9526d", + "tarball": "http://registry.npmjs.org/liftoff/-/liftoff-0.12.1.tgz" + }, "directories": {}, - "_shasum": "8cc991cb362ba60458460d943c0d031605cbe086", - "_resolved": "https://registry.npmjs.org/liftoff/-/liftoff-0.12.0.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/liftoff/-/liftoff-0.12.1.tgz" } diff --git a/node_modules/gulp/node_modules/minimist/package.json b/node_modules/gulp/node_modules/minimist/package.json index 3b36570..ae29cd3 100644 --- a/node_modules/gulp/node_modules/minimist/package.json +++ b/node_modules/gulp/node_modules/minimist/package.json @@ -46,7 +46,7 @@ }, "_id": "minimist@0.2.0", "_shasum": "4dffe525dae2b864c66c2e23c6271d7afdecefce", - "_from": "minimist@^0.2.0", + "_from": "minimist@0.2.0", "_npmVersion": "1.4.15", "_npmUser": { "name": "substack", diff --git a/node_modules/gulp/node_modules/orchestrator/lib/runTask.js b/node_modules/gulp/node_modules/orchestrator/lib/runTask.js index 3a1e2ab..97dae22 100644 --- a/node_modules/gulp/node_modules/orchestrator/lib/runTask.js +++ b/node_modules/gulp/node_modules/orchestrator/lib/runTask.js @@ -3,6 +3,7 @@ "use strict"; var eos = require('end-of-stream'); +var consume = require('stream-consume'); module.exports = function (task, done) { var that = this, finish, cb, isDone = false, start, r; @@ -47,10 +48,13 @@ module.exports = function (task, done) { } else if (r && typeof r.pipe === 'function') { // wait for stream to end - eos(r, { error: true, readable: false, writable: false }, function(err){ + eos(r, { error: true, readable: r.readable, writable: r.writable && !r.readable }, function(err){ finish(err, 'stream'); }); + // Ensure that the stream completes + consume(r); + } else if (task.length === 0) { // synchronous, function took in args.length parameters, and the callback was extra finish(null, 'sync'); diff --git a/node_modules/gulp/node_modules/orchestrator/node_modules/end-of-stream/package.json b/node_modules/gulp/node_modules/orchestrator/node_modules/end-of-stream/package.json index 28a760c..f1bf181 100644 --- a/node_modules/gulp/node_modules/orchestrator/node_modules/end-of-stream/package.json +++ b/node_modules/gulp/node_modules/orchestrator/node_modules/end-of-stream/package.json @@ -33,7 +33,7 @@ "license": "MIT", "_id": "end-of-stream@0.1.5", "_shasum": "8e177206c3c80837d85632e8b9359dfe8b2f6eaf", - "_from": "end-of-stream@~0.1.5", + "_from": "end-of-stream@0.1.5", "_npmVersion": "1.4.9", "_npmUser": { "name": "mafintosh", diff --git a/node_modules/gulp/node_modules/orchestrator/node_modules/sequencify/package.json b/node_modules/gulp/node_modules/orchestrator/node_modules/sequencify/package.json index 94c91b1..dac5833 100644 --- a/node_modules/gulp/node_modules/orchestrator/node_modules/sequencify/package.json +++ b/node_modules/gulp/node_modules/orchestrator/node_modules/sequencify/package.json @@ -44,7 +44,7 @@ "shasum": "90cff19d02e07027fd767f5ead3e7b95d1e7380c", "tarball": "http://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz" }, - "_from": "sequencify@~0.0.7", + "_from": "sequencify@>=0.0.7-0 <0.1.0-0", "_npmVersion": "1.3.15", "_npmUser": { "name": "robrich", diff --git a/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/.npmignore b/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/README.md b/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/README.md new file mode 100644 index 0000000..d7c9c90 --- /dev/null +++ b/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/README.md @@ -0,0 +1,53 @@ +# stream-consume + +A node module ensures a Readable stream continues flowing if it's not piped to +another destination. + + npm install stream-consume + +## Usage + +Simply pass a stream to `stream-consume`. +Both legacy streams and streams2 are supported. + +``` js +var consume = require('stream-consume'); + +consume(readableStream); +``` + +## Details + +Only Readable streams are processed (as determined by presence of `readable` +property and a `resume` property that is a function). If called with anything +else, it's a NOP. + +For a streams2 stream (as determined by presence of a `_readableState` +property), nothing is done if the stream has already been piped to at least +one other destination. + +`resume()` is used to cause the stream to continue flowing. + +## License + +The MIT License (MIT) + +Copyright (c) 2014 Aron Nopanen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/node_modules/orchestrator/node_modules/stream-consume/index.js b/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/index.js new file mode 100644 index 0000000..122edb1 --- /dev/null +++ b/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/index.js @@ -0,0 +1,14 @@ +module.exports = function(stream) { + if (stream.readable && typeof stream.resume === 'function') { + var state = stream._readableState; + if (!state || state.pipesCount === 0) { + // Either a classic stream or streams2 that's not piped to another destination + try { + stream.resume(); + } catch (err) { + console.error("Got error: " + err); + // If we can't, it's not worth dying over + } + } + } +}; diff --git a/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/package.json b/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/package.json new file mode 100644 index 0000000..a96f990 --- /dev/null +++ b/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/package.json @@ -0,0 +1,47 @@ +{ + "name": "stream-consume", + "version": "0.1.0", + "description": "Consume a stream to ensure it keeps flowing", + "main": "index.js", + "scripts": { + "test": "mocha" + }, + "repository": { + "type": "git", + "url": "https://github.com/aroneous/stream-consume.git" + }, + "author": { + "name": "Aron Nopanen" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/aroneous/stream-consume/issues" + }, + "homepage": "https://github.com/aroneous/stream-consume", + "devDependencies": { + "mocha": "^1.20.1", + "should": "^4.0.4", + "through2": "^0.5.1" + }, + "gitHead": "54496fd47e0f10bf6924728ef405b72a4bbad6de", + "_id": "stream-consume@0.1.0", + "_shasum": "a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f", + "_from": "stream-consume@>=0.1.0-0 <0.2.0-0", + "_npmVersion": "1.5.0-alpha-3", + "_npmUser": { + "name": "aroneous", + "email": "aron.nopanen@gmail.com" + }, + "maintainers": [ + { + "name": "aroneous", + "email": "aron.nopanen@gmail.com" + } + ], + "dist": { + "shasum": "a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f", + "tarball": "http://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz" +} diff --git a/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/test/tests.js b/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/test/tests.js new file mode 100644 index 0000000..660e37a --- /dev/null +++ b/node_modules/gulp/node_modules/orchestrator/node_modules/stream-consume/test/tests.js @@ -0,0 +1,180 @@ +/*jshint node:true */ +/*global describe:false, it:false */ +"use strict"; + +var consume = require('../'); +var Stream = require('stream'); +var Readable = Stream.Readable; +var Writable = Stream.Writable; +var Duplex = Stream.Duplex; +var should = require('should'); +var through = require('through2'); +require('mocha'); + +describe('stream-consume', function() { + + it('should cause a Readable stream to complete if it\'s not piped anywhere', function(done) { + var rs = new Readable({highWaterMark: 2}); + var a = 0; + var ended = false; + rs._read = function() { + if (a++ < 100) { + rs.push(a + ""); + } else { + ended = true; + rs.push(null); + } + }; + + rs.on("end", function() { + a.should.be.above(99); + ended.should.be.true; + done(); + }); + + consume(rs); + }); + + it('should work with Readable streams in objectMode', function(done) { + var rs = new Readable({highWaterMark: 2, objectMode: true}); + var a = 0; + var ended = false; + rs._read = function() { + if (a++ < 100) { + rs.push(a); + } else { + ended = true; + rs.push(null); + } + }; + + rs.on("end", function() { + a.should.be.above(99); + ended.should.be.true; + done(); + }); + + consume(rs); + }); + + it('should not interfere with a Readable stream that is piped somewhere', function(done) { + var rs = new Readable({highWaterMark: 2}); + var a = 0; + var ended = false; + rs._read = function() { + if (a++ < 100) { + rs.push("."); + } else { + ended = true; + rs.push(null); + } + }; + + var sizeRead = 0; + var ws = new Writable({highWaterMark: 2}); + ws._write = function(chunk, enc, next) { + sizeRead += chunk.length; + next(); + } + + ws.on("finish", function() { + a.should.be.above(99); + ended.should.be.true; + sizeRead.should.equal(100); + done(); + }); + + rs.pipe(ws); + + consume(rs); + }); + + it('should not interfere with a Writable stream', function(done) { + var rs = new Readable({highWaterMark: 2}); + var a = 0; + var ended = false; + rs._read = function() { + if (a++ < 100) { + rs.push("."); + } else { + ended = true; + rs.push(null); + } + }; + + var sizeRead = 0; + var ws = new Writable({highWaterMark: 2}); + ws._write = function(chunk, enc, next) { + sizeRead += chunk.length; + next(); + } + + ws.on("finish", function() { + a.should.be.above(99); + ended.should.be.true; + sizeRead.should.equal(100); + done(); + }); + + rs.pipe(ws); + + consume(ws); + }); + + it('should handle a Transform stream', function(done) { + var rs = new Readable({highWaterMark: 2}); + var a = 0; + var ended = false; + rs._read = function() { + if (a++ < 100) { + rs.push("."); + } else { + ended = true; + rs.push(null); + } + }; + + var sizeRead = 0; + var flushed = false; + var ts = through({highWaterMark: 2}, function(chunk, enc, cb) { + sizeRead += chunk.length; + this.push(chunk); + cb(); + }, function(cb) { + flushed = true; + cb(); + }); + + ts.on("end", function() { + a.should.be.above(99); + ended.should.be.true; + sizeRead.should.equal(100); + flushed.should.be.true; + done(); + }); + + rs.pipe(ts); + + consume(ts); + }); + + it('should handle a classic stream', function(done) { + var rs = new Stream(); + var ended = false; + var i; + + rs.on("end", function() { + ended.should.be.true; + done(); + }); + + consume(rs); + + for (i = 0; i < 100; i++) { + rs.emit("data", i); + } + ended = true; + rs.emit("end"); + }); + +}); diff --git a/node_modules/gulp/node_modules/orchestrator/package.json b/node_modules/gulp/node_modules/orchestrator/package.json index fa1d338..5833b5a 100644 --- a/node_modules/gulp/node_modules/orchestrator/package.json +++ b/node_modules/gulp/node_modules/orchestrator/package.json @@ -1,7 +1,7 @@ { "name": "orchestrator", "description": "A module for sequencing and executing tasks and dependencies in maximum concurrency", - "version": "0.3.6", + "version": "0.3.7", "homepage": "https://github.com/robrich/orchestrator", "repository": { "type": "git", @@ -20,7 +20,8 @@ ], "dependencies": { "end-of-stream": "~0.1.5", - "sequencify": "~0.0.7" + "sequencify": "~0.0.7", + "stream-consume": "~0.1.0" }, "devDependencies": { "event-stream": "~3.1.5", @@ -44,13 +45,13 @@ "url": "http://github.com/robrich/orchestrator/raw/master/LICENSE" } ], - "gitHead": "18831d3db0448910d49208d790256dc879b8e9e6", + "gitHead": "f3fcb93e3560afd0bc0c4acd5c5db7bd109414e7", "bugs": { "url": "https://github.com/robrich/orchestrator/issues" }, - "_id": "orchestrator@0.3.6", - "_shasum": "1fc5694c0edabd1357569270bb771f48390ee1d0", - "_from": "orchestrator@^0.3.0", + "_id": "orchestrator@0.3.7", + "_shasum": "c45064e22c5a2a7b99734f409a95ffedc7d3c3df", + "_from": "orchestrator@>=0.3.0-0 <0.4.0-0", "_npmVersion": "1.4.14", "_npmUser": { "name": "phated", @@ -71,10 +72,9 @@ } ], "dist": { - "shasum": "1fc5694c0edabd1357569270bb771f48390ee1d0", - "tarball": "http://registry.npmjs.org/orchestrator/-/orchestrator-0.3.6.tgz" + "shasum": "c45064e22c5a2a7b99734f409a95ffedc7d3c3df", + "tarball": "http://registry.npmjs.org/orchestrator/-/orchestrator-0.3.7.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.6.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.7.tgz" } diff --git a/node_modules/gulp/node_modules/pretty-hrtime/package.json b/node_modules/gulp/node_modules/pretty-hrtime/package.json index 44d6315..144c909 100644 --- a/node_modules/gulp/node_modules/pretty-hrtime/package.json +++ b/node_modules/gulp/node_modules/pretty-hrtime/package.json @@ -40,7 +40,7 @@ "shasum": "f341d39215fa5f7bff50af7d8572f8d4ec9d12f6", "tarball": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-0.2.1.tgz" }, - "_from": "pretty-hrtime@^0.2.0", + "_from": "pretty-hrtime@>=0.2.0-0 <0.3.0-0", "_npmVersion": "1.4.4", "_npmUser": { "name": "robrich", diff --git a/node_modules/gulp/node_modules/semver/README.md b/node_modules/gulp/node_modules/semver/README.md index 4e95b84..2ca8d80 100644 --- a/node_modules/gulp/node_modules/semver/README.md +++ b/node_modules/gulp/node_modules/semver/README.md @@ -66,11 +66,11 @@ The following range styles are supported: prerelease) will be supported up to, but not including, the next major version (or its prereleases). `1.5.1` will satisfy `^1.2.3`, while `1.2.2` and `2.0.0-beta` will not. -* `^0.1.3` := `>=0.1.3-0 <0.2.0-0` "Compatible with `0.1.3`". `0.x.x` versions are - special: the first non-zero component indicates potentially breaking changes, - meaning the caret operator matches any version with the same first non-zero - component starting at the specified version. -* `^0.0.2` := `=0.0.2` "Only the version `0.0.2` is considered compatible" +* `^0.1.3` := `0.1.3` "Compatible with `0.1.3`". `0.x.x` versions are + special: since the semver spec specifies that `0.x.x` versions make + no stability guarantees, only the version specified is considered + valid. +* `^0.0.2` := `0.0.2` "Only the version `0.0.2` is considered compatible" * `~1.2` := `>=1.2.0-0 <1.3.0-0` "Any version starting with `1.2`" * `^1.2` := `>=1.2.0-0 <2.0.0-0` "Any version compatible with `1.2`" * `1.2.x` := `>=1.2.0-0 <1.3.0-0` "Any version starting with `1.2`" diff --git a/node_modules/gulp/node_modules/semver/bin/semver b/node_modules/gulp/node_modules/semver/bin/semver index 8484206..41c148f 100755 --- a/node_modules/gulp/node_modules/semver/bin/semver +++ b/node_modules/gulp/node_modules/semver/bin/semver @@ -107,8 +107,8 @@ function help () { ,"" ,"-i --increment []" ," Increment a version by the specified level. Level can" - ," be one of: major, minor, patch, or prerelease" - ," Default level is 'patch'." + ," be one of: major, minor, patch, premajor, preminor," + ," prepatch, or prerelease. Default level is 'patch'." ," Only one version may be specified." ,"" ,"-l --loose" diff --git a/node_modules/gulp/node_modules/semver/package.json b/node_modules/gulp/node_modules/semver/package.json index 6f12e5e..59f7929 100644 --- a/node_modules/gulp/node_modules/semver/package.json +++ b/node_modules/gulp/node_modules/semver/package.json @@ -1,6 +1,6 @@ { "name": "semver", - "version": "2.3.1", + "version": "3.0.1", "description": "The semantic version parser used by npm.", "main": "semver.js", "browser": "semver.browser.js", @@ -21,15 +21,15 @@ "bin": { "semver": "./bin/semver" }, - "gitHead": "e5b259a784b79895853aff1c6d5e23b07bdd4664", + "gitHead": "4b24aeb54dd23560f53b0df01e64e5f229e6172f", "bugs": { "url": "https://github.com/isaacs/node-semver/issues" }, "homepage": "https://github.com/isaacs/node-semver", - "_id": "semver@2.3.1", - "_shasum": "6f65ee7d1aed753cdf9dda70e5631a3fb42a5bee", - "_from": "semver@^2.2.1", - "_npmVersion": "1.4.16", + "_id": "semver@3.0.1", + "_shasum": "720ac012515a252f91fb0dd2e99a56a70d6cf078", + "_from": "semver@>=3.0.1-0 <4.0.0-0", + "_npmVersion": "2.0.0-alpha-5", "_npmUser": { "name": "isaacs", "email": "i@izs.me" @@ -41,10 +41,9 @@ } ], "dist": { - "shasum": "6f65ee7d1aed753cdf9dda70e5631a3fb42a5bee", - "tarball": "http://registry.npmjs.org/semver/-/semver-2.3.1.tgz" + "shasum": "720ac012515a252f91fb0dd2e99a56a70d6cf078", + "tarball": "http://registry.npmjs.org/semver/-/semver-3.0.1.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/semver/-/semver-2.3.1.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/semver/-/semver-3.0.1.tgz" } diff --git a/node_modules/gulp/node_modules/semver/semver.browser.js b/node_modules/gulp/node_modules/semver/semver.browser.js index e11fe09..c335720 100644 --- a/node_modules/gulp/node_modules/semver/semver.browser.js +++ b/node_modules/gulp/node_modules/semver/semver.browser.js @@ -236,7 +236,7 @@ function valid(version, loose) { exports.clean = clean; function clean(version, loose) { - var s = parse(version, loose); + var s = parse(version.trim().replace(/^[=v]+/, ""), loose); return s ? s.version : null; } @@ -359,7 +359,7 @@ SemVer.prototype.inc = function(release) { // If this is already a prerelease, it will bump to the next version // drop any prereleases that might already exist, since they are not // relevant at this point. - this.prerelease.length = 0 + this.prerelease.length = 0; this.inc('patch'); this.inc('pre'); break; @@ -552,6 +552,9 @@ Comparator.prototype.parse = function(comp) { throw new TypeError('Invalid comparator: ' + comp); this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; + // if it literally is just '>' or '' then allow anything. if (!m[2]) this.semver = ANY; @@ -757,6 +760,11 @@ function replaceCaret(comp, loose) { return comp.replace(r, function(_, M, m, p, pr) { ; var ret; + if (pr) { + if (pr.charAt(0) !== '-') + pr = '-' + pr; + } else + pr = ''; if (isX(M)) ret = ''; @@ -767,30 +775,14 @@ function replaceCaret(comp, loose) { ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; else ret = '>=' + M + '.' + m + '.0-0 <' + (+M + 1) + '.0.0-0'; - } else if (pr) { - ; - if (pr.charAt(0) !== '-') - pr = '-' + pr; - if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p + pr; - else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + (+M + 1) + '.0.0-0'; - } else { - if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p; - else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + (+M + 1) + '.0.0-0'; - } + } else if (M === '0') + ret = '=' + M + '.' + m + '.' + p + pr; + else if (pr) + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0-0'; + else + ret = '>=' + M + '.' + m + '.' + p + '-0' + + ' <' + (+M + 1) + '.0.0-0'; ; return ret; diff --git a/node_modules/gulp/node_modules/semver/semver.browser.js.gz b/node_modules/gulp/node_modules/semver/semver.browser.js.gz index d47bae5487f24b1bd77bfa21fcb3b83fed132b28..4ff42fe9b0ef3b4fe0ae2323b38fe5ca0173dc23 100644 GIT binary patch delta 7195 zcmV+$9OUE1IL|nLABzY8ib2s+0t3Z8X>%J#uHW@5+FDmgN+eC$$%m)Qr6kJ6uPoUm zDO=vPrFclTsEOxbW`;Uq$-n*K=yNVoUhi8UBBu{D8fc)=0D833y<8-dB21I6yq%|6 zk@v*swY6u@1V4)6N{UGo`d>`3?F4HJVZ^C3IPULKV5kZ5)+j#~PgDC*+K_bRdEOMaZ zWtxd1{Unp{FKFIJ0M|hjPJ;p;MUYH^1Tb{~#f&qQ$cqe0bLPO`{w9tWvCP7Wcr`_~ z0h2PUI1tzu*3ZY$$G(8U0+FQ2;4hh_Vj9kX2aGGAGQJa342|LxW=_=zA18SH+tK04 ztDjzf{d{BQ`|?FE>S}_u<13T7YJ${P|CIMJkjgQCTwOx+T+5 zZQ2oAhTXRYqI486`)wu%pmJr9OU?6&L|2*ZNOrYSErhoxhbM=x4-ZZc>lbNVJ=5}k z<#rpJ8mCUvzc*cLWx!=}9Rd|@H#S;|swQ_UzK=q>nPph>tI{j3-boW_^^zyRa|g(^ z1yYq~OMrT^XgUnc!mDR&9UZVAujjUoF#C;O4cA(D<#A~6vK6&ud|ClXN3s;A%&8w2 zVKfy-vIt;*4a#zr+<{dQkHaJ=l%=6#6~5U4Dw_Yt-(J1`xn7=1Rb~$Z6%UGjz*|`z zURd}xTI8^E&sx^c9K<}GI!kCwP+|v4b@dQZ6)ZJpK780Ttf`=1Vn~S%)#jG?YL>q& zqR8m9Q?g!IpT)SrsYUP1H=QGs-UAzd{zySrf)R@!^PreqDHF>9ol7!=b65Zf20QyE z7uoHTU|uZfX_lpnc|H_m`1y#SHJpG^OUx+s=z|G33BU$KJ2<~e7tjyeN*K&ohn6k` zA&r68VNPZ@a`TtpUcc7N)X#5U!+wbTynd;9cgL$WtI?7)w~b049j? zv@f>Ms1Ks~Rj?(xz&Opfo3H>XGPhYsdkP+K0ooPCog!k4$DD*3Ci57N10itsZb&pF z-C>CM{(A4jhaAkYDk+=wRITo7qG}yISq&bpq*@(Hgm&=Ml*Vp)}IeI)=|BzBR6i>hrSf8-;+TF7Jsb=pi9-lT}LQy5_O!r z46__helkW#C{L3DsxtZK0#2G!X2H9YgX6!q83DBoaF$E#toz&hclRGY=;KHkOxqBR z(93`w$a)o(fKu_fySj|ht&U2zMw9hS8u-7|xn>V<@6&sUe`_ezz+PLo8m(M&y44_W zpZNbjm>Np1+JD>96ohPl52UtF9tC+Dpl5|8GN&3)nu8HG+ua)8iW}N*#*$q!K`cd( zi}l?tZnoYRs7q&8t~^#bWR;QCG@E#+%{P3qs1>jDlm*$q`I4qv1-K=c-gC}iBbFjV z6~(*9ky1{ech)o5F~GDKgX#gz1_YZy3Hk#-(}Bif{eOFWcm`Uzq=QwVwwS)`zciLG zRh*r?I&yoMLhga+_cZ>|=AJ2R;GTl!anI{h;-0N@xi`UCSGafKVOGJa zN@jyh8~3PDg?qMib+A?Lp|26uj+hnCqT-qSQ;>B*$EH6Pz_|5wQKVpcO~VODTggly z?A{!`JvccydsE%>OI0oEp<6YNdQa~!3nh;!M%LnG2jH z7@~#D=g8c#EN-M^^K({2g?2nLvFO-Vpw}MHZE)nwQ#QXo?h7)KKZ?D*eR$%B(u^wW z*Q=>n#AH!7&-_A zMSq%Aq~_`Kr!O==O7`tXK5q<&j^BT*oDl&>IGGq+qcqLYlb^-*s0QVC9cVL_bdpFm1TS^C# zc%f<-nMpA47D)v9 zh8Cu{k?5EpO9mF@IKAc_5e{tFVYr5tVHa@=DOv>|yW#{sHa9U)DZ~!^$H3zg5YOG5bh9BS&_aXi^?#rX;>1C*$_U#cSwxYCA|G1!`0(nWNY9NZUh7GfTR6B~11{G? z?Id!BHe*k~a7h3XeL7>)bK}@~dF&x*mAKm*W~}kL&o18YU7v40>%-34t3fOW#PT}C zOx%=1icV12pw>Xx&uWcmps4tQWP*We?!isGMnmQ?hNu~el7Bl*K5n%`r83H;s@6m7 znP9Wi@_||kCr+-LKfypbd+ItGnc^w~ImPvI28|E1EX}%|R|zi(<&xYMs4w*TqA}LA zKy*2_U74$v5t>Kya@<){(uH6&HMnj^@j7;ZGI0Hhb_m&oD2Y&=bm-Q&G8$dTLQe4lf7C;#U z89nN1CBxwW>}lkUcgXJ*5$&~#FA--L$z)bsIh55yY=STiEDYP@k2FkZR*t@Ld&0DK zYUTwpG>84HIxz*Jv#WH{x*il~vA*AFfLEj(NoWMP0#0n4Nf$(lmRxC9 z8la-SBY*Y0R9wu|*cjv2gWlhJRc|w?YTD7KG=cgl{72AN!`dKP-nFZ-&+zyGr({j7 z#(o@?QT^~?wSFp$!~N)C38CILvijT73C|aA&fo}iO}3${*k2p~wF)IBdp%LJ zs~1?skinMLe>{<9aH~LD8Q4m=jff)F_JoINs(YI;svq=gIIa$bx;nOT&0USly zG(nF792dHqo1t3nu-t$)toUz2Jftq-xfi}%%<*_ZVJ~@Ga2Ql5VsacbjAJ71moyj-B-LOvgPh7!M5LxtcIH>>_zYu7I($djG zcD5CTXsH0WZimZzJCzFPV~fXdDEhQhf{4?vgGl9H1Cc0UAOihfU7DoGAc79lJ5LSt z(bMCw%HfTU`WjHvES;C^qnte#aX7mw41aui8|FnHll~^`t{~ejNec@KyI%)MA;|54 z!BN=Ci=jK;s-W*_QSm536Mh7#G)*w?b-pM#nuu9Tj&3xzGvNkSXYK|mG#E|pq0a&Z z#4w>nt)eWBdS-w5H)h47*Q`(~LI;3brVL}P9aQJ)Vx*!{XKg?Gyr{8)>z8QD`hTP} zg}M|AyGVfs871qg#9Tvt4J%X(b)k4G+$tdACeOxX5*twHpBoK+;Ce|8L@Fw^DA#X& z9nT3$na)coN_m)+Sdfk>j>IV(NvAN$8}r3DVrS8C&EP!(yw?Hzx(UI7nwLTa-fY4G z66q#O!9JLV8E2%FmipJOaerX9N1iAi=bYwz7!_TliZ3V%NxzY?k| zBfn<1aa=e>cBcrw)OkU=Pow9%U?wEMUF-DGz{t;p6LEY^RdWU%VwFPWRMuzzJz)>w zuH&r1HZs1m005ws&S3cX9`v-gWn5D`w%!!#jJ6|u>ZzfHx*6~iKx=e!Y+OXzU7))? z;eIb+$%$>dth!@eAEUVW_6@B^vhZa*ld7~!A|r& zzxME~zE!zIkiF$sU37t2Zo1RBcAVGBdFDP=N2KD$2`PMvY$1EKlyt~fL$k)|7|el4 z*7fJW&+!(}p1=>Hwzt%%DE z5t+GI%!;KH_UiXb@(>}!$b}d^65?(NqWlvt{`~1clz%=BB5lMT%!Gg@9@ONqV4qaL z&I(ENlpaClBPqI9At^bmJ*d%Rq3)KUPQWAtNsi~P0LOFemCnnM`EFLR{C~u2^`xN{G*Lk9H`}kor`l0W<79d3ebczK`0Lv4IgRDA*1M*0 zv=s90p3}GmvbJ^FqYdd?Qox(-8{m~TZPXeeW;(0kCmSN)6ZXMb8@8~E3#<~8!a~BSlB63ErgozqvvLsHVj(;l{5X4^AUZD!Ua!GSK zIR2;W%12}|^4zJ$M|2%MXpU)bzq-U}o#$+t0d(l`8EjBH4adu)L&0W~AY8qeuQNRg zY*li5w*As`H%dkf;MiF9$N-ql!r(<|sp!ui12`PZGSszocxc({IP`V8A&J@Z8`5z& z3Ja*ipc$+U%6}LDQOB&1PKWOr`UwO>8|HfMhPgCrk@Utb`?;pxF{ltk)hA83?NTDl zAe)Gv-yEJQ9Jp*Oi$HWSYsVgcdb-~}r|EMqbZwV=ngQH~O^tp{Z}6@|U!fzWDIDeN zp!RhSXr8FVRF%xb`0lFAD0?tRPf@;z=lVvoxdy^RX@7?(&NDYjLU-vxL)e(6a7f$` zH$hTR3f7GjcnDCR<;jxR;(4&l|ylkX0DIQ)q-C!GRK;<844WDTnIXBZ9;SU@KvV+LA#)l?;f4d zzVJMZhJQnSmy#vPLG;W<#n&G81bsT&6Fqk+QK+&tak0BSQ0pEp2db*yk@Qx{BQ)L!z7o+yn3~5IW3B_LURd z`o1w2>IQ1)x)rB`yNFC2Ki7k^%jjvAWVLnIQBp)RQqCTly0IUs=>XLBYebdTrjgPi zFFRLO%b;5m4KlUV&9prZ;`W)BI7nqGIY4xJig!##ReXQ%mAkB0%c%~})znD~0K2Tb zAb*ryg=k=CsjwnKD5_rWa@WkTw8^>@jGnB6| zm>BxU3m59ea;R>SeL1z>KuvJjN8w-iLVpq{&np0p{@Q%jv+G%RKX5~5ecJz(hUW_j zk;E9Pz@-vnGG;PeQ?WM;(t*V=mP*S)|J0!^Uex8Kf@LStUoI;f%2iEF(pVASlJt^{ zG#*YI8Af0(g*;o?+56ZQPShOYbSnF8>bY#DbGVNugX*WE^_?l0Nj!Pt91)m`J%5|3 z#b%KOxr`*O$2GG#=!8o;({eEWD9sC!L{Q zXz0iFo*iq$E3dIS+UflvIlWqG z0lf841bE*bX@z$rI(a!*P1k{0ntzn&Po0~;DqWkdA|RF|WC3vGkbAPsW3j*Bj>VOs=CA7?8R9dl61y z@x6vqS@siHeqDB2c5XXd$4{89&iwn*7hm?pV6ZPXF!FKN7oWmp3N#MkxPRND7SEvx zT}i~B^tu0>ehhE#w zdzo+B6r7jVmECju)}H#kFMp2uBJK+qWN!R!Hj#_Ge&&dbi}9%Ec;Aeh%1N8TMsc~( z{vO)6N0j2qq4QlV=x$=sR?n8#L7N+BiodY9HBSeMse|V6@LS9y=y7dDcQbY{sE%)m zqRApu`EYU-WCule#D4wGpkpKVbMh`xBJMofSp_v}O3h36TskXa{D0s&KaI3lO1&89 z^*&SH=yIaadt2(*>eQ-g_;i66TT#&F|)TkQUgmlYAjcR%BHYsZq zzj9R9vn;YTd&{>}Bn1BPilo}DNs+ksO1DkHw^Jlmc&t!;l`wgWeeSq&|J!=Xo7NF; z!Xsxc-$*@qk&acNHh)gSxtvo$S%F@nv#Lt-Tj;!2s(%|DRy)Kp-BlK_Is>rm@FcDD6m8=+~WOb7FVYb<3><}hAauG zQ-!!gy{ei!Rj`Y^!^*j%2F2?t4wLpM9tQ3kh1Rtp@tIiXY;+se37Id^oSdU2_(wNu>pvhpwhw1qwx`!*4; z3au#K&|cJ4qUnIu>?CvQHQ7MocD%Gbn4p&wNM0KOdL5Rb&GfTM;x_i%BT-ly-6TPe z8V&{O0M31YF@N1$D+4U|H%WqPo<^Z*wriA%@^mRc2VNB{^i|bHO~=^p$SaDpR+^}I zm5GATy^5RAwe>n%Xd!h(tTJr*O}Z3q>p02fq6lWT(+0k_Ez38&I|t+)`1iKN29A8A zo$oJ3ZBvr2c^`!Ewj7s`Ql-yJ;ec`^KfzTm4JvH30MqEAx~bbTjFde6n) zeLCtly*2>fk_}rH%<2+9=lCD@uyJFLBJGO;+85BinB#wpJW@*CnzcMHwdqN(;dT=_ zY?HXugvH|Ws3c8(r+Hf^`Wk!EV$7sc2YA|X5q~Z;!mtc#(Jf-Hfs+5CRsr}O=hcpd zE8|6tklUN$+KyDc_e$LhtCI^>%KSC+6KCAcsq6mj5?!F5;5r-Tdf+#b01}uzqhEy% zLdPmr9K3#wrD2h~j>$e71SnJ0cvxFtoMM%_#8qsULBt`gx_3d8f}75pA(V3;hCGFn zpMP%mJ_Kc8UdZ74g)#14O88P^Ke%rh&>(X(@4PA0A=rZ36UL|Xk_aCsGkFIo#?#Hw z4T>p?Jr^Qt#QB zhgYsa<#m(sU(=9Rf-oN2Y$#+2oz$6QX@5R(OCIt2(K*`f^>6ynkzV^ye&Ea#8eCS;dqWy*gUX&5m!MqKQa)A{9JMjuR z8!8G9GgYSEiWe^cho2>I3QiED{>&>oVC(01#srjr=Gto*U&(WNnVPa>XmBSHn12p+ zMdl>}XKk{eP)ip@9!_PYCFpQ3SH1;n_a%KRB0h8yqcgI?GcPgv-@<&qQ=8?l+T)F7 z{^pF>1nVk{Qs0?oUh&ZOT9Fm>i#m(Xic9QQNdCZ|Y(+|)?5eY>5fwkLdf!|%Lnta; zp9=_}P7T*Zs$|DcobBveUy~`aXMeuB%w>Pns50uTGU}`{>TY$^-P%zbZ*Vy&Jx6G( z!ybH%{0)d}s7p{Ktnc!>bNAOfHnYdvizICrUdr4}6)5z@OSLN0#=T5)Hg6Iti3^R8 z1Vil56L=p6C>1DDIlst7{r;H_|N5DAkb-pz%@4UhzM?rXFGh0?IB4oeA%C1D)vqmq znXE_HSubzOU8vi*RU(43edE1#=l=i1i+P*obj9B^x(a7kbZd*1oX*&}F=cD^JrNw( z1zZk;$(8RG^Haiw21_5HWG7DQxmsH^1pch8W~a%e3*2N8B2e?-v(Fj23e!3BMh&0= zpBBiBa}8kkoi*--Y&ms)%YTmZx;o5}4NNjW8>HzX^KPi4Wt-!zO0D|B!Wd>m0WS-d z#1JT1t&z3)9A<%=!@9*9T@HECh<9QU$0K+x-p*zi7Cb+aOq>s*s5czD8S1HZpCAv+ z2rwn@SX!+>0KELu>Q4Gup}RPT{OTLiuk4cvQ{ICXN{vW)&Bek|`001B3>$?B| delta 7195 zcmV+$9OUEAIL0`CABzY8Iv1i-0t4MWX;&M^vfud?4c8}e0T`(;o9WJ?-=X@ zB**vK5RarrOgxJ+Gh&Iszx~zH>nxIRlK0MeUXZ4j>guYl>guZMVc5Q$C*vYaleWB_ zrCE`8#Fw?Tr%wexisDL&aTMga2rtEr6hS6Mn210erxV$Ki^9)RLSdc^EjGM-s!pjhL?XvB&x0(4QL*_f7=I3?(uV?rjDckRH8rdL z>EY2YhbO^am|F)nHuAgGgj@3LSGXO$9*IFfzGz9b`}` z_M9?!_;5a?nmijjRs5vuPT>2%4s@ADQF;?5Q*k1Hr}GFJ9Nx|{m>5g}a1RnOl470% z9WT>N6zOM~gnvNuE&{j?qHq!v_$Y#80wjQ`11M&kp+sI}P?|Fb{_ziSJdb4-j>YQ< zvJIG&Va0*KzOa5i4L)@R3>JtaO?rRGEESV*3Orz30hQ66pkingr!aG>M))|vc_g)y{!eupU2mR&h-6U!F`?1b-Rw#xOlnwhi6#O9A^_YJAZSRY zlOfLA7A=DFwNe7`KB|^qX3k|FU)mbV3~wzrA057ur`7M z=A`Km8aim)jt*WQTahp*ImLuYyCt?n124BktMl<=A6kHBsr>mnyCM}zlc+42a@~^Y zs5XlcTZY|V4MgcEVD`IA_CV#zAeWlw6^X7g+mY;QrCJE@P7Y5F-y9yC9@a0?x_YL6 z<%^v~Y-*f3P5<6>t(5_n$#n=+xZT)jDXN;>3-Nsv(#Ik#n?9^~=0k1p`^;M(b|IeRazj;+JPo*lehk=R*Mc?DC ztPU?Md>74g*tw?**3S&YJe@d8XhcwA2TFDI5Kkr`Ei&jHBwOptPaDNty za8O!67dW0p0opuKOPr22m%x6Q^c={649>;%cK=!bInjTQzIMgURXDzam7T(|02HLi zQy^s+OIW@DCW!L1E4I<752D#sur1oaIL)`4umCDDw^>L#3LbC)+7-o}B4UikoP-)C zvlx#9A#nDtPc$UmVTkzQdhg@M97@cwDk+=wRITo7qG}yk4IZwfS{+J+cJS1c#%}*Q zdvoUY!e_qX@& z?>~Oj$B{CaMME?~F9UWU>s3?&O2y~y>M}~VIx5*3P1ZAM;Qyn}HGBBtKAji%w}wIu z?6q~P(aJTa7aHV?C;q<=riPNMfA+RC1tHtt1F7wjM?u~O=viTj%&7*HW^aJacDMVt z;)eE{kz|)l5K9r{VqeA_zE00wUS!HB3%@!VN^G%;DYQ-x(WkEJ@zNG0^ z0d5JV_nb4>h^5F-Me*)&q?8lrosA533@|N5pn5>F0l}tFg8l%|bfB?VfBzmIo`F^_ z>0ni;EvB#gFN`Hj6=x@}kK7)nkb5Bd9gV*Ojc0}?VJ7`PiM&B4(&6o_?ZfMe*0j}O zauzt*vn-5H8`ru!qbd)={Gh=WOZfV5>}f38q!i#5CX(?(_v& z45MKD`6kFFIa@_VIEvT=f3Vzpd2n)gR^}cRT6_1xaE~g=+%ts@+*8mz?s($gOVl};n9j1w#_f6_uTbAUa$HVFsY%4$rJm%mOpH9VP6ii7> zDyWrZ#c$vV3>}1me|yW#{swze=( zDZ~)|W8iTe#4|ka5OwHlRXCw~xc0DS0&p0kLJ6eL;hKpi(sSGRc1Rd_Fp9N750;M? zIFMq_4t^)E0wM%k<2*}5JL`i2Ei|Z32Ykw~)Xyo0Snx^kT7U<>>{-m7hFi{Q_-JwQK<`cLeGQ zZ2aJmkUhLO(huj*5I>v&q0_lk)2T8o#6(~o2_Ev_8O>LIp3n0gk5?eSY0CNwKY-?%+tTEm)ofeg)H%c@RH zfoSb2owT6`#aV3Zw;JFTDF+K00j_`(+h5WJk)p9y+W5GzQ44VGo~s6^sOv~QFBKOv zH8zIv^`Q6nUe&uys+z^SA~HuZ^OLkVqV{vJrZQQC23(nVfX7GDSrfcHZcAPTY1rU=UWwY z5ZWq1Xugl2lqLygw$A1S#|tqp$x)5QbSBim=*-$_%amQLm4oVBU5ivy>a5M@!LXiL#t5!op$nELB_h-%QP?#KG{`6& zSEb$>>T6h`Vt=R$#arN3{}4BMHYQitfI<)4p!WmUOL7rXQK?0_e*4>aPEg8pUP@8Q zw4~I5bVQLNPSQwPg-Oqt%|{WtgZgU*?*ZVw0pK@GkPWoF6e_f4QxcF!H(3hi!6eK$ z=cKgMzjclKa~qh+(JuAHwAEX6J>;Qjr?#P9FBJPYn12I8xTo{#=FUm$eE4hm{X|W3 z%OV9Eh3J`E_OMp{h8To2Qg6FMdNd>^*~P5=b8C%*_h<9`sy#5G|KKkNdIAd|m`8<` zV0{c%NAOS`!JTol=^VfCX~^S}5WO=4Z}-}T!<#DnbUa6>u8jPe&BpQI6xp33 z_)^~m>3=?rp6`JflK{7^&qo6zHxo|8aWz$~8FYD73YFVfAN}`)J%hWhu?Ew~c*g<& zfJQol;nRE2(ax4pP3_1!Q>ZhVj_|3ch6d_Zz)Jv)(XEm35NU6L?zYbTUcizQJ9b&M zN4h>x^m zmS1(z1!lSFPNUj!-YDOh`&b>3iW?`S@F}vn?9@`yAzuy68mD702O?R|p94R~dp>&t zKODID*pA3*tHQ)`>SrBQc3P%YiAWxXv`kC$RET6HOtQZam25>^rijSY#bR14rLb4O zUw@K^2q8u;#ORR_cS{iE?|8N6cL$>U{c#X!Blch>1T^uWCXWTXUI9BTB+*lP1eK4Z z=w5}SG`dua4To zsujHMwOVgz1x*xC`_1+%@u_wc(>Ph)dVk+EE-n7LwtG%vxvcfBX&fzuyu0T#UI1C! zI*Wr1=}b~co9!Fml{RhE8X;yntKp>$g6|3Y;H(W>*v17`2}xn0>$bD)-Ix@%S`v`L zCKaa)LFbJJqlN6YSr8#|Mz2JP8fLO2Or(x081lnj)?T3szEnwbIynBf>&ZuCF@Lt) zs)k2&9X)7{X=lH>rfGfWY?=Xd=rVVF8sG{Q@pibRUEkGdNl;z8B~R`};Ot z^~{Y|X(k~Njeqq^O}%3pA&9DTnSXHGrKFW!HWshm9-b;3xNIbgK(sN##vWuky5Byh z)N?QNQI~s~0o;a7jebgR@Lob!p(7?K9LnpUc6ASEo~R^Jm3YJW?y4*%d&EYcPd<-l z`u4H8vcW@X&nC_@Hwis=>0CqDoTPBv+Y~oJQc$|ojTCsCV;_b+3TscNzJJCX&*T1@ zce=K#1COn{bj^C*m6NIi+?;9ao8kGpHE5j=Yg)NSKUSL$bn2@Wxs_vTj*hJluhoKI zF~r6?u^9>+vRnu{{%m4w`WRKG%|K6}x$Yi<&{FVxg@!|2my#vPLG;X)!&emc1bsRi z4L!Fhsi(5ZaIvfCsdWdJ1AkT3?=5=MUCpP9S-9QapjpEd87k`nl>FjFj7krfw{OYFwY%ev7E`+B8zy=Vj;0Y8mvxjDbuobu(>`gSZjqB@R-V zit>wANAZrysEY6Jy>gfJYB|;6xtcmz0KhIQFPdamA({$WDy)bQimI2p9EVE(z1owm#+_2}c@=?-lT+JQpr-g%no3vokW#t5YIpoWp{2^W zs1b5Cm$qA{ zmWBSQLtDI5%S#2zPNctFRyKL7nwX@qBEBW*B^hZvW;im8z+4J>2|~`^$F^{y<`Ab7 z*2%6b^`kT| zbWSh5kp(On%75rcCL)s4V0BDJHTN7j3GtPQWc#_CvX2lQ8&x+3GO zW|ws~N^`0$Ef1BBXjh-(##0xMvyd!|OL5Do&`Jy74TU1WyYWaXywA|e%TZ^#y35j} zM1SJk(p9O|bZr2!Bq0lk>oD4X|9pDpi=3ZZyvSpKlYdZWdNnTHFUl(mquP*ekFC=1 zJuz&RmY7Cf-_G+%JU9uuVgBAEEoy-QnY+Ii;RF`n8#t9^FTwI_v-`1i+u}NY!qjr+ z-`B4Ax-WXYeX)r#jJvM*93~T>aR|rV4z+j&P3Za{{-n?SXY`|g%Rk{00jR5lV)r?I zaM%8Tx_=E+H+tNsXTQs{{DSUEz(KF8eus@le~$GJ$l#FVxLG%Nx5jCC$4R?{-YVd1+nQJ-2J^sb9O|s4L>G zfI())gJv_b$bV;!$ha7fI*uRBIGmjPCu|g#8-MNZp^bY)xvCrl-^GIV78Y%HYOqCHU>XK z4sk~9EE}$Z8a1Wnr8_CD6)}Er-IzvNETx|J^!o1&9)nN|M)(GloOR^7g553UVxc;^ z0DpaOLCWD`k?Of1VZW$RHMR-qmWvwI^2}{g)+m1Epsr_GWNY@8zfzG9_{S@fYPTju z;@$z>F$Mpx6p0aLEIZ;|a^OhrU!*_0pu(z98z=Gbx9B6E0#0fUR>W1(m}x9gU^ZLF zqrtZ-z{e=Tk{bN>AzQ0)c0*S)ILI_Ais3`W79_ zz#p$vl$J$nV1Ux!?2c)q(SB&VOJw zlj^oS=*>8E(~2EwygjngcH}10Qe|u_<4Wbs(VOa>uC~@rao-bkjJIv0%gerK#j8T2 zmF}-8gPzzdaI#Wzx;A^r+!b zpbp^72N=_hzcRpbf0JFg=I!e=&40z3rLq;e6d?bCip}~4!)8s#*zd?IinLdnsPLc( zI?;WUo6t3_Tia-mwnVH_lldjX6x?h%N%^7(rnb{2zR@nrH@&+W)xTo)1sI0%1rxj~kKwp!l4gJ=Fjw{kIk5Nw$4zjT#5r$<@i*6Bn4V3&BwSNl0?>MV=EL<5c zYJ}Y0um_95?Y&p(URa%6uu|r)nV)gwc1~Sydz`&Oj8ZJwd1;1?23-85%i=G;uE#5$aN2`YxynEtTn0zw_aD&*@<)5AXwZchotJC03z&(1u& zat$i4n~eW@i@Xx^^4Ml0PfO^e&Kye1Cc{BRumWHwULi$B zB|X4Qm8rMljTOM*l>|<~34+w0dDRJQ{rozefb#uZdkw=`c~0+{Q$c-gh#}GqS=nFQfcVVZPt0y&j?3<4te= z=8V_`>ne;=-*;(Vjj`x;EGy_2brzo%m)Nh6{DD8&ij+D_Sf`^SDt?{BnhB9*yNO4=~Il)0OkQRo}1YE`I>dzt2J-Xv7c92y}B zW;8%g;C&dNRG>)Z`~n>Ht9e@dn|U@s3N|PcqR;*D?bV5SXPk4uK~p~p;Vh|sqYKPr zBf`#ld4E%?NZrP*@;;pH8}Iu&?@btcDF&uFy&AzZx(cUPblr`WoKBFsF=cD^{Tduc z2V4$=@s;lu^K~iA#0wU*4ewdORm|GBRkbkE0%)8l-mTivLQMKv|3uBlO1-ztV z5<{S5wMN#a&zJ>n4(k?cbUEZjBi@Nc9FO3&csrY6Sn&KvGI2hLqTX=qW~isuUPm67 z5nxK*vz{yF)LOov>T(siW@2aIyq)Dx9)i`{ci)i;d_3d^a~MeTvwBA)zZIn2anAXU z`b;=DdL<%ECvz@Ia}RbR>Q3Y?<%)g~(>q2KVEr4tU`al7+Gv0=6!*7&nO_R_!W8e= dmMe@09ltzKA9FY1%flLs`9E;pK)BIt005|l`=9^- diff --git a/node_modules/gulp/node_modules/semver/semver.js b/node_modules/gulp/node_modules/semver/semver.js index 22538cf..a3413d7 100644 --- a/node_modules/gulp/node_modules/semver/semver.js +++ b/node_modules/gulp/node_modules/semver/semver.js @@ -246,7 +246,7 @@ function valid(version, loose) { exports.clean = clean; function clean(version, loose) { - var s = parse(version, loose); + var s = parse(version.trim().replace(/^[=v]+/, ""), loose); return s ? s.version : null; } @@ -369,7 +369,7 @@ SemVer.prototype.inc = function(release) { // If this is already a prerelease, it will bump to the next version // drop any prereleases that might already exist, since they are not // relevant at this point. - this.prerelease.length = 0 + this.prerelease.length = 0; this.inc('patch'); this.inc('pre'); break; @@ -562,6 +562,9 @@ Comparator.prototype.parse = function(comp) { throw new TypeError('Invalid comparator: ' + comp); this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; + // if it literally is just '>' or '' then allow anything. if (!m[2]) this.semver = ANY; @@ -767,6 +770,11 @@ function replaceCaret(comp, loose) { return comp.replace(r, function(_, M, m, p, pr) { debug('caret', comp, _, M, m, p, pr); var ret; + if (pr) { + if (pr.charAt(0) !== '-') + pr = '-' + pr; + } else + pr = ''; if (isX(M)) ret = ''; @@ -777,30 +785,14 @@ function replaceCaret(comp, loose) { ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0'; else ret = '>=' + M + '.' + m + '.0-0 <' + (+M + 1) + '.0.0-0'; - } else if (pr) { - debug('replaceCaret pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p + pr; - else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + (+M + 1) + '.0.0-0'; - } else { - if (M === '0') { - if (m === '0') - ret = '=' + M + '.' + m + '.' + p; - else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + M + '.' + (+m + 1) + '.0-0'; - } else - ret = '>=' + M + '.' + m + '.' + p + '-0' + - ' <' + (+M + 1) + '.0.0-0'; - } + } else if (M === '0') + ret = '=' + M + '.' + m + '.' + p + pr; + else if (pr) + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0-0'; + else + ret = '>=' + M + '.' + m + '.' + p + '-0' + + ' <' + (+M + 1) + '.0.0-0'; debug('caret return', ret); return ret; diff --git a/node_modules/gulp/node_modules/semver/semver.min.js b/node_modules/gulp/node_modules/semver/semver.min.js index 4cee256..04e4abb 100644 --- a/node_modules/gulp/node_modules/semver/semver.min.js +++ b/node_modules/gulp/node_modules/semver/semver.min.js @@ -1 +1 @@ -(function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=H;e.SEMVER_SPEC_VERSION="2.0.0";var r=e.re=[];var t=e.src=[];var n=0;var i=n++;t[i]="0|[1-9]\\d*";var s=n++;t[s]="[0-9]+";var a=n++;t[a]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var o=n++;t[o]="("+t[i]+")\\."+"("+t[i]+")\\."+"("+t[i]+")";var f=n++;t[f]="("+t[s]+")\\."+"("+t[s]+")\\."+"("+t[s]+")";var u=n++;t[u]="(?:"+t[i]+"|"+t[a]+")";var c=n++;t[c]="(?:"+t[s]+"|"+t[a]+")";var l=n++;t[l]="(?:-("+t[u]+"(?:\\."+t[u]+")*))";var p=n++;t[p]="(?:-?("+t[c]+"(?:\\."+t[c]+")*))";var h=n++;t[h]="[0-9A-Za-z-]+";var v=n++;t[v]="(?:\\+("+t[h]+"(?:\\."+t[h]+")*))";var m=n++;var g="v?"+t[o]+t[l]+"?"+t[v]+"?";t[m]="^"+g+"$";var w="[v=\\s]*"+t[f]+t[p]+"?"+t[v]+"?";var d=n++;t[d]="^"+w+"$";var y=n++;t[y]="((?:<|>)?=?)";var b=n++;t[b]=t[s]+"|x|X|\\*";var $=n++;t[$]=t[i]+"|x|X|\\*";var j=n++;t[j]="[v=\\s]*("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:("+t[l]+")"+")?)?)?";var k=n++;t[k]="[v=\\s]*("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:("+t[p]+")"+")?)?)?";var E=n++;t[E]="^"+t[y]+"\\s*"+t[j]+"$";var x=n++;t[x]="^"+t[y]+"\\s*"+t[k]+"$";var R=n++;t[R]="(?:~>?)";var S=n++;t[S]="(\\s*)"+t[R]+"\\s+";r[S]=new RegExp(t[S],"g");var V="$1~";var I=n++;t[I]="^"+t[R]+t[j]+"$";var T=n++;t[T]="^"+t[R]+t[k]+"$";var A=n++;t[A]="(?:\\^)";var C=n++;t[C]="(\\s*)"+t[A]+"\\s+";r[C]=new RegExp(t[C],"g");var M="$1^";var z=n++;t[z]="^"+t[A]+t[j]+"$";var P=n++;t[P]="^"+t[A]+t[k]+"$";var Z=n++;t[Z]="^"+t[y]+"\\s*("+w+")$|^$";var q=n++;t[q]="^"+t[y]+"\\s*("+g+")$|^$";var L=n++;t[L]="(\\s*)"+t[y]+"\\s*("+w+"|"+t[j]+")";r[L]=new RegExp(t[L],"g");var X="$1$2$3";var _=n++;t[_]="^\\s*("+t[j]+")"+"\\s+-\\s+"+"("+t[j]+")"+"\\s*$";var N=n++;t[N]="^\\s*("+t[k]+")"+"\\s+-\\s+"+"("+t[k]+")"+"\\s*$";var O=n++;t[O]="(<|>)?=?\\s*\\*";for(var B=0;B'};H.prototype.toString=function(){return this.version};H.prototype.compare=function(e){if(!(e instanceof H))e=new H(e,this.loose);return this.compareMain(e)||this.comparePre(e)};H.prototype.compareMain=function(e){if(!(e instanceof H))e=new H(e,this.loose);return Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)};H.prototype.comparePre=function(e){if(!(e instanceof H))e=new H(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return Q(t,n)}while(++r)};H.prototype.inc=function(e){switch(e){case"premajor":this.inc("major");this.inc("pre");break;case"preminor":this.inc("minor");this.inc("pre");break;case"prepatch":this.prerelease.length=0;this.inc("patch");this.inc("pre");break;case"prerelease":if(this.prerelease.length===0)this.inc("patch");this.inc("pre");break;case"major":this.major++;this.minor=-1;case"minor":this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var r=this.prerelease.length;while(--r>=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1)this.prerelease.push(0)}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=J;function J(e,r,t){try{return new H(e,t).inc(r).version}catch(n){return null}}e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,r){var t=K.test(e);var n=K.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:er?1:0}e.rcompareIdentifiers=U;function U(e,r){return Q(r,e)}e.compare=W;function W(e,r,t){return new H(e,t).compare(r)}e.compareLoose=Y;function Y(e,r){return W(e,r,true)}e.rcompare=er;function er(e,r,t){return W(r,e,t)}e.sort=rr;function rr(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=tr;function tr(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=nr;function nr(e,r,t){return W(e,r,t)>0}e.lt=ir;function ir(e,r,t){return W(e,r,t)<0}e.eq=sr;function sr(e,r,t){return W(e,r,t)===0}e.neq=ar;function ar(e,r,t){return W(e,r,t)!==0}e.gte=or;function or(e,r,t){return W(e,r,t)>=0}e.lte=fr;function fr(e,r,t){return W(e,r,t)<=0}e.cmp=ur;function ur(e,r,t,n){var i;switch(r){case"===":i=e===t;break;case"!==":i=e!==t;break;case"":case"=":case"==":i=sr(e,t,n);break;case"!=":i=ar(e,t,n);break;case">":i=nr(e,t,n);break;case">=":i=or(e,t,n);break;case"<":i=ir(e,t,n);break;case"<=":i=fr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=cr;function cr(e,r){if(e instanceof cr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof cr))return new cr(e,r);this.loose=r;this.parse(e);if(this.semver===lr)this.value="";else this.value=this.operator+this.semver.version}var lr={};cr.prototype.parse=function(e){var t=this.loose?r[Z]:r[q];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1];if(!n[2])this.semver=lr;else{this.semver=new H(n[2],this.loose);if(this.operator==="<"&&!this.semver.prerelease.length){this.semver.prerelease=["0"];this.semver.format()}}};cr.prototype.inspect=function(){return''};cr.prototype.toString=function(){return this.value};cr.prototype.test=function(e){return this.semver===lr?true:ur(e,this.operator,this.semver,this.loose)};e.Range=pr;function pr(e,r){if(e instanceof pr&&e.loose===r)return e;if(!(this instanceof pr))return new pr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}pr.prototype.inspect=function(){return''};pr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};pr.prototype.toString=function(){return this.range};pr.prototype.parseRange=function(e){var t=this.loose;e=e.trim();var n=t?r[N]:r[_];e=e.replace(n,kr);e=e.replace(r[L],X);e=e.replace(r[S],V);e=e.replace(r[C],M);e=e.split(/\s+/).join(" ");var i=t?r[Z]:r[q];var s=e.split(" ").map(function(e){return vr(e,t)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new cr(e,t)});return s};e.toComparators=hr;function hr(e,r){return new pr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function vr(e,r){e=dr(e,r);e=gr(e,r);e=br(e,r);e=jr(e,r);return e}function mr(e){return!e||e.toLowerCase()==="x"||e==="*"}function gr(e,r){return e.trim().split(/\s+/).map(function(e){return wr(e,r)}).join(" ")}function wr(e,t){var n=t?r[T]:r[I];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(mr(n))s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+"-0"+" <"+r+"."+(+t+1)+".0-0";return s})}function dr(e,r){return e.trim().split(/\s+/).map(function(e){return yr(e,r)}).join(" ")}function yr(e,t){var n=t?r[P]:r[z];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(mr(n)){if(r==="0")s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else s=">="+r+"."+t+".0-0 <"+(+r+1)+".0.0-0"}else if(i){if(i.charAt(0)!=="-")i="-"+i;if(r==="0"){if(t==="0")s="="+r+"."+t+"."+n+i;else s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0-0"}else{if(r==="0"){if(t==="0")s="="+r+"."+t+"."+n;else s=">="+r+"."+t+"."+n+"-0"+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+"-0"+" <"+(+r+1)+".0.0-0"}return s})}function br(e,r){return e.split(/\s+/).map(function(e){return $r(e,r)}).join(" ")}function $r(e,t){e=e.trim();var n=t?r[x]:r[E];return e.replace(n,function(e,r,t,n,i,s){var a=mr(t);var o=a||mr(n);var f=o||mr(i);var u=f;if(r==="="&&u)r="";if(r&&u){if(a)t=0;if(o)n=0;if(f)i=0;if(r===">"){r=">=";if(a){}else if(o){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}e=r+t+"."+n+"."+i+"-0"}else if(a){e="*"}else if(o){e=">="+t+".0.0-0 <"+(+t+1)+".0.0-0"}else if(f){e=">="+t+"."+n+".0-0 <"+t+"."+(+n+1)+".0-0"}return e})}function jr(e,t){return e.trim().replace(r[O],"")}function kr(e,r,t,n,i,s,a,o,f,u,c,l,p){if(mr(t))r="";else if(mr(n))r=">="+t+".0.0-0";else if(mr(i))r=">="+t+"."+n+".0-0";else r=">="+r;if(mr(f))o="";else if(mr(u))o="<"+(+f+1)+".0.0-0";else if(mr(c))o="<"+f+"."+(+u+1)+".0-0";else if(l)o="<="+f+"."+u+"."+c+"-"+l;else o="<="+o;return(r+" "+o).trim()}pr.prototype.test=function(e){if(!e)return false;for(var r=0;r",t)}e.outside=Tr;function Tr(e,r,t,n){e=new H(e,n);r=new pr(r,n);var i,s,a,o,f;switch(t){case">":i=nr;s=fr;a=ir;o=">";f=">=";break;case"<":i=ir;s=or;a=nr;o="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(xr(e,r,n)){return false}for(var u=0;u)?=?)";var b=n++;t[b]=t[s]+"|x|X|\\*";var $=n++;t[$]=t[i]+"|x|X|\\*";var j=n++;t[j]="[v=\\s]*("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:("+t[l]+")"+")?)?)?";var k=n++;t[k]="[v=\\s]*("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:("+t[p]+")"+")?)?)?";var E=n++;t[E]="^"+t[y]+"\\s*"+t[j]+"$";var x=n++;t[x]="^"+t[y]+"\\s*"+t[k]+"$";var R=n++;t[R]="(?:~>?)";var S=n++;t[S]="(\\s*)"+t[R]+"\\s+";r[S]=new RegExp(t[S],"g");var V="$1~";var I=n++;t[I]="^"+t[R]+t[j]+"$";var T=n++;t[T]="^"+t[R]+t[k]+"$";var A=n++;t[A]="(?:\\^)";var C=n++;t[C]="(\\s*)"+t[A]+"\\s+";r[C]=new RegExp(t[C],"g");var M="$1^";var z=n++;t[z]="^"+t[A]+t[j]+"$";var P=n++;t[P]="^"+t[A]+t[k]+"$";var Z=n++;t[Z]="^"+t[y]+"\\s*("+w+")$|^$";var q=n++;t[q]="^"+t[y]+"\\s*("+g+")$|^$";var L=n++;t[L]="(\\s*)"+t[y]+"\\s*("+w+"|"+t[j]+")";r[L]=new RegExp(t[L],"g");var X="$1$2$3";var _=n++;t[_]="^\\s*("+t[j]+")"+"\\s+-\\s+"+"("+t[j]+")"+"\\s*$";var N=n++;t[N]="^\\s*("+t[k]+")"+"\\s+-\\s+"+"("+t[k]+")"+"\\s*$";var O=n++;t[O]="(<|>)?=?\\s*\\*";for(var B=0;B'};H.prototype.toString=function(){return this.version};H.prototype.compare=function(e){if(!(e instanceof H))e=new H(e,this.loose);return this.compareMain(e)||this.comparePre(e)};H.prototype.compareMain=function(e){if(!(e instanceof H))e=new H(e,this.loose);return Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)};H.prototype.comparePre=function(e){if(!(e instanceof H))e=new H(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return Q(t,n)}while(++r)};H.prototype.inc=function(e){switch(e){case"premajor":this.inc("major");this.inc("pre");break;case"preminor":this.inc("minor");this.inc("pre");break;case"prepatch":this.prerelease.length=0;this.inc("patch");this.inc("pre");break;case"prerelease":if(this.prerelease.length===0)this.inc("patch");this.inc("pre");break;case"major":this.major++;this.minor=-1;case"minor":this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var r=this.prerelease.length;while(--r>=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1)this.prerelease.push(0)}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=J;function J(e,r,t){try{return new H(e,t).inc(r).version}catch(n){return null}}e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,r){var t=K.test(e);var n=K.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:er?1:0}e.rcompareIdentifiers=U;function U(e,r){return Q(r,e)}e.compare=W;function W(e,r,t){return new H(e,t).compare(r)}e.compareLoose=Y;function Y(e,r){return W(e,r,true)}e.rcompare=er;function er(e,r,t){return W(r,e,t)}e.sort=rr;function rr(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=tr;function tr(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=nr;function nr(e,r,t){return W(e,r,t)>0}e.lt=ir;function ir(e,r,t){return W(e,r,t)<0}e.eq=sr;function sr(e,r,t){return W(e,r,t)===0}e.neq=ar;function ar(e,r,t){return W(e,r,t)!==0}e.gte=or;function or(e,r,t){return W(e,r,t)>=0}e.lte=fr;function fr(e,r,t){return W(e,r,t)<=0}e.cmp=ur;function ur(e,r,t,n){var i;switch(r){case"===":i=e===t;break;case"!==":i=e!==t;break;case"":case"=":case"==":i=sr(e,t,n);break;case"!=":i=ar(e,t,n);break;case">":i=nr(e,t,n);break;case">=":i=or(e,t,n);break;case"<":i=ir(e,t,n);break;case"<=":i=fr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=cr;function cr(e,r){if(e instanceof cr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof cr))return new cr(e,r);this.loose=r;this.parse(e);if(this.semver===lr)this.value="";else this.value=this.operator+this.semver.version}var lr={};cr.prototype.parse=function(e){var t=this.loose?r[Z]:r[q];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1];if(this.operator==="=")this.operator="";if(!n[2])this.semver=lr;else{this.semver=new H(n[2],this.loose);if(this.operator==="<"&&!this.semver.prerelease.length){this.semver.prerelease=["0"];this.semver.format()}}};cr.prototype.inspect=function(){return''};cr.prototype.toString=function(){return this.value};cr.prototype.test=function(e){return this.semver===lr?true:ur(e,this.operator,this.semver,this.loose)};e.Range=pr;function pr(e,r){if(e instanceof pr&&e.loose===r)return e;if(!(this instanceof pr))return new pr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}pr.prototype.inspect=function(){return''};pr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};pr.prototype.toString=function(){return this.range};pr.prototype.parseRange=function(e){var t=this.loose;e=e.trim();var n=t?r[N]:r[_];e=e.replace(n,kr);e=e.replace(r[L],X);e=e.replace(r[S],V);e=e.replace(r[C],M);e=e.split(/\s+/).join(" ");var i=t?r[Z]:r[q];var s=e.split(" ").map(function(e){return vr(e,t)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new cr(e,t)});return s};e.toComparators=hr;function hr(e,r){return new pr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function vr(e,r){e=dr(e,r);e=gr(e,r);e=br(e,r);e=jr(e,r);return e}function mr(e){return!e||e.toLowerCase()==="x"||e==="*"}function gr(e,r){return e.trim().split(/\s+/).map(function(e){return wr(e,r)}).join(" ")}function wr(e,t){var n=t?r[T]:r[I];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(mr(n))s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+"-0"+" <"+r+"."+(+t+1)+".0-0";return s})}function dr(e,r){return e.trim().split(/\s+/).map(function(e){return yr(e,r)}).join(" ")}function yr(e,t){var n=t?r[P]:r[z];return e.replace(n,function(e,r,t,n,i){var s;if(i){if(i.charAt(0)!=="-")i="-"+i}else i="";if(mr(r))s="";else if(mr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(mr(n)){if(r==="0")s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else s=">="+r+"."+t+".0-0 <"+(+r+1)+".0.0-0"}else if(r==="0")s="="+r+"."+t+"."+n+i;else if(i)s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0-0";else s=">="+r+"."+t+"."+n+"-0"+" <"+(+r+1)+".0.0-0";return s})}function br(e,r){return e.split(/\s+/).map(function(e){return $r(e,r)}).join(" ")}function $r(e,t){e=e.trim();var n=t?r[x]:r[E];return e.replace(n,function(e,r,t,n,i,s){var a=mr(t);var o=a||mr(n);var f=o||mr(i);var u=f;if(r==="="&&u)r="";if(r&&u){if(a)t=0;if(o)n=0;if(f)i=0;if(r===">"){r=">=";if(a){}else if(o){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}e=r+t+"."+n+"."+i+"-0"}else if(a){e="*"}else if(o){e=">="+t+".0.0-0 <"+(+t+1)+".0.0-0"}else if(f){e=">="+t+"."+n+".0-0 <"+t+"."+(+n+1)+".0-0"}return e})}function jr(e,t){return e.trim().replace(r[O],"")}function kr(e,r,t,n,i,s,a,o,f,u,c,l,p){if(mr(t))r="";else if(mr(n))r=">="+t+".0.0-0";else if(mr(i))r=">="+t+"."+n+".0-0";else r=">="+r;if(mr(f))o="";else if(mr(u))o="<"+(+f+1)+".0.0-0";else if(mr(c))o="<"+f+"."+(+u+1)+".0-0";else if(l)o="<="+f+"."+u+"."+c+"-"+l;else o="<="+o;return(r+" "+o).trim()}pr.prototype.test=function(e){if(!e)return false;for(var r=0;r",t)}e.outside=Tr;function Tr(e,r,t,n){e=new H(e,n);r=new pr(r,n);var i,s,a,o,f;switch(t){case">":i=nr;s=fr;a=ir;o=">";f=">=";break;case"<":i=ir;s=or;a=nr;o="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(xr(e,r,n)){return false}for(var u=0;uieiwFRULD5qJ1FafsbK5rZugDyaBZiV9r*|JtGOS5lw{e?SZP#rhD;b)G zEZQ{5fS@0-)Zc!)z=8xRN_MU{p0S91VP9A*K(?oO9LO+<+uVH!r)_zk@?_e&PR{d) zGsc|c?2-r4+1k>e9=}TyAu~X6m$Mr1&5-ww_TQcCAAULdxWD%W9*zz^yl2kKUcc9O zhBv-w3C4SZv++cYB#bfNjMu=MCjJoG_<9A8&X6GdVpyf378Dgv#|FcfY;re(Fx>0Z6+Ol93Q?0<>+%!#Esuz{5bzuSf24ml#rFNQq&jID!gCP~n&n z$Bdi}egtoJjn8igeWL}Qo_b2+tRit%k$A0G@acj%HzOoSCLS8$IcjvH9zf_d2>tAM z7oM}JS#Lpy8+Lk{K^Q#@fQP13*^us>v^v)UZVLhTgt$j_LBXB*t~+8Q((H_|XA?&L zzMKC!KRuIxy!9Y8 zP8+7!rz!Te>(Esmtfovk{Blxw@{Z{4n&_@dxYAKLi z0x>baZ5{H9{kyb{lpW{7aTWIob2hjC){+iL(t%Osa8lLvmDywzP0TA6Ybr6x%q<@{)L2pK{ZI8k)$2iRbHej zX(67IdhbcX`-+6CRT8e2C43+WAJ9Nr?TA*ZcAAJb61|39=k-oJeC>H^6WkEv*Ao~2 zRc!^}g7;EiWSsptG&^VO$2RXs_d)MpawMSa3QcY5eQ8?w=m%*%UMa&(d;Mje-CR)DmZyDE**ZyT9m=}+?Cju14ckr%!eTZS_&>J?e`qq_Y3RG zp|TyVuG!U#czhvet}V}FPS>!NgqKMeD^-iswOAHITU|(v6na-%U(NGuM<;j7d8Xuh z&z#+7RbH7KskB^XUNd2kTtji-tkzR+)Yl6%&P9e6=~*?1M7{Gvlro>&z>k6htZ{0j z|A*86)-L1N;rbU8Fkp-)g7LQmtGIT!{%uz69Eruo+ng}YhuP?QWT^r6zzpVn#bpS8piy5Yb&;gDe0v z#6^=?9?(V9v$qejrMhF-%4<(NL2pG_2wy2rJk1NXfWF?t9`r(J<{awO>UPC0h_G%T zmKO`&M#TB`85a(1JQXyU0N#7Kz}`RrZFjq_Q7_H2S-bBpv|X?s{5+C_aMUD^DeN=WxyKFCpdQJRNHch`^LxydW6!#BH?TN|};TGFTpgNMc*lScT zwkT@o!8s@qPD7w(zp3K!D=YW&-Tpt!}O z?)D&t2RYgv@Ew6ezAIqR2aQC7O23yH{H`@9$_VTkZfOVmqon-9IB3~9L=CEztZ!8- z_gBgPS7j!WCUP~MQIc^{GH_9w@ekAv#=wvzLNZ|y3(>Yog`y}sF3~At#Y=rVF^W?f zD2dXND8EOdXb^cJS!~IRm(9`RT?|tsS!fZ5tB7}yn15xNMVzf7#^ny=G0^)Ky}ycn zL(^YK&Jv40S*bbGszbwIkxy6ZuE>Myl;swAPUPrMb)`6@-AT~yg!N<)GIeCJOWg*+ zH)?QapxMl?qEbG>IjRy6r5fe9J6jRcK+Cfa%h*3<_8fv++H5_A-lnY-b0&5y9 zF!E^#p4?M8hd35k4h@7}Y4!78AZiCd(R2XxqntM%+koFbx6w5A!A+Q*4-VdKs~^nx zH55*mF%oogz*(5%SZ5~|rqsgw^5b!@k|)SiPLm4o;7s@bvh# z?B?iP`J~fiP&nH@P#RU4I!79N3n=6sbKEKntk$Q=mvovW??giH!Zu9TSR`%iv+a3y z9NYmchb?!!56x&ccKQw-Cka`cDi<|3KYmmzld^VdtH^ou*rw93#sj+{TRua#>M1tD zU1gxkO2tbZi_mr_HUo!#e8E|2t)g_rDoO>OMjDn-a70) zufXQ;mpy;6>Jp(Ul$maC8bXa0O{^w27J3bs`K^puvm_|uYSN~TYmt6m z>L@`bYrrEgqTHznT5-Ff=viUG3SXIviI(G%mliI8=JNtpIpQn9H60$y-zJ_iLTl^P zkQWzU!}6-~J(jL76NNN)gmLEza><6^wQuLoI_zlDIjO_;CY^U0RwSDD!Y!RcZ}()a zYGwt4^56<5->9`$dKO9TX^H}-7vMw2veh}dv0(~zhIwMf@z(Mp7_T<%huS#AR>iurG7e$LLRHgI-PJe?I!m!fjT%u5N^!txcL z&(Yeq$t@RqP}|$s13Gt*+v+9pbEo9Hs9MgedQv{DF!NUP+Gdu5Z$=8IPn4y4#|b{#iV7oO0k)@3?g?1i4QLax44Z)9=+y^^oYWXs9t z{~&tz>!NqR6uplay>H(iy+_zCR$DfE0fmc zN~1ZC(3abx{3g>35=Y`YGasr))r)DJ}%6KEnBX2Vc1 z;z5-#Q}-ce;QDO^T|mQDMg#tbDkcTBkG{b&YYFB$lCqk?vN4^e6>>cZu}DhU*s3VS zZeYdel44Y^4CUVcVS;ZJOO7jH$ED+UlFqb~cY;pTNtIvqN))xl87ol5vLXjpSd_uX~hE)gsY*Ms{ z>DqG$cFx?i`BNVR7H_Qay@J@OwbesG@2~fTIUmchm~?n?R=^X?!WOtFJC=P~)n*Dz zdAU>E(@OJhoR8(i+#ptzTiBC8QSfD$O+%isJF73c6P5c=MvW0dmM%XlQiZw2Tws%Q zcci4>W2<~g&hi2n4lIU)RSdhtkmNE8&pA7`n2xR6vhpPy zR7@*GR6mQgY%bI!U8vFB7W6MuG4%1?F~Qn6oa)lJe4z!D2~x(2az|0_6qM_3v7Wul zGYMKHH(*H1Z_UCeX+cO@a5e@(ExaYzb)KmY1t`q8gI5yEBzg{sp6>{IA$eY|w~>G; z_&A@K@9iK;=1V$!4Di^v?}HcY1dCV%o$)YbDgNL_4TopCA&ATaDikqZ*7%YpwP{kI z(dX#MzL|kdtTLX~%me!NMp{tJ=V^u8-P+2)FJ`8?bBt0Irs>v}zlNt$0LnKx`n@CW zlg34`%W7cHzdm>MBd%<>_%5XQ$kcp)IwH{EX+lR2iveBTJb>^13mv0xmF6k{0J6wt AAOHXW literal 3304 zcmVWhsiwFQZ7ot-F1I1cxciXlO{wt17PHI)Q>vX#xt`)|o&9XIHUz04`>bO0M zLdQxJNu{W~)b@V+1xQGuWGPLz5BKDpSOOn_AOL~@?d~j#d>O=1m)nbA)|K}Ok7u3h z_&f_aW6X-rF1atQtu0L&@Vg`yGKC>-b56tUdEj01&WLxG^QJXy z@KK%q9(Q;&8Awd`ZKX(^5-ij7{aR+#ru2srQiH?J@r8DXwUWtNIjY z>+&8ZsrRH|ihY`5Uz-k1<-l%AmBBBkg(dF@ch`iwDshK|JJbR4_ik?NBN{lu0c5n1 z^H58H=n^;*@!QTJzu3P^x`^yq7nZHKPnfm2{kN8MK#~q}RSu_BU5^QHTmcwLz97Jh zJc>V&l6y3;S5fkXq2yjo$vs2KH>l(%E$J&s`kL$TqNe0~0=%yP3?)Aj;A7q5T@~T> z=JFFEzYy|E1M;GRd`-yLmGxBxFLTe^xZc;b^}aUN`zNk<^ZDivTKH!Y{u$LEdATHQ zz`n8~Wl3Y;DXI6CB)qLixN4JdwJzZuNqC0~q}`6gYS+$U(M8ZpICWm`MD9z+QHS7$ zn7o|Y_^-NFAg=fz@kGkmPi}s4c7E#ep0pSG{E}k zR|-9fvM>Z;H(nT=v!6?0Kf|!l!X*1iz2tJ_SPpKuNCB3!`yuxt_DjkB%XhIK@#_;V z;MgwswRUI(-U*^qdXbOyz$;A}gmIi=Ss-l^%3U6&yu;xbC)q1SC`$>x0aZjQMG!%l zEaY6ow;i;@F%0hu0WPo(B4vio32E1{9B!}B5nVYC(yAi)%%v?|1d(cz$_PGy8Lzwc z;M$Y^ylZ&Hc2RI-KVB0pUwF5S>&I*FG8W8;^$jik@;Fqk!#pETrNO14EL+Uk?qHk45EyZb{P!4 z$X?yfgOGO}N7(fp=2v{0-UgUa;mL=kSg?_IHUjEuxd9V;&UX7Y#Ekpp&R$9v`%p z>WN`0uPyNiy%n+$-YQQ#&I+c0p+3VFdLuM*x;nJ_eX$E7j9Z5F&4M=$QFeXCg+&KX zWf+zK)_cCf+CTudzg^d8kYwq+JG57NU9ca#ER>`2u&0AQpo1R#2a(7l+400hh7VMI zR8B}UZLeItCw?u9reCqn!m>$<`^8#$qGCkY#c|@RiXG0MP7% zN*=$l@~kf>{a{vlzvVRmWgB`IIPt~Dsq2%H&qxeoS6iToos(7JI54XT!`uT?4cSIPfZWhRm)GBsVU zB;%rF;G#C;AE+I?149}M$%FwGqH98hLX;Jk=#{?WrM|rg#VHMxL}^Hr-y=~ph`f+2 zGUP?;%hB(<=%!GzzyJqr;2i|>FDx~{X&V@~JHR8rdj{TX!*6K(h2$(Y@Nui=OsftB zg8`ql>aO7ab;2?Oo)H}FsjdxOI-LZaPMA+d0aGoDnd&x(zEPuFBh8k7DwMJj&QX@P=?{N=2cgwf-P3AFN_LDH}qzWW7Kj=JLn!iV)yu^tmde%d{j5-7sfUl%3M{Z z`bga+KBq2`Rvij`x|%edI}zGgKNnIVc6Thy?1mxME7?W!Fq>FIi`qmQEV{*2&3xZ( z!OCE(bz>Dd-)zTJc-45|lw<3?ai<~TJDqU2p)H8slIq{G`^r8#S5@UBHExRKT z*kv?qjmEu@RQE#Cx)+Qahm@-?N>mU346m=2@RvS))^<72DL0c^MmN6?u~%xD_Fxu3 z?iEd}d2Fn7Z0GYE5%WN(lgHJhO_kIt`M%Img7T;Vi@+PjPDN15t%bs~Vg)U>$}b!` zmQ7Y#*+g0{3tFXhSAuIgd@FvNcuEgFn15VeTxhxFHRD@MNuQ@`5c;Cf^LaPwT|q3F z6uh$S{aL3SO?xMG+TOJHM$?KwbDr6yap;>lS<8lL!JsVIV&ogO_e#qm)SRYBV0r^C zQkJ&I=*C8#fCH?T5Zf|saoXV2xeHYdFXJ*TrEG3&^SP*$o5m)6IEq>abmp?x!ptxm ztfH9zhUVw&oN@za7sbw-T-L`W|g(IqPSdK)L=F)^NkTkE!8K~?Z4E(t#UPx#(v6Adt zcAzdYq5iDPw4BHZ9IHjHzASHKvS7HCuZ(2F$mjpUd-o4{?|#jD@6mf-|F7O#&>a92 zD&OzPHip`itH-+C&}BilZKT(FFu3hL|3`sBOiijU9@gLs^a~Pixm2M@KMIM}YhcswJZ42uFet+_TVT*5 z3183|o-NrBDX|^thZ)4vuwdH-p9y7GSD_b0G{#WgFm!^e7_l{`k(s@S7?^%rQCCn( zmfnE>f$~X#_RuzX02qR~_N1(CMA^72W)--egjgg+N@PSzaZVXNx+EXfb5>cEyqoqc z)2mm)^h?j{#l2ZC>-oK~mnggHgd%D=CQ_uz(kkOYWxQAmVQ5HD4x8C_T$7(Ek}}q; zEo=EXW=7V@8cvu{VOS2z)PLW>JQHdVjmH$bUD$O{X~#wJnmpJcVNK8T24v=ez~Xyw z{3b)})CzuA(6{3IBJarML`-|U=wh(9TA2b@Wi7Q&yE>l&LtgF_H^Vaj#+^^(G{3W~ zD7P{vfu!KcAe{v~Wp_r!b|)$~u#8GJq^w=HR-}sj-gJfK+uf0pevd``p&|aTek;Wv zXrBsQASqR^{VM6LL`{a%<iWjvB7j~+|QL?`$5JuTtxY^*vt79o}?>0 zx=n-1Y9?F{Z#rYljqXgR#`P;SK*orS6mmx)cM9Y~_hwJtWT^zL;u}~<$Lq|4Fz$d$ zI?%O)pbp+&>{?IMPZP+^Scp^tD-ZMx0zKOi=0k(+{>Fy%TA5fu?@iNDkn8d^+fYBX(Xxx)s_eN z?nY7|mdm8VZEtO*V3&NRx^Z%)DonGjE$;!IN&+aqJJR2D;yIa{2u@i|9C+8~wtmE& mZ5O{pDSo<||EhINq|xJqju)#DT`DcWcK-v!0|#h4D*ynz=0.1.0-0 <0.2.0-0'], ['^1.0', '>=1.0.0-0 <2.0.0-0'], ['^1.2', '>=1.2.0-0 <2.0.0-0'], - ['^0.0.1', '=0.0.1'], - ['^0.0.1-beta', '=0.0.1-beta'], - ['^0.1.2', '>=0.1.2-0 <0.2.0-0'], + ['^0.0.1', '0.0.1'], + ['^0.0.1-beta', '0.0.1-beta'], + ['^0.1.2', '0.1.2'], ['^1.2.3', '>=1.2.3-0 <2.0.0-0'], ['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0-0'], ['<1', '<1.0.0-0'], diff --git a/node_modules/gulp/node_modules/semver/test/ltr.js b/node_modules/gulp/node_modules/semver/test/ltr.js index a4f503a..d146137 100644 --- a/node_modules/gulp/node_modules/semver/test/ltr.js +++ b/node_modules/gulp/node_modules/semver/test/ltr.js @@ -162,7 +162,8 @@ test('\nnegative ltr tests', function(t) { ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'], ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true], ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true], - ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'] + ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'], + ['=0.1.0', '1.0.0'] ].forEach(function(tuple) { var range = tuple[0]; var version = tuple[1]; diff --git a/node_modules/gulp/node_modules/tildify/package.json b/node_modules/gulp/node_modules/tildify/package.json index f48c035..5ca0b5c 100644 --- a/node_modules/gulp/node_modules/tildify/package.json +++ b/node_modules/gulp/node_modules/tildify/package.json @@ -40,7 +40,7 @@ "shasum": "70e639947af67d6ab6b822bbed0a6806fd81e430", "tarball": "http://registry.npmjs.org/tildify/-/tildify-0.2.0.tgz" }, - "_from": "tildify@^0.2.0", + "_from": "tildify@0.2.0", "_npmVersion": "1.4.6", "_npmUser": { "name": "sindresorhus", diff --git a/node_modules/gulp/node_modules/vinyl-fs/lib/dest/index.js b/node_modules/gulp/node_modules/vinyl-fs/lib/dest/index.js index 6e6691d..4ff4c27 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/lib/dest/index.js +++ b/node_modules/gulp/node_modules/vinyl-fs/lib/dest/index.js @@ -1,7 +1,9 @@ 'use strict'; +var _ = require('lodash'); +var defaults = _.defaults; + var path = require('path'); -var defaults = require('lodash.defaults'); var through2 = require('through2'); var mkdirp = require('mkdirp'); var fs = require('graceful-fs'); diff --git a/node_modules/gulp/node_modules/vinyl-fs/lib/dest/writeContents/index.js b/node_modules/gulp/node_modules/vinyl-fs/lib/dest/writeContents/index.js index 1cb6213..ab8f0f9 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/lib/dest/writeContents/index.js +++ b/node_modules/gulp/node_modules/vinyl-fs/lib/dest/writeContents/index.js @@ -1,35 +1,57 @@ 'use strict'; +var fs = require('fs'); var writeDir = require('./writeDir'); var writeStream = require('./writeStream'); var writeBuffer = require('./writeBuffer'); function writeContents(writePath, file, cb) { - var done = function(err){ - cb(err, file); + var written = function(err) { + var done = function(err) { + cb(err, file); + }; + if (err) { + return done(err); + } + + if (!file.stat || typeof file.stat.mode !== 'number') { + return done(); + } + + fs.stat(writePath, function(err, st) { + if (err) { + return done(err); + } + // octal 7777 = decimal 4095 + var currentMode = (st.mode & 4095); + if (currentMode === file.stat.mode) { + return done(); + } + fs.chmod(writePath, file.stat.mode, done); + }); }; // if directory then mkdirp it if (file.isDirectory()) { - writeDir(writePath, file, done); + writeDir(writePath, file, written); return; } // stream it to disk yo if (file.isStream()) { - writeStream(writePath, file, done); + writeStream(writePath, file, written); return; } // write it like normal if (file.isBuffer()) { - writeBuffer(writePath, file, done); + writeBuffer(writePath, file, written); return; } // if no contents then do nothing if (file.isNull()) { - done(); + cb(null, file); return; } } diff --git a/node_modules/gulp/node_modules/vinyl-fs/lib/src/index.js b/node_modules/gulp/node_modules/vinyl-fs/lib/src/index.js index 4d5f046..d6fe194 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/lib/src/index.js +++ b/node_modules/gulp/node_modules/vinyl-fs/lib/src/index.js @@ -1,6 +1,8 @@ 'use strict'; -var defaults = require('lodash.defaults'); +var _ = require('lodash'); +var defaults = _.defaults; + var through = require('through2'); var gs = require('glob-stream'); var File = require('vinyl'); @@ -14,7 +16,7 @@ function createFile (globFile, enc, cb) { function src(glob, opt) { if (!isValidGlob(glob)) { - throw new Error('Invalid glob argument'); + throw new Error('Invalid glob argument: ' + glob); } var options = defaults({}, opt, { diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/LICENSE b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/LICENSE index 0c44ae7..19129e3 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/LICENSE +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/LICENSE @@ -1,27 +1,15 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. +The ISC License -The BSD License +Copyright (c) Isaac Z. Schlueter and Contributors -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: +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. -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. +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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/node_modules/inherits/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/node_modules/inherits/package.json index 5bf0db5..c552a22 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/node_modules/inherits/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/node_modules/inherits/package.json @@ -29,5 +29,5 @@ }, "homepage": "https://github.com/isaacs/inherits", "_id": "inherits@2.0.1", - "_from": "inherits@2" + "_from": "inherits@>=2.0.0-0 <3.0.0-0" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/node_modules/once/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/node_modules/once/package.json index a8167cd..ca4f43b 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/node_modules/once/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/node_modules/once/package.json @@ -39,7 +39,7 @@ "shasum": "151af86bfc1f08c4b9f07d06ab250ffcbeb56581", "tarball": "http://registry.npmjs.org/once/-/once-1.3.0.tgz" }, - "_from": "once@^1.3.0", + "_from": "once@>=1.3.0-0 <2.0.0-0", "_npmVersion": "1.3.11", "_npmUser": { "name": "isaacs", diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/package.json index 6f85488..d0e9cf5 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/package.json @@ -6,7 +6,7 @@ }, "name": "glob", "description": "a little globber", - "version": "4.0.4", + "version": "4.0.5", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" @@ -20,7 +20,7 @@ }, "dependencies": { "inherits": "2", - "minimatch": "^0.3.0", + "minimatch": "^1.0.0", "once": "^1.3.0", "graceful-fs": "^3.0.2" }, @@ -33,16 +33,16 @@ "test": "tap test/*.js", "test-regen": "TEST_REGEN=1 node test/00-setup.js" }, - "license": "BSD", - "gitHead": "b7c1296f7fad4eac9fa560058cb6f737ef99d267", + "license": "ISC", + "gitHead": "a7d85acf4e89fa26d17396ab022ef98fbe1f8a4b", "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, "homepage": "https://github.com/isaacs/node-glob", - "_id": "glob@4.0.4", - "_shasum": "730ce0190d87eca7812398018e21be712b4d69d2", - "_from": "glob@^4.0.0", - "_npmVersion": "1.5.0-alpha-1", + "_id": "glob@4.0.5", + "_shasum": "95e42c9efdb3ab1f4788fd7793dfded4a3378063", + "_from": "glob@>=4.0.0-0 <5.0.0-0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "isaacs", "email": "i@izs.me" @@ -54,10 +54,10 @@ } ], "dist": { - "shasum": "730ce0190d87eca7812398018e21be712b4d69d2", - "tarball": "http://registry.npmjs.org/glob/-/glob-4.0.4.tgz" + "shasum": "95e42c9efdb3ab1f4788fd7793dfded4a3378063", + "tarball": "http://registry.npmjs.org/glob/-/glob-4.0.5.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/glob/-/glob-4.0.4.tgz", + "_resolved": "https://registry.npmjs.org/glob/-/glob-4.0.5.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.editorconfig b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.editorconfig new file mode 100644 index 0000000..6c5424e --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.editorconfig @@ -0,0 +1,10 @@ +# editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.jshintrc b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.jshintrc new file mode 100644 index 0000000..af7124e --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.jshintrc @@ -0,0 +1,19 @@ +{ + "camelcase": true, + "curly": true, + "eqeqeq": true, + "freeze": true, + "indent": 2, + "newcap": false, + "quotmark": "single", + "maxdepth": 3, + "maxstatements": 50, + "maxlen": 80, + "eqnull": true, + "funcscope": true, + "strict": true, + "undef": true, + "unused": true, + "node": true, + "mocha": true +} \ No newline at end of file diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.npmignore b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.npmignore index b5ef13a..d9689e3 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.npmignore +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.npmignore @@ -3,4 +3,7 @@ node_modules build *.node -components \ No newline at end of file +coverage +*.orig +.idea +sandbox \ No newline at end of file diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.travis.yml b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.travis.yml index 468a53d..dfec605 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.travis.yml +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/.travis.yml @@ -1,7 +1,6 @@ language: node_js node_js: - - 0.7 - - 0.8 - - 0.9 - - 0.10 - - 0.11 + - "0.10" + - "0.11" +after_script: + - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/LICENSE b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/LICENSE index 4f482f9..7cbe012 100755 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/LICENSE +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013 Fractal +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 diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/README.md index 35ce170..c14fa38 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/README.md +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/README.md @@ -1,11 +1,10 @@ -[![Build Status](https://travis-ci.org/wearefractal/glob2base.png?branch=master)](https://travis-ci.org/wearefractal/glob2base) +# glob2base [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Support us][gittip-image]][gittip-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] -[![NPM version](https://badge.fury.io/js/glob2base.png)](http://badge.fury.io/js/glob2base) ## Information - + @@ -14,43 +13,39 @@ - +
Packageglob2base
Node Version>= 0.4>= 0.10
-Extracts a base path from a glob object. - ## Usage +The module is a function that takes in a node-glob instance and returns a string. Basically it just gives you everything before any globbing/matching happens. + ```javascript var glob2base = require('glob2base'); var glob = require('glob'); -var globber = new glob.Glob("js/**/*.js"); -var basePath = glob2base(globber); -``` +// js/ +glob2base(new glob.Glob('js/**/*.js')); + +// css/test/ +glob2base(new glob.Glob('css/test/{a,b}/*.css')); -## LICENSE +// pages/whatever/ +glob2base(new glob.Glob('pages/whatever/index.html')); +``` -(MIT License) +## Like what we do? -Copyright (c) 2013 Fractal +[gittip-url]: https://www.gittip.com/WeAreFractal/ +[gittip-image]: http://img.shields.io/gittip/WeAreFractal.svg -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +[downloads-image]: http://img.shields.io/npm/dm/glob2base.svg +[npm-url]: https://npmjs.org/package/glob2base +[npm-image]: http://img.shields.io/npm/v/glob2base.svg -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +[travis-url]: https://travis-ci.org/wearefractal/glob2base +[travis-image]: http://img.shields.io/travis/wearefractal/glob2base.svg -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +[coveralls-url]: https://coveralls.io/r/wearefractal/glob2base +[coveralls-image]: http://img.shields.io/coveralls/wearefractal/glob2base/master.svg diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/index.js index b48de29..502578b 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/index.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/index.js @@ -1,5 +1,8 @@ +'use strict'; + var path = require('path'); -var findIndex = require('lodash.findindex'); +var _ = require('lodash'); +var findIndex = _.findIndex; var flattenGlob = function(arr){ var out = []; @@ -11,7 +14,12 @@ var flattenGlob = function(arr){ } out.push(arr[i]); } - if (flat) out.pop(); // last one is a file or specific dir + + // last one is a file or specific dir + // so we pop it off + if (flat) { + out.pop(); + } return out; }; @@ -21,12 +29,12 @@ var flattenExpansion = function(set) { // find index where the diff is var idx = findIndex(first, function(v, idx){ - if (typeof v !== 'string') return true; + if (typeof v !== 'string') { + return true; + } var matched = toCompare.every(function(arr){ - var v2 = arr[idx]; - if (typeof v2 !== 'string') return false; - return v === v2; + return v === arr[idx]; }); return !matched; @@ -45,7 +53,6 @@ var setToBase = function(set) { }; module.exports = function(glob) { - var cwd = (glob.options && glob.options.cwd) ? glob.options.cwd : process.cwd(); var set = glob.minimatch.set; var baseParts = setToBase(set); var basePath = path.normalize(baseParts.join(path.sep))+path.sep; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/README.md deleted file mode 100644 index 4c505ba..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.findindex v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.findIndex`](http://lodash.com/docs#findIndex) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/index.js deleted file mode 100644 index 2f76582..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/index.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var createCallback = require('lodash.createcallback'); - -/** - * This method is like `_.find` except that it returns the index of the first - * element that passes the callback check, instead of the element itself. - * - * If a property name is provided for `callback` the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is provided for `callback` the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to search. - * @param {Function|Object|string} [callback=identity] The function called - * per iteration. If a property name or object is provided it will be used - * to create a "_.pluck" or "_.where" style callback, respectively. - * @param {*} [thisArg] The `this` binding of `callback`. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var characters = [ - * { 'name': 'barney', 'age': 36, 'blocked': false }, - * { 'name': 'fred', 'age': 40, 'blocked': true }, - * { 'name': 'pebbles', 'age': 1, 'blocked': false } - * ]; - * - * _.findIndex(characters, function(chr) { - * return chr.age < 20; - * }); - * // => 2 - * - * // using "_.where" callback shorthand - * _.findIndex(characters, { 'age': 36 }); - * // => 0 - * - * // using "_.pluck" callback shorthand - * _.findIndex(characters, 'blocked'); - * // => 1 - */ -function findIndex(array, callback, thisArg) { - var index = -1, - length = array ? array.length : 0; - - callback = createCallback(callback, thisArg, 3); - while (++index < length) { - if (callback(array[index], index, array)) { - return index; - } - } - return -1; -} - -module.exports = findIndex; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/README.md deleted file mode 100644 index 72045f2..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.createcallback v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.createCallback`](http://lodash.com/docs#createCallback) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/index.js deleted file mode 100644 index 850a887..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/index.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseCreateCallback = require('lodash._basecreatecallback'), - baseIsEqual = require('lodash._baseisequal'), - isObject = require('lodash.isobject'), - keys = require('lodash.keys'), - property = require('lodash.property'); - -/** - * Produces a callback bound to an optional `thisArg`. If `func` is a property - * name the created callback will return the property value for a given element. - * If `func` is an object the created callback will return `true` for elements - * that contain the equivalent object properties, otherwise it will return `false`. - * - * @static - * @memberOf _ - * @category Utilities - * @param {*} [func=identity] The value to convert to a callback. - * @param {*} [thisArg] The `this` binding of the created callback. - * @param {number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. - * @example - * - * var characters = [ - * { 'name': 'barney', 'age': 36 }, - * { 'name': 'fred', 'age': 40 } - * ]; - * - * // wrap to create custom callback shorthands - * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { - * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); - * return !match ? func(callback, thisArg) : function(object) { - * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; - * }; - * }); - * - * _.filter(characters, 'age__gt38'); - * // => [{ 'name': 'fred', 'age': 40 }] - */ -function createCallback(func, thisArg, argCount) { - var type = typeof func; - if (func == null || type == 'function') { - return baseCreateCallback(func, thisArg, argCount); - } - // handle "_.pluck" style callback shorthands - if (type != 'object') { - return property(func); - } - var props = keys(func), - key = props[0], - a = func[key]; - - // handle "_.where" style callback shorthands - if (props.length == 1 && a === a && !isObject(a)) { - // fast path the common case of providing an object with a single - // property containing a primitive value - return function(object) { - var b = object[key]; - return a === b && (a !== 0 || (1 / a == 1 / b)); - }; - } - return function(object) { - var length = props.length, - result = false; - - while (length--) { - if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) { - break; - } - } - return result; - }; -} - -module.exports = createCallback; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/README.md deleted file mode 100644 index aa4a6e9..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._basecreatecallback v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseCreateCallback` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/index.js deleted file mode 100644 index 381aefe..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/index.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var bind = require('lodash.bind'), - identity = require('lodash.identity'), - setBindData = require('lodash._setbinddata'), - support = require('lodash.support'); - -/** Used to detected named functions */ -var reFuncName = /^\s*function[ \n\r\t]+\w/; - -/** Used to detect functions containing a `this` reference */ -var reThis = /\bthis\b/; - -/** Native method shortcuts */ -var fnToString = Function.prototype.toString; - -/** - * The base implementation of `_.createCallback` without support for creating - * "_.pluck" or "_.where" style callbacks. - * - * @private - * @param {*} [func=identity] The value to convert to a callback. - * @param {*} [thisArg] The `this` binding of the created callback. - * @param {number} [argCount] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. - */ -function baseCreateCallback(func, thisArg, argCount) { - if (typeof func != 'function') { - return identity; - } - // exit early for no `thisArg` or already bound by `Function#bind` - if (typeof thisArg == 'undefined' || !('prototype' in func)) { - return func; - } - var bindData = func.__bindData__; - if (typeof bindData == 'undefined') { - if (support.funcNames) { - bindData = !func.name; - } - bindData = bindData || !support.funcDecomp; - if (!bindData) { - var source = fnToString.call(func); - if (!support.funcNames) { - bindData = !reFuncName.test(source); - } - if (!bindData) { - // checks if `func` references the `this` keyword and stores the result - bindData = reThis.test(source); - setBindData(func, bindData); - } - } - } - // exit early if there are no `this` references or `func` is bound - if (bindData === false || (bindData !== true && bindData[1] & 1)) { - return func; - } - switch (argCount) { - case 1: return function(value) { - return func.call(thisArg, value); - }; - case 2: return function(a, b) { - return func.call(thisArg, a, b); - }; - case 3: return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(thisArg, accumulator, value, index, collection); - }; - } - return bind(func, thisArg); -} - -module.exports = baseCreateCallback; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/README.md deleted file mode 100644 index 430c783..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._setbinddata v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `setBindData` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/index.js deleted file mode 100644 index 79efad2..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/index.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isNative = require('lodash._isnative'), - noop = require('lodash.noop'); - -/** Used as the property descriptor for `__bindData__` */ -var descriptor = { - 'configurable': false, - 'enumerable': false, - 'value': null, - 'writable': false -}; - -/** Used to set meta data on functions */ -var defineProperty = (function() { - // IE 8 only accepts DOM elements - try { - var o = {}, - func = isNative(func = Object.defineProperty) && func, - result = func(o, o, o) && func; - } catch(e) { } - return result; -}()); - -/** - * Sets `this` binding data on a given function. - * - * @private - * @param {Function} func The function to set data on. - * @param {Array} value The data array to set. - */ -var setBindData = !defineProperty ? noop : function(func, value) { - descriptor.value = value; - defineProperty(func, '__bindData__', descriptor); -}; - -module.exports = setBindData; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/README.md deleted file mode 100644 index 39fab6a..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.noop v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/index.js deleted file mode 100644 index 61b6162..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * A no-operation function. - * - * @static - * @memberOf _ - * @category Utilities - * @example - * - * var object = { 'name': 'fred' }; - * _.noop(object) === undefined; - * // => true - */ -function noop() { - // no operation performed -} - -module.exports = noop; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/package.json deleted file mode 100644 index cb388d0..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/node_modules/lodash.noop/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "lodash.noop", - "version": "2.4.1", - "description": "The Lo-Dash function `_.noop` 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" - }, - "readme": "# lodash.noop v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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.noop@2.4.1", - "dist": { - "shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "tarball": "http://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz" - }, - "_from": "lodash.noop@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "_resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/package.json deleted file mode 100644 index 1ccabad..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash._setbinddata/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "lodash._setbinddata", - "version": "2.4.1", - "description": "The internal Lo-Dash function `setBindData` 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._isnative": "~2.4.1", - "lodash.noop": "~2.4.1" - }, - "readme": "# lodash._setbinddata v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `setBindData` 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._setbinddata@2.4.1", - "dist": { - "shasum": "f7c200cd1b92ef236b399eecf73c648d17aa94d2", - "tarball": "http://registry.npmjs.org/lodash._setbinddata/-/lodash._setbinddata-2.4.1.tgz" - }, - "_from": "lodash._setbinddata@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "f7c200cd1b92ef236b399eecf73c648d17aa94d2", - "_resolved": "https://registry.npmjs.org/lodash._setbinddata/-/lodash._setbinddata-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/README.md deleted file mode 100644 index 3a32fbe..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.bind v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.bind`](http://lodash.com/docs#bind) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/index.js deleted file mode 100644 index fa76328..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var createWrapper = require('lodash._createwrapper'), - slice = require('lodash._slice'); - -/** - * Creates a function that, when called, invokes `func` with the `this` - * binding of `thisArg` and prepends any additional `bind` arguments to those - * provided to the bound function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to bind. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {...*} [arg] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var func = function(greeting) { - * return greeting + ' ' + this.name; - * }; - * - * func = _.bind(func, { 'name': 'fred' }, 'hi'); - * func(); - * // => 'hi fred' - */ -function bind(func, thisArg) { - return arguments.length > 2 - ? createWrapper(func, 17, slice(arguments, 2), null, thisArg) - : createWrapper(func, 1, null, null, thisArg); -} - -module.exports = bind; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/README.md deleted file mode 100644 index b89f6e2..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._createwrapper v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `createWrapper` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/index.js deleted file mode 100644 index 02abfad..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/index.js +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseBind = require('lodash._basebind'), - baseCreateWrapper = require('lodash._basecreatewrapper'), - isFunction = require('lodash.isfunction'), - slice = require('lodash._slice'); - -/** - * Used for `Array` method references. - * - * Normally `Array.prototype` would suffice, however, using an array literal - * avoids issues in Narwhal. - */ -var arrayRef = []; - -/** Native method shortcuts */ -var push = arrayRef.push, - unshift = arrayRef.unshift; - -/** - * Creates a function that, when called, either curries or invokes `func` - * with an optional `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to reference. - * @param {number} bitmask The bitmask of method flags to compose. - * The bitmask may be composed of the following flags: - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` - * 8 - `_.curry` (bound) - * 16 - `_.partial` - * 32 - `_.partialRight` - * @param {Array} [partialArgs] An array of arguments to prepend to those - * provided to the new function. - * @param {Array} [partialRightArgs] An array of arguments to append to those - * provided to the new function. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new function. - */ -function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { - var isBind = bitmask & 1, - isBindKey = bitmask & 2, - isCurry = bitmask & 4, - isCurryBound = bitmask & 8, - isPartial = bitmask & 16, - isPartialRight = bitmask & 32; - - if (!isBindKey && !isFunction(func)) { - throw new TypeError; - } - if (isPartial && !partialArgs.length) { - bitmask &= ~16; - isPartial = partialArgs = false; - } - if (isPartialRight && !partialRightArgs.length) { - bitmask &= ~32; - isPartialRight = partialRightArgs = false; - } - var bindData = func && func.__bindData__; - if (bindData && bindData !== true) { - // clone `bindData` - bindData = slice(bindData); - if (bindData[2]) { - bindData[2] = slice(bindData[2]); - } - if (bindData[3]) { - bindData[3] = slice(bindData[3]); - } - // set `thisBinding` is not previously bound - if (isBind && !(bindData[1] & 1)) { - bindData[4] = thisArg; - } - // set if previously bound but not currently (subsequent curried functions) - if (!isBind && bindData[1] & 1) { - bitmask |= 8; - } - // set curried arity if not yet set - if (isCurry && !(bindData[1] & 4)) { - bindData[5] = arity; - } - // append partial left arguments - if (isPartial) { - push.apply(bindData[2] || (bindData[2] = []), partialArgs); - } - // append partial right arguments - if (isPartialRight) { - unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs); - } - // merge flags - bindData[1] |= bitmask; - return createWrapper.apply(null, bindData); - } - // fast path for `_.bind` - var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper; - return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]); -} - -module.exports = createWrapper; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/README.md deleted file mode 100644 index 28c0806..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._basebind v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseBind` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/index.js deleted file mode 100644 index cbd8a50..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseCreate = require('lodash._basecreate'), - isObject = require('lodash.isobject'), - setBindData = require('lodash._setbinddata'), - slice = require('lodash._slice'); - -/** - * Used for `Array` method references. - * - * Normally `Array.prototype` would suffice, however, using an array literal - * avoids issues in Narwhal. - */ -var arrayRef = []; - -/** Native method shortcuts */ -var push = arrayRef.push; - -/** - * The base implementation of `_.bind` that creates the bound function and - * sets its meta data. - * - * @private - * @param {Array} bindData The bind data array. - * @returns {Function} Returns the new bound function. - */ -function baseBind(bindData) { - var func = bindData[0], - partialArgs = bindData[2], - thisArg = bindData[4]; - - function bound() { - // `Function#bind` spec - // http://es5.github.io/#x15.3.4.5 - if (partialArgs) { - // avoid `arguments` object deoptimizations by using `slice` instead - // of `Array.prototype.slice.call` and not assigning `arguments` to a - // variable as a ternary expression - var args = slice(partialArgs); - push.apply(args, arguments); - } - // mimic the constructor's `return` behavior - // http://es5.github.io/#x13.2.2 - if (this instanceof bound) { - // ensure `new bound` is an instance of `func` - var thisBinding = baseCreate(func.prototype), - result = func.apply(thisBinding, args || arguments); - return isObject(result) ? result : thisBinding; - } - return func.apply(thisArg, args || arguments); - } - setBindData(bound, bindData); - return bound; -} - -module.exports = baseBind; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/README.md deleted file mode 100644 index a2733dd..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._basecreate v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseCreate` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/index.js deleted file mode 100644 index 1daf7f6..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/index.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isNative = require('lodash._isnative'), - isObject = require('lodash.isobject'), - noop = require('lodash.noop'); - -/* Native method shortcuts for methods with the same name as other `lodash` methods */ -var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate; - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ -function baseCreate(prototype, properties) { - return isObject(prototype) ? nativeCreate(prototype) : {}; -} -// fallback for browsers without `Object.create` -if (!nativeCreate) { - baseCreate = (function() { - function Object() {} - return function(prototype) { - if (isObject(prototype)) { - Object.prototype = prototype; - var result = new Object; - Object.prototype = null; - } - return result || global.Object(); - }; - }()); -} - -module.exports = baseCreate; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md deleted file mode 100644 index 39fab6a..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.noop v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js deleted file mode 100644 index 61b6162..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * A no-operation function. - * - * @static - * @memberOf _ - * @category Utilities - * @example - * - * var object = { 'name': 'fred' }; - * _.noop(object) === undefined; - * // => true - */ -function noop() { - // no operation performed -} - -module.exports = noop; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json deleted file mode 100644 index cb388d0..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "lodash.noop", - "version": "2.4.1", - "description": "The Lo-Dash function `_.noop` 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" - }, - "readme": "# lodash.noop v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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.noop@2.4.1", - "dist": { - "shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "tarball": "http://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz" - }, - "_from": "lodash.noop@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "_resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/package.json deleted file mode 100644 index 420ef89..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "lodash._basecreate", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseCreate` 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._isnative": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash.noop": "~2.4.1" - }, - "readme": "# lodash._basecreate v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseCreate` 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._basecreate@2.4.1", - "dist": { - "shasum": "f8e6f5b578a9e34e541179b56b8eeebf4a287e08", - "tarball": "http://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz" - }, - "_from": "lodash._basecreate@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "f8e6f5b578a9e34e541179b56b8eeebf4a287e08", - "_resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/package.json deleted file mode 100644 index 7c51c23..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "lodash._basebind", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseBind` 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._basecreate": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash._setbinddata": "~2.4.1", - "lodash._slice": "~2.4.1" - }, - "readme": "# lodash._basebind v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseBind` 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._basebind@2.4.1", - "dist": { - "shasum": "e940b9ebdd27c327e0a8dab1b55916c5341e9575", - "tarball": "http://registry.npmjs.org/lodash._basebind/-/lodash._basebind-2.4.1.tgz" - }, - "_from": "lodash._basebind@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "e940b9ebdd27c327e0a8dab1b55916c5341e9575", - "_resolved": "https://registry.npmjs.org/lodash._basebind/-/lodash._basebind-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/README.md deleted file mode 100644 index aba5586..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._basecreatewrapper v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseCreateWrapper` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/index.js deleted file mode 100644 index 68ed252..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/index.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseCreate = require('lodash._basecreate'), - isObject = require('lodash.isobject'), - setBindData = require('lodash._setbinddata'), - slice = require('lodash._slice'); - -/** - * Used for `Array` method references. - * - * Normally `Array.prototype` would suffice, however, using an array literal - * avoids issues in Narwhal. - */ -var arrayRef = []; - -/** Native method shortcuts */ -var push = arrayRef.push; - -/** - * The base implementation of `createWrapper` that creates the wrapper and - * sets its meta data. - * - * @private - * @param {Array} bindData The bind data array. - * @returns {Function} Returns the new function. - */ -function baseCreateWrapper(bindData) { - var func = bindData[0], - bitmask = bindData[1], - partialArgs = bindData[2], - partialRightArgs = bindData[3], - thisArg = bindData[4], - arity = bindData[5]; - - var isBind = bitmask & 1, - isBindKey = bitmask & 2, - isCurry = bitmask & 4, - isCurryBound = bitmask & 8, - key = func; - - function bound() { - var thisBinding = isBind ? thisArg : this; - if (partialArgs) { - var args = slice(partialArgs); - push.apply(args, arguments); - } - if (partialRightArgs || isCurry) { - args || (args = slice(arguments)); - if (partialRightArgs) { - push.apply(args, partialRightArgs); - } - if (isCurry && args.length < arity) { - bitmask |= 16 & ~32; - return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]); - } - } - args || (args = arguments); - if (isBindKey) { - func = thisBinding[key]; - } - if (this instanceof bound) { - thisBinding = baseCreate(func.prototype); - var result = func.apply(thisBinding, args); - return isObject(result) ? result : thisBinding; - } - return func.apply(thisBinding, args); - } - setBindData(bound, bindData); - return bound; -} - -module.exports = baseCreateWrapper; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/README.md deleted file mode 100644 index a2733dd..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._basecreate v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseCreate` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/index.js deleted file mode 100644 index 1daf7f6..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/index.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isNative = require('lodash._isnative'), - isObject = require('lodash.isobject'), - noop = require('lodash.noop'); - -/* Native method shortcuts for methods with the same name as other `lodash` methods */ -var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate; - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ -function baseCreate(prototype, properties) { - return isObject(prototype) ? nativeCreate(prototype) : {}; -} -// fallback for browsers without `Object.create` -if (!nativeCreate) { - baseCreate = (function() { - function Object() {} - return function(prototype) { - if (isObject(prototype)) { - Object.prototype = prototype; - var result = new Object; - Object.prototype = null; - } - return result || global.Object(); - }; - }()); -} - -module.exports = baseCreate; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md deleted file mode 100644 index 39fab6a..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.noop v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js deleted file mode 100644 index 61b6162..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * A no-operation function. - * - * @static - * @memberOf _ - * @category Utilities - * @example - * - * var object = { 'name': 'fred' }; - * _.noop(object) === undefined; - * // => true - */ -function noop() { - // no operation performed -} - -module.exports = noop; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json deleted file mode 100644 index cb388d0..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/node_modules/lodash.noop/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "lodash.noop", - "version": "2.4.1", - "description": "The Lo-Dash function `_.noop` 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" - }, - "readme": "# lodash.noop v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.noop`](http://lodash.com/docs#noop) 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.noop@2.4.1", - "dist": { - "shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "tarball": "http://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz" - }, - "_from": "lodash.noop@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "4fb54f816652e5ae10e8f72f717a388c7326538a", - "_resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/package.json deleted file mode 100644 index 420ef89..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/node_modules/lodash._basecreate/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "lodash._basecreate", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseCreate` 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._isnative": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash.noop": "~2.4.1" - }, - "readme": "# lodash._basecreate v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseCreate` 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._basecreate@2.4.1", - "dist": { - "shasum": "f8e6f5b578a9e34e541179b56b8eeebf4a287e08", - "tarball": "http://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz" - }, - "_from": "lodash._basecreate@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "f8e6f5b578a9e34e541179b56b8eeebf4a287e08", - "_resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/package.json deleted file mode 100644 index a992899..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basecreatewrapper/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "lodash._basecreatewrapper", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseCreateWrapper` 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._basecreate": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash._setbinddata": "~2.4.1", - "lodash._slice": "~2.4.1" - }, - "readme": "# lodash._basecreatewrapper v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseCreateWrapper` 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._basecreatewrapper@2.4.1", - "dist": { - "shasum": "4d31f2e7de7e134fbf2803762b8150b32519666f", - "tarball": "http://registry.npmjs.org/lodash._basecreatewrapper/-/lodash._basecreatewrapper-2.4.1.tgz" - }, - "_from": "lodash._basecreatewrapper@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "4d31f2e7de7e134fbf2803762b8150b32519666f", - "_resolved": "https://registry.npmjs.org/lodash._basecreatewrapper/-/lodash._basecreatewrapper-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/README.md deleted file mode 100644 index 2831b7f..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.isfunction v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.isFunction`](http://lodash.com/docs#isFunction) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/index.js deleted file mode 100644 index ad4b451..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/index.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Checks if `value` is a function. - * - * @static - * @memberOf _ - * @category Objects - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - */ -function isFunction(value) { - return typeof value == 'function'; -} - -module.exports = isFunction; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/package.json deleted file mode 100644 index ddd5d59..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "lodash.isfunction", - "version": "2.4.1", - "description": "The Lo-Dash function `_.isFunction` 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" - }, - "readme": "# lodash.isfunction v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.isFunction`](http://lodash.com/docs#isFunction) 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.isfunction@2.4.1", - "_from": "lodash.isfunction@~2.4.1", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/package.json deleted file mode 100644 index 19cc563..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "lodash._createwrapper", - "version": "2.4.1", - "description": "The internal Lo-Dash function `createWrapper` 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._basebind": "~2.4.1", - "lodash._basecreatewrapper": "~2.4.1", - "lodash.isfunction": "~2.4.1", - "lodash._slice": "~2.4.1" - }, - "readme": "# lodash._createwrapper v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `createWrapper` 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._createwrapper@2.4.1", - "dist": { - "shasum": "51d6957973da4ed556e37290d8c1a18c53de1607", - "tarball": "http://registry.npmjs.org/lodash._createwrapper/-/lodash._createwrapper-2.4.1.tgz" - }, - "_from": "lodash._createwrapper@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "51d6957973da4ed556e37290d8c1a18c53de1607", - "_resolved": "https://registry.npmjs.org/lodash._createwrapper/-/lodash._createwrapper-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/README.md deleted file mode 100644 index d824980..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._slice v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `slice` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/index.js deleted file mode 100644 index 9c471c8..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Slices the `collection` from the `start` index up to, but not including, - * the `end` index. - * - * Note: This function is used instead of `Array#slice` to support node lists - * in IE < 9 and to ensure dense arrays are returned. - * - * @private - * @param {Array|Object|string} collection The collection to slice. - * @param {number} start The start index. - * @param {number} end The end index. - * @returns {Array} Returns the new array. - */ -function slice(array, start, end) { - start || (start = 0); - if (typeof end == 'undefined') { - end = array ? array.length : 0; - } - var index = -1, - length = end - start || 0, - result = Array(length < 0 ? 0 : length); - - while (++index < length) { - result[index] = array[start + index]; - } - return result; -} - -module.exports = slice; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/package.json deleted file mode 100644 index 078475c..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._slice/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "lodash._slice", - "version": "2.4.1", - "description": "The internal Lo-Dash function `slice` 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._slice v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `slice` 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._slice@2.4.1", - "dist": { - "shasum": "745cf41a53597b18f688898544405efa2b06d90f", - "tarball": "http://registry.npmjs.org/lodash._slice/-/lodash._slice-2.4.1.tgz" - }, - "_from": "lodash._slice@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "745cf41a53597b18f688898544405efa2b06d90f", - "_resolved": "https://registry.npmjs.org/lodash._slice/-/lodash._slice-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/package.json deleted file mode 100644 index 00ad79a..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "lodash.bind", - "version": "2.4.1", - "description": "The Lo-Dash function `_.bind` 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._createwrapper": "~2.4.1", - "lodash._slice": "~2.4.1" - }, - "readme": "# lodash.bind v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.bind`](http://lodash.com/docs#bind) 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.bind@2.4.1", - "dist": { - "shasum": "5d19fa005c8c4d236faf4742c7b7a1fcabe29267", - "tarball": "http://registry.npmjs.org/lodash.bind/-/lodash.bind-2.4.1.tgz" - }, - "_from": "lodash.bind@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "5d19fa005c8c4d236faf4742c7b7a1fcabe29267", - "_resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/README.md deleted file mode 100644 index ad7738a..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.identity v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.identity`](http://lodash.com/docs#identity) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/index.js deleted file mode 100644 index dc9c92a..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/index.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * This method returns the first argument provided to it. - * - * @static - * @memberOf _ - * @category Utilities - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'name': 'fred' }; - * _.identity(object) === object; - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/package.json deleted file mode 100644 index c0174d3..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.identity/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "lodash.identity", - "version": "2.4.1", - "description": "The Lo-Dash function `_.identity` 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" - }, - "readme": "# lodash.identity v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.identity`](http://lodash.com/docs#identity) 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.identity@2.4.1", - "dist": { - "shasum": "6694cffa65fef931f7c31ce86c74597cf560f4f1", - "tarball": "http://registry.npmjs.org/lodash.identity/-/lodash.identity-2.4.1.tgz" - }, - "_from": "lodash.identity@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "6694cffa65fef931f7c31ce86c74597cf560f4f1", - "_resolved": "https://registry.npmjs.org/lodash.identity/-/lodash.identity-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/README.md deleted file mode 100644 index eecd6cd..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.support v2.4.1 - -The [Lo-Dash](http://lodash.com/) object [`_.support`](http://lodash.com/docs#support) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/index.js deleted file mode 100644 index 5dd3e3d..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isNative = require('lodash._isnative'); - -/** Used to detect functions containing a `this` reference */ -var reThis = /\bthis\b/; - -/** - * An object used to flag environments features. - * - * @static - * @memberOf _ - * @type Object - */ -var support = {}; - -/** - * Detect if functions can be decompiled by `Function#toString` - * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). - * - * @memberOf _.support - * @type boolean - */ -support.funcDecomp = !isNative(global.WinRTError) && reThis.test(function() { return this; }); - -/** - * Detect if `Function#name` is supported (all but IE). - * - * @memberOf _.support - * @type boolean - */ -support.funcNames = typeof Function.name == 'string'; - -module.exports = support; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/package.json deleted file mode 100644 index 1dc272e..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.support/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "lodash.support", - "version": "2.4.1", - "description": "The Lo-Dash object `_.support` 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" - }, - "readme": "# lodash.support v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) object [`_.support`](http://lodash.com/docs#support) 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.support@2.4.1", - "dist": { - "shasum": "320e0b67031673c28d7a2bb5d9e0331a45240515", - "tarball": "http://registry.npmjs.org/lodash.support/-/lodash.support-2.4.1.tgz" - }, - "_from": "lodash.support@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "320e0b67031673c28d7a2bb5d9e0331a45240515", - "_resolved": "https://registry.npmjs.org/lodash.support/-/lodash.support-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/package.json deleted file mode 100644 index dbb0383..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "lodash._basecreatecallback", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseCreateCallback` 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.bind": "~2.4.1", - "lodash.identity": "~2.4.1", - "lodash._setbinddata": "~2.4.1", - "lodash.support": "~2.4.1" - }, - "readme": "# lodash._basecreatecallback v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseCreateCallback` 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._basecreatecallback@2.4.1", - "dist": { - "shasum": "7d0b267649cb29e7a139d0103b7c11fae84e4851", - "tarball": "http://registry.npmjs.org/lodash._basecreatecallback/-/lodash._basecreatecallback-2.4.1.tgz" - }, - "_from": "lodash._basecreatecallback@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "7d0b267649cb29e7a139d0103b7c11fae84e4851", - "_resolved": "https://registry.npmjs.org/lodash._basecreatecallback/-/lodash._basecreatecallback-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/README.md deleted file mode 100644 index cc0b123..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._baseisequal v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `baseIsEqual` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/index.js deleted file mode 100644 index 36917c8..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/index.js +++ /dev/null @@ -1,209 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var forIn = require('lodash.forin'), - getArray = require('lodash._getarray'), - isFunction = require('lodash.isfunction'), - objectTypes = require('lodash._objecttypes'), - releaseArray = require('lodash._releasearray'); - -/** `Object#toString` result shortcuts */ -var argsClass = '[object Arguments]', - arrayClass = '[object Array]', - boolClass = '[object Boolean]', - dateClass = '[object Date]', - numberClass = '[object Number]', - objectClass = '[object Object]', - regexpClass = '[object RegExp]', - stringClass = '[object String]'; - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Used to resolve the internal [[Class]] of values */ -var toString = objectProto.toString; - -/** Native method shortcuts */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.isEqual`, without support for `thisArg` binding, - * that allows partial "_.where" style comparisons. - * - * @private - * @param {*} a The value to compare. - * @param {*} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `a` objects. - * @param {Array} [stackB=[]] Tracks traversed `b` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { - // used to indicate that when comparing objects, `a` has at least the properties of `b` - if (callback) { - var result = callback(a, b); - if (typeof result != 'undefined') { - return !!result; - } - } - // exit early for identical values - if (a === b) { - // treat `+0` vs. `-0` as not equal - return a !== 0 || (1 / a == 1 / b); - } - var type = typeof a, - otherType = typeof b; - - // exit early for unlike primitive values - if (a === a && - !(a && objectTypes[type]) && - !(b && objectTypes[otherType])) { - return false; - } - // exit early for `null` and `undefined` avoiding ES3's Function#call behavior - // http://es5.github.io/#x15.3.4.4 - if (a == null || b == null) { - return a === b; - } - // compare [[Class]] names - var className = toString.call(a), - otherClass = toString.call(b); - - if (className == argsClass) { - className = objectClass; - } - if (otherClass == argsClass) { - otherClass = objectClass; - } - if (className != otherClass) { - return false; - } - switch (className) { - case boolClass: - case dateClass: - // coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0` treating invalid dates coerced to `NaN` as not equal - return +a == +b; - - case numberClass: - // treat `NaN` vs. `NaN` as equal - return (a != +a) - ? b != +b - // but treat `+0` vs. `-0` as not equal - : (a == 0 ? (1 / a == 1 / b) : a == +b); - - case regexpClass: - case stringClass: - // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) - // treat string primitives and their corresponding object instances as equal - return a == String(b); - } - var isArr = className == arrayClass; - if (!isArr) { - // unwrap any `lodash` wrapped values - var aWrapped = hasOwnProperty.call(a, '__wrapped__'), - bWrapped = hasOwnProperty.call(b, '__wrapped__'); - - if (aWrapped || bWrapped) { - return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB); - } - // exit for functions and DOM nodes - if (className != objectClass) { - return false; - } - // in older versions of Opera, `arguments` objects have `Array` constructors - var ctorA = a.constructor, - ctorB = b.constructor; - - // non `Object` object instances with different constructors are not equal - if (ctorA != ctorB && - !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && - ('constructor' in a && 'constructor' in b) - ) { - return false; - } - } - // assume cyclic structures are equal - // the algorithm for detecting cyclic structures is adapted from ES 5.1 - // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) - var initedStack = !stackA; - stackA || (stackA = getArray()); - stackB || (stackB = getArray()); - - var length = stackA.length; - while (length--) { - if (stackA[length] == a) { - return stackB[length] == b; - } - } - var size = 0; - result = true; - - // add `a` and `b` to the stack of traversed objects - stackA.push(a); - stackB.push(b); - - // recursively compare objects and arrays (susceptible to call stack limits) - if (isArr) { - // compare lengths to determine if a deep comparison is necessary - length = a.length; - size = b.length; - result = size == length; - - if (result || isWhere) { - // deep compare the contents, ignoring non-numeric properties - while (size--) { - var index = length, - value = b[size]; - - if (isWhere) { - while (index--) { - if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) { - break; - } - } - } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) { - break; - } - } - } - } - else { - // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` - // which, in this case, is more costly - forIn(b, function(value, key, b) { - if (hasOwnProperty.call(b, key)) { - // count the number of properties. - size++; - // deep compare each property value. - return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB)); - } - }); - - if (result && !isWhere) { - // ensure both objects have the same number of properties - forIn(a, function(value, key, a) { - if (hasOwnProperty.call(a, key)) { - // `size` will be `-1` if `a` has more properties than `b` - return (result = --size > -1); - } - }); - } - } - stackA.pop(); - stackB.pop(); - - if (initedStack) { - releaseArray(stackA); - releaseArray(stackB); - } - return result; -} - -module.exports = baseIsEqual; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/README.md deleted file mode 100644 index 0709725..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._getarray v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `getArray` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/index.js deleted file mode 100644 index 0ef2497..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/index.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var arrayPool = require('lodash._arraypool'); - -/** - * Gets an array from the array pool or creates a new one if the pool is empty. - * - * @private - * @returns {Array} The array from the pool. - */ -function getArray() { - return arrayPool.pop() || []; -} - -module.exports = getArray; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/README.md deleted file mode 100644 index 752bdff..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._arraypool v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `arrayPool` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/index.js deleted file mode 100644 index bb76cda..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to pool arrays and objects used internally */ -var arrayPool = []; - -module.exports = arrayPool; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/package.json deleted file mode 100644 index 93f0da5..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/node_modules/lodash._arraypool/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "lodash._arraypool", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `arrayPool` 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._arraypool v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `arrayPool` 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._arraypool@2.4.1", - "dist": { - "shasum": "e88eecb92e2bb84c9065612fd958a0719cd47f94", - "tarball": "http://registry.npmjs.org/lodash._arraypool/-/lodash._arraypool-2.4.1.tgz" - }, - "_from": "lodash._arraypool@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "e88eecb92e2bb84c9065612fd958a0719cd47f94", - "_resolved": "https://registry.npmjs.org/lodash._arraypool/-/lodash._arraypool-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/package.json deleted file mode 100644 index cfbcb4b..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._getarray/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "lodash._getarray", - "version": "2.4.1", - "description": "The internal Lo-Dash function `getArray` 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._arraypool": "~2.4.1" - }, - "readme": "# lodash._getarray v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `getArray` 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._getarray@2.4.1", - "dist": { - "shasum": "faf1f7f810fa985a251c2187404481094839e5ee", - "tarball": "http://registry.npmjs.org/lodash._getarray/-/lodash._getarray-2.4.1.tgz" - }, - "_from": "lodash._getarray@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "faf1f7f810fa985a251c2187404481094839e5ee", - "_resolved": "https://registry.npmjs.org/lodash._getarray/-/lodash._getarray-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de730..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6c..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd8..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/README.md deleted file mode 100644 index be058e0..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._releasearray v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `releaseArray` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/index.js deleted file mode 100644 index 958c3ee..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var arrayPool = require('lodash._arraypool'), - maxPoolSize = require('lodash._maxpoolsize'); - -/** - * Releases the given array back to the array pool. - * - * @private - * @param {Array} [array] The array to release. - */ -function releaseArray(array) { - array.length = 0; - if (arrayPool.length < maxPoolSize) { - arrayPool.push(array); - } -} - -module.exports = releaseArray; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/README.md deleted file mode 100644 index 752bdff..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._arraypool v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `arrayPool` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/index.js deleted file mode 100644 index bb76cda..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to pool arrays and objects used internally */ -var arrayPool = []; - -module.exports = arrayPool; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/package.json deleted file mode 100644 index 93f0da5..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._arraypool/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "lodash._arraypool", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `arrayPool` 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._arraypool v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `arrayPool` 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._arraypool@2.4.1", - "dist": { - "shasum": "e88eecb92e2bb84c9065612fd958a0719cd47f94", - "tarball": "http://registry.npmjs.org/lodash._arraypool/-/lodash._arraypool-2.4.1.tgz" - }, - "_from": "lodash._arraypool@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "e88eecb92e2bb84c9065612fd958a0719cd47f94", - "_resolved": "https://registry.npmjs.org/lodash._arraypool/-/lodash._arraypool-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/README.md deleted file mode 100644 index 6004448..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._maxpoolsize v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `maxPoolSize` 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/index.js deleted file mode 100644 index 4cd1e8b..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used as the max size of the `arrayPool` and `objectPool` */ -var maxPoolSize = 40; - -module.exports = maxPoolSize; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/package.json deleted file mode 100644 index 503b92a..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/node_modules/lodash._maxpoolsize/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "lodash._maxpoolsize", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `maxPoolSize` 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._maxpoolsize v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `maxPoolSize` 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._maxpoolsize@2.4.1", - "dist": { - "shasum": "9d482f463b8e66afbe59c2c14edb117060172334", - "tarball": "http://registry.npmjs.org/lodash._maxpoolsize/-/lodash._maxpoolsize-2.4.1.tgz" - }, - "_from": "lodash._maxpoolsize@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "9d482f463b8e66afbe59c2c14edb117060172334", - "_resolved": "https://registry.npmjs.org/lodash._maxpoolsize/-/lodash._maxpoolsize-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/package.json deleted file mode 100644 index 8b7a6c6..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash._releasearray/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "lodash._releasearray", - "version": "2.4.1", - "description": "The internal Lo-Dash function `releaseArray` 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._arraypool": "~2.4.1", - "lodash._maxpoolsize": "~2.4.1" - }, - "readme": "# lodash._releasearray v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `releaseArray` 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._releasearray@2.4.1", - "dist": { - "shasum": "a6139630d76d1536b07ddc80962889b082f6a641", - "tarball": "http://registry.npmjs.org/lodash._releasearray/-/lodash._releasearray-2.4.1.tgz" - }, - "_from": "lodash._releasearray@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "a6139630d76d1536b07ddc80962889b082f6a641", - "_resolved": "https://registry.npmjs.org/lodash._releasearray/-/lodash._releasearray-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/README.md deleted file mode 100644 index 1999513..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.forin v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.forIn`](http://lodash.com/docs#forIn) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/index.js deleted file mode 100644 index 0dfad07..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseCreateCallback = require('lodash._basecreatecallback'), - objectTypes = require('lodash._objecttypes'); - -/** - * Iterates over own and inherited enumerable properties of an object, - * executing the callback for each property. The callback is bound to `thisArg` - * and invoked with three arguments; (value, key, object). Callbacks may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {*} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * Shape.prototype.move = function(x, y) { - * this.x += x; - * this.y += y; - * }; - * - * _.forIn(new Shape, function(value, key) { - * console.log(key); - * }); - * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) - */ -var forIn = function(collection, callback, thisArg) { - var index, iterable = collection, result = iterable; - if (!iterable) return result; - if (!objectTypes[typeof iterable]) return result; - callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); - for (index in iterable) { - if (callback(iterable[index], index, collection) === false) return result; - } - return result -}; - -module.exports = forIn; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/package.json deleted file mode 100644 index f7a8189..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.forin/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "lodash.forin", - "version": "2.4.1", - "description": "The Lo-Dash function `_.forIn` 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._basecreatecallback": "~2.4.1", - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash.forin v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.forIn`](http://lodash.com/docs#forIn) 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.forin@2.4.1", - "dist": { - "shasum": "8089eaed7d25b08672b7c66fd07ac55d062320eb", - "tarball": "http://registry.npmjs.org/lodash.forin/-/lodash.forin-2.4.1.tgz" - }, - "_from": "lodash.forin@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "8089eaed7d25b08672b7c66fd07ac55d062320eb", - "_resolved": "https://registry.npmjs.org/lodash.forin/-/lodash.forin-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/README.md deleted file mode 100644 index 2831b7f..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.isfunction v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.isFunction`](http://lodash.com/docs#isFunction) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/index.js deleted file mode 100644 index ad4b451..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/index.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Checks if `value` is a function. - * - * @static - * @memberOf _ - * @category Objects - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - */ -function isFunction(value) { - return typeof value == 'function'; -} - -module.exports = isFunction; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/package.json deleted file mode 100644 index ddd5d59..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/node_modules/lodash.isfunction/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "lodash.isfunction", - "version": "2.4.1", - "description": "The Lo-Dash function `_.isFunction` 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" - }, - "readme": "# lodash.isfunction v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.isFunction`](http://lodash.com/docs#isFunction) 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.isfunction@2.4.1", - "_from": "lodash.isfunction@~2.4.1", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/package.json deleted file mode 100644 index 749f435..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._baseisequal/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "lodash._baseisequal", - "version": "2.4.1", - "description": "The internal Lo-Dash function `baseIsEqual` 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.forin": "~2.4.1", - "lodash._getarray": "~2.4.1", - "lodash.isfunction": "~2.4.1", - "lodash._objecttypes": "~2.4.1", - "lodash._releasearray": "~2.4.1" - }, - "readme": "# lodash._baseisequal v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `baseIsEqual` 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._baseisequal@2.4.1", - "dist": { - "shasum": "6b1e62e587c5523111f6f228553dab19e445fc03", - "tarball": "http://registry.npmjs.org/lodash._baseisequal/-/lodash._baseisequal-2.4.1.tgz" - }, - "_from": "lodash._baseisequal@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "6b1e62e587c5523111f6f228553dab19e445fc03", - "_resolved": "https://registry.npmjs.org/lodash._baseisequal/-/lodash._baseisequal-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/README.md deleted file mode 100644 index eeb0a78..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/index.js deleted file mode 100644 index 3596ac3..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de730..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6c..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd8..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/package.json deleted file mode 100644 index adfee42..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.isobject/package.json +++ /dev/null @@ -1,56 +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", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/README.md deleted file mode 100644 index bee29a8..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/index.js deleted file mode 100644 index 139568a..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md deleted file mode 100644 index 23f3000..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js deleted file mode 100644 index 12be0bf..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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 -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de730..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6c..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd8..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json deleted file mode 100644 index f962e0e..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json +++ /dev/null @@ -1,79 +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", - "tarball": "http://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz" - }, - "_from": "lodash._shimkeys@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "6e9cc9666ff081f0b5a6c978b83e242e6949d203", - "_resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/package.json deleted file mode 100644 index 99d6b91..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.keys/package.json +++ /dev/null @@ -1,88 +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", - "tarball": "http://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz" - }, - "_from": "lodash.keys@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "48dea46df8ff7632b10d706b8acb26591e2b3727", - "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/README.md deleted file mode 100644 index f7c10c5..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.property v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.property`](http://lodash.com/docs#property) 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/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/index.js deleted file mode 100644 index 1f71481..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Creates a "_.pluck" style function, which returns the `key` value of a - * given object. - * - * @static - * @memberOf _ - * @category Utilities - * @param {string} key The name of the property to retrieve. - * @returns {Function} Returns the new function. - * @example - * - * var characters = [ - * { 'name': 'fred', 'age': 40 }, - * { 'name': 'barney', 'age': 36 } - * ]; - * - * var getName = _.property('name'); - * - * _.map(characters, getName); - * // => ['barney', 'fred'] - * - * _.sortBy(characters, getName); - * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] - */ -function property(key) { - return function(object) { - return object[key]; - }; -} - -module.exports = property; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/package.json deleted file mode 100644 index 990aa7b..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash.property/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "lodash.property", - "version": "2.4.1", - "description": "The Lo-Dash function `_.property` 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" - }, - "readme": "# lodash.property v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.property`](http://lodash.com/docs#property) 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.property@2.4.1", - "dist": { - "shasum": "4049c0549daf5a7102bc5e93eeaebb379deb132f", - "tarball": "http://registry.npmjs.org/lodash.property/-/lodash.property-2.4.1.tgz" - }, - "_from": "lodash.property@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "4049c0549daf5a7102bc5e93eeaebb379deb132f", - "_resolved": "https://registry.npmjs.org/lodash.property/-/lodash.property-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/package.json deleted file mode 100644 index 66f92cf..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name": "lodash.createcallback", - "version": "2.4.1", - "description": "The Lo-Dash function `_.createCallback` 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._basecreatecallback": "~2.4.1", - "lodash._baseisequal": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash.keys": "~2.4.1", - "lodash.property": "~2.4.1" - }, - "readme": "# lodash.createcallback v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.createCallback`](http://lodash.com/docs#createCallback) 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.createcallback@2.4.1", - "dist": { - "shasum": "c81645ac3a1d7f9dc6b36b8bc0d84c013c98ea95", - "tarball": "http://registry.npmjs.org/lodash.createcallback/-/lodash.createcallback-2.4.1.tgz" - }, - "_from": "lodash.createcallback@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "c81645ac3a1d7f9dc6b36b8bc0d84c013c98ea95", - "_resolved": "https://registry.npmjs.org/lodash.createcallback/-/lodash.createcallback-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/package.json deleted file mode 100644 index 98664ee..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/node_modules/lodash.findindex/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "lodash.findindex", - "version": "2.4.1", - "description": "The Lo-Dash function `_.findIndex` 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.createcallback": "~2.4.1" - }, - "readme": "# lodash.findindex v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.findIndex`](http://lodash.com/docs#findIndex) 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.findindex@2.4.1", - "dist": { - "shasum": "738d108641cf2ef087207f35f2c6a5eacf807caa", - "tarball": "http://registry.npmjs.org/lodash.findindex/-/lodash.findindex-2.4.1.tgz" - }, - "_from": "lodash.findindex@^2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "738d108641cf2ef087207f35f2c6a5eacf807caa", - "_resolved": "https://registry.npmjs.org/lodash.findindex/-/lodash.findindex-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/package.json index 47e5566..7a8df77 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob2base/package.json @@ -1,7 +1,7 @@ { "name": "glob2base", "description": "Extracts a base path from a node-glob instance", - "version": "0.0.9", + "version": "0.0.11", "homepage": "http://github.com/wearefractal/glob2base", "repository": { "type": "git", @@ -14,18 +14,25 @@ }, "main": "./index.js", "dependencies": { - "lodash.findindex": "^2.4.1" + "lodash": "^2.4.1" }, "devDependencies": { - "mocha": "^1.17.1", - "should": "^4.0.0", - "glob": "^4.0.0" + "coveralls": "^2.6.1", + "istanbul": "^0.2.3", + "jshint": "^2.4.1", + "jshint-stylish": "^0.2.0", + "mocha": "^1.17.0", + "mocha-lcov-reporter": "^0.0.1", + "glob": "^4.0.0", + "should": "^4.0.0" }, "scripts": { - "test": "mocha" + "lint": "jshint index.js --reporter node_modules/jshint-stylish/stylish.js --exclude node_modules", + "test": "npm run-script lint && mocha --reporter spec", + "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" }, "engines": { - "node": ">= 0.4.0" + "node": ">= 0.10" }, "licenses": [ { @@ -33,14 +40,14 @@ "url": "http://github.com/wearefractal/glob2base/raw/master/LICENSE" } ], - "gitHead": "96122493b535a221ee2e8b833d971b21fddd88db", + "gitHead": "ad402068aa76041bd7ced8144969e544c2ba6dec", "bugs": { "url": "https://github.com/wearefractal/glob2base/issues" }, - "_id": "glob2base@0.0.9", - "_shasum": "50a7bb1fc1260e1eb5ba1b136003569a1fe57f98", - "_from": "glob2base@^0.0.9", - "_npmVersion": "1.4.13", + "_id": "glob2base@0.0.11", + "_shasum": "e56904ae5292c2d9cefbc5b97f419614fb56b660", + "_from": "glob2base@=0.0.11", + "_npmVersion": "1.5.0-alpha-1", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -52,10 +59,10 @@ } ], "dist": { - "shasum": "50a7bb1fc1260e1eb5ba1b136003569a1fe57f98", - "tarball": "http://registry.npmjs.org/glob2base/-/glob2base-0.0.9.tgz" + "shasum": "e56904ae5292c2d9cefbc5b97f419614fb56b660", + "tarball": "http://registry.npmjs.org/glob2base/-/glob2base-0.0.11.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.9.tgz", + "_resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.11.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/.travis.yml b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/.travis.yml new file mode 100644 index 0000000..fca8ef0 --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.10 + - 0.11 diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/minimatch.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/minimatch.js index 4539678..4761786 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/minimatch.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/minimatch.js @@ -260,6 +260,13 @@ minimatch.braceExpand = function (pattern, options) { } Minimatch.prototype.braceExpand = braceExpand + +function pad(n, width, z) { + z = z || '0'; + n = n + ''; + return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; +} + function braceExpand (pattern, options) { options = options || this.options pattern = typeof pattern === "undefined" @@ -332,13 +339,18 @@ function braceExpand (pattern, options) { this.debug("numset", numset[1], numset[2]) var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) , start = +numset[1] + , needPadding = numset[1][0] === '0' + , startWidth = numset[1].length + , padded , end = +numset[2] , inc = start > end ? -1 : 1 , set = [] + for (var i = start; i != (end + inc); i += inc) { + padded = needPadding ? pad(i, startWidth) : i + '' // append all the suffixes for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - set.push(i + suf[ii]) + set.push(padded + suf[ii]) } } return set diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/package.json index 4472725..d70041d 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/lru-cache/package.json @@ -29,5 +29,5 @@ }, "homepage": "https://github.com/isaacs/node-lru-cache", "_id": "lru-cache@2.5.0", - "_from": "lru-cache@2" + "_from": "lru-cache@>=2.0.0-0 <3.0.0-0" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/package.json index cb7e2bd..23ceea0 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/node_modules/sigmund/package.json @@ -38,5 +38,5 @@ }, "homepage": "https://github.com/isaacs/sigmund", "_id": "sigmund@1.0.0", - "_from": "sigmund@~1.0.0" + "_from": "sigmund@>=1.0.0-0 <1.1.0-0" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/package.json index 4ca5979..729548b 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/package.json @@ -6,7 +6,7 @@ }, "name": "minimatch", "description": "a glob matcher in javascript", - "version": "0.3.0", + "version": "1.0.0", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" @@ -29,14 +29,30 @@ "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 if this option is set. When not set, an empty list\nis returned if there are no 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", + "gitHead": "b374a643976eb55cdc19c60b6dd51ebe9bcc607a", "bugs": { "url": "https://github.com/isaacs/minimatch/issues" }, "homepage": "https://github.com/isaacs/minimatch", - "_id": "minimatch@0.3.0", - "_shasum": "275d8edaac4f1bb3326472089e7949c8394699dd", - "_from": "minimatch@^0.3.0", - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz" + "_id": "minimatch@1.0.0", + "_shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d", + "_from": "minimatch@>=1.0.0-0 <2.0.0-0", + "_npmVersion": "1.4.21", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/brace-expand.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/brace-expand.js index 7ee278a..e63d3f6 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/brace-expand.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/test/brace-expand.js @@ -21,6 +21,13 @@ tap.test("brace expansion", function (t) { , "a4b" , "a5b" ] ] , [ "a{b}c", ["a{b}c"] ] + , [ "a{00..05}b" + , ["a00b" + ,"a01b" + ,"a02b" + ,"a03b" + ,"a04b" + ,"a05b" ] ] ].forEach(function (tc) { var p = tc[0] , expect = tc[1] diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/ordered-read-streams/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/ordered-read-streams/package.json index f9cfd4d..5ab3a99 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/ordered-read-streams/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/ordered-read-streams/package.json @@ -45,6 +45,5 @@ ], "directories": {}, "_shasum": "fd921331b1a130b66aeef711b219aee01d89e0c5", - "_resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.0.8.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.0.8.tgz" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/unique-stream/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/unique-stream/package.json index 58880cf..2ac03c5 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/unique-stream/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/unique-stream/package.json @@ -36,7 +36,7 @@ "shasum": "d59a4a75427447d9aa6c91e70263f8d26a4b104b", "tarball": "http://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz" }, - "_from": "unique-stream@^1.0.0", + "_from": "unique-stream@>=1.0.0-0 <2.0.0-0", "_npmVersion": "1.4.3", "_npmUser": { "name": "eugeneware", diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/package.json index 4f01967..1fb29b7 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/package.json @@ -1,7 +1,7 @@ { "name": "glob-stream", "description": "File system globs as a stream", - "version": "3.1.14", + "version": "3.1.15", "homepage": "http://github.com/wearefractal/glob-stream", "repository": { "type": "git", @@ -15,18 +15,18 @@ "main": "./index.js", "dependencies": { "glob": "^4.0.0", - "minimatch": "^0.3.0", + "minimatch": "^1.0.0", "ordered-read-streams": "0.0.8", - "glob2base": "^0.0.9", + "glob2base": "^0.0.11", "unique-stream": "^1.0.0", - "through2": "^0.5.1" + "through2": "^0.6.1" }, "devDependencies": { "mocha": "^1.17.0", "should": "^4.0.0", "mocha-lcov-reporter": "0.0.1", "coveralls": "^2.6.1", - "istanbul": "^0.2.3", + "istanbul": "^0.3.0", "rimraf": "^2.2.5", "jshint": "^2.4.1" }, @@ -43,14 +43,14 @@ "url": "http://github.com/wearefractal/glob-stream/raw/master/LICENSE" } ], - "gitHead": "f670ab68053cf21d8048d12b568f7f6973f70ee0", + "gitHead": "0923af26161489610becddd6f8de7ea3f2293979", "bugs": { "url": "https://github.com/wearefractal/glob-stream/issues" }, - "_id": "glob-stream@3.1.14", - "_shasum": "4a01ac53219c9582404858c6b76008fba0b10bf8", - "_from": "glob-stream@^3.1.5", - "_npmVersion": "1.5.0-alpha-1", + "_id": "glob-stream@3.1.15", + "_shasum": "084bdbe9d8203fbb48bcf05c382dbb7e6666f8f5", + "_from": "glob-stream@>=3.1.5-0 <4.0.0-0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -62,10 +62,9 @@ } ], "dist": { - "shasum": "4a01ac53219c9582404858c6b76008fba0b10bf8", - "tarball": "http://registry.npmjs.org/glob-stream/-/glob-stream-3.1.14.tgz" + "shasum": "084bdbe9d8203fbb48bcf05c382dbb7e6666f8f5", + "tarball": "http://registry.npmjs.org/glob-stream/-/glob-stream-3.1.15.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.14.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.15.tgz" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/node_modules/globule/node_modules/glob/node_modules/inherits/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/node_modules/globule/node_modules/glob/node_modules/inherits/package.json index 5ac5551..2930a14 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/node_modules/globule/node_modules/glob/node_modules/inherits/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/node_modules/globule/node_modules/glob/node_modules/inherits/package.json @@ -41,5 +41,6 @@ "url": "https://github.com/isaacs/inherits/issues" }, "readme": "ERROR: No README data found!", - "homepage": "https://github.com/isaacs/inherits" + "homepage": "https://github.com/isaacs/inherits", + "scripts": {} } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/package.json index 62a570f..ae9867c 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/package.json @@ -52,7 +52,7 @@ "shasum": "22e731078ef3e49d1c4ab1115ac091192051824c", "tarball": "http://registry.npmjs.org/gaze/-/gaze-0.5.1.tgz" }, - "_from": "gaze@^0.5.1", + "_from": "gaze@0.5.1", "_npmVersion": "1.2.30", "_npmUser": { "name": "shama", diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/package.json index 77bc77e..db7127e 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/package.json @@ -44,7 +44,7 @@ }, "_id": "glob-watcher@0.0.6", "_shasum": "b95b4a8df74b39c83298b0c05c978b4d9a3b710b", - "_from": "glob-watcher@^0.0.6", + "_from": "glob-watcher@=0.0.6", "_npmVersion": "1.4.7", "_npmUser": { "name": "fractal", @@ -61,6 +61,5 @@ "tarball": "http://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/graceful-fs/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/graceful-fs/package.json index b93a2a1..1c6b781 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/graceful-fs/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/graceful-fs/package.json @@ -45,7 +45,7 @@ "homepage": "https://github.com/isaacs/node-graceful-fs", "_id": "graceful-fs@3.0.2", "_shasum": "2cb5bf7f742bea8ad47c754caeee032b7e71a577", - "_from": "graceful-fs@^3.0.0", + "_from": "graceful-fs@>=3.0.0-0 <4.0.0-0", "_npmVersion": "1.4.14", "_npmUser": { "name": "isaacs", diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/lodash.defaults/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/README.md deleted file mode 100644 index da283fc..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/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/node_modules/vinyl-fs/node_modules/lodash.defaults/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/index.js deleted file mode 100644 index 52eec90..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de730..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6c..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd8..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/README.md deleted file mode 100644 index bee29a8..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/index.js deleted file mode 100644 index 139568a..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/package.json deleted file mode 100644 index 0dadd03..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,46 +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", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md deleted file mode 100644 index 23f3000..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js deleted file mode 100644 index 12be0bf..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json deleted file mode 100644 index 467f461..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json +++ /dev/null @@ -1,78 +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", - "tarball": "http://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz" - }, - "_from": "lodash._shimkeys@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "6e9cc9666ff081f0b5a6c978b83e242e6949d203", - "_resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/README.md deleted file mode 100644 index eeb0a78..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/index.js deleted file mode 100644 index 3596ac3..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT 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/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/package.json deleted file mode 100644 index adfee42..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/package.json +++ /dev/null @@ -1,56 +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", - "scripts": {} -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/package.json deleted file mode 100644 index 76a7e22..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/package.json +++ /dev/null @@ -1,87 +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", - "tarball": "http://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz" - }, - "_from": "lodash.keys@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "48dea46df8ff7632b10d706b8acb26591e2b3727", - "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz" -} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/package.json deleted file mode 100644 index 0955275..0000000 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/package.json +++ /dev/null @@ -1,86 +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", - "tarball": "http://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz" - }, - "_from": "lodash.defaults@~2.4.1", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "directories": {}, - "_shasum": "a7e8885f05e68851144b6e12a8f3678026bc4c54", - "_resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz" -} diff --git a/node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/LICENSE.txt b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/LICENSE.txt similarity index 100% rename from node_modules/gulp-watch/node_modules/glob2base/node_modules/lodash.findindex/node_modules/lodash.createcallback/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/LICENSE.txt rename to node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/LICENSE.txt diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/README.md new file mode 100644 index 0000000..6f9598e --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/README.md @@ -0,0 +1,163 @@ +# Lo-Dash v2.4.1 +A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features). + +## Download + +Check out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences]) for details over the differences between builds. + +* Modern builds perfect for newer browsers/environments:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.min.js) + +* Compatibility builds for older environment support too:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.compat.min.js) + +* Underscore builds to use as a drop-in replacement:
+[Development](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.js) & +[Production](https://raw.github.com/lodash/lodash/2.4.1/dist/lodash.underscore.min.js) + +CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed. + +Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method. + +## Dive in + +There’s plenty of **[documentation](http://lodash.com/docs)**, [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).
+Check out DevDocs as a fast, organized, & searchable interface for our documentation. + +The full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).
+A list of upcoming features is available on our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap). + +## Features *not* in Underscore + + * AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.) + * [_(…)](http://lodash.com/docs#_) supports intuitive chaining + * [_.at](http://lodash.com/docs#at) for cherry-picking collection values + * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.constant](http://lodash.com/docs#constant) & [_.property](http://lodash.com/docs#property) function generators for composing functions + * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` + * [_.create](http://lodash.com/docs#create) for easier object inheritance + * [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins + * [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions + * [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control + * [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys + * [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early + * [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties + * [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties + * [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object` + * [_.mapValues](http://lodash.com/docs#mapValues) for [mapping](http://lodash.com/docs#map) values to an object + * [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions + * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend) + * [_.noop](http://lodash.com/docs#noop) for function placeholders + * [_.now](http://lodash.com/docs#now) as a cross-browser `Date.now` alternative + * [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior + * [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays + * [_.random](http://lodash.com/docs#random) supports returning floating-point numbers + * [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking + * [_.sortBy](http://lodash.com/docs#sortBy) supports sorting by multiple properties + * [_.support](http://lodash.com/docs#support) for flagging environment features + * [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals) + * [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects + * [_.where](http://lodash.com/docs#where) supports deep object comparisons + * [_.xor](http://lodash.com/docs#xor) as a companion to [_.difference](http://lodash.com/docs#difference), [_.intersection](http://lodash.com/docs#intersection), & [_.union](http://lodash.com/docs#union) + * [_.zip](http://lodash.com/docs#zip) is capable of unzipping values + * [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), & + [more](http://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks + * [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), & + [more](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings + * [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), & + [more](http://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands + * [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), & + [more](http://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight") right-associative methods + +## Resources + + * Podcasts + - [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/) + + * Posts + - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/) + - [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/) + + * Videos + - [Introduction](https://vimeo.com/44154599) + - [Origins](https://vimeo.com/44154600) + - [Optimizations & builds](https://vimeo.com/44154601) + - [Native method use](https://vimeo.com/48576012) + - [Testing](https://vimeo.com/45865290) + - [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk) + + A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources). + +## Support + +Tested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.21~0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
+Automated browser test results [are available](https://saucelabs.com/u/lodash) as well as [Travis CI](https://travis-ci.org/) builds for [lodash](https://travis-ci.org/lodash/lodash/), [lodash-cli](https://travis-ci.org/lodash/lodash-cli/), [lodash-amd](https://travis-ci.org/lodash/lodash-amd/), [lodash-node](https://travis-ci.org/lodash/lodash-node/), & [grunt-lodash](https://travis-ci.org/lodash/grunt-lodash). + +Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
+[![Sauce Labs](http://lodash.com/_img/sauce.png)](https://saucelabs.com/ "Sauce Labs: Selenium Testing & More") + +## Installation & usage + +In browsers: + +```html + +``` + +Using [`npm`](http://npmjs.org/): + +```bash +npm i --save lodash + +{sudo} npm i -g lodash +npm ln lodash +``` + +In [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/): + +```js +var _ = require('lodash'); +// or as Underscore +var _ = require('lodash/dist/lodash.underscore'); +``` + +**Notes:** + * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL + * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it + +In [Rhino](http://www.mozilla.org/rhino/): + +```js +load('lodash.js'); +``` + +In an AMD loader: + +```js +require({ + 'packages': [ + { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' } + ] +}, +['lodash'], function(_) { + console.log(_.VERSION); +}); +``` + +## 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/) | + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.compat.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.compat.js new file mode 100644 index 0000000..23798ba --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash/dist/lodash.compat.js @@ -0,0 +1,7157 @@ +/** + * @license + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash -o ./dist/lodash.compat.js` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre ES5 environments */ + var undefined; + + /** Used to pool arrays and objects used internally */ + var arrayPool = [], + objectPool = []; + + /** Used to generate unique IDs */ + var idCounter = 0; + + /** Used internally to indicate various things */ + var indicatorObject = {}; + + /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */ + var keyPrefix = +new Date + ''; + + /** Used as the size when optimizations are enabled for large arrays */ + var largeArraySize = 75; + + /** Used as the max size of the `arrayPool` and `objectPool` */ + var maxPoolSize = 40; + + /** Used to detect and test whitespace */ + var whitespace = ( + // whitespace + ' \t\x0B\f\xA0\ufeff' + + + // line terminators + '\n\r\u2028\u2029' + + + // unicode category "Zs" space separators + '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' + ); + + /** 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 match regexp flags from their coerced string values */ + var reFlags = /\w*$/; + + /** Used to detected named functions */ + var reFuncName = /^\s*function[ \n\r\t]+\w/; + + /** Used to match "interpolate" template delimiters */ + var reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match leading whitespace and zeros to be removed */ + var reLeadingSpacesAndZeros = RegExp('^[' + whitespace + ']*0+(?=.$)'); + + /** Used to ensure capturing order of template delimiters */ + var reNoMatch = /($^)/; + + /** Used to detect functions containing a `this` reference */ + var reThis = /\bthis\b/; + + /** Used to match unescaped characters in compiled string literals */ + var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; + + /** Used to assign default `context` object properties */ + var contextProps = [ + 'Array', 'Boolean', 'Date', 'Error', 'Function', 'Math', 'Number', 'Object', + 'RegExp', 'String', '_', 'attachEvent', 'clearTimeout', 'isFinite', 'isNaN', + 'parseInt', 'setTimeout' + ]; + + /** Used to fix the JScript [[DontEnum]] bug */ + var shadowedProps = [ + 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', + 'toLocaleString', 'toString', 'valueOf' + ]; + + /** Used to make template sourceURLs easier to identify */ + var templateCounter = 0; + + /** `Object#toString` result shortcuts */ + var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + boolClass = '[object Boolean]', + dateClass = '[object Date]', + errorClass = '[object Error]', + funcClass = '[object Function]', + numberClass = '[object Number]', + objectClass = '[object Object]', + regexpClass = '[object RegExp]', + stringClass = '[object String]'; + + /** Used to identify object classifications that `_.clone` supports */ + var cloneableClasses = {}; + cloneableClasses[funcClass] = false; + cloneableClasses[argsClass] = cloneableClasses[arrayClass] = + cloneableClasses[boolClass] = cloneableClasses[dateClass] = + cloneableClasses[numberClass] = cloneableClasses[objectClass] = + cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true; + + /** Used as an internal `_.debounce` options object */ + var debounceOptions = { + 'leading': false, + 'maxWait': 0, + 'trailing': false + }; + + /** Used as the property descriptor for `__bindData__` */ + var descriptor = { + 'configurable': false, + 'enumerable': false, + 'value': null, + 'writable': false + }; + + /** Used as the data object for `iteratorTemplate` */ + var iteratorData = { + 'args': '', + 'array': null, + 'bottom': '', + 'firstArg': '', + 'init': '', + 'keys': null, + 'loop': '', + 'shadowedProps': null, + 'support': null, + 'top': '', + 'useHas': false + }; + + /** 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 + }; + + /** Used to escape characters for inclusion in compiled string literals */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\t': 't', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Used as a reference to the global object */ + var root = (objectTypes[typeof window] && window) || this; + + /** Detect free variable `exports` */ + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports` */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + + /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ + var freeGlobal = objectTypes[typeof global] && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.indexOf` without support for binary searches + * or `fromIndex` constraints. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * An implementation of `_.contains` for cache objects that mimics the return + * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var type = typeof value; + cache = cache.cache; + + if (type == 'boolean' || value == null) { + return cache[value] ? 0 : -1; + } + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value; + cache = (cache = cache[type]) && cache[key]; + + return type == 'object' + ? (cache && baseIndexOf(cache, value) > -1 ? 0 : -1) + : (cache ? 0 : -1); + } + + /** + * Adds a given value to the corresponding cache object. + * + * @private + * @param {*} value The value to add to the cache. + */ + function cachePush(value) { + var cache = this.cache, + type = typeof value; + + if (type == 'boolean' || value == null) { + cache[value] = true; + } else { + if (type != 'number' && type != 'string') { + type = 'object'; + } + var key = type == 'number' ? value : keyPrefix + value, + typeCache = cache[type] || (cache[type] = {}); + + if (type == 'object') { + (typeCache[key] || (typeCache[key] = [])).push(value); + } else { + typeCache[key] = true; + } + } + } + + /** + * Used by `_.max` and `_.min` as the default callback when a given + * collection is a string value. + * + * @private + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. + */ + function charAtCallback(value) { + return value.charCodeAt(0); + } + + /** + * Used by `sortBy` to compare transformed `collection` elements, stable sorting + * them in ascending order. + * + * @private + * @param {Object} a The object to compare to `b`. + * @param {Object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. + */ + function compareAscending(a, b) { + var ac = a.criteria, + bc = b.criteria, + index = -1, + length = ac.length; + + while (++index < length) { + var value = ac[index], + other = bc[index]; + + if (value !== other) { + if (value > other || typeof value == 'undefined') { + return 1; + } + if (value < other || typeof other == 'undefined') { + return -1; + } + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to return the same value for + // `a` and `b`. See https://github.com/jashkenas/underscore/pull/1247 + // + // This also ensures a stable sort in V8 and other engines. + // See http://code.google.com/p/v8/issues/detail?id=90 + return a.index - b.index; + } + + /** + * Creates a cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [array=[]] The array to search. + * @returns {null|Object} Returns the cache object or `null` if caching should not be used. + */ + function createCache(array) { + var index = -1, + length = array.length, + first = array[0], + mid = array[(length / 2) | 0], + last = array[length - 1]; + + if (first && typeof first == 'object' && + mid && typeof mid == 'object' && last && typeof last == 'object') { + return false; + } + var cache = getObject(); + cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false; + + var result = getObject(); + result.array = array; + result.cache = cache; + result.push = cachePush; + + while (++index < length) { + result.push(array[index]); + } + return result; + } + + /** + * 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]; + } + + /** + * Gets an array from the array pool or creates a new one if the pool is empty. + * + * @private + * @returns {Array} The array from the pool. + */ + function getArray() { + return arrayPool.pop() || []; + } + + /** + * Gets an object from the object pool or creates a new one if the pool is empty. + * + * @private + * @returns {Object} The object from the pool. + */ + function getObject() { + return objectPool.pop() || { + 'array': null, + 'cache': null, + 'criteria': null, + 'false': false, + 'index': 0, + 'null': false, + 'number': null, + 'object': null, + 'push': null, + 'string': null, + 'true': false, + 'undefined': false, + 'value': null + }; + } + + /** + * Checks if `value` is a DOM node in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM node, else `false`. + */ + function isNode(value) { + // IE < 9 presents DOM nodes as `Object` objects except they have `toString` + // methods that are `typeof` "string" and still can coerce nodes to strings + return typeof value.toString != 'function' && typeof (value + '') == 'string'; + } + + /** + * Releases the given array back to the array pool. + * + * @private + * @param {Array} [array] The array to release. + */ + function releaseArray(array) { + array.length = 0; + if (arrayPool.length < maxPoolSize) { + arrayPool.push(array); + } + } + + /** + * Releases the given object back to the object pool. + * + * @private + * @param {Object} [object] The object to release. + */ + function releaseObject(object) { + var cache = object.cache; + if (cache) { + releaseObject(cache); + } + object.array = object.cache = object.criteria = object.object = object.number = object.string = object.value = null; + if (objectPool.length < maxPoolSize) { + objectPool.push(object); + } + } + + /** + * Slices the `collection` from the `start` index up to, but not including, + * the `end` index. + * + * Note: This function is used instead of `Array#slice` to support node lists + * in IE < 9 and to ensure dense arrays are returned. + * + * @private + * @param {Array|Object|string} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {Array} Returns the new array. + */ + function slice(array, start, end) { + start || (start = 0); + if (typeof end == 'undefined') { + end = array ? array.length : 0; + } + var index = -1, + length = end - start || 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = array[start + index]; + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new `lodash` function using the given context object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} [context=root] The context object. + * @returns {Function} Returns the `lodash` function. + */ + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See http://es5.github.io/#x11.1.5. + context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; + + /** Native constructor references */ + var Array = context.Array, + Boolean = context.Boolean, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ + var arrayRef = []; + + /** Used for native method references */ + var errorProto = Error.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + + /** Used to restore the original `_` reference in `noConflict` */ + var oldDash = context._; + + /** 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, '.*?') + '$' + ); + + /** Native method shortcuts */ + var ceil = Math.ceil, + clearTimeout = context.clearTimeout, + floor = Math.floor, + fnToString = Function.prototype.toString, + getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf, + hasOwnProperty = objectProto.hasOwnProperty, + push = arrayRef.push, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + setTimeout = context.setTimeout, + splice = arrayRef.splice, + unshift = arrayRef.unshift; + + /** Used to set meta data on functions */ + var defineProperty = (function() { + // IE 8 only accepts DOM elements + try { + var o = {}, + func = isNative(func = Object.defineProperty) && func, + result = func(o, o, o) && func; + } catch(e) { } + return result; + }()); + + /* Native method shortcuts for methods with the same name as other `lodash` methods */ + var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate, + nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray, + nativeIsFinite = context.isFinite, + nativeIsNaN = context.isNaN, + nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys, + nativeMax = Math.max, + nativeMin = Math.min, + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + + /** Used to lookup a built-in constructor by [[Class]] */ + var ctorByClass = {}; + ctorByClass[arrayClass] = Array; + ctorByClass[boolClass] = Boolean; + ctorByClass[dateClass] = Date; + ctorByClass[funcClass] = Function; + ctorByClass[objectClass] = Object; + ctorByClass[numberClass] = Number; + ctorByClass[regexpClass] = RegExp; + ctorByClass[stringClass] = String; + + /** Used to avoid iterating non-enumerable properties in IE < 9 */ + var nonEnumProps = {}; + nonEnumProps[arrayClass] = nonEnumProps[dateClass] = nonEnumProps[numberClass] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; + nonEnumProps[boolClass] = nonEnumProps[stringClass] = { 'constructor': true, 'toString': true, 'valueOf': true }; + nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true }; + nonEnumProps[objectClass] = { 'constructor': true }; + + (function() { + var length = shadowedProps.length; + while (length--) { + var key = shadowedProps[length]; + for (var className in nonEnumProps) { + if (hasOwnProperty.call(nonEnumProps, className) && !hasOwnProperty.call(nonEnumProps[className], key)) { + nonEnumProps[className][key] = false; + } + } + } + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps the given value to enable intuitive + * method chaining. + * + * In addition to Lo-Dash methods, wrappers also have the following `Array` methods: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, + * and `unshift` + * + * Chaining is supported in custom builds as long as the `value` method is + * implicitly or explicitly included in the build. + * + * The chainable wrapper functions are: + * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, + * `compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`, + * `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, + * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`, + * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, + * `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, + * `union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, + * and `zip` + * + * The non-chainable wrapper functions are: + * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`, + * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, + * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, + * `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, + * `template`, `unescape`, `uniqueId`, and `value` + * + * The wrapper functions `first` and `last` return wrapped values when `n` is + * provided, otherwise they return unwrapped values. + * + * Explicit chaining can be enabled by using the `_.chain` method. + * + * @name _ + * @constructor + * @category Chaining + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(num) { + * return num * num; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + // don't wrap if already wrapped, even if wrapped by a different `lodash` constructor + return (value && typeof value == 'object' && !isArray(value) && hasOwnProperty.call(value, '__wrapped__')) + ? value + : new lodashWrapper(value); + } + + /** + * A fast path for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {Object} Returns a `lodash` instance. + */ + function lodashWrapper(value, chainAll) { + this.__chain__ = !!chainAll; + this.__wrapped__ = value; + } + // ensure `new lodashWrapper` is an instance of `lodash` + lodashWrapper.prototype = lodash.prototype; + + /** + * An object used to flag environments features. + * + * @static + * @memberOf _ + * @type Object + */ + var support = lodash.support = {}; + + (function() { + var ctor = function() { this.x = 1; }, + object = { '0': 1, 'length': 1 }, + props = []; + + ctor.prototype = { 'valueOf': 1, 'y': 1 }; + for (var key in new ctor) { props.push(key); } + for (key in arguments) { } + + /** + * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.argsClass = toString.call(arguments) == argsClass; + + /** + * Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5). + * + * @memberOf _.support + * @type boolean + */ + support.argsObject = arguments.constructor == Object && !(arguments instanceof Array); + + /** + * Detect if `name` or `message` properties of `Error.prototype` are + * enumerable by default. (IE < 9, Safari < 5.1) + * + * @memberOf _.support + * @type boolean + */ + support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); + + /** + * Detect if `prototype` properties are enumerable by default. + * + * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 + * (if the prototype or a property on the prototype has been set) + * incorrectly sets a function's `prototype` property [[Enumerable]] + * value to `true`. + * + * @memberOf _.support + * @type boolean + */ + support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); + + /** + * Detect if functions can be decompiled by `Function#toString` + * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). + * + * @memberOf _.support + * @type boolean + */ + support.funcDecomp = !isNative(context.WinRTError) && reThis.test(runInContext); + + /** + * Detect if `Function#name` is supported (all but IE). + * + * @memberOf _.support + * @type boolean + */ + support.funcNames = typeof Function.name == 'string'; + + /** + * Detect if `arguments` object indexes are non-enumerable + * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumArgs = key != 0; + + /** + * Detect if properties shadowing those on `Object.prototype` are non-enumerable. + * + * In IE < 9 an objects own properties, shadowing non-enumerable ones, are + * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumShadows = !/valueOf/.test(props); + + /** + * Detect if own properties are iterated after inherited properties (all but IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.ownLast = props[0] != 'x'; + + /** + * Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. + * + * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` + * and `splice()` functions that fail to remove the last element, `value[0]`, + * of array-like objects even though the `length` property is set to `0`. + * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` + * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. + * + * @memberOf _.support + * @type boolean + */ + support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); + + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index and IE 8 can only access + * characters by index on string literals. + * + * @memberOf _.support + * @type boolean + */ + support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; + + /** + * Detect if a DOM node's [[Class]] is resolvable (all but IE < 9) + * and that the JS engine errors when attempting to coerce an object to + * a string without a `toString` function. + * + * @memberOf _.support + * @type boolean + */ + try { + support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); + } catch(e) { + support.nodeClass = true; + } + }(1)); + + /** + * 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 + */ + lodash.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 + */ + '_': lodash + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The template used to create iterator functions. + * + * @private + * @param {Object} data The data object used to populate the text. + * @returns {string} Returns the interpolated text. + */ + var iteratorTemplate = function(obj) { + + var __p = 'var index, iterable = ' + + (obj.firstArg) + + ', result = ' + + (obj.init) + + ';\nif (!iterable) return result;\n' + + (obj.top) + + ';'; + if (obj.array) { + __p += '\nvar length = iterable.length; index = -1;\nif (' + + (obj.array) + + ') { '; + if (support.unindexedChars) { + __p += '\n if (isString(iterable)) {\n iterable = iterable.split(\'\')\n } '; + } + __p += '\n while (++index < length) {\n ' + + (obj.loop) + + ';\n }\n}\nelse { '; + } else if (support.nonEnumArgs) { + __p += '\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += \'\';\n ' + + (obj.loop) + + ';\n }\n } else { '; + } + + if (support.enumPrototypes) { + __p += '\n var skipProto = typeof iterable == \'function\';\n '; + } + + if (support.enumErrorProps) { + __p += '\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n '; + } + + var conditions = []; if (support.enumPrototypes) { conditions.push('!(skipProto && index == "prototype")'); } if (support.enumErrorProps) { conditions.push('!(skipErrorProps && (index == "message" || index == "name"))'); } + + if (obj.useHas && obj.keys) { + __p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n'; + if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + } else { + __p += '\n for (index in iterable) {\n'; + if (obj.useHas) { conditions.push("hasOwnProperty.call(iterable, index)"); } if (conditions.length) { + __p += ' if (' + + (conditions.join(' && ')) + + ') {\n '; + } + __p += + (obj.loop) + + '; '; + if (conditions.length) { + __p += '\n }'; + } + __p += '\n } '; + if (support.nonEnumShadows) { + __p += '\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n '; + for (k = 0; k < 7; k++) { + __p += '\n index = \'' + + (obj.shadowedProps[k]) + + '\';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))'; + if (!obj.useHas) { + __p += ' || (!nonEnum[index] && iterable[index] !== objectProto[index])'; + } + __p += ') {\n ' + + (obj.loop) + + ';\n } '; + } + __p += '\n } '; + } + + } + + if (obj.array || support.nonEnumArgs) { + __p += '\n}'; + } + __p += + (obj.bottom) + + ';\nreturn result'; + + return __p + }; + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.bind` that creates the bound function and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new bound function. + */ + function baseBind(bindData) { + var func = bindData[0], + partialArgs = bindData[2], + thisArg = bindData[4]; + + function bound() { + // `Function#bind` spec + // http://es5.github.io/#x15.3.4.5 + if (partialArgs) { + // avoid `arguments` object deoptimizations by using `slice` instead + // of `Array.prototype.slice.call` and not assigning `arguments` to a + // variable as a ternary expression + var args = slice(partialArgs); + push.apply(args, arguments); + } + // mimic the constructor's `return` behavior + // http://es5.github.io/#x13.2.2 + if (this instanceof bound) { + // ensure `new bound` is an instance of `func` + var thisBinding = baseCreate(func.prototype), + result = func.apply(thisBinding, args || arguments); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisArg, args || arguments); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.clone` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, callback, stackA, stackB) { + if (callback) { + var result = callback(value); + if (typeof result != 'undefined') { + return result; + } + } + // inspect [[Class]] + var isObj = isObject(value); + if (isObj) { + var className = toString.call(value); + if (!cloneableClasses[className] || (!support.nodeClass && isNode(value))) { + return value; + } + var ctor = ctorByClass[className]; + switch (className) { + case boolClass: + case dateClass: + return new ctor(+value); + + case numberClass: + case stringClass: + return new ctor(value); + + case regexpClass: + result = ctor(value.source, reFlags.exec(value)); + result.lastIndex = value.lastIndex; + return result; + } + } else { + return value; + } + var isArr = isArray(value); + if (isDeep) { + // check for circular references and return corresponding clone + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + result = isArr ? ctor(value.length) : {}; + } + else { + result = isArr ? slice(value) : assign({}, value); + } + // add array properties assigned by `RegExp#exec` + if (isArr) { + if (hasOwnProperty.call(value, 'index')) { + result.index = value.index; + } + if (hasOwnProperty.call(value, 'input')) { + result.input = value.input; + } + } + // exit for shallow clone + if (!isDeep) { + return result; + } + // add the source value to the stack of traversed objects + // and associate it with its clone + stackA.push(value); + stackB.push(result); + + // recursively populate clone (susceptible to call stack limits) + (isArr ? baseEach : forOwn)(value, function(objValue, key) { + result[key] = baseClone(objValue, isDeep, callback, stackA, stackB); + }); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + function baseCreate(prototype, properties) { + return isObject(prototype) ? nativeCreate(prototype) : {}; + } + // fallback for browsers without `Object.create` + if (!nativeCreate) { + baseCreate = (function() { + function Object() {} + return function(prototype) { + if (isObject(prototype)) { + Object.prototype = prototype; + var result = new Object; + Object.prototype = null; + } + return result || context.Object(); + }; + }()); + } + + /** + * The base implementation of `_.createCallback` without support for creating + * "_.pluck" or "_.where" style callbacks. + * + * @private + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + */ + function baseCreateCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + // exit early for no `thisArg` or already bound by `Function#bind` + if (typeof thisArg == 'undefined' || !('prototype' in func)) { + return func; + } + var bindData = func.__bindData__; + if (typeof bindData == 'undefined') { + if (support.funcNames) { + bindData = !func.name; + } + bindData = bindData || !support.funcDecomp; + if (!bindData) { + var source = fnToString.call(func); + if (!support.funcNames) { + bindData = !reFuncName.test(source); + } + if (!bindData) { + // checks if `func` references the `this` keyword and stores the result + bindData = reThis.test(source); + setBindData(func, bindData); + } + } + } + // exit early if there are no `this` references or `func` is bound + if (bindData === false || (bindData !== true && bindData[1] & 1)) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 2: return function(a, b) { + return func.call(thisArg, a, b); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + } + return bind(func, thisArg); + } + + /** + * The base implementation of `createWrapper` that creates the wrapper and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new function. + */ + function baseCreateWrapper(bindData) { + var func = bindData[0], + bitmask = bindData[1], + partialArgs = bindData[2], + partialRightArgs = bindData[3], + thisArg = bindData[4], + arity = bindData[5]; + + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + key = func; + + function bound() { + var thisBinding = isBind ? thisArg : this; + if (partialArgs) { + var args = slice(partialArgs); + push.apply(args, arguments); + } + if (partialRightArgs || isCurry) { + args || (args = slice(arguments)); + if (partialRightArgs) { + push.apply(args, partialRightArgs); + } + if (isCurry && args.length < arity) { + bitmask |= 16 & ~32; + return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]); + } + } + args || (args = arguments); + if (isBindKey) { + func = thisBinding[key]; + } + if (this instanceof bound) { + thisBinding = baseCreate(func.prototype); + var result = func.apply(thisBinding, args); + return isObject(result) ? result : thisBinding; + } + return func.apply(thisBinding, args); + } + setBindData(bound, bindData); + return bound; + } + + /** + * The base implementation of `_.difference` that accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to process. + * @param {Array} [values] The array of values to exclude. + * @returns {Array} Returns a new array of filtered values. + */ + function baseDifference(array, values) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + isLarge = length >= largeArraySize && indexOf === baseIndexOf, + result = []; + + if (isLarge) { + var cache = createCache(values); + if (cache) { + indexOf = cacheIndexOf; + values = cache; + } else { + isLarge = false; + } + } + while (++index < length) { + var value = array[index]; + if (indexOf(values, value) < 0) { + result.push(value); + } + } + if (isLarge) { + releaseObject(values); + } + return result; + } + + /** + * The base implementation of `_.flatten` without support for callback + * shorthands or `thisArg` binding. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isStrict=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {Array} Returns a new flattened array. + */ + function baseFlatten(array, isShallow, isStrict, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (value && typeof value == 'object' && typeof value.length == 'number' + && (isArray(value) || isArguments(value))) { + // recursively flatten arrays (susceptible to call stack limits) + if (!isShallow) { + value = baseFlatten(value, isShallow, isStrict); + } + var valIndex = -1, + valLength = value.length, + resIndex = result.length; + + result.length += valLength; + while (++valIndex < valLength) { + result[resIndex++] = value[valIndex]; + } + } else if (!isStrict) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.isEqual`, without support for `thisArg` binding, + * that allows partial "_.where" style comparisons. + * + * @private + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `a` objects. + * @param {Array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { + // used to indicate that when comparing objects, `a` has at least the properties of `b` + if (callback) { + var result = callback(a, b); + if (typeof result != 'undefined') { + return !!result; + } + } + // exit early for identical values + if (a === b) { + // treat `+0` vs. `-0` as not equal + return a !== 0 || (1 / a == 1 / b); + } + var type = typeof a, + otherType = typeof b; + + // exit early for unlike primitive values + if (a === a && + !(a && objectTypes[type]) && + !(b && objectTypes[otherType])) { + return false; + } + // exit early for `null` and `undefined` avoiding ES3's Function#call behavior + // http://es5.github.io/#x15.3.4.4 + if (a == null || b == null) { + return a === b; + } + // compare [[Class]] names + var className = toString.call(a), + otherClass = toString.call(b); + + if (className == argsClass) { + className = objectClass; + } + if (otherClass == argsClass) { + otherClass = objectClass; + } + if (className != otherClass) { + return false; + } + switch (className) { + case boolClass: + case dateClass: + // coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal + return +a == +b; + + case numberClass: + // treat `NaN` vs. `NaN` as equal + return (a != +a) + ? b != +b + // but treat `+0` vs. `-0` as not equal + : (a == 0 ? (1 / a == 1 / b) : a == +b); + + case regexpClass: + case stringClass: + // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) + // treat string primitives and their corresponding object instances as equal + return a == String(b); + } + var isArr = className == arrayClass; + if (!isArr) { + // unwrap any `lodash` wrapped values + var aWrapped = hasOwnProperty.call(a, '__wrapped__'), + bWrapped = hasOwnProperty.call(b, '__wrapped__'); + + if (aWrapped || bWrapped) { + return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB); + } + // exit for functions and DOM nodes + if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) { + return false; + } + // in older versions of Opera, `arguments` objects have `Array` constructors + var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor, + ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor; + + // non `Object` object instances with different constructors are not equal + if (ctorA != ctorB && + !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && + ('constructor' in a && 'constructor' in b) + ) { + return false; + } + } + // assume cyclic structures are equal + // the algorithm for detecting cyclic structures is adapted from ES 5.1 + // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + + var length = stackA.length; + while (length--) { + if (stackA[length] == a) { + return stackB[length] == b; + } + } + var size = 0; + result = true; + + // add `a` and `b` to the stack of traversed objects + stackA.push(a); + stackB.push(b); + + // recursively compare objects and arrays (susceptible to call stack limits) + if (isArr) { + // compare lengths to determine if a deep comparison is necessary + length = a.length; + size = b.length; + result = size == length; + + if (result || isWhere) { + // deep compare the contents, ignoring non-numeric properties + while (size--) { + var index = length, + value = b[size]; + + if (isWhere) { + while (index--) { + if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) { + break; + } + } + } + } + else { + // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` + // which, in this case, is more costly + forIn(b, function(value, key, b) { + if (hasOwnProperty.call(b, key)) { + // count the number of properties. + size++; + // deep compare each property value. + return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB)); + } + }); + + if (result && !isWhere) { + // ensure both objects have the same number of properties + forIn(a, function(value, key, a) { + if (hasOwnProperty.call(a, key)) { + // `size` will be `-1` if `a` has more properties than `b` + return (result = --size > -1); + } + }); + } + } + stackA.pop(); + stackB.pop(); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + return result; + } + + /** + * The base implementation of `_.merge` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [callback] The function to customize merging properties. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + */ + function baseMerge(object, source, callback, stackA, stackB) { + (isArray(source) ? forEach : forOwn)(source, function(source, key) { + var found, + isArr, + result = source, + value = object[key]; + + if (source && ((isArr = isArray(source)) || isPlainObject(source))) { + // avoid merging previously merged cyclic sources + var stackLength = stackA.length; + while (stackLength--) { + if ((found = stackA[stackLength] == source)) { + value = stackB[stackLength]; + break; + } + } + if (!found) { + var isShallow; + if (callback) { + result = callback(value, source); + if ((isShallow = typeof result != 'undefined')) { + value = result; + } + } + if (!isShallow) { + value = isArr + ? (isArray(value) ? value : []) + : (isPlainObject(value) ? value : {}); + } + // add `source` and associated `value` to the stack of traversed objects + stackA.push(source); + stackB.push(value); + + // recursively merge objects and arrays (susceptible to call stack limits) + if (!isShallow) { + baseMerge(value, source, callback, stackA, stackB); + } + } + } + else { + if (callback) { + result = callback(value, source); + if (typeof result == 'undefined') { + result = source; + } + } + if (typeof result != 'undefined') { + value = result; + } + } + object[key] = value; + }); + } + + /** + * The base implementation of `_.random` without argument juggling or support + * for returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns a random number. + */ + function baseRandom(min, max) { + return min + floor(nativeRandom() * (max - min + 1)); + } + + /** + * The base implementation of `_.uniq` without support for callback shorthands + * or `thisArg` binding. + * + * @private + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. + */ + function baseUniq(array, isSorted, callback) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + result = []; + + var isLarge = !isSorted && length >= largeArraySize && indexOf === baseIndexOf, + seen = (callback || isLarge) ? getArray() : result; + + if (isLarge) { + var cache = createCache(seen); + indexOf = cacheIndexOf; + seen = cache; + } + while (++index < length) { + var value = array[index], + computed = callback ? callback(value, index, array) : value; + + if (isSorted + ? !index || seen[seen.length - 1] !== computed + : indexOf(seen, computed) < 0 + ) { + if (callback || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + if (isLarge) { + releaseArray(seen.array); + releaseObject(seen); + } else if (callback) { + releaseArray(seen); + } + return result; + } + + /** + * Creates a function that aggregates a collection, creating an object composed + * of keys generated from the results of running each element of the collection + * through a callback. The given `setter` function sets the keys and values + * of the composed object. + * + * @private + * @param {Function} setter The setter function. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter) { + return function(collection, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, callback(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, callback(value, key, collection), collection); + }); + } + return result; + }; + } + + /** + * Creates a function that, when called, either curries or invokes `func` + * with an optional `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` + * 8 - `_.curry` (bound) + * 16 - `_.partial` + * 32 - `_.partialRight` + * @param {Array} [partialArgs] An array of arguments to prepend to those + * provided to the new function. + * @param {Array} [partialRightArgs] An array of arguments to append to those + * provided to the new function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new function. + */ + function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) { + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + isPartial = bitmask & 16, + isPartialRight = bitmask & 32; + + if (!isBindKey && !isFunction(func)) { + throw new TypeError; + } + if (isPartial && !partialArgs.length) { + bitmask &= ~16; + isPartial = partialArgs = false; + } + if (isPartialRight && !partialRightArgs.length) { + bitmask &= ~32; + isPartialRight = partialRightArgs = false; + } + var bindData = func && func.__bindData__; + if (bindData && bindData !== true) { + // clone `bindData` + bindData = slice(bindData); + if (bindData[2]) { + bindData[2] = slice(bindData[2]); + } + if (bindData[3]) { + bindData[3] = slice(bindData[3]); + } + // set `thisBinding` is not previously bound + if (isBind && !(bindData[1] & 1)) { + bindData[4] = thisArg; + } + // set if previously bound but not currently (subsequent curried functions) + if (!isBind && bindData[1] & 1) { + bitmask |= 8; + } + // set curried arity if not yet set + if (isCurry && !(bindData[1] & 4)) { + bindData[5] = arity; + } + // append partial left arguments + if (isPartial) { + push.apply(bindData[2] || (bindData[2] = []), partialArgs); + } + // append partial right arguments + if (isPartialRight) { + unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs); + } + // merge flags + bindData[1] |= bitmask; + return createWrapper.apply(null, bindData); + } + // fast path for `_.bind` + var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper; + return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]); + } + + /** + * Creates compiled iteration functions. + * + * @private + * @param {...Object} [options] The compile options object(s). + * @param {string} [options.array] Code to determine if the iterable is an array or array-like. + * @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop. + * @param {Function} [options.keys] A reference to `_.keys` for use in own property iteration. + * @param {string} [options.args] A comma separated string of iteration function arguments. + * @param {string} [options.top] Code to execute before the iteration branches. + * @param {string} [options.loop] Code to execute in the object loop. + * @param {string} [options.bottom] Code to execute after the iteration branches. + * @returns {Function} Returns the compiled function. + */ + function createIterator() { + // data properties + iteratorData.shadowedProps = shadowedProps; + + // iterator options + iteratorData.array = iteratorData.bottom = iteratorData.loop = iteratorData.top = ''; + iteratorData.init = 'iterable'; + iteratorData.useHas = true; + + // merge options into a template data object + for (var object, index = 0; object = arguments[index]; index++) { + for (var key in object) { + iteratorData[key] = object[key]; + } + } + var args = iteratorData.args; + iteratorData.firstArg = /^[^,]+/.exec(args)[0]; + + // create the function factory + var factory = Function( + 'baseCreateCallback, errorClass, errorProto, hasOwnProperty, ' + + 'indicatorObject, isArguments, isArray, isString, keys, objectProto, ' + + 'objectTypes, nonEnumProps, stringClass, stringProto, toString', + 'return function(' + args + ') {\n' + iteratorTemplate(iteratorData) + '\n}' + ); + + // return the compiled function + return factory( + baseCreateCallback, errorClass, errorProto, hasOwnProperty, + indicatorObject, isArguments, isArray, isString, iteratorData.keys, objectProto, + objectTypes, nonEnumProps, stringClass, stringProto, toString + ); + } + + /** + * 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]; + } + + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized, this method returns the custom method, otherwise it returns + * the `baseIndexOf` function. + * + * @private + * @returns {Function} Returns the "indexOf" function. + */ + function getIndexOf() { + var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result; + return result; + } + + /** + * 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); + } + + /** + * Sets `this` binding data on a given function. + * + * @private + * @param {Function} func The function to set data on. + * @param {Array} value The data array to set. + */ + var setBindData = !defineProperty ? noop : function(func, value) { + descriptor.value = value; + defineProperty(func, '__bindData__', descriptor); + }; + + /** + * A fallback implementation of `isPlainObject` which checks if a given value + * is an object created by the `Object` constructor, assuming objects created + * by the `Object` constructor have no inherited enumerable properties and that + * there are no `Object.prototype` extensions. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + */ + function shimIsPlainObject(value) { + var ctor, + result; + + // avoid non Object objects, `arguments` objects, and DOM elements + if (!(value && toString.call(value) == objectClass) || + (ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor)) || + (!support.argsClass && isArguments(value)) || + (!support.nodeClass && isNode(value))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + if (support.ownLast) { + forIn(value, function(value, key, object) { + result = hasOwnProperty.call(object, key); + return false; + }); + return result !== false; + } + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + forIn(value, function(value, key) { + result = key; + }); + return typeof result == 'undefined' || hasOwnProperty.call(value, result); + } + + /** + * Used by `unescape` to convert HTML entities to characters. + * + * @private + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + function unescapeHtmlChar(match) { + return htmlUnescapes[match]; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Checks if `value` is an `arguments` object. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @example + * + * (function() { return _.isArguments(arguments); })(1, 2, 3); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == argsClass || false; + } + // fallback for browsers that can't detect `arguments` objects by [[Class]] + if (!support.argsClass) { + isArguments = function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee') || false; + }; + } + + /** + * Checks if `value` is an array. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. + * @example + * + * (function() { return _.isArray(arguments); })(); + * // => false + * + * _.isArray([1, 2, 3]); + * // => true + */ + var isArray = nativeIsArray || function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == arrayClass || false; + }; + + /** + * 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 = createIterator({ + 'args': 'object', + 'init': '[]', + 'top': 'if (!(objectTypes[typeof object])) return result', + 'loop': 'result.push(index)' + }); + + /** + * 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 []; + } + if ((support.enumPrototypes && typeof object == 'function') || + (support.nonEnumArgs && object.length && isArguments(object))) { + return shimKeys(object); + } + return nativeKeys(object); + }; + + /** Reusable iterator options shared by `each`, `forIn`, and `forOwn` */ + var eachIteratorOptions = { + 'args': 'collection, callback, thisArg', + 'top': "callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)", + 'array': "typeof length == 'number'", + 'keys': keys, + 'loop': 'if (callback(iterable[index], index, collection) === false) return result' + }; + + /** Reusable iterator options for `assign` and `defaults` */ + var defaultsIteratorOptions = { + 'args': 'object, source, guard', + 'top': + 'var args = arguments,\n' + + ' argsIndex = 0,\n' + + " argsLength = typeof guard == 'number' ? 2 : args.length;\n" + + 'while (++argsIndex < argsLength) {\n' + + ' iterable = args[argsIndex];\n' + + ' if (iterable && objectTypes[typeof iterable]) {', + 'keys': keys, + 'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]", + 'bottom': ' }\n}' + }; + + /** Reusable iterator options for `forIn` and `forOwn` */ + var forOwnIteratorOptions = { + 'top': 'if (!objectTypes[typeof iterable]) return result;\n' + eachIteratorOptions.top, + 'array': false + }; + + /** + * 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 = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to convert HTML entities to characters */ + var htmlUnescapes = invert(htmlEscapes); + + /** Used to match HTML entities and HTML characters */ + var reEscapedHtml = RegExp('(' + keys(htmlUnescapes).join('|') + ')', 'g'), + reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); + + /** + * A function compiled to iterate `arguments` objects, arrays, objects, and + * strings consistenly across environments, executing the callback for each + * element in the collection. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index|key, collection). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @private + * @type Function + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEach = createIterator(eachIteratorOptions); + + /*--------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources will overwrite property assignments of previous + * sources. If a callback is provided it will be executed to produce the + * assigned values. The callback is bound to `thisArg` and invoked with two + * arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @type Function + * @alias extend + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * _.assign({ 'name': 'fred' }, { 'employer': 'slate' }); + * // => { 'name': 'fred', 'employer': 'slate' } + * + * var defaults = _.partialRight(_.assign, function(a, b) { + * return typeof a == 'undefined' ? b : a; + * }); + * + * var object = { 'name': 'barney' }; + * defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ + var assign = createIterator(defaultsIteratorOptions, { + 'top': + defaultsIteratorOptions.top.replace(';', + ';\n' + + "if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n" + + ' var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n' + + "} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n" + + ' callback = args[--argsLength];\n' + + '}' + ), + 'loop': 'result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]' + }); + + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects will also + * be cloned, otherwise they will be assigned by reference. If a callback + * is provided it will be executed to produce the cloned values. If the + * callback returns `undefined` cloning will be handled by the method instead. + * The callback is bound to `thisArg` and invoked with one argument; (value). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var shallow = _.clone(characters); + * shallow[0] === characters[0]; + * // => true + * + * var deep = _.clone(characters, true); + * deep[0] === characters[0]; + * // => false + * + * _.mixin({ + * 'clone': _.partialRight(_.clone, function(value) { + * return _.isElement(value) ? value.cloneNode(false) : undefined; + * }) + * }); + * + * var clone = _.clone(document.body); + * clone.childNodes.length; + * // => 0 + */ + function clone(value, isDeep, callback, thisArg) { + // allows working with "Collections" methods without using their `index` + // and `collection` arguments for `isDeep` and `callback` + if (typeof isDeep != 'boolean' && isDeep != null) { + thisArg = callback; + callback = isDeep; + isDeep = false; + } + return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates a deep clone of `value`. If a callback is provided it will be + * executed to produce the cloned values. If the callback returns `undefined` + * cloning will be handled by the method instead. The callback is bound to + * `thisArg` and invoked with one argument; (value). + * + * Note: This method is loosely based on the structured clone algorithm. Functions + * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and + * objects created by constructors other than `Object` are cloned to plain `Object` objects. + * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var deep = _.cloneDeep(characters); + * deep[0] === characters[0]; + * // => false + * + * var view = { + * 'label': 'docs', + * 'node': element + * }; + * + * var clone = _.cloneDeep(view, function(value) { + * return _.isElement(value) ? value.cloneNode(true) : undefined; + * }); + * + * clone.node == view.node; + * // => false + */ + function cloneDeep(value, callback, thisArg) { + return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); + } + + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { 'constructor': Circle }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties ? assign(result, properties) : result; + } + + /** + * 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 = createIterator(defaultsIteratorOptions); + + /** + * This method is like `_.findIndex` except that it returns the key of the + * first element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': false }, + * 'fred': { 'age': 40, 'blocked': true }, + * 'pebbles': { 'age': 1, 'blocked': false } + * }; + * + * _.findKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (property order is not guaranteed across environments) + * + * // using "_.where" callback shorthand + * _.findKey(characters, { 'age': 1 }); + * // => 'pebbles' + * + * // using "_.pluck" callback shorthand + * _.findKey(characters, 'blocked'); + * // => 'fred' + */ + function findKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwn(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * This method is like `_.findKey` except that it iterates over elements + * of a `collection` in the opposite order. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': true }, + * 'fred': { 'age': 40, 'blocked': false }, + * 'pebbles': { 'age': 1, 'blocked': true } + * }; + * + * _.findLastKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles`, assuming `_.findKey` returns `barney` + * + * // using "_.where" callback shorthand + * _.findLastKey(characters, { 'age': 40 }); + * // => 'fred' + * + * // using "_.pluck" callback shorthand + * _.findLastKey(characters, 'blocked'); + * // => 'pebbles' + */ + function findLastKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwnRight(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + + /** + * Iterates over own and inherited enumerable properties of an object, + * executing the callback for each property. The callback is bound to `thisArg` + * and invoked with three arguments; (value, key, object). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forIn(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) + */ + var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, { + 'useHas': false + }); + + /** + * This method is like `_.forIn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forInRight(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'move', 'y', and 'x' assuming `_.forIn ` logs 'x', 'y', and 'move' + */ + function forInRight(object, callback, thisArg) { + var pairs = []; + + forIn(object, function(value, key) { + pairs.push(key, value); + }); + + var length = pairs.length; + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + if (callback(pairs[length--], pairs[length], object) === false) { + break; + } + } + return object; + } + + /** + * Iterates over own enumerable properties of an object, executing the callback + * for each property. The callback is bound to `thisArg` and invoked with three + * arguments; (value, key, object). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs '0', '1', and 'length' (property order is not guaranteed across environments) + */ + var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions); + + /** + * This method is like `_.forOwn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs 'length', '1', and '0' assuming `_.forOwn` logs '0', '1', and 'length' + */ + function forOwnRight(object, callback, thisArg) { + var props = keys(object), + length = props.length; + + callback = baseCreateCallback(callback, thisArg, 3); + while (length--) { + var key = props[length]; + if (callback(object[key], key, object) === false) { + break; + } + } + return object; + } + + /** + * Creates a sorted array of property names of all enumerable properties, + * own and inherited, of `object` that have function values. + * + * @static + * @memberOf _ + * @alias methods + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names that have function values. + * @example + * + * _.functions(_); + * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] + */ + function functions(object) { + var result = []; + forIn(object, function(value, key) { + if (isFunction(value)) { + result.push(key); + } + }); + return result.sort(); + } + + /** + * Checks if the specified property name exists as a direct property of `object`, + * instead of an inherited property. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to check. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. + * @example + * + * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + * // => true + */ + function has(object, key) { + return object ? hasOwnProperty.call(object, key) : false; + } + + /** + * Creates an object composed of the inverted keys and values of the given object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to invert. + * @returns {Object} Returns the created inverted object. + * @example + * + * _.invert({ 'first': 'fred', 'second': 'barney' }); + * // => { 'fred': 'first', 'barney': 'second' } + */ + function invert(object) { + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + result[object[key]] = key; + } + return result; + } + + /** + * Checks if `value` is a boolean value. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @example + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + value && typeof value == 'object' && toString.call(value) == boolClass || false; + } + + /** + * Checks if `value` is a date. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + */ + function isDate(value) { + return value && typeof value == 'object' && toString.call(value) == dateClass || false; + } + + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + */ + function isElement(value) { + return value && value.nodeType === 1 || false; + } + + /** + * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a + * length of `0` and objects with no own enumerable properties are considered + * "empty". + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. + * @example + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({}); + * // => true + * + * _.isEmpty(''); + * // => true + */ + function isEmpty(value) { + var result = true; + if (!value) { + return result; + } + var className = toString.call(value), + length = value.length; + + if ((className == arrayClass || className == stringClass || + (support.argsClass ? className == argsClass : isArguments(value))) || + (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { + return !length; + } + forOwn(value, function() { + return (result = false); + }); + return result; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent to each other. If a callback is provided it will be executed + * to compare values. If the callback returns `undefined` comparisons will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (a, b). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'name': 'fred' }; + * var copy = { 'name': 'fred' }; + * + * object == copy; + * // => false + * + * _.isEqual(object, copy); + * // => true + * + * var words = ['hello', 'goodbye']; + * var otherWords = ['hi', 'goodbye']; + * + * _.isEqual(words, otherWords, function(a, b) { + * var reGreet = /^(?:hello|hi)$/i, + * aGreet = _.isString(a) && reGreet.test(a), + * bGreet = _.isString(b) && reGreet.test(b); + * + * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; + * }); + * // => true + */ + function isEqual(a, b, callback, thisArg) { + return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2)); + } + + /** + * Checks if `value` is, or can be coerced to, a finite number. + * + * Note: This is not the same as native `isFinite` which will return true for + * booleans and empty strings. See http://es5.github.io/#x15.1.2.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. + * @example + * + * _.isFinite(-101); + * // => true + * + * _.isFinite('10'); + * // => true + * + * _.isFinite(true); + * // => false + * + * _.isFinite(''); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + function isFinite(value) { + return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); + } + + /** + * Checks if `value` is a function. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + */ + function isFunction(value) { + return typeof value == 'function'; + } + // fallback for older versions of Chrome and Safari + if (isFunction(/x/)) { + isFunction = function(value) { + return typeof value == 'function' && toString.call(value) == funcClass; + }; + } + + /** + * 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]); + } + + /** + * Checks if `value` is `NaN`. + * + * Note: This is not the same as native `isNaN` which will return `true` for + * `undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // `NaN` as a primitive is the only value that is not equal to itself + // (perform the [[Class]] check first to avoid errors with some host objects in IE) + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(undefined); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is a number. + * + * Note: `NaN` is considered a number. See http://es5.github.io/#x8.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. + * @example + * + * _.isNumber(8.4 * 5); + * // => true + */ + function isNumber(value) { + return typeof value == 'number' || + value && typeof value == 'object' && toString.call(value) == numberClass || false; + } + + /** + * Checks if `value` is an object created by the `Object` constructor. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * _.isPlainObject(new Shape); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + */ + var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { + if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) { + return false; + } + var valueOf = value.valueOf, + objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); + + return objProto + ? (value == objProto || getPrototypeOf(value) == objProto) + : shimIsPlainObject(value); + }; + + /** + * Checks if `value` is a regular expression. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @example + * + * _.isRegExp(/fred/); + * // => true + */ + function isRegExp(value) { + return value && objectTypes[typeof value] && toString.call(value) == regexpClass || false; + } + + /** + * Checks if `value` is a string. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. + * @example + * + * _.isString('fred'); + * // => true + */ + function isString(value) { + return typeof value == 'string' || + value && typeof value == 'object' && toString.call(value) == stringClass || false; + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + */ + function isUndefined(value) { + return typeof value == 'undefined'; + } + + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new object with values of the results of each `callback` execution. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + * + * var characters = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // using "_.pluck" callback shorthand + * _.mapValues(characters, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } + */ + function mapValues(object, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + + forOwn(object, function(value, key, object) { + result[key] = callback(value, key, object); + }); + return result; + } + + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * will overwrite property assignments of previous sources. If a callback is + * provided it will be executed to produce the merged values of the destination + * and source properties. If the callback returns `undefined` merging will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * var names = { + * 'characters': [ + * { 'name': 'barney' }, + * { 'name': 'fred' } + * ] + * }; + * + * var ages = { + * 'characters': [ + * { 'age': 36 }, + * { 'age': 40 } + * ] + * }; + * + * _.merge(names, ages); + * // => { 'characters': [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] } + * + * var food = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var otherFood = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(food, otherFood, function(a, b) { + * return _.isArray(a) ? a.concat(b) : undefined; + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } + */ + function merge(object) { + var args = arguments, + length = 2; + + if (!isObject(object)) { + return object; + } + // allows working with `_.reduce` and `_.reduceRight` without using + // their `index` and `collection` arguments + if (typeof args[2] != 'number') { + length = args.length; + } + if (length > 3 && typeof args[length - 2] == 'function') { + var callback = baseCreateCallback(args[--length - 1], args[length--], 2); + } else if (length > 2 && typeof args[length - 1] == 'function') { + callback = args[--length]; + } + var sources = slice(arguments, 1, length), + index = -1, + stackA = getArray(), + stackB = getArray(); + + while (++index < length) { + baseMerge(object, sources[index], callback, stackA, stackB); + } + releaseArray(stackA); + releaseArray(stackB); + return object; + } + + /** + * Creates a shallow clone of `object` excluding the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` omitting the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object without the omitted properties. + * @example + * + * _.omit({ 'name': 'fred', 'age': 40 }, 'age'); + * // => { 'name': 'fred' } + * + * _.omit({ 'name': 'fred', 'age': 40 }, function(value) { + * return typeof value == 'number'; + * }); + * // => { 'name': 'fred' } + */ + function omit(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var props = []; + forIn(object, function(value, key) { + props.push(key); + }); + props = baseDifference(props, baseFlatten(arguments, true, false, 1)); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + result[key] = object[key]; + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (!callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * Creates a two dimensional array of an object's key-value pairs, + * i.e. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments) + */ + function pairs(object) { + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; + } + + /** + * Creates a shallow clone of `object` composed of the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` picking the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object composed of the picked properties. + * @example + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, 'name'); + * // => { 'name': 'fred' } + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) { + * return key.charAt(0) != '_'; + * }); + * // => { 'name': 'fred' } + */ + function pick(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var index = -1, + props = baseFlatten(arguments, true, false, 1), + length = isObject(object) ? props.length : 0; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; + } + + /** + * An alternative to `_.reduce` this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable properties through a callback, with each callback execution + * potentially mutating the `accumulator` object. The callback is bound to + * `thisArg` and invoked with four arguments; (accumulator, value, key, object). + * Callbacks may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { + * num *= num; + * if (num % 2) { + * return result.push(num) < 3; + * } + * }); + * // => [1, 9, 25] + * + * var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function transform(object, callback, accumulator, thisArg) { + var isArr = isArray(object); + if (accumulator == null) { + if (isArr) { + accumulator = []; + } else { + var ctor = object && object.constructor, + proto = ctor && ctor.prototype; + + accumulator = baseCreate(proto); + } + } + if (callback) { + callback = lodash.createCallback(callback, thisArg, 4); + (isArr ? baseEach : forOwn)(object, function(value, index, object) { + return callback(accumulator, value, index, object); + }); + } + return accumulator; + } + + /** + * 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; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array of elements from the specified indexes, or keys, of the + * `collection`. Indexes may be specified as individual arguments or as arrays + * of indexes. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` + * to retrieve, specified as individual indexes or arrays of indexes. + * @returns {Array} Returns a new array of elements corresponding to the + * provided indexes. + * @example + * + * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); + * // => ['a', 'c', 'e'] + * + * _.at(['fred', 'barney', 'pebbles'], 0, 2); + * // => ['fred', 'pebbles'] + */ + function at(collection) { + var args = arguments, + index = -1, + props = baseFlatten(args, true, false, 1), + length = (args[2] && args[2][args[1]] === collection) ? 1 : props.length, + result = Array(length); + + if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + while(++index < length) { + result[index] = collection[props[index]]; + } + return result; + } + + /** + * Checks if a given value is present in a collection using strict equality + * for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the + * offset from the end of the collection. + * + * @static + * @memberOf _ + * @alias include + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. + * @example + * + * _.contains([1, 2, 3], 1); + * // => true + * + * _.contains([1, 2, 3], 1, 2); + * // => false + * + * _.contains({ 'name': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.contains('pebbles', 'eb'); + * // => true + */ + function contains(collection, target, fromIndex) { + var index = -1, + indexOf = getIndexOf(), + length = collection ? collection.length : 0, + result = false; + + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; + if (isArray(collection)) { + result = indexOf(collection, target, fromIndex) > -1; + } else if (typeof length == 'number') { + result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1; + } else { + baseEach(collection, function(value) { + if (++index >= fromIndex) { + return !(result = value === target); + } + }); + } + return result; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through the callback. The corresponding value + * of each key is the number of times the key was returned by the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1); + }); + + /** + * Checks if the given callback returns truey value for **all** elements of + * a collection. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes']); + * // => false + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.every(characters, 'age'); + * // => true + * + * // using "_.where" callback shorthand + * _.every(characters, { 'age': 36 }); + * // => false + */ + function every(collection, callback, thisArg) { + var result = true; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (!(result = !!callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return (result = !!callback(value, index, collection)); + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning an array of all elements + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that passed the callback check. + * @example + * + * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [2, 4, 6] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.filter(characters, 'blocked'); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + * + * // using "_.where" callback shorthand + * _.filter(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + */ + function filter(collection, callback, thisArg) { + var result = []; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + result.push(value); + } + } + } else { + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result.push(value); + } + }); + } + return result; + } + + /** + * Iterates over elements of a collection, returning the first element that + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias detect, findWhere + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.find(characters, function(chr) { + * return chr.age < 40; + * }); + * // => { 'name': 'barney', 'age': 36, 'blocked': false } + * + * // using "_.where" callback shorthand + * _.find(characters, { 'age': 1 }); + * // => { 'name': 'pebbles', 'age': 1, 'blocked': false } + * + * // using "_.pluck" callback shorthand + * _.find(characters, 'blocked'); + * // => { 'name': 'fred', 'age': 40, 'blocked': true } + */ + function find(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (callback(value, index, collection)) { + return value; + } + } + } else { + var result; + baseEach(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + } + + /** + * This method is like `_.find` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(num) { + * return num % 2 == 1; + * }); + * // => 3 + */ + function findLast(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forEachRight(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + + /** + * Iterates over elements of a collection, executing the callback for each + * element. The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * Note: As with other "Collections" methods, objects with a `length` property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); + * // => logs each number and returns '1,2,3' + * + * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); }); + * // => logs each number and returns the object (property order is not guaranteed across environments) + */ + function forEach(collection, callback, thisArg) { + if (callback && typeof thisArg == 'undefined' && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if (callback(collection[index], index, collection) === false) { + break; + } + } + } else { + baseEach(collection, callback, thisArg); + } + return collection; + } + + /** + * This method is like `_.forEach` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); + * // => logs each number from right to left and returns '3,2,1' + */ + function forEachRight(collection, callback, thisArg) { + var iterable = collection, + length = collection ? collection.length : 0; + + callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (length--) { + if (callback(collection[length], length, collection) === false) { + break; + } + } + } else { + if (typeof length != 'number') { + var props = keys(collection); + length = props.length; + } else if (support.unindexedChars && isString(collection)) { + iterable = collection.split(''); + } + baseEach(collection, function(value, key, collection) { + key = props ? props[--length] : --length; + return callback(iterable[key], key, collection); + }); + } + return collection; + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of a collection through the callback. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false` + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using "_.pluck" callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value); + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of the collection through the given callback. The corresponding + * value of each key is the last element responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keys = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keys, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keys, function(key) { return String.fromCharCode(key.code); }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + + /** + * Invokes the method named by `methodName` on each element in the `collection` + * returning an array of the results of each invoked method. Additional arguments + * will be provided to each invoked method. If `methodName` is a function it + * will be invoked for, and `this` bound to, each element in the `collection`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|string} methodName The name of the method to invoke or + * the function invoked per iteration. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {Array} Returns a new array of the results of each invoked method. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + function invoke(collection, methodName) { + var args = slice(arguments, 2), + index = -1, + isFunc = typeof methodName == 'function', + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args); + }); + return result; + } + + /** + * Creates an array of values by running each element in the collection + * through the callback. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias collect + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of the results of each `callback` execution. + * @example + * + * _.map([1, 2, 3], function(num) { return num * 3; }); + * // => [3, 6, 9] + * + * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); + * // => [3, 6, 9] (property order is not guaranteed across environments) + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(characters, 'name'); + * // => ['barney', 'fred'] + */ + function map(collection, callback, thisArg) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + callback = lodash.createCallback(callback, thisArg, 3); + if (isArray(collection)) { + while (++index < length) { + result[index] = callback(collection[index], index, collection); + } + } else { + baseEach(collection, function(value, key, collection) { + result[++index] = callback(value, key, collection); + }); + } + return result; + } + + /** + * Retrieves the maximum value of a collection. If the collection is empty or + * falsey `-Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.max(characters, function(chr) { return chr.age; }); + * // => { 'name': 'fred', 'age': 40 }; + * + * // using "_.pluck" callback shorthand + * _.max(characters, 'age'); + * // => { 'name': 'fred', 'age': 40 }; + */ + function max(collection, callback, thisArg) { + var computed = -Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value > result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current > computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the minimum value of a collection. If the collection is empty or + * falsey `Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.min(characters, function(chr) { return chr.age; }); + * // => { 'name': 'barney', 'age': 36 }; + * + * // using "_.pluck" callback shorthand + * _.min(characters, 'age'); + * // => { 'name': 'barney', 'age': 36 }; + */ + function min(collection, callback, thisArg) { + var computed = Infinity, + result = computed; + + // allows working with functions like `_.map` without using + // their `index` argument as a callback + if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) { + callback = null; + } + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + if (value < result) { + result = value; + } + } + } else { + callback = (callback == null && isString(collection)) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + + baseEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + if (current < computed) { + computed = current; + result = value; + } + }); + } + return result; + } + + /** + * Retrieves the value of a specified property from all elements in the collection. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {string} property The name of the property to pluck. + * @returns {Array} Returns a new array of property values. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.pluck(characters, 'name'); + * // => ['barney', 'fred'] + */ + var pluck = map; + + /** + * Reduces a collection to a value which is the accumulated result of running + * each element in the collection through the callback, where each successive + * callback execution consumes the return value of the previous execution. If + * `accumulator` is not provided the first element of the collection will be + * used as the initial `accumulator` value. The callback is bound to `thisArg` + * and invoked with four arguments; (accumulator, value, index|key, collection). + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var sum = _.reduce([1, 2, 3], function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + function reduce(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + if (noaccum) { + accumulator = collection[++index]; + } + while (++index < length) { + accumulator = callback(accumulator, collection[index], index, collection); + } + } else { + baseEach(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection) + }); + } + return accumulator; + } + + /** + * This method is like `_.reduce` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var list = [[0, 1], [2, 3], [4, 5]]; + * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + forEachRight(collection, function(value, index, collection) { + accumulator = noaccum + ? (noaccum = false, value) + : callback(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The opposite of `_.filter` this method returns the elements of a + * collection that the callback does **not** return truey for. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that failed the callback check. + * @example + * + * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [1, 3, 5] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.reject(characters, 'blocked'); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + * + * // using "_.where" callback shorthand + * _.reject(characters, { 'age': 36 }); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + */ + function reject(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + return filter(collection, function(value, index, collection) { + return !callback(value, index, collection); + }); + } + + /** + * Retrieves a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Allows working with functions like `_.map` + * without using their `index` arguments as `n`. + * @returns {Array} Returns the random sample(s) of `collection`. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + function sample(collection, n, guard) { + if (collection && typeof collection.length != 'number') { + collection = values(collection); + } else if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + if (n == null || guard) { + return collection ? collection[baseRandom(0, collection.length - 1)] : undefined; + } + var result = shuffle(collection); + result.length = nativeMin(nativeMax(0, n), result.length); + return result; + } + + /** + * Creates an array of shuffled values, using a version of the Fisher-Yates + * shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns a new shuffled collection. + * @example + * + * _.shuffle([1, 2, 3, 4, 5, 6]); + * // => [4, 1, 6, 3, 5, 2] + */ + function shuffle(collection) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + forEach(collection, function(value) { + var rand = baseRandom(0, ++index); + result[index] = result[rand]; + result[rand] = value; + }); + return result; + } + + /** + * Gets the size of the `collection` by returning `collection.length` for arrays + * and array-like objects or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. + * @example + * + * _.size([1, 2]); + * // => 2 + * + * _.size({ 'one': 1, 'two': 2, 'three': 3 }); + * // => 3 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + var length = collection ? collection.length : 0; + return typeof length == 'number' ? length : keys(collection).length; + } + + /** + * Checks if the callback returns a truey value for **any** element of a + * collection. The function returns as soon as it finds a passing value and + * does not iterate over the entire collection. The callback is bound to + * `thisArg` and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.some(characters, 'blocked'); + * // => true + * + * // using "_.where" callback shorthand + * _.some(characters, { 'age': 1 }); + * // => false + */ + function some(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + if ((result = callback(collection[index], index, collection))) { + break; + } + } + } else { + baseEach(collection, function(value, index, collection) { + return !(result = callback(value, index, collection)); + }); + } + return !!result; + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through the callback. This method + * performs a stable sort, that is, it will preserve the original sort order + * of equal elements. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an array of property names is provided for `callback` the collection + * will be sorted by each property value. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of sorted elements. + * @example + * + * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); + * // => [3, 1, 2] + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 26 }, + * { 'name': 'fred', 'age': 30 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(_.sortBy(characters, 'age'), _.values); + * // => [['barney', 26], ['fred', 30], ['barney', 36], ['fred', 40]] + * + * // sorting by multiple properties + * _.map(_.sortBy(characters, ['name', 'age']), _.values); + * // = > [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]] + */ + function sortBy(collection, callback, thisArg) { + var index = -1, + isArr = isArray(callback), + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + if (!isArr) { + callback = lodash.createCallback(callback, thisArg, 3); + } + forEach(collection, function(value, key, collection) { + var object = result[++index] = getObject(); + if (isArr) { + object.criteria = map(callback, function(key) { return value[key]; }); + } else { + (object.criteria = getArray())[0] = callback(value, key, collection); + } + object.index = index; + object.value = value; + }); + + length = result.length; + result.sort(compareAscending); + while (length--) { + var object = result[length]; + result[length] = object.value; + if (!isArr) { + releaseArray(object.criteria); + } + releaseObject(object); + } + return result; + } + + /** + * Converts the `collection` to an array. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to convert. + * @returns {Array} Returns the new converted array. + * @example + * + * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); + * // => [2, 3, 4] + */ + function toArray(collection) { + if (collection && typeof collection.length == 'number') { + return (support.unindexedChars && isString(collection)) + ? collection.split('') + : slice(collection); + } + return values(collection); + } + + /** + * Performs a deep comparison of each element in a `collection` to the given + * `properties` object, returning an array of all elements that have equivalent + * property values. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Object} props The object of property values to filter by. + * @returns {Array} Returns a new array of elements that have the given properties. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.where(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }] + * + * _.where(characters, { 'pets': ['dino'] }); + * // => [{ 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] }] + */ + var where = filter; + + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are all falsey. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to compact. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result.push(value); + } + } + return result; + } + + /** + * Creates an array excluding all values of the provided arrays using strict + * equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to process. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); + * // => [1, 3, 4] + */ + function difference(array) { + return baseDifference(array, baseFlatten(arguments, true, true, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.findIndex(characters, function(chr) { + * return chr.age < 20; + * }); + * // => 2 + * + * // using "_.where" callback shorthand + * _.findIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findIndex(characters, 'blocked'); + * // => 1 + */ + function findIndex(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + if (callback(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of a `collection` from right to left. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': true }, + * { 'name': 'fred', 'age': 40, 'blocked': false }, + * { 'name': 'pebbles', 'age': 1, 'blocked': true } + * ]; + * + * _.findLastIndex(characters, function(chr) { + * return chr.age > 30; + * }); + * // => 1 + * + * // using "_.where" callback shorthand + * _.findLastIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findLastIndex(characters, 'blocked'); + * // => 2 + */ + function findLastIndex(array, callback, thisArg) { + var length = array ? array.length : 0; + callback = lodash.createCallback(callback, thisArg, 3); + while (length--) { + if (callback(array[length], length, array)) { + return length; + } + } + return -1; + } + + /** + * Gets the first element or first `n` elements of an array. If a callback + * is provided elements at the beginning of the array are returned as long + * as the callback returns truey. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias head, take + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([1, 2, 3], 2); + * // => [1, 2] + * + * _.first([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [1, 2] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.first(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': true, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.first(characters, { 'employer': 'slate' }), 'name'); + * // => ['barney', 'fred'] + */ + function first(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = -1; + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[0] : undefined; + } + } + return slice(array, 0, nativeMin(nativeMax(0, n), length)); + } + + /** + * Flattens a nested array (the nesting can be to any depth). If `isShallow` + * is truey, the array will only be flattened a single level. If a callback + * is provided each element of the array is passed through the callback before + * flattening. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new flattened array. + * @example + * + * _.flatten([1, [2], [3, [[4]]]]); + * // => [1, 2, 3, 4]; + * + * _.flatten([1, [2], [3, [[4]]]], true); + * // => [1, 2, 3, [[4]]]; + * + * var characters = [ + * { 'name': 'barney', 'age': 30, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * // using "_.pluck" callback shorthand + * _.flatten(characters, 'pets'); + * // => ['hoppy', 'baby puss', 'dino'] + */ + function flatten(array, isShallow, callback, thisArg) { + // juggle arguments + if (typeof isShallow != 'boolean' && isShallow != null) { + thisArg = callback; + callback = (typeof isShallow != 'function' && thisArg && thisArg[isShallow] === array) ? null : isShallow; + isShallow = false; + } + if (callback != null) { + array = map(array, callback, thisArg); + } + return baseFlatten(array, isShallow); + } + + /** + * Gets the index at which the first occurrence of `value` is found using + * strict equality for comparisons, i.e. `===`. If the array is already sorted + * providing `true` for `fromIndex` will run a faster binary search. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2); + * // => 1 + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 4 + * + * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); + * // => 2 + */ + function indexOf(array, value, fromIndex) { + if (typeof fromIndex == 'number') { + var length = array ? array.length : 0; + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0); + } else if (fromIndex) { + var index = sortedIndex(array, value); + return array[index] === value ? index : -1; + } + return baseIndexOf(array, value, fromIndex); + } + + /** + * Gets all but the last element or last `n` elements of an array. If a + * callback is provided elements at the end of the array are excluded from + * the result as long as the callback returns truey. The callback is bound + * to `thisArg` and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + * + * _.initial([1, 2, 3], 2); + * // => [1] + * + * _.initial([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [1] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.initial(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': false, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.initial(characters, { 'employer': 'na' }), 'name'); + * // => ['barney', 'fred'] + */ + function initial(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : callback || n; + } + return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); + } + + /** + * Creates an array of unique values present in all provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of shared values. + * @example + * + * _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2] + */ + function intersection() { + var args = [], + argsIndex = -1, + argsLength = arguments.length, + caches = getArray(), + indexOf = getIndexOf(), + trustIndexOf = indexOf === baseIndexOf, + seen = getArray(); + + while (++argsIndex < argsLength) { + var value = arguments[argsIndex]; + if (isArray(value) || isArguments(value)) { + args.push(value); + caches.push(trustIndexOf && value.length >= largeArraySize && + createCache(argsIndex ? args[argsIndex] : seen)); + } + } + var array = args[0], + index = -1, + length = array ? array.length : 0, + result = []; + + outer: + while (++index < length) { + var cache = caches[0]; + value = array[index]; + + if ((cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0) { + argsIndex = argsLength; + (cache || seen).push(value); + while (--argsIndex) { + cache = caches[argsIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) { + continue outer; + } + } + result.push(value); + } + } + while (argsLength--) { + cache = caches[argsLength]; + if (cache) { + releaseObject(cache); + } + } + releaseArray(caches); + releaseArray(seen); + return result; + } + + /** + * Gets the last element or last `n` elements of an array. If a callback is + * provided elements at the end of the array are returned as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + * + * _.last([1, 2, 3], 2); + * // => [2, 3] + * + * _.last([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [2, 3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.last(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.last(characters, { 'employer': 'na' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function last(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[length - 1] : undefined; + } + } + return slice(array, nativeMax(0, length - n)); + } + + /** + * Gets the index at which the last occurrence of `value` is found using strict + * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used + * as the offset from the end of the collection. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); + * // => 4 + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var index = array ? array.length : 0; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * Removes all provided values from the given array using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + function pull(array) { + var args = arguments, + argsIndex = 0, + argsLength = args.length, + length = array ? array.length : 0; + + while (++argsIndex < argsLength) { + var index = -1, + value = args[argsIndex]; + while (++index < length) { + if (array[index] === value) { + splice.call(array, index--, 1); + length--; + } + } + } + return array; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to but not including `end`. If `start` is less than `stop` a + * zero-length range is created unless a negative `step` is specified. + * + * @static + * @memberOf _ + * @category Arrays + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns a new range array. + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + function range(start, end, step) { + start = +start || 0; + step = typeof step == 'number' ? step : (+step || 1); + + if (end == null) { + end = start; + start = 0; + } + // use `Array(length)` so engines like Chakra and V8 avoid slower modes + // http://youtu.be/XAqIpGU8ZZk#t=17m25s + var index = -1, + length = nativeMax(0, ceil((end - start) / (step || 1))), + result = Array(length); + + while (++index < length) { + result[index] = start; + start += step; + } + return result; + } + + /** + * Removes all elements from an array that the callback returns truey for + * and returns an array of removed elements. The callback is bound to `thisArg` + * and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4, 5, 6]; + * var evens = _.remove(array, function(num) { return num % 2 == 0; }); + * + * console.log(array); + * // => [1, 3, 5] + * + * console.log(evens); + * // => [2, 4, 6] + */ + function remove(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0, + result = []; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (callback(value, index, array)) { + result.push(value); + splice.call(array, index--, 1); + length--; + } + } + return result; + } + + /** + * The opposite of `_.initial` this method gets all but the first element or + * first `n` elements of an array. If a callback function is provided elements + * at the beginning of the array are excluded from the result as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias drop, tail + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + * + * _.rest([1, 2, 3], 2); + * // => [3] + * + * _.rest([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.rest(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.rest(characters, { 'employer': 'slate' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + function rest(array, callback, thisArg) { + if (typeof callback != 'number' && callback != null) { + var n = 0, + index = -1, + length = array ? array.length : 0; + + callback = lodash.createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : nativeMax(0, callback); + } + return slice(array, n); + } + + /** + * Uses a binary search to determine the smallest index at which a value + * should be inserted into a given sorted array in order to maintain the sort + * order of the array. If a callback is provided it will be executed for + * `value` and each element of `array` to compute their sort ranking. The + * callback is bound to `thisArg` and invoked with one argument; (value). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([20, 30, 50], 40); + * // => 2 + * + * // using "_.pluck" callback shorthand + * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 2 + * + * var dict = { + * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } + * }; + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return dict.wordToNumber[word]; + * }); + * // => 2 + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return this.wordToNumber[word]; + * }, dict); + * // => 2 + */ + function sortedIndex(array, value, callback, thisArg) { + var low = 0, + high = array ? array.length : low; + + // explicitly reference `identity` for better inlining in Firefox + callback = callback ? lodash.createCallback(callback, thisArg, 1) : identity; + value = callback(value); + + while (low < high) { + var mid = (low + high) >>> 1; + (callback(array[mid]) < value) + ? low = mid + 1 + : high = mid; + } + return low; + } + + /** + * Creates an array of unique values, in order, of the provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of combined values. + * @example + * + * _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2, 3, 5, 4] + */ + function union() { + return baseUniq(baseFlatten(arguments, true, true)); + } + + /** + * Creates a duplicate-value-free version of an array using strict equality + * for comparisons, i.e. `===`. If the array is sorted, providing + * `true` for `isSorted` will use a faster algorithm. If a callback is provided + * each element of `array` is passed through the callback before uniqueness + * is computed. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Arrays + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a duplicate-value-free array. + * @example + * + * _.uniq([1, 2, 1, 3, 1]); + * // => [1, 2, 3] + * + * _.uniq([1, 1, 2, 2, 3], true); + * // => [1, 2, 3] + * + * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); }); + * // => ['A', 'b', 'C'] + * + * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math); + * // => [1, 2.5, 3] + * + * // using "_.pluck" callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniq(array, isSorted, callback, thisArg) { + // juggle arguments + if (typeof isSorted != 'boolean' && isSorted != null) { + thisArg = callback; + callback = (typeof isSorted != 'function' && thisArg && thisArg[isSorted] === array) ? null : isSorted; + isSorted = false; + } + if (callback != null) { + callback = lodash.createCallback(callback, thisArg, 3); + } + return baseUniq(array, isSorted, callback); + } + + /** + * Creates an array excluding all provided values using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); + * // => [2, 3, 4] + */ + function without(array) { + return baseDifference(array, slice(arguments, 1)); + } + + /** + * Creates an array that is the symmetric difference of the provided arrays. + * See http://en.wikipedia.org/wiki/Symmetric_difference. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of values. + * @example + * + * _.xor([1, 2, 3], [5, 2, 1, 4]); + * // => [3, 5, 4] + * + * _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); + * // => [1, 4, 5] + */ + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArray(array) || isArguments(array)) { + var result = result + ? baseUniq(baseDifference(result, array).concat(baseDifference(array, result))) + : array; + } + } + return result || []; + } + + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second + * elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @alias unzip + * @category Arrays + * @param {...Array} [array] Arrays to process. + * @returns {Array} Returns a new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + function zip() { + var array = arguments.length > 1 ? arguments : arguments[0], + index = -1, + length = array ? max(pluck(array, 'length')) : 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = pluck(array, index); + } + return result; + } + + /** + * Creates an object composed from arrays of `keys` and `values`. Provide + * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` + * or two arrays, one of `keys` and one of corresponding `values`. + * + * @static + * @memberOf _ + * @alias object + * @category Arrays + * @param {Array} keys The array of keys. + * @param {Array} [values=[]] The array of values. + * @returns {Object} Returns an object composed of the given keys and + * corresponding values. + * @example + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + function zipObject(keys, values) { + var index = -1, + length = keys ? keys.length : 0, + result = {}; + + if (!values && length && !isArray(keys[0])) { + values = []; + } + while (++index < length) { + var key = keys[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that executes `func`, with the `this` binding and + * arguments of the created function, only after being called `n` times. + * + * @static + * @memberOf _ + * @category Functions + * @param {number} n The number of times the function must be called before + * `func` is executed. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('Done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'Done saving!', after all saves have completed + */ + function after(n, func) { + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that, when called, invokes `func` with the `this` + * binding of `thisArg` and prepends any additional `bind` arguments to those + * provided to the bound function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var func = function(greeting) { + * return greeting + ' ' + this.name; + * }; + * + * func = _.bind(func, { 'name': 'fred' }, 'hi'); + * func(); + * // => 'hi fred' + */ + function bind(func, thisArg) { + return arguments.length > 2 + ? createWrapper(func, 17, slice(arguments, 2), null, thisArg) + : createWrapper(func, 1, null, null, thisArg); + } + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all the function properties + * of `object` will be bound. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to + * bind, specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { console.log('clicked ' + this.label); } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs', when the button is clicked + */ + function bindAll(object) { + var funcs = arguments.length > 1 ? baseFlatten(arguments, true, false, 1) : functions(object), + index = -1, + length = funcs.length; + + while (++index < length) { + var key = funcs[index]; + object[key] = createWrapper(object[key], 1, null, null, object); + } + return object; + } + + /** + * Creates a function that, when called, invokes the method at `object[key]` + * and prepends any additional `bindKey` arguments to those provided to the bound + * function. This method differs from `_.bind` by allowing bound functions to + * reference methods that will be redefined or don't yet exist. + * See http://michaux.ca/articles/lazy-function-definition-pattern. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'name': 'fred', + * 'greet': function(greeting) { + * return greeting + ' ' + this.name; + * } + * }; + * + * var func = _.bindKey(object, 'greet', 'hi'); + * func(); + * // => 'hi fred' + * + * object.greet = function(greeting) { + * return greeting + 'ya ' + this.name + '!'; + * }; + * + * func(); + * // => 'hiya fred!' + */ + function bindKey(object, key) { + return arguments.length > 2 + ? createWrapper(key, 19, slice(arguments, 2), null, object) + : createWrapper(key, 3, null, null, object); + } + + /** + * Creates a function that is the composition of the provided functions, + * where each function consumes the return value of the function that follows. + * For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + * Each function is executed with the `this` binding of the composed function. + * + * @static + * @memberOf _ + * @category Functions + * @param {...Function} [func] Functions to compose. + * @returns {Function} Returns the new composed function. + * @example + * + * var realNameMap = { + * 'pebbles': 'penelope' + * }; + * + * var format = function(name) { + * name = realNameMap[name.toLowerCase()] || name; + * return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase(); + * }; + * + * var greet = function(formatted) { + * return 'Hiya ' + formatted + '!'; + * }; + * + * var welcome = _.compose(greet, format); + * welcome('pebbles'); + * // => 'Hiya Penelope!' + */ + function compose() { + var funcs = arguments, + length = funcs.length; + + while (length--) { + if (!isFunction(funcs[length])) { + throw new TypeError; + } + } + return function() { + var args = arguments, + length = funcs.length; + + while (length--) { + args = [funcs[length].apply(this, args)]; + } + return args[0]; + }; + } + + /** + * Creates a function which accepts one or more arguments of `func` that when + * invoked either executes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` can be specified + * if `func.length` is not sufficient. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {Function} Returns the new curried function. + * @example + * + * var curried = _.curry(function(a, b, c) { + * console.log(a + b + c); + * }); + * + * curried(1)(2)(3); + * // => 6 + * + * curried(1, 2)(3); + * // => 6 + * + * curried(1, 2, 3); + * // => 6 + */ + function curry(func, arity) { + arity = typeof arity == 'number' ? arity : (+arity || func.length); + return createWrapper(func, 4, null, null, null, arity); + } + + /** + * Creates a function that will delay the execution of `func` until after + * `wait` milliseconds have elapsed since the last time it was invoked. + * Provide an options object to indicate that `func` should be invoked on + * the leading and/or trailing edge of the `wait` timeout. Subsequent calls + * to the debounced function will return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * var lazyLayout = _.debounce(calculateLayout, 150); + * jQuery(window).on('resize', lazyLayout); + * + * // execute `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * }); + * + * // ensure `batchLog` is executed once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * source.addEventListener('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * }, false); + */ + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + wait = nativeMax(0, wait) || 0; + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = options.leading; + maxWait = 'maxWait' in options && (nativeMax(wait, options.maxWait) || 0); + trailing = 'trailing' in options ? options.trailing : trailing; + } + var delayed = function() { + var remaining = wait - (now() - stamp); + if (remaining <= 0) { + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + var isCalled = trailingCall; + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + } else { + timeoutId = setTimeout(delayed, remaining); + } + }; + + var maxDelayed = function() { + if (timeoutId) { + clearTimeout(timeoutId); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (trailing || (maxWait !== wait)) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + }; + + return function() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + return result; + }; + } + + /** + * Defers executing the `func` function until the current call stack has cleared. + * Additional arguments will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { console.log(text); }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + function defer(func) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 1); + return setTimeout(function() { func.apply(undefined, args); }, 1); + } + + /** + * Executes the `func` function after `wait` milliseconds. Additional arguments + * will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { console.log(text); }, 1000, 'later'); + * // => logs 'later' after one second + */ + function delay(func, wait) { + if (!isFunction(func)) { + throw new TypeError; + } + var args = slice(arguments, 2); + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it will be used to determine the cache key for storing the result + * based on the arguments provided to the memoized function. By default, the + * first argument provided to the memoized function is used as the cache key. + * The `func` is executed with the `this` binding of the memoized function. + * The result cache is exposed as the `cache` property on the memoized function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] A function used to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var fibonacci = _.memoize(function(n) { + * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); + * }); + * + * fibonacci(9) + * // => 34 + * + * var data = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // modifying the result cache + * var get = _.memoize(function(name) { return data[name]; }, _.identity); + * get('pebbles'); + * // => { 'name': 'pebbles', 'age': 1 } + * + * get.cache.pebbles.name = 'penelope'; + * get('pebbles'); + * // => { 'name': 'penelope', 'age': 1 } + */ + function memoize(func, resolver) { + if (!isFunction(func)) { + throw new TypeError; + } + var memoized = function() { + var cache = memoized.cache, + key = resolver ? resolver.apply(this, arguments) : keyPrefix + arguments[0]; + + return hasOwnProperty.call(cache, key) + ? cache[key] + : (cache[key] = func.apply(this, arguments)); + } + memoized.cache = {}; + return memoized; + } + + /** + * Creates a function that is restricted to execute `func` once. Repeat calls to + * the function will return the value of the first call. The `func` is executed + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` executes `createApplication` once + */ + function once(func) { + var ran, + result; + + if (!isFunction(func)) { + throw new TypeError; + } + return function() { + if (ran) { + return result; + } + ran = true; + result = func.apply(this, arguments); + + // clear the `func` variable so the function may be garbage collected + func = null; + return result; + }; + } + + /** + * Creates a function that, when called, invokes `func` with any additional + * `partial` arguments prepended to those provided to the new function. This + * method is similar to `_.bind` except it does **not** alter the `this` binding. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { return greeting + ' ' + name; }; + * var hi = _.partial(greet, 'hi'); + * hi('fred'); + * // => 'hi fred' + */ + function partial(func) { + return createWrapper(func, 16, slice(arguments, 1)); + } + + /** + * This method is like `_.partial` except that `partial` arguments are + * appended to those provided to the new function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var defaultsDeep = _.partialRight(_.merge, _.defaults); + * + * var options = { + * 'variable': 'data', + * 'imports': { 'jq': $ } + * }; + * + * defaultsDeep(options, _.templateSettings); + * + * options.variable + * // => 'data' + * + * options.imports + * // => { '_': _, 'jq': $ } + */ + function partialRight(func) { + return createWrapper(func, 32, null, slice(arguments, 1)); + } + + /** + * Creates a function that, when executed, will only call the `func` function + * at most once per every `wait` milliseconds. Provide an options object to + * indicate that `func` should be invoked on the leading and/or trailing edge + * of the `wait` timeout. Subsequent calls to the throttled function will + * return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * var throttled = _.throttle(updatePosition, 100); + * jQuery(window).on('scroll', throttled); + * + * // execute `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError; + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? options.leading : leading; + trailing = 'trailing' in options ? options.trailing : trailing; + } + debounceOptions.leading = leading; + debounceOptions.maxWait = wait; + debounceOptions.trailing = trailing; + + return debounce(func, wait, debounceOptions); + } + + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Additional arguments provided to the function are appended + * to those provided to the wrapper function. The wrapper is executed with + * the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('Fred, Wilma, & Pebbles'); + * // => '

Fred, Wilma, & Pebbles

' + */ + function wrap(value, wrapper) { + return createWrapper(wrapper, 16, [value]); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'name': 'fred' }; + * var getter = _.constant(object); + * getter() === object; + * // => true + */ + function constant(value) { + return function() { + return value; + }; + } + + /** + * Produces a callback bound to an optional `thisArg`. If `func` is a property + * name the created callback will return the property value for a given element. + * If `func` is an object the created callback will return `true` for elements + * that contain the equivalent object properties, otherwise it will return `false`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // wrap to create custom callback shorthands + * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { + * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); + * return !match ? func(callback, thisArg) : function(object) { + * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; + * }; + * }); + * + * _.filter(characters, 'age__gt38'); + * // => [{ 'name': 'fred', 'age': 40 }] + */ + function createCallback(func, thisArg, argCount) { + var type = typeof func; + if (func == null || type == 'function') { + return baseCreateCallback(func, thisArg, argCount); + } + // handle "_.pluck" style callback shorthands + if (type != 'object') { + return property(func); + } + var props = keys(func), + key = props[0], + a = func[key]; + + // handle "_.where" style callback shorthands + if (props.length == 1 && a === a && !isObject(a)) { + // fast path the common case of providing an object with a single + // property containing a primitive value + return function(object) { + var b = object[key]; + return a === b && (a !== 0 || (1 / a == 1 / b)); + }; + } + return function(object) { + var length = props.length, + result = false; + + while (length--) { + if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) { + break; + } + } + return result; + }; + } + + /** + * 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); + } + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'name': 'fred' }; + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + /** + * Adds function properties of a source object to the destination object. + * If `object` is a function methods will be added to its prototype as well. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Function|Object} [object=lodash] object The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options] The options object. + * @param {boolean} [options.chain=true] Specify whether the functions added are chainable. + * @example + * + * function capitalize(string) { + * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); + * } + * + * _.mixin({ 'capitalize': capitalize }); + * _.capitalize('fred'); + * // => 'Fred' + * + * _('fred').capitalize().value(); + * // => 'Fred' + * + * _.mixin({ 'capitalize': capitalize }, { 'chain': false }); + * _('fred').capitalize(); + * // => 'Fred' + */ + function mixin(object, source, options) { + var chain = true, + methodNames = source && functions(source); + + if (!source || (!options && !methodNames.length)) { + if (options == null) { + options = source; + } + ctor = lodashWrapper; + source = object; + object = lodash; + methodNames = functions(source); + } + if (options === false) { + chain = false; + } else if (isObject(options) && 'chain' in options) { + chain = options.chain; + } + var ctor = object, + isFunc = isFunction(ctor); + + forEach(methodNames, function(methodName) { + var func = object[methodName] = source[methodName]; + if (isFunc) { + ctor.prototype[methodName] = function() { + var chainAll = this.__chain__, + value = this.__wrapped__, + args = [value]; + + push.apply(args, arguments); + var result = func.apply(object, args); + if (chain || chainAll) { + if (value === result && isObject(result)) { + return this; + } + result = new ctor(result); + result.__chain__ = chainAll; + } + return result; + }; + } + }); + } + + /** + * Reverts the '_' variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @memberOf _ + * @category Utilities + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + context._ = oldDash; + return this; + } + + /** + * A no-operation function. + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var object = { 'name': 'fred' }; + * _.noop(object) === undefined; + * // => true + */ + function noop() { + // no operation performed + } + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var stamp = _.now(); + * _.defer(function() { console.log(_.now() - stamp); }); + * // => logs the number of milliseconds it took for the deferred function to be called + */ + var now = isNative(now = Date.now) && now || function() { + return new Date().getTime(); + }; + + /** + * Converts the given value into an integer of the specified radix. + * If `radix` is `undefined` or `0` a `radix` of `10` is used unless the + * `value` is a hexadecimal, in which case a `radix` of `16` is used. + * + * Note: This method avoids differences in native ES3 and ES5 `parseInt` + * implementations. See http://es5.github.io/#E. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. + * @example + * + * _.parseInt('08'); + * // => 8 + */ + var parseInt = nativeParseInt(whitespace + '08') == 8 ? nativeParseInt : function(value, radix) { + // Firefox < 21 and Opera < 15 follow the ES3 specified implementation of `parseInt` + return nativeParseInt(isString(value) ? value.replace(reLeadingSpacesAndZeros, '') : value, radix || 0); + }; + + /** + * Creates a "_.pluck" style function, which returns the `key` value of a + * given object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} key The name of the property to retrieve. + * @returns {Function} Returns the new function. + * @example + * + * var characters = [ + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 36 } + * ]; + * + * var getName = _.property('name'); + * + * _.map(characters, getName); + * // => ['barney', 'fred'] + * + * _.sortBy(characters, getName); + * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] + */ + function property(key) { + return function(object) { + return object[key]; + }; + } + + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number will be + * returned. If `floating` is truey or either `min` or `max` are floats a + * floating-point number will be returned instead of an integer. + * + * @static + * @memberOf _ + * @category Utilities + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating=false] Specify returning a floating-point number. + * @returns {number} Returns a random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(min, max, floating) { + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (typeof min == 'boolean' && noMax) { + floating = min; + min = 1; + } + else if (!noMax && typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand +'').length - 1)))), max); + } + return baseRandom(min, max); + } + + /** + * Resolves the value of property `key` on `object`. If `key` is a function + * it will be invoked with the `this` binding of `object` and its result returned, + * else the property value is returned. If `object` is falsey then `undefined` + * is returned. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to resolve. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { + * 'cheese': 'crumpets', + * 'stuff': function() { + * return 'nonsense'; + * } + * }; + * + * _.result(object, 'cheese'); + * // => 'crumpets' + * + * _.result(object, 'stuff'); + * // => 'nonsense' + */ + function result(object, key) { + if (object) { + var value = object[key]; + return isFunction(value) ? object[key]() : value; + } + } + + /** + * 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('<%- value %>', { 'value': '\n```\n\nUsing [`npm`](http://npmjs.org/):\n\n```bash\nnpm i --save lodash\n\n{sudo} npm i -g lodash\nnpm ln lodash\n```\n\nIn [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/):\n\n```js\nvar _ = require('lodash');\n// or as Underscore\nvar _ = require('lodash/dist/lodash.underscore');\n```\n\n**Notes:**\n * Don’t assign values to [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL\n * If Lo-Dash is installed globally, run [`npm ln lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory *before* requiring it\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('lodash.js');\n```\n\nIn an AMD loader:\n\n```js\nrequire({\n 'packages': [\n { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }\n ]\n},\n['lodash'], function(_) {\n console.log(_.VERSION);\n});\n```\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\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", + "readmeFilename": "README.md", + "_id": "lodash@2.4.1", + "_from": "lodash@>=2.4.1-0 <3.0.0-0", + "scripts": {} +} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/mkdirp/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/mkdirp/package.json index becdf58..ae63af1 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/mkdirp/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/mkdirp/package.json @@ -39,7 +39,7 @@ "shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12", "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz" }, - "_from": "mkdirp@^0.5.0", + "_from": "mkdirp@>=0.5.0-0 <0.6.0-0", "_npmVersion": "1.4.3", "_npmUser": { "name": "substack", diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/cli.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/cli.js index a60a624..2c1e7c4 100755 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/cli.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/cli.js @@ -2,26 +2,30 @@ 'use strict'; var fs = require('fs'); var pkg = require('./package.json'); -var stripBom = require('./index'); -var input = process.argv[2]; +var stripBom = require('./'); +var argv = process.argv.slice(2); +var input = argv[0]; function help() { - console.log(pkg.description); - console.log(''); - console.log('Usage'); - console.log(' $ strip-bom > '); - console.log(' $ cat | strip-bom > '); - console.log(''); - console.log('Example'); - console.log(' $ strip-bom unicorn.txt > unicorn-without-bom.txt'); + console.log([ + '', + ' ' + pkg.description, + '', + ' Usage', + ' strip-bom > ', + ' cat | strip-bom > ', + '', + ' Example', + ' strip-bom unicorn.txt > unicorn-without-bom.txt' + ].join('\n')); } -if (process.argv.indexOf('--help') !== -1) { +if (argv.indexOf('--help') !== -1) { help(); return; } -if (process.argv.indexOf('--version') !== -1) { +if (argv.indexOf('--version') !== -1) { console.log(pkg.version); return; } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/index.js index 30119a6..c085b4c 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/index.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/index.js @@ -3,11 +3,11 @@ var isUtf8 = require('is-utf8'); var stripBom = module.exports = function (arg) { if (typeof arg === 'string') { - return arg.replace(/^\uFEFF/g, ''); + return arg.replace(/^\ufeff/g, ''); } if (Buffer.isBuffer(arg) && isUtf8(arg) && - arg[0] === 0xEF && arg[1] === 0xBB && arg[2] === 0xBF) { + arg[0] === 0xef && arg[1] === 0xbb && arg[2] === 0xbf) { return arg.slice(3); } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/first-chunk-stream/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/first-chunk-stream/package.json index 8cf4e9c..3af21e4 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/first-chunk-stream/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/first-chunk-stream/package.json @@ -1,11 +1,11 @@ { "name": "first-chunk-stream", - "version": "0.1.0", + "version": "1.0.0", "description": "Transform the first chunk in a stream", "license": "MIT", "repository": { "type": "git", - "url": "git://github.com/sindresorhus/first-chunk-stream" + "url": "https://github.com/sindresorhus/first-chunk-stream" }, "author": { "name": "Sindre Sorhus", @@ -36,15 +36,15 @@ "concat-stream": "^1.4.5", "mocha": "*" }, - "gitHead": "79ca900b4d31074448dc7767eae79f1e605dca20", + "gitHead": "8b0b1750edcc30fa2b2071245198181e925be619", "bugs": { "url": "https://github.com/sindresorhus/first-chunk-stream/issues" }, "homepage": "https://github.com/sindresorhus/first-chunk-stream", - "_id": "first-chunk-stream@0.1.0", - "_shasum": "755d3ec14d49a86e3d2fcc08beead5c0ca2b9c0a", - "_from": "first-chunk-stream@^0.1.0", - "_npmVersion": "1.4.13", + "_id": "first-chunk-stream@1.0.0", + "_shasum": "59bfb50cd905f60d7c394cd3d9acaab4e6ad934e", + "_from": "first-chunk-stream@>=1.0.0-0 <2.0.0-0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" @@ -56,10 +56,9 @@ } ], "dist": { - "shasum": "755d3ec14d49a86e3d2fcc08beead5c0ca2b9c0a", - "tarball": "http://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-0.1.0.tgz" + "shasum": "59bfb50cd905f60d7c394cd3d9acaab4e6ad934e", + "tarball": "http://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-0.1.0.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/is-utf8/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/is-utf8/package.json index 5b2daaa..4823691 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/is-utf8/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/node_modules/is-utf8/package.json @@ -37,7 +37,7 @@ ], "directories": {}, "_shasum": "b8aa54125ae626bfe4e3beb965f16a89c58a1137", - "_from": "is-utf8@^0.2.0", + "_from": "is-utf8@>=0.2.0-0 <0.3.0-0", "_resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.0.tgz", "bugs": { "url": "https://github.com/wayfind/is-utf8/issues" diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/package.json index 6e4c955..e37cd69 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/package.json @@ -1,20 +1,20 @@ { "name": "strip-bom", - "version": "0.3.1", + "version": "1.0.0", "description": "Strip UTF-8 byte order mark (BOM) from a string/buffer/stream", "license": "MIT", "repository": { "type": "git", "url": "git://github.com/sindresorhus/strip-bom" }, - "bin": { - "strip-bom": "cli.js" - }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, + "bin": { + "strip-bom": "cli.js" + }, "engines": { "node": ">=0.10.0" }, @@ -45,22 +45,21 @@ "streams" ], "dependencies": { - "first-chunk-stream": "^0.1.0", + "first-chunk-stream": "^1.0.0", "is-utf8": "^0.2.0" }, "devDependencies": { "concat-stream": "^1.4.5", "mocha": "*" }, - "gitHead": "bac8b80dceb94ce6d544dfc1234e755c779f9829", "bugs": { "url": "https://github.com/sindresorhus/strip-bom/issues" }, "homepage": "https://github.com/sindresorhus/strip-bom", - "_id": "strip-bom@0.3.1", - "_shasum": "9e8a39eff456ff9abc2f059f5f2225bb0f3f7ca5", - "_from": "strip-bom@^0.3.0", - "_npmVersion": "1.4.13", + "_id": "strip-bom@1.0.0", + "_shasum": "85b8862f3844b5a6d5ec8467a93598173a36f794", + "_from": "strip-bom@>=1.0.0-0 <2.0.0-0", + "_npmVersion": "1.4.9", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" @@ -72,10 +71,9 @@ } ], "dist": { - "shasum": "9e8a39eff456ff9abc2f059f5f2225bb0f3f7ca5", - "tarball": "http://registry.npmjs.org/strip-bom/-/strip-bom-0.3.1.tgz" + "shasum": "85b8862f3844b5a6d5ec8467a93598173a36f794", + "tarball": "http://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-0.3.1.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/readme.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/readme.md index d0747ca..10e1d8f 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/readme.md +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/strip-bom/readme.md @@ -2,21 +2,17 @@ > Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string/buffer/stream - From Wikipedia: > The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8. -## Install +## Usage ```sh $ npm install --save strip-bom ``` - -## Usage - ```js var fs = require('fs'); var stripBom = require('strip-bom'); @@ -46,15 +42,15 @@ fs.createReadStream('unicorn.txt') $ npm install --global strip-bom ``` -```sh +``` $ strip-bom --help -Usage - $ strip-bom > - $ cat | strip-bom > + Usage + strip-bom > + cat | strip-bom > -Example - $ strip-bom unicorn.txt > unicorn-without-bom.txt + Example + strip-bom unicorn.txt > unicorn-without-bom.txt ``` diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/README.md index 33aa01e..ec74569 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/README.md +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/README.md @@ -100,7 +100,9 @@ The `transformFunction` must have the following signature: `function (chunk, enc 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. +Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. + +If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. ### flushFunction diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js index 0ca7705..6307220 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js @@ -240,7 +240,7 @@ function howMuchToRead(n, state) { if (state.objectMode) return n === 0 ? 0 : 1; - if (isNaN(n) || n === null) { + if (n === null || isNaN(n)) { // only flow one buffer at a time if (state.flowing && state.buffer.length) return state.buffer[0].length; @@ -275,6 +275,7 @@ Readable.prototype.read = function(n) { var state = this._readableState; state.calledRead = true; var nOrig = n; + var ret; if (typeof n !== 'number' || n > 0) state.emittedReadable = false; @@ -293,9 +294,28 @@ Readable.prototype.read = function(n) { // if we've ended, and we're now clear, then finish it up. if (n === 0 && state.ended) { + ret = null; + + // In cases where the decoder did not receive enough data + // to produce a full chunk, then immediately received an + // EOF, state.buffer will contain [, ]. + // howMuchToRead will see this and coerce the amount to + // read to zero (because it's looking at the length of the + // first in state.buffer), and we'll end up here. + // + // This can only happen via state.decoder -- no other venue + // exists for pushing a zero-length chunk into state.buffer + // and triggering this behavior. In this case, we return our + // remaining data and end the stream, if appropriate. + if (state.length > 0 && state.decoder) { + ret = fromList(n, state); + state.length -= ret.length; + } + if (state.length === 0) endReadable(this); - return null; + + return ret; } // All the actual chunk generation logic needs to be @@ -349,7 +369,6 @@ Readable.prototype.read = function(n) { if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - var ret; if (n > 0) ret = fromList(n, state); else @@ -382,8 +401,7 @@ function chunkInvalid(state, chunk) { 'string' !== typeof chunk && chunk !== null && chunk !== undefined && - !state.objectMode && - !er) { + !state.objectMode) { er = new TypeError('Invalid non-string/buffer chunk'); } return er; @@ -814,7 +832,12 @@ Readable.prototype.wrap = function(stream) { stream.on('data', function(chunk) { if (state.decoder) chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) + + // don't skip over falsy values in objectMode + //if (state.objectMode && util.isNullOrUndefined(chunk)) + if (state.objectMode && (chunk === null || chunk === undefined)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) return; var ret = self.push(chunk); diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js index d0254d5..4bdaa4f 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js @@ -37,7 +37,6 @@ var util = require('core-util-is'); util.inherits = require('inherits'); /**/ - var Stream = require('stream'); util.inherits(Writable, Stream); diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json index d28ffc4..e59d249 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json @@ -31,6 +31,6 @@ "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", + "_from": "core-util-is@>=1.0.0-0 <1.1.0-0", "scripts": {} } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json index c532ca6..3f828f9 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json @@ -29,5 +29,5 @@ }, "homepage": "https://github.com/isaacs/inherits", "_id": "inherits@2.0.1", - "_from": "inherits@~2.0.1" + "_from": "inherits@>=2.0.1-0 <2.1.0-0" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json index fc7904b..04d6a3f 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json @@ -47,8 +47,5 @@ ], "directories": {}, "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - } + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js index 2e44a03..b00e54f 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -36,6 +36,14 @@ function assertEncoding(encoding) { } } +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. var StringDecoder = exports.StringDecoder = function(encoding) { this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); assertEncoding(encoding); @@ -60,37 +68,50 @@ var StringDecoder = exports.StringDecoder = function(encoding) { return; } + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. this.charLength = 0; }; +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . 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; + var available = (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; + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; if (this.charReceived < this.charLength) { // still not enough chars in this buffer? wait for more ... return ''; } + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + // 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 + // CESU-8: 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; @@ -100,34 +121,33 @@ StringDecoder.prototype.write = function(buffer) { 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); + if (buffer.length === 0) { + return charStr; + } break; } - var lenIncomplete = this.detectIncompleteChar(buffer); + // determine and set charLength / charReceived + 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; + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } 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 + // CESU-8: 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); + buffer.copy(this.charBuffer, 0, 0, size); return charStr.substring(0, end); } @@ -135,6 +155,10 @@ StringDecoder.prototype.write = function(buffer) { return charStr; }; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. 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; @@ -164,8 +188,7 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { break; } } - - return i; + this.charReceived = i; }; StringDecoder.prototype.end = function(buffer) { @@ -188,13 +211,11 @@ function passThroughWrite(buffer) { } function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json index 7f5d001..752eab6 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,6 +1,6 @@ { "name": "string_decoder", - "version": "0.10.25-1", + "version": "0.10.31", "description": "The string_decoder module from Node core", "main": "index.js", "dependencies": {}, @@ -22,11 +22,33 @@ "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", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@>=0.10.0-0 <0.11.0-0", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/package.json index afdd6ef..15c84e6 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.0.27-1", + "version": "1.0.31", "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", "main": "readable.js", "dependencies": { @@ -37,13 +37,10 @@ "url": "https://github.com/isaacs/readable-stream/issues" }, "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.27-1", - "dist": { - "shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz" - }, - "_from": "readable-stream@~1.0.17", - "_npmVersion": "1.4.3", + "_id": "readable-stream@1.0.31", + "_shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "_from": "readable-stream@>=1.0.27-1 <1.1.0-0", + "_npmVersion": "1.4.9", "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" @@ -62,8 +59,11 @@ "email": "rod@vagg.org" } ], + "dist": { + "shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz" + }, "directories": {}, - "_shasum": "6b67983c20357cefd07f0165001a16d710d91078", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/README.md index e754831..093cb29 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/README.md +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/README.md @@ -2,9 +2,11 @@ [![browser support][3]][4] +[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + 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. +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 precedence. ## Examples @@ -13,13 +15,15 @@ var extend = require("xtend") // extend returns a new object. Does not mutate arguments var combination = extend({ - a: "a" + a: "a", + b: 'c' }, { b: "b" }) // { a: "a", b: "b" } ``` +## Stability status: Locked ## MIT Licenced diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/immutable.js similarity index 100% rename from node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/index.js rename to node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/immutable.js diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/package.json index 99147b6..d90698e 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/xtend/package.json @@ -1,6 +1,6 @@ { "name": "xtend", - "version": "3.0.0", + "version": "4.0.0", "description": "extend like a boss", "keywords": [ "extend", @@ -18,7 +18,7 @@ "type": "git", "url": "git://github.com/Raynos/xtend.git" }, - "main": "index", + "main": "immutable", "scripts": { "test": "node test" }, @@ -63,13 +63,11 @@ "engines": { "node": ">=0.4" }, - "_id": "xtend@3.0.0", - "dist": { - "shasum": "5cce7407baf642cba7becda568111c493f59665a", - "tarball": "http://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" - }, - "_from": "xtend@~3.0.0", - "_npmVersion": "1.4.6", + "gitHead": "94a95d76154103290533b2c55ffa0fe4be16bfef", + "_id": "xtend@4.0.0", + "_shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", + "_from": "xtend@>=4.0.0 <4.1.0-0", + "_npmVersion": "1.4.15", "_npmUser": { "name": "raynos", "email": "raynos2@gmail.com" @@ -80,8 +78,11 @@ "email": "raynos2@gmail.com" } ], + "dist": { + "shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", + "tarball": "http://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz" + }, "directories": {}, - "_shasum": "5cce7407baf642cba7becda568111c493f59665a", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/package.json index bf3f167..f763af0 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/package.json @@ -1,6 +1,6 @@ { "name": "through2", - "version": "0.5.1", + "version": "0.6.1", "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", "main": "through2.js", "scripts": { @@ -24,26 +24,23 @@ }, "license": "MIT", "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~3.0.0" + "readable-stream": ">=1.0.27-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" }, "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" + "bl": ">=0.9.0 <0.10.0-0", + "stream-spigot": ">=3.0.4 <3.1.0-0", + "tape": ">=2.14.0 <2.15.0-0" }, + "gitHead": "f66daaa2cb5d37b56c401f3b5a4962f709893267", "bugs": { "url": "https://github.com/rvagg/through2/issues" }, "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.5.1", - "dist": { - "shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "tarball": "http://registry.npmjs.org/through2/-/through2-0.5.1.tgz" - }, - "_from": "through2@^0.5.1", - "_npmVersion": "1.4.3", + "_id": "through2@0.6.1", + "_shasum": "f742b32893e8bd26146e789e4fd2ccb2c07a717e", + "_from": "through2@>=0.6.1-0 <0.7.0-0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" @@ -58,8 +55,11 @@ "email": "bryce@ravenwall.com" } ], + "dist": { + "shasum": "f742b32893e8bd26146e789e4fd2ccb2c07a717e", + "tarball": "http://registry.npmjs.org/through2/-/through2-0.6.1.tgz" + }, "directories": {}, - "_shasum": "dfdd012eb9c700e2323fd334f38ac622ab372da7", - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", + "_resolved": "https://registry.npmjs.org/through2/-/through2-0.6.1.tgz", "readme": "ERROR: No README data found!" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/through2.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/through2.js index d3610aa..5b7a880 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/through2.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/through2.js @@ -2,6 +2,24 @@ var Transform = require('readable-stream/transform') , inherits = require('util').inherits , xtend = require('xtend') +function DestroyableTransform(opts) { + Transform.call(this, opts) + this._destroyed = false +} + +inherits(DestroyableTransform, Transform) + +DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) return + this._destroyed = true + + var self = this + process.nextTick(function() { + if (err) + self.emit('error', err) + self.emit('close') + }) +} // a noop _transform function function noop (chunk, enc, callback) { @@ -32,7 +50,7 @@ function through2 (construct) { // main export, just make me a transform stream! module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) + var t2 = new DestroyableTransform(options) t2._transform = transform @@ -52,10 +70,10 @@ module.exports.ctor = through2(function (options, transform, flush) { this.options = xtend(options, override) - Transform.call(this, this.options) + DestroyableTransform.call(this, this.options) } - inherits(Through2, Transform) + inherits(Through2, DestroyableTransform) Through2.prototype._transform = transform @@ -67,7 +85,7 @@ module.exports.ctor = through2(function (options, transform, flush) { module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true, highWaterMark: 16 }, options)) + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) t2._transform = transform diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.jshintignore b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.jshintignore new file mode 100644 index 0000000..ba2a97b --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.jshintignore @@ -0,0 +1,2 @@ +node_modules +coverage diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.jshintrc b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.jshintrc new file mode 100644 index 0000000..373d6c3 --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.jshintrc @@ -0,0 +1,36 @@ +{ + "indent": 2, + "smarttabs": true, + "latedef": "nofunc", + "undef": true, + "unused": true, + "trailing": true, + "laxcomma": false, + "eqeqeq": true, + "eqnull": true, + "boss": true, + "expr": true, + "sub": true, + "newcap": true, + "quotmark": true, + "loopfunc": true, + "lastsemic": true, + "funcscope": true, + "browser": true, + "nonstandard": true, + "jquery": true, + "devel": true, + "node": true, + "esnext": true, + "globals": { + "describe": false, + "xdescribe": false, + "it": false, + "xit": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false, + "define": false + } +} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.travis.yml b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.travis.yml index 33ad9f8..8b95a9f 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.travis.yml +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/.travis.yml @@ -1,6 +1,5 @@ language: node_js node_js: - - "0.9" - "0.10" after_script: - - npm run coveralls \ No newline at end of file + - npm run coveralls diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/LICENSE b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/LICENSE old mode 100755 new mode 100644 diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/README.md b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/README.md index 3f97efc..ae6f16f 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/README.md +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/README.md @@ -17,6 +17,10 @@ +## What is this? + +Read this for more info about how this plays into the grand scheme of things https://medium.com/@eschoff/3828e8126466 + ## File ```javascript @@ -25,7 +29,7 @@ var File = require('vinyl'); var coffeeFile = new File({ cwd: "/", base: "/test/", - path: "/test/file.coffee" + path: "/test/file.coffee", contents: new Buffer("test = 123") }); ``` @@ -79,7 +83,7 @@ Returns true if file.contents is null. ### clone() -Returns a new File object with all attributes cloned. +Returns a new File object with all attributes cloned. Custom attributes are deep-cloned. ### pipe(stream[, opt]) @@ -89,7 +93,7 @@ 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). +If opt.end is false, the destination stream will not be ended (same as node core). Returns the stream. @@ -120,4 +124,4 @@ console.log(file.relative); // file.coffee [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 +[depstat-image]: https://david-dm.org/wearefractal/vinyl.png diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/coverage.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/coverage.json new file mode 100644 index 0000000..2bf4c62 --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/coverage.json @@ -0,0 +1 @@ +{"/Users/contra/Projects/vinyl/index.js":{"path":"/Users/contra/Projects/vinyl/index.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":73,"12":14,"13":73,"14":73,"15":73,"16":73,"17":73,"18":73,"19":1,"20":26,"21":1,"22":29,"23":1,"24":6,"25":1,"26":3,"27":1,"28":14,"29":2,"30":12,"31":7,"32":5,"33":5,"34":14,"35":14,"36":1,"37":1,"38":13,"39":6,"40":14,"41":14,"42":75,"43":70,"44":5,"45":14,"46":1,"47":6,"48":3,"49":6,"50":3,"51":6,"52":2,"53":4,"54":2,"55":1,"56":1,"57":2,"58":2,"59":1,"60":2,"61":1,"62":6,"63":6,"64":6,"65":4,"66":6,"67":3,"68":6,"69":1,"70":6,"71":1,"72":99,"73":78,"74":1,"75":77,"76":1,"77":7,"78":1,"79":6,"80":1,"81":5,"82":1,"83":1,"84":46,"85":9,"86":1,"87":8,"88":5,"89":1},"b":{"1":[14,59],"2":[25,48],"3":[73,33],"4":[73,32],"5":[73,39],"6":[73,65],"7":[73,44],"8":[3,1,1],"9":[2,12],"10":[7,5],"11":[1,13],"12":[6,7],"13":[5,1],"14":[2,12],"15":[70,5],"16":[75,61,47,33,33,19],"17":[2,3],"18":[3,3],"19":[3,3],"20":[2,4],"21":[2,2],"22":[1,1],"23":[1,1],"24":[3,3],"25":[6,5],"26":[4,2],"27":[3,3],"28":[1,5],"29":[1,77],"30":[78,57,46],"31":[1,6],"32":[1,5],"33":[1,8],"34":[5,3],"35":[8,7]},"f":{"1":73,"2":26,"3":29,"4":6,"5":3,"6":14,"7":75,"8":6,"9":6,"10":99,"11":78,"12":7,"13":1,"14":46,"15":9},"fnMap":{"1":{"name":"File","line":11,"loc":{"start":{"line":11,"column":0},"end":{"line":11,"column":20}}},"2":{"name":"(anonymous_2)","line":30,"loc":{"start":{"line":30,"column":26},"end":{"line":30,"column":37}}},"3":{"name":"(anonymous_3)","line":34,"loc":{"start":{"line":34,"column":26},"end":{"line":34,"column":37}}},"4":{"name":"(anonymous_4)","line":38,"loc":{"start":{"line":38,"column":24},"end":{"line":38,"column":35}}},"5":{"name":"(anonymous_5)","line":43,"loc":{"start":{"line":43,"column":29},"end":{"line":43,"column":40}}},"6":{"name":"(anonymous_6)","line":47,"loc":{"start":{"line":47,"column":23},"end":{"line":47,"column":37}}},"7":{"name":"(anonymous_7)","line":81,"loc":{"start":{"line":81,"column":28},"end":{"line":81,"column":42}}},"8":{"name":"(anonymous_8)","line":93,"loc":{"start":{"line":93,"column":22},"end":{"line":93,"column":44}}},"9":{"name":"(anonymous_9)","line":114,"loc":{"start":{"line":114,"column":25},"end":{"line":114,"column":36}}},"10":{"name":"(anonymous_10)","line":138,"loc":{"start":{"line":138,"column":7},"end":{"line":138,"column":18}}},"11":{"name":"(anonymous_11)","line":141,"loc":{"start":{"line":141,"column":7},"end":{"line":141,"column":21}}},"12":{"name":"(anonymous_12)","line":151,"loc":{"start":{"line":151,"column":7},"end":{"line":151,"column":18}}},"13":{"name":"(anonymous_13)","line":156,"loc":{"start":{"line":156,"column":7},"end":{"line":156,"column":18}}},"14":{"name":"(anonymous_14)","line":162,"loc":{"start":{"line":162,"column":7},"end":{"line":162,"column":18}}},"15":{"name":"(anonymous_15)","line":165,"loc":{"start":{"line":165,"column":7},"end":{"line":165,"column":22}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":27}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":36}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":40}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":47}},"5":{"start":{"line":5,"column":0},"end":{"line":5,"column":41}},"6":{"start":{"line":6,"column":0},"end":{"line":6,"column":41}},"7":{"start":{"line":7,"column":0},"end":{"line":7,"column":37}},"8":{"start":{"line":8,"column":0},"end":{"line":8,"column":51}},"9":{"start":{"line":9,"column":0},"end":{"line":9,"column":31}},"10":{"start":{"line":11,"column":0},"end":{"line":28,"column":1}},"11":{"start":{"line":12,"column":2},"end":{"line":12,"column":23}},"12":{"start":{"line":12,"column":13},"end":{"line":12,"column":23}},"13":{"start":{"line":15,"column":2},"end":{"line":15,"column":55}},"14":{"start":{"line":16,"column":2},"end":{"line":16,"column":31}},"15":{"start":{"line":19,"column":2},"end":{"line":19,"column":39}},"16":{"start":{"line":20,"column":2},"end":{"line":20,"column":36}},"17":{"start":{"line":24,"column":2},"end":{"line":24,"column":32}},"18":{"start":{"line":27,"column":2},"end":{"line":27,"column":40}},"19":{"start":{"line":30,"column":0},"end":{"line":32,"column":2}},"20":{"start":{"line":31,"column":2},"end":{"line":31,"column":33}},"21":{"start":{"line":34,"column":0},"end":{"line":36,"column":2}},"22":{"start":{"line":35,"column":2},"end":{"line":35,"column":33}},"23":{"start":{"line":38,"column":0},"end":{"line":40,"column":2}},"24":{"start":{"line":39,"column":2},"end":{"line":39,"column":31}},"25":{"start":{"line":43,"column":0},"end":{"line":45,"column":2}},"26":{"start":{"line":44,"column":2},"end":{"line":44,"column":63}},"27":{"start":{"line":47,"column":0},"end":{"line":91,"column":2}},"28":{"start":{"line":48,"column":2},"end":{"line":61,"column":3}},"29":{"start":{"line":49,"column":4},"end":{"line":52,"column":6}},"30":{"start":{"line":53,"column":9},"end":{"line":61,"column":3}},"31":{"start":{"line":54,"column":4},"end":{"line":57,"column":6}},"32":{"start":{"line":59,"column":4},"end":{"line":59,"column":33}},"33":{"start":{"line":60,"column":4},"end":{"line":60,"column":42}},"34":{"start":{"line":64,"column":2},"end":{"line":64,"column":15}},"35":{"start":{"line":65,"column":2},"end":{"line":70,"column":3}},"36":{"start":{"line":66,"column":4},"end":{"line":66,"column":60}},"37":{"start":{"line":67,"column":4},"end":{"line":67,"column":65}},"38":{"start":{"line":68,"column":9},"end":{"line":70,"column":3}},"39":{"start":{"line":69,"column":4},"end":{"line":69,"column":73}},"40":{"start":{"line":72,"column":2},"end":{"line":78,"column":5}},"41":{"start":{"line":81,"column":2},"end":{"line":89,"column":11}},"42":{"start":{"line":83,"column":4},"end":{"line":87,"column":5}},"43":{"start":{"line":86,"column":6},"end":{"line":86,"column":13}},"44":{"start":{"line":88,"column":4},"end":{"line":88,"column":62}},"45":{"start":{"line":90,"column":2},"end":{"line":90,"column":14}},"46":{"start":{"line":93,"column":0},"end":{"line":112,"column":2}},"47":{"start":{"line":94,"column":2},"end":{"line":94,"column":21}},"48":{"start":{"line":94,"column":12},"end":{"line":94,"column":21}},"49":{"start":{"line":95,"column":2},"end":{"line":95,"column":53}},"50":{"start":{"line":95,"column":38},"end":{"line":95,"column":53}},"51":{"start":{"line":97,"column":2},"end":{"line":99,"column":3}},"52":{"start":{"line":98,"column":4},"end":{"line":98,"column":43}},"53":{"start":{"line":100,"column":2},"end":{"line":107,"column":3}},"54":{"start":{"line":101,"column":4},"end":{"line":105,"column":5}},"55":{"start":{"line":102,"column":6},"end":{"line":102,"column":32}},"56":{"start":{"line":104,"column":6},"end":{"line":104,"column":34}},"57":{"start":{"line":106,"column":4},"end":{"line":106,"column":18}},"58":{"start":{"line":110,"column":2},"end":{"line":110,"column":28}},"59":{"start":{"line":110,"column":15},"end":{"line":110,"column":28}},"60":{"start":{"line":111,"column":2},"end":{"line":111,"column":16}},"61":{"start":{"line":114,"column":0},"end":{"line":133,"column":2}},"62":{"start":{"line":115,"column":2},"end":{"line":115,"column":19}},"63":{"start":{"line":118,"column":2},"end":{"line":118,"column":70}},"64":{"start":{"line":120,"column":2},"end":{"line":122,"column":3}},"65":{"start":{"line":121,"column":4},"end":{"line":121,"column":35}},"66":{"start":{"line":124,"column":2},"end":{"line":126,"column":3}},"67":{"start":{"line":125,"column":4},"end":{"line":125,"column":42}},"68":{"start":{"line":128,"column":2},"end":{"line":130,"column":3}},"69":{"start":{"line":129,"column":4},"end":{"line":129,"column":47}},"70":{"start":{"line":132,"column":2},"end":{"line":132,"column":40}},"71":{"start":{"line":137,"column":0},"end":{"line":147,"column":3}},"72":{"start":{"line":139,"column":4},"end":{"line":139,"column":26}},"73":{"start":{"line":142,"column":4},"end":{"line":144,"column":5}},"74":{"start":{"line":143,"column":6},"end":{"line":143,"column":80}},"75":{"start":{"line":145,"column":4},"end":{"line":145,"column":25}},"76":{"start":{"line":150,"column":0},"end":{"line":159,"column":3}},"77":{"start":{"line":152,"column":4},"end":{"line":152,"column":80}},"78":{"start":{"line":152,"column":20},"end":{"line":152,"column":80}},"79":{"start":{"line":153,"column":4},"end":{"line":153,"column":80}},"80":{"start":{"line":153,"column":20},"end":{"line":153,"column":80}},"81":{"start":{"line":154,"column":4},"end":{"line":154,"column":47}},"82":{"start":{"line":157,"column":4},"end":{"line":157,"column":103}},"83":{"start":{"line":161,"column":0},"end":{"line":173,"column":3}},"84":{"start":{"line":163,"column":4},"end":{"line":163,"column":49}},"85":{"start":{"line":166,"column":4},"end":{"line":166,"column":75}},"86":{"start":{"line":166,"column":34},"end":{"line":166,"column":75}},"87":{"start":{"line":169,"column":4},"end":{"line":171,"column":5}},"88":{"start":{"line":170,"column":6},"end":{"line":170,"column":30}},"89":{"start":{"line":175,"column":0},"end":{"line":175,"column":22}}},"branchMap":{"1":{"line":12,"type":"if","locations":[{"start":{"line":12,"column":2},"end":{"line":12,"column":2}},{"start":{"line":12,"column":2},"end":{"line":12,"column":2}}]},"2":{"line":15,"type":"cond-expr","locations":[{"start":{"line":15,"column":28},"end":{"line":15,"column":39}},{"start":{"line":15,"column":42},"end":{"line":15,"column":54}}]},"3":{"line":16,"type":"binary-expr","locations":[{"start":{"line":16,"column":17},"end":{"line":16,"column":24}},{"start":{"line":16,"column":28},"end":{"line":16,"column":30}}]},"4":{"line":19,"type":"binary-expr","locations":[{"start":{"line":19,"column":13},"end":{"line":19,"column":21}},{"start":{"line":19,"column":25},"end":{"line":19,"column":38}}]},"5":{"line":20,"type":"binary-expr","locations":[{"start":{"line":20,"column":14},"end":{"line":20,"column":23}},{"start":{"line":20,"column":27},"end":{"line":20,"column":35}}]},"6":{"line":24,"type":"binary-expr","locations":[{"start":{"line":24,"column":14},"end":{"line":24,"column":23}},{"start":{"line":24,"column":27},"end":{"line":24,"column":31}}]},"7":{"line":27,"type":"binary-expr","locations":[{"start":{"line":27,"column":18},"end":{"line":27,"column":31}},{"start":{"line":27,"column":35},"end":{"line":27,"column":39}}]},"8":{"line":44,"type":"binary-expr","locations":[{"start":{"line":44,"column":9},"end":{"line":44,"column":22}},{"start":{"line":44,"column":26},"end":{"line":44,"column":35}},{"start":{"line":44,"column":39},"end":{"line":44,"column":62}}]},"9":{"line":48,"type":"if","locations":[{"start":{"line":48,"column":2},"end":{"line":48,"column":2}},{"start":{"line":48,"column":2},"end":{"line":48,"column":2}}]},"10":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":9},"end":{"line":53,"column":9}},{"start":{"line":53,"column":9},"end":{"line":53,"column":9}}]},"11":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":2},"end":{"line":65,"column":2}},{"start":{"line":65,"column":2},"end":{"line":65,"column":2}}]},"12":{"line":68,"type":"if","locations":[{"start":{"line":68,"column":9},"end":{"line":68,"column":9}},{"start":{"line":68,"column":9},"end":{"line":68,"column":9}}]},"13":{"line":69,"type":"cond-expr","locations":[{"start":{"line":69,"column":30},"end":{"line":69,"column":56}},{"start":{"line":69,"column":59},"end":{"line":69,"column":72}}]},"14":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":23},"end":{"line":75,"column":44}},{"start":{"line":75,"column":47},"end":{"line":75,"column":51}}]},"15":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":4},"end":{"line":83,"column":4}},{"start":{"line":83,"column":4},"end":{"line":83,"column":4}}]},"16":{"line":83,"type":"binary-expr","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":27}},{"start":{"line":83,"column":31},"end":{"line":83,"column":45}},{"start":{"line":84,"column":6},"end":{"line":84,"column":23}},{"start":{"line":84,"column":27},"end":{"line":84,"column":41}},{"start":{"line":85,"column":6},"end":{"line":85,"column":20}},{"start":{"line":85,"column":24},"end":{"line":85,"column":37}}]},"17":{"line":88,"type":"cond-expr","locations":[{"start":{"line":88,"column":27},"end":{"line":88,"column":49}},{"start":{"line":88,"column":52},"end":{"line":88,"column":61}}]},"18":{"line":94,"type":"if","locations":[{"start":{"line":94,"column":2},"end":{"line":94,"column":2}},{"start":{"line":94,"column":2},"end":{"line":94,"column":2}}]},"19":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":2},"end":{"line":95,"column":2}},{"start":{"line":95,"column":2},"end":{"line":95,"column":2}}]},"20":{"line":97,"type":"if","locations":[{"start":{"line":97,"column":2},"end":{"line":97,"column":2}},{"start":{"line":97,"column":2},"end":{"line":97,"column":2}}]},"21":{"line":100,"type":"if","locations":[{"start":{"line":100,"column":2},"end":{"line":100,"column":2}},{"start":{"line":100,"column":2},"end":{"line":100,"column":2}}]},"22":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":4},"end":{"line":101,"column":4}},{"start":{"line":101,"column":4},"end":{"line":101,"column":4}}]},"23":{"line":110,"type":"if","locations":[{"start":{"line":110,"column":2},"end":{"line":110,"column":2}},{"start":{"line":110,"column":2},"end":{"line":110,"column":2}}]},"24":{"line":118,"type":"cond-expr","locations":[{"start":{"line":118,"column":44},"end":{"line":118,"column":57}},{"start":{"line":118,"column":60},"end":{"line":118,"column":69}}]},"25":{"line":118,"type":"binary-expr","locations":[{"start":{"line":118,"column":18},"end":{"line":118,"column":27}},{"start":{"line":118,"column":31},"end":{"line":118,"column":40}}]},"26":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":2},"end":{"line":120,"column":2}},{"start":{"line":120,"column":2},"end":{"line":120,"column":2}}]},"27":{"line":124,"type":"if","locations":[{"start":{"line":124,"column":2},"end":{"line":124,"column":2}},{"start":{"line":124,"column":2},"end":{"line":124,"column":2}}]},"28":{"line":128,"type":"if","locations":[{"start":{"line":128,"column":2},"end":{"line":128,"column":2}},{"start":{"line":128,"column":2},"end":{"line":128,"column":2}}]},"29":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":4},"end":{"line":142,"column":4}},{"start":{"line":142,"column":4},"end":{"line":142,"column":4}}]},"30":{"line":142,"type":"binary-expr","locations":[{"start":{"line":142,"column":8},"end":{"line":142,"column":22}},{"start":{"line":142,"column":26},"end":{"line":142,"column":40}},{"start":{"line":142,"column":44},"end":{"line":142,"column":56}}]},"31":{"line":152,"type":"if","locations":[{"start":{"line":152,"column":4},"end":{"line":152,"column":4}},{"start":{"line":152,"column":4},"end":{"line":152,"column":4}}]},"32":{"line":153,"type":"if","locations":[{"start":{"line":153,"column":4},"end":{"line":153,"column":4}},{"start":{"line":153,"column":4},"end":{"line":153,"column":4}}]},"33":{"line":166,"type":"if","locations":[{"start":{"line":166,"column":4},"end":{"line":166,"column":4}},{"start":{"line":166,"column":4},"end":{"line":166,"column":4}}]},"34":{"line":169,"type":"if","locations":[{"start":{"line":169,"column":4},"end":{"line":169,"column":4}},{"start":{"line":169,"column":4},"end":{"line":169,"column":4}}]},"35":{"line":169,"type":"binary-expr","locations":[{"start":{"line":169,"column":8},"end":{"line":169,"column":12}},{"start":{"line":169,"column":16},"end":{"line":169,"column":34}}]}}},"/Users/contra/Projects/vinyl/lib/cloneBuffer.js":{"path":"/Users/contra/Projects/vinyl/lib/cloneBuffer.js","s":{"1":1,"2":1,"3":7,"4":7,"5":7},"b":{},"f":{"1":7},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":3,"column":0},"end":{"line":7,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":35}},"4":{"start":{"line":5,"column":2},"end":{"line":5,"column":16}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":13}}},"branchMap":{}},"/Users/contra/Projects/vinyl/lib/isBuffer.js":{"path":"/Users/contra/Projects/vinyl/lib/isBuffer.js","s":{"1":1,"2":1,"3":1,"4":108},"b":{"1":[108,107]},"f":{"1":108},"fnMap":{"1":{"name":"(anonymous_1)","line":5,"loc":{"start":{"line":5,"column":17},"end":{"line":5,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":24}},"3":{"start":{"line":5,"column":0},"end":{"line":7,"column":2}},"4":{"start":{"line":6,"column":2},"end":{"line":6,"column":54}}},"branchMap":{"1":{"line":6,"type":"binary-expr","locations":[{"start":{"line":6,"column":9},"end":{"line":6,"column":30}},{"start":{"line":6,"column":34},"end":{"line":6,"column":53}}]}}},"/Users/contra/Projects/vinyl/lib/isStream.js":{"path":"/Users/contra/Projects/vinyl/lib/isStream.js","s":{"1":1,"2":1,"3":99},"b":{"1":[99,40]},"f":{"1":99},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":36}}},"branchMap":{"1":{"line":4,"type":"binary-expr","locations":[{"start":{"line":4,"column":9},"end":{"line":4,"column":12}},{"start":{"line":4,"column":16},"end":{"line":4,"column":35}}]}}},"/Users/contra/Projects/vinyl/lib/isNull.js":{"path":"/Users/contra/Projects/vinyl/lib/isNull.js","s":{"1":1,"2":57},"b":{},"f":{"1":57},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":3,"column":2}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":20}}},"branchMap":{}},"/Users/contra/Projects/vinyl/lib/inspectStream.js":{"path":"/Users/contra/Projects/vinyl/lib/inspectStream.js","s":{"1":1,"2":1,"3":9,"4":2,"5":7,"6":7,"7":1,"8":7},"b":{"1":[2,7],"2":[1,6]},"f":{"1":9},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":17},"end":{"line":3,"column":34}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":37}},"2":{"start":{"line":3,"column":0},"end":{"line":11,"column":2}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":32}},"4":{"start":{"line":4,"column":25},"end":{"line":4,"column":32}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":43}},"6":{"start":{"line":8,"column":2},"end":{"line":8,"column":47}},"7":{"start":{"line":8,"column":31},"end":{"line":8,"column":47}},"8":{"start":{"line":10,"column":2},"end":{"line":10,"column":34}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":4,"column":2}},{"start":{"line":4,"column":2},"end":{"line":4,"column":2}}]},"2":{"line":8,"type":"if","locations":[{"start":{"line":8,"column":2},"end":{"line":8,"column":2}},{"start":{"line":8,"column":2},"end":{"line":8,"column":2}}]}}}} \ No newline at end of file diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/index.html b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/index.html new file mode 100644 index 0000000..b875fbd --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/index.html @@ -0,0 +1,363 @@ + + + + Code coverage report for All files + + + + + + + +
+

Code coverage report for All files

+

+ + Statements: 100% (111 / 111)      + + + Branches: 100% (84 / 84)      + + + Functions: 100% (20 / 20)      + + + Lines: 100% (102 / 102)      + + Ignored: none      +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
vinyl/100%(89 / 89)100%(76 / 76)100%(15 / 15)100%(82 / 82)
vinyl/lib/100%(22 / 22)100%(8 / 8)100%(5 / 5)100%(20 / 20)
+
+
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.css b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.html b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.html new file mode 100644 index 0000000..ef3bcc4 --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.html @@ -0,0 +1,350 @@ + + + + Code coverage report for vinyl/ + + + + + + + +
+

Code coverage report for vinyl/

+

+ + Statements: 100% (89 / 89)      + + + Branches: 100% (76 / 76)      + + + Functions: 100% (15 / 15)      + + + Lines: 100% (82 / 82)      + + Ignored: none      +

+
All files » vinyl/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js100%(89 / 89)100%(76 / 76)100%(15 / 15)100%(82 / 82)
+
+
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html new file mode 100644 index 0000000..36a4d76 --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/index.js.html @@ -0,0 +1,847 @@ + + + + Code coverage report for vinyl/index.js + + + + + + + +
+

Code coverage report for vinyl/index.js

+

+ + Statements: 100% (89 / 89)      + + + Branches: 100% (76 / 76)      + + + Functions: 100% (15 / 15)      + + + Lines: 100% (82 / 82)      + + Ignored: none      +

+
All files » vinyl/ » index.js
+
+
+

+
+
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 +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 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +1761 +1 +1 +1 +1 +1 +1 +1 +1 +  +1 +73 +  +  +73 +73 +  +  +73 +73 +  +  +  +73 +  +  +73 +  +  +1 +26 +  +  +1 +29 +  +  +1 +6 +  +  +  +1 +3 +  +  +1 +14 +2 +  +  +  +12 +7 +  +  +  +  +5 +5 +  +  +  +14 +14 +1 +1 +13 +6 +  +  +14 +  +  +  +  +  +  +  +  +14 +  +75 +  +  +70 +  +5 +  +14 +  +  +1 +6 +6 +  +6 +2 +  +4 +2 +1 +  +1 +  +2 +  +  +  +2 +2 +  +  +1 +6 +  +  +6 +  +6 +4 +  +  +6 +3 +  +  +6 +1 +  +  +6 +  +  +  +  +1 +  +99 +  +  +78 +1 +  +77 +  +  +  +  +1 +  +7 +6 +5 +  +  +1 +  +  +  +1 +  +46 +  +  +9 +  +  +8 +5 +  +  +  +  +1 + 
var path = require('path');
+var clone = require('lodash').clone;
+var cloneStats = require('clone-stats');
+var cloneBuffer = require('./lib/cloneBuffer');
+var isBuffer = require('./lib/isBuffer');
+var isStream = require('./lib/isStream');
+var isNull = require('./lib/isNull');
+var inspectStream = require('./lib/inspectStream');
+var Stream = require('stream');
+ 
+function File(file) {
+  if (!file) file = {};
+ 
+  // record path change
+  var history = file.path ? [file.path] : file.history;
+  this.history = history || [];
+ 
+  // TODO: should this be moved to vinyl-fs?
+  this.cwd = file.cwd || process.cwd();
+  this.base = file.base || this.cwd;
+ 
+  // 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(opt) {
+  if (typeof opt === 'boolean') {
+    opt = {
+      deep: opt,
+      contents: true
+    };
+  } else if (!opt) {
+    opt = {
+      deep: false,
+      contents: true
+    };
+  } else {
+    opt.deep = opt.deep === true;
+    opt.contents = opt.contents !== false;
+  }
+ 
+  // clone our file contents
+  var contents;
+  if (this.isStream()) {
+    contents = this.contents.pipe(new Stream.PassThrough());
+    this.contents = this.contents.pipe(new Stream.PassThrough());
+  } else if (this.isBuffer()) {
+    contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
+  }
+ 
+  var file = new File({
+    cwd: this.cwd,
+    base: this.base,
+    stat: (this.stat ? cloneStats(this.stat) : null),
+    history: this.history.slice(),
+    contents: contents
+  });
+ 
+  // clone our custom properties
+  Object.keys(this).forEach(function(key) {
+    // ignore built-in fields
+    if (key === '_contents' || key === 'stat' ||
+      key === 'history' || key === 'path' ||
+      key === 'base' || key === 'cwd') {
+      return;
+    }
+    file[key] = opt.deep ? clone(this[key], true) : this[key];
+  }, this);
+  return file;
+};
+ 
+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;
+  }
+ 
+  // isNull
+  if (opt.end) stream.end();
+  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.');
+  }
+});
+ 
+Object.defineProperty(File.prototype, 'path', {
+  get: function() {
+    return this.history[this.history.length - 1];
+  },
+  set: function(path) {
+    if (typeof path !== 'string') throw new Error('path should be string');
+ 
+    // record history only when path changed
+    if (path && path !== this.path) {
+      this.history.push(path);
+    }
+  }
+});
+ 
+module.exports = File;
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html new file mode 100644 index 0000000..39ec92b --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/cloneBuffer.js.html @@ -0,0 +1,343 @@ + + + + Code coverage report for vinyl/lib/cloneBuffer.js + + + + + + + +
+

Code coverage report for vinyl/lib/cloneBuffer.js

+

+ + Statements: 100% (5 / 5)      + + + Branches: 100% (0 / 0)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (5 / 5)      + + Ignored: none      +

+
All files » vinyl/lib/ » cloneBuffer.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +81 +  +1 +7 +7 +7 +  + 
var Buffer = require('buffer').Buffer;
+ 
+module.exports = function(buf) {
+  var out = new Buffer(buf.length);
+  buf.copy(out);
+  return out;
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html new file mode 100644 index 0000000..5288f5a --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/index.html @@ -0,0 +1,402 @@ + + + + Code coverage report for vinyl/lib/ + + + + + + + +
+

Code coverage report for vinyl/lib/

+

+ + Statements: 100% (22 / 22)      + + + Branches: 100% (8 / 8)      + + + Functions: 100% (5 / 5)      + + + Lines: 100% (20 / 20)      + + Ignored: none      +

+
All files » vinyl/lib/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
cloneBuffer.js100%(5 / 5)100%(0 / 0)100%(1 / 1)100%(5 / 5)
inspectStream.js100%(8 / 8)100%(4 / 4)100%(1 / 1)100%(6 / 6)
isBuffer.js100%(4 / 4)100%(2 / 2)100%(1 / 1)100%(4 / 4)
isNull.js100%(2 / 2)100%(0 / 0)100%(1 / 1)100%(2 / 2)
isStream.js100%(3 / 3)100%(2 / 2)100%(1 / 1)100%(3 / 3)
+
+
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html new file mode 100644 index 0000000..e8e5b36 --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/inspectStream.js.html @@ -0,0 +1,355 @@ + + + + Code coverage report for vinyl/lib/inspectStream.js + + + + + + + +
+

Code coverage report for vinyl/lib/inspectStream.js

+

+ + Statements: 100% (8 / 8)      + + + Branches: 100% (4 / 4)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (6 / 6)      + + Ignored: none      +

+
All files » vinyl/lib/ » inspectStream.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +121 +  +1 +9 +  +7 +  +7 +  +7 +  + 
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>';
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html new file mode 100644 index 0000000..a44efe4 --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isBuffer.js.html @@ -0,0 +1,340 @@ + + + + Code coverage report for vinyl/lib/isBuffer.js + + + + + + + +
+

Code coverage report for vinyl/lib/isBuffer.js

+

+ + Statements: 100% (4 / 4)      + + + Branches: 100% (2 / 2)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (4 / 4)      + + Ignored: none      +

+
All files » vinyl/lib/ » isBuffer.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +71 +1 +  +  +1 +108 + 
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;
+};
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html new file mode 100644 index 0000000..010d3e0 --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isNull.js.html @@ -0,0 +1,331 @@ + + + + Code coverage report for vinyl/lib/isNull.js + + + + + + + +
+

Code coverage report for vinyl/lib/isNull.js

+

+ + Statements: 100% (2 / 2)      + + + Branches: 100% (0 / 0)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (2 / 2)      + + Ignored: none      +

+
All files » vinyl/lib/ » isNull.js
+
+
+

+
+
1 +2 +3 +41 +57 +  + 
module.exports = function(v) {
+  return v === null;
+};
+ 
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html new file mode 100644 index 0000000..511186f --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov-report/vinyl/lib/isStream.js.html @@ -0,0 +1,334 @@ + + + + Code coverage report for vinyl/lib/isStream.js + + + + + + + +
+

Code coverage report for vinyl/lib/isStream.js

+

+ + Statements: 100% (3 / 3)      + + + Branches: 100% (2 / 2)      + + + Functions: 100% (1 / 1)      + + + Lines: 100% (3 / 3)      + + Ignored: none      +

+
All files » vinyl/lib/ » isStream.js
+
+
+

+
+
1 +2 +3 +4 +51 +  +1 +99 + 
var Stream = require('stream').Stream;
+ 
+module.exports = function(o) {
+  return !!o && o instanceof Stream;
+};
+ +
+ + + + + + + + diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov.info b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov.info new file mode 100644 index 0000000..bbebe38 --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov.info @@ -0,0 +1,280 @@ +TN: +SF:/Users/contra/Projects/vinyl/index.js +FN:11,File +FN:30,(anonymous_2) +FN:34,(anonymous_3) +FN:38,(anonymous_4) +FN:43,(anonymous_5) +FN:47,(anonymous_6) +FN:81,(anonymous_7) +FN:93,(anonymous_8) +FN:114,(anonymous_9) +FN:138,(anonymous_10) +FN:141,(anonymous_11) +FN:151,(anonymous_12) +FN:156,(anonymous_13) +FN:162,(anonymous_14) +FN:165,(anonymous_15) +FNF:15 +FNH:15 +FNDA:73,File +FNDA:26,(anonymous_2) +FNDA:29,(anonymous_3) +FNDA:6,(anonymous_4) +FNDA:3,(anonymous_5) +FNDA:14,(anonymous_6) +FNDA:75,(anonymous_7) +FNDA:6,(anonymous_8) +FNDA:6,(anonymous_9) +FNDA:99,(anonymous_10) +FNDA:78,(anonymous_11) +FNDA:7,(anonymous_12) +FNDA:1,(anonymous_13) +FNDA:46,(anonymous_14) +FNDA:9,(anonymous_15) +DA:1,1 +DA:2,1 +DA:3,1 +DA:4,1 +DA:5,1 +DA:6,1 +DA:7,1 +DA:8,1 +DA:9,1 +DA:11,1 +DA:12,73 +DA:15,73 +DA:16,73 +DA:19,73 +DA:20,73 +DA:24,73 +DA:27,73 +DA:30,1 +DA:31,26 +DA:34,1 +DA:35,29 +DA:38,1 +DA:39,6 +DA:43,1 +DA:44,3 +DA:47,1 +DA:48,14 +DA:49,2 +DA:53,12 +DA:54,7 +DA:59,5 +DA:60,5 +DA:64,14 +DA:65,14 +DA:66,1 +DA:67,1 +DA:68,13 +DA:69,6 +DA:72,14 +DA:81,14 +DA:83,75 +DA:86,70 +DA:88,5 +DA:90,14 +DA:93,1 +DA:94,6 +DA:95,6 +DA:97,6 +DA:98,2 +DA:100,4 +DA:101,2 +DA:102,1 +DA:104,1 +DA:106,2 +DA:110,2 +DA:111,2 +DA:114,1 +DA:115,6 +DA:118,6 +DA:120,6 +DA:121,4 +DA:124,6 +DA:125,3 +DA:128,6 +DA:129,1 +DA:132,6 +DA:137,1 +DA:139,99 +DA:142,78 +DA:143,1 +DA:145,77 +DA:150,1 +DA:152,7 +DA:153,6 +DA:154,5 +DA:157,1 +DA:161,1 +DA:163,46 +DA:166,9 +DA:169,8 +DA:170,5 +DA:175,1 +LF:82 +LH:82 +BRDA:12,1,0,14 +BRDA:12,1,1,59 +BRDA:15,2,0,25 +BRDA:15,2,1,48 +BRDA:16,3,0,73 +BRDA:16,3,1,33 +BRDA:19,4,0,73 +BRDA:19,4,1,32 +BRDA:20,5,0,73 +BRDA:20,5,1,39 +BRDA:24,6,0,73 +BRDA:24,6,1,65 +BRDA:27,7,0,73 +BRDA:27,7,1,44 +BRDA:44,8,0,3 +BRDA:44,8,1,1 +BRDA:44,8,2,1 +BRDA:48,9,0,2 +BRDA:48,9,1,12 +BRDA:53,10,0,7 +BRDA:53,10,1,5 +BRDA:65,11,0,1 +BRDA:65,11,1,13 +BRDA:68,12,0,6 +BRDA:68,12,1,7 +BRDA:69,13,0,5 +BRDA:69,13,1,1 +BRDA:75,14,0,2 +BRDA:75,14,1,12 +BRDA:83,15,0,70 +BRDA:83,15,1,5 +BRDA:83,16,0,75 +BRDA:83,16,1,61 +BRDA:83,16,2,47 +BRDA:83,16,3,33 +BRDA:83,16,4,33 +BRDA:83,16,5,19 +BRDA:88,17,0,2 +BRDA:88,17,1,3 +BRDA:94,18,0,3 +BRDA:94,18,1,3 +BRDA:95,19,0,3 +BRDA:95,19,1,3 +BRDA:97,20,0,2 +BRDA:97,20,1,4 +BRDA:100,21,0,2 +BRDA:100,21,1,2 +BRDA:101,22,0,1 +BRDA:101,22,1,1 +BRDA:110,23,0,1 +BRDA:110,23,1,1 +BRDA:118,24,0,3 +BRDA:118,24,1,3 +BRDA:118,25,0,6 +BRDA:118,25,1,5 +BRDA:120,26,0,4 +BRDA:120,26,1,2 +BRDA:124,27,0,3 +BRDA:124,27,1,3 +BRDA:128,28,0,1 +BRDA:128,28,1,5 +BRDA:142,29,0,1 +BRDA:142,29,1,77 +BRDA:142,30,0,78 +BRDA:142,30,1,57 +BRDA:142,30,2,46 +BRDA:152,31,0,1 +BRDA:152,31,1,6 +BRDA:153,32,0,1 +BRDA:153,32,1,5 +BRDA:166,33,0,1 +BRDA:166,33,1,8 +BRDA:169,34,0,5 +BRDA:169,34,1,3 +BRDA:169,35,0,8 +BRDA:169,35,1,7 +BRF:76 +BRH:76 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/cloneBuffer.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:7,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,7 +DA:5,7 +DA:6,7 +LF:5 +LH:5 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isBuffer.js +FN:5,(anonymous_1) +FNF:1 +FNH:1 +FNDA:108,(anonymous_1) +DA:1,1 +DA:2,1 +DA:5,1 +DA:6,108 +LF:4 +LH:4 +BRDA:6,1,0,108 +BRDA:6,1,1,107 +BRF:2 +BRH:2 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isStream.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:99,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,99 +LF:3 +LH:3 +BRDA:4,1,0,99 +BRDA:4,1,1,40 +BRF:2 +BRH:2 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/isNull.js +FN:1,(anonymous_1) +FNF:1 +FNH:1 +FNDA:57,(anonymous_1) +DA:1,1 +DA:2,57 +LF:2 +LH:2 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/contra/Projects/vinyl/lib/inspectStream.js +FN:3,(anonymous_1) +FNF:1 +FNH:1 +FNDA:9,(anonymous_1) +DA:1,1 +DA:3,1 +DA:4,9 +DA:6,7 +DA:8,7 +DA:10,7 +LF:6 +LH:6 +BRDA:4,1,0,2 +BRDA:4,1,1,7 +BRDA:8,2,0,1 +BRDA:8,2,1,6 +BRF:4 +BRH:4 +end_of_record diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/index.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/index.js index 97f5c75..09913c3 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/index.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/index.js @@ -1,22 +1,24 @@ var path = require('path'); - +var clone = require('lodash').clone; var cloneStats = require('clone-stats'); - +var cloneBuffer = require('./lib/cloneBuffer'); 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'); +var Stream = require('stream'); function File(file) { if (!file) file = {}; + // record path change + var history = file.path ? [file.path] : file.history; + this.history = history || []; + // 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; @@ -42,17 +44,50 @@ 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; +File.prototype.clone = function(opt) { + if (typeof opt === 'boolean') { + opt = { + deep: opt, + contents: true + }; + } else if (!opt) { + opt = { + deep: false, + contents: true + }; + } else { + opt.deep = opt.deep === true; + opt.contents = opt.contents !== false; + } - return new File({ + // clone our file contents + var contents; + if (this.isStream()) { + contents = this.contents.pipe(new Stream.PassThrough()); + this.contents = this.contents.pipe(new Stream.PassThrough()); + } else if (this.isBuffer()) { + contents = opt.contents ? cloneBuffer(this.contents) : this.contents; + } + + var file = new File({ cwd: this.cwd, base: this.base, - path: this.path, - stat: clonedStat, - contents: clonedContents + stat: (this.stat ? cloneStats(this.stat) : null), + history: this.history.slice(), + contents: contents }); + + // clone our custom properties + Object.keys(this).forEach(function(key) { + // ignore built-in fields + if (key === '_contents' || key === 'stat' || + key === 'history' || key === 'path' || + key === 'base' || key === 'cwd') { + return; + } + file[key] = opt.deep ? clone(this[key], true) : this[key]; + }, this); + return file; }; File.prototype.pipe = function(stream, opt) { @@ -70,11 +105,9 @@ File.prototype.pipe = function(stream, opt) { } return stream; } - if (this.isNull()) { - if (opt.end) stream.end(); - return stream; - } + // isNull + if (opt.end) stream.end(); return stream; }; @@ -107,7 +140,7 @@ Object.defineProperty(File.prototype, '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."); + throw new Error('File.contents can only be a Buffer, a Stream, or null.'); } this._contents = val; } @@ -125,4 +158,18 @@ Object.defineProperty(File.prototype, 'relative', { } }); +Object.defineProperty(File.prototype, 'path', { + get: function() { + return this.history[this.history.length - 1]; + }, + set: function(path) { + if (typeof path !== 'string') throw new Error('path should be string'); + + // record history only when path changed + if (path && path !== this.path) { + this.history.push(path); + } + } +}); + module.exports = File; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js index 3a861f2..89f09ed 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js @@ -4,4 +4,4 @@ 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/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js index 2c90678..d36df6f 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js @@ -1,12 +1,11 @@ -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/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js index 403bb30..7f22c63 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js @@ -1,3 +1,3 @@ module.exports = function(v) { return v === null; -}; \ No newline at end of file +}; diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/package.json index 4967bde..e691165 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/node_modules/clone-stats/package.json @@ -39,7 +39,7 @@ "shasum": "b88f94a82cf38b8791d58046ea4029ad88ca99d1", "tarball": "http://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" }, - "_from": "clone-stats@~0.0.1", + "_from": "clone-stats@^0.0.1", "_npmVersion": "1.3.22", "_npmUser": { "name": "hughsk", diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/package.json b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/package.json index d7d5fe1..77250ce 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/package.json @@ -1,7 +1,7 @@ { "name": "vinyl", "description": "A virtual file format", - "version": "0.2.3", + "version": "0.4.3", "homepage": "http://github.com/wearefractal/vinyl", "repository": { "type": "git", @@ -14,22 +14,23 @@ }, "main": "./index.js", "dependencies": { - "clone-stats": "~0.0.1" + "clone-stats": "^0.0.1", + "lodash": "^2.4.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" + "mocha": "^1.17.0", + "should": "^4.0.4", + "mocha-lcov-reporter": "^0.0.1", + "coveralls": "^2.6.1", + "istanbul": "^0.3.0", + "rimraf": "^2.2.5", + "jshint": "^2.4.1", + "buffer-equal": "0.0.1", + "lodash.templatesettings": "^2.4.1", + "event-stream": "^3.1.0" }, "scripts": { - "test": "mocha --reporter spec && jshint", + "test": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter spec && jshint .", "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" }, "engines": { @@ -41,16 +42,14 @@ "url": "http://github.com/wearefractal/vinyl/raw/master/LICENSE" } ], + "gitHead": "6eae432519b007c313a8df83b093adfb97a2944c", "bugs": { "url": "https://github.com/wearefractal/vinyl/issues" }, - "_id": "vinyl@0.2.3", - "dist": { - "shasum": "bca938209582ec5a49ad538a00fa1f125e513252", - "tarball": "http://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz" - }, - "_from": "vinyl@^0.2.0", - "_npmVersion": "1.3.23", + "_id": "vinyl@0.4.3", + "_shasum": "19f61a1b28e72b4c50697889dbe91d7503943ecf", + "_from": "vinyl@0.4.3", + "_npmVersion": "1.4.21", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -61,8 +60,10 @@ "email": "contact@wearefractal.com" } ], + "dist": { + "shasum": "19f61a1b28e72b4c50697889dbe91d7503943ecf", + "tarball": "http://registry.npmjs.org/vinyl/-/vinyl-0.4.3.tgz" + }, "directories": {}, - "_shasum": "bca938209582ec5a49ad538a00fa1f125e513252", - "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.3.tgz" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/perf/clone.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/perf/clone.js new file mode 100644 index 0000000..4df8578 --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/perf/clone.js @@ -0,0 +1,59 @@ +var File = require('../'); + +var contents = new Buffer('blah blah blah'); + +var originalFile = new File({ + path: 'yo.coffee', + contents: contents +}); + +// simulate some history +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; +originalFile.path = 'yo.js'; + +originalFile.ast = { + a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { +a: { + b: { + c: { + + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +}; + +for (var i = 0; i < 10000; i++) { + originalFile.clone(true).ast; +} \ No newline at end of file diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/File.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/File.js index 1f2a83a..419e7aa 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/File.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/File.js @@ -1,12 +1,13 @@ -var File = require('../'); var Stream = require('stream'); var fs = require('fs'); +var path = require('path'); +var es = require('event-stream'); +var File = require('../'); 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(); @@ -15,7 +16,7 @@ describe('File', function() { }); it('should default base to cwd', function(done) { - var cwd = "/"; + var cwd = '/'; var file = new File({cwd: cwd}); file.base.should.equal(cwd); done(); @@ -33,6 +34,12 @@ describe('File', function() { done(); }); + it('should default history to []', function(done) { + var file = new File(); + file.history.should.eql([]); + done(); + }); + it('should default stat to null', function(done) { var file = new File(); should.not.exist(file.stat); @@ -46,23 +53,32 @@ describe('File', function() { }); it('should set base to given value', function(done) { - var val = "/"; + 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 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 val = '/test.coffee'; var file = new File({path: val}); file.path.should.equal(val); + file.history.should.eql([val]); + done(); + }); + + it('should set history to given value', function(done) { + var val = '/test.coffee'; + var file = new File({history: [val]}); + file.path.should.equal(val); + file.history.should.eql([val]); done(); }); @@ -74,16 +90,16 @@ describe('File', function() { }); it('should set contents to given value', function(done) { - var val = new Buffer("test"); + 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 val = new Buffer('test'); var file = new File({contents: val}); file.isBuffer().should.equal(true); done(); @@ -105,7 +121,7 @@ describe('File', function() { describe('isStream()', function() { it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({contents: val}); file.isStream().should.equal(false); done(); @@ -127,7 +143,7 @@ describe('File', function() { describe('isNull()', function() { it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({contents: val}); file.isNull().should.equal(false); done(); @@ -155,7 +171,7 @@ describe('File', function() { }; it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({contents: val, stat: fakeStat}); file.isDirectory().should.equal(false); done(); @@ -178,10 +194,10 @@ describe('File', function() { 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") + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: new Buffer('test') }; var file = new File(options); var file2 = file.clone(); @@ -195,29 +211,65 @@ describe('File', function() { done(); }); + it('should copy buffer\'s reference with option contents: false', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.js', + contents: new Buffer('test') + }; + + var file = new File(options); + + var copy1 = file.clone({ contents: false }); + copy1.contents.should.equal(file.contents); + + var copy2 = file.clone({}); + copy2.contents.should.not.equal(file.contents); + + var copy3 = file.clone({ contents: 'any string' }); + copy3.contents.should.not.equal(file.contents); + + done(); + }); + it('should copy all attributes over with Stream', function(done) { + var contents = new Stream.PassThrough(); var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream() + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: contents }; var file = new File(options); var file2 = file.clone(); + contents.write(new Buffer('wa')); + + process.nextTick(function() { + contents.write(new Buffer('dup')); + contents.end(); + }); + 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'); + file2.contents.should.not.equal(file.contents, 'stream ref should not be the same'); + file.contents.pipe(es.wait(function(err, data) { + file2.contents.pipe(es.wait(function(err, data2) { + data2.should.not.equal(data, 'stream contents ref should not be the same'); + data2.should.eql(data, 'stream contents should be the same'); + })); + })); done(); }); it('should copy all attributes over with null', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: null }; var file = new File(options); @@ -233,20 +285,123 @@ describe('File', function() { it('should properly clone the `stat` property', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.js", - contents: new Buffer("test"), + 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; + copy.stat.isFile().should.equal(true); + copy.stat.isDirectory().should.equal(false); + should(file.stat instanceof fs.Stats).equal(true); + should(copy.stat instanceof fs.Stats).equal(true); + + done(); + }); + + it('should properly clone the `history` 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.history[0].should.equal(options.path); + copy.path = 'lol'; + file.path.should.not.equal(copy.path); + done(); + }); + + it('should copy custom properties', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.custom = { a: 'custom property' }; + + 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.custom.should.equal(file.custom); + file2.custom.a.should.equal(file.custom.a); + + done(); + }); + + it('should copy history', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.path = '/test/test.js'; + file.path = '/test/test-938di2s.js'; + var file2 = file.clone(); + + file2.history.should.eql([ + '/test/test.coffee', + '/test/test.js', + '/test/test-938di2s.js' + ]); + file2.history.should.not.equal([ + '/test/test.coffee', + '/test/test.js', + '/test/test-938di2s.js' + ]); + file2.path.should.eql('/test/test-938di2s.js'); + + done(); + }); + + it('should copy all attributes deeply', function(done) { + var options = { + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: null + }; + + var file = new File(options); + file.custom = { a: 'custom property' }; + + var file2 = file.clone(true); + file2.custom.should.eql(file.custom); + file2.custom.should.not.equal(file.custom); + file2.custom.a.should.equal(file.custom.a); + + var file3 = file.clone({ deep: true }); + file3.custom.should.eql(file.custom); + file3.custom.should.not.equal(file.custom); + file3.custom.a.should.equal(file.custom.a); + + var file4 = file.clone(false); + file4.custom.should.eql(file.custom); + file4.custom.should.equal(file.custom); + file4.custom.a.should.equal(file.custom.a); + + var file5 = file.clone({ deep: false }); + file5.custom.should.eql(file.custom); + file5.custom.should.equal(file.custom); + file5.custom.a.should.equal(file.custom.a); done(); }); @@ -255,10 +410,10 @@ describe('File', function() { 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") + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: new Buffer('test') }; var file = new File(options); var stream = new Stream.PassThrough(); @@ -267,7 +422,7 @@ describe('File', function() { (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) { + stream.on('end', function() { done(); }); var ret = file.pipe(stream); @@ -275,11 +430,11 @@ describe('File', function() { }); it('should pipe to stream with Stream', function(done) { - var testChunk = new Buffer("test"); + var testChunk = new Buffer('test'); var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: new Stream.PassThrough() }; var file = new File(options); @@ -298,15 +453,15 @@ describe('File', function() { it('should do nothing with null', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + 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('data', function() { + throw new Error('should not write'); }); stream.on('end', function() { done(); @@ -317,10 +472,10 @@ describe('File', function() { it('should write to stream with Buffer', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") + cwd: '/', + base: '/test/', + path: '/test/test.coffee', + contents: new Buffer('test') }; var file = new File(options); var stream = new Stream.PassThrough(); @@ -330,19 +485,19 @@ describe('File', function() { chunk.toString('utf8').should.equal(options.contents.toString('utf8')); done(); }); - stream.on('end', function(chunk) { - throw new Error("should not end"); + stream.on('end', function() { + 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 testChunk = new Buffer('test'); var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: new Stream.PassThrough() }; var file = new File(options); @@ -353,8 +508,8 @@ describe('File', function() { chunk.toString('utf8').should.equal(testChunk.toString('utf8')); done(); }); - stream.on('end', function(chunk) { - throw new Error("should not end"); + stream.on('end', function() { + throw new Error('should not end'); }); var ret = file.pipe(stream, {end: false}); ret.should.equal(stream, 'should return the stream'); @@ -364,25 +519,25 @@ describe('File', function() { it('should do nothing with null', function(done) { var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + 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('data', function() { + throw new Error('should not write'); }); - stream.on('end', function(chunk) { - throw new Error("should not end"); + stream.on('end', function() { + 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(); @@ -391,7 +546,7 @@ describe('File', function() { }); it('should return correct format when Buffer and no path', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({ contents: val }); @@ -400,11 +555,11 @@ describe('File', function() { }); it('should return correct format when Buffer and relative path', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: val }); file.inspect().should.equal('>'); @@ -412,10 +567,10 @@ describe('File', function() { }); it('should return correct format when Buffer and only path and no base', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File({ - cwd: "/", - path: "/test/test.coffee", + cwd: '/', + path: '/test/test.coffee', contents: val }); delete file.base; @@ -425,9 +580,9 @@ describe('File', function() { it('should return correct format when Stream and relative path', function(done) { var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: new Stream.PassThrough() }); file.inspect().should.equal('>'); @@ -436,19 +591,19 @@ describe('File', function() { it('should return correct format when null and relative path', function(done) { var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", + cwd: '/', + base: '/test/', + path: '/test/test.coffee', contents: null }); file.inspect().should.equal(''); done(); }); }); - + describe('contents get/set', function() { it('should work with Buffer', function(done) { - var val = new Buffer("test"); + var val = new Buffer('test'); var file = new File(); file.contents = val; file.contents.should.equal(val); @@ -472,7 +627,7 @@ describe('File', function() { }); it('should not work with string', function(done) { - var val = "test"; + var val = 'test'; var file = new File(); try { file.contents = val; @@ -487,7 +642,7 @@ describe('File', function() { it('should error on set', function(done) { var file = new File(); try { - file.relative = "test"; + file.relative = 'test'; } catch (err) { should.exist(err); done(); @@ -519,22 +674,80 @@ describe('File', function() { it('should return a relative path from base', function(done) { var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee" + cwd: '/', + base: '/test/', + path: '/test/test.coffee' }); - file.relative.should.equal("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" + cwd: '/', + path: '/test/test.coffee' }); - file.relative.should.equal("test/test.coffee"); + file.relative.should.equal(path.join('test','test.coffee')); done(); }); }); + describe('path get/set', function() { + + it('should record history when instantiation', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should record history when path change', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.js'; + file.path.should.eql('/test/test.js'); + file.history.should.eql(['/test/test.coffee', '/test/test.js']); + + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee', '/test/test.js', '/test/test.coffee']); + }); + + it('should not record history when set the same path', function() { + var file = new File({ + cwd: '/', + path: '/test/test.coffee' + }); + + file.path = '/test/test.coffee'; + file.path = '/test/test.coffee'; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + + // ignore when set empty string + file.path = ''; + file.path.should.eql('/test/test.coffee'); + file.history.should.eql(['/test/test.coffee']); + }); + + it('should throw when set path null', function() { + var file = new File({ + cwd: '/', + path: null + }); + + should.not.exist(file.path); + file.history.should.eql([]); + + (function() { + file.path = null; + }).should.throw('path should be string'); + }); + }); }); diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/cloneBuffer.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/cloneBuffer.js index 7d28681..34b3e7c 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/cloneBuffer.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/cloneBuffer.js @@ -1,5 +1,4 @@ var cloneBuffer = require('../lib/cloneBuffer'); -var Stream = require('stream'); var should = require('should'); require('mocha'); @@ -25,4 +24,4 @@ describe('cloneBuffer()', function() { testBuffer2.toString('utf8').should.equal('west', 'new buffer should be modified'); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isBuffer.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isBuffer.js index 5bb1cb9..432ad2a 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isBuffer.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isBuffer.js @@ -1,6 +1,6 @@ var isBuffer = require('../lib/isBuffer'); var Stream = require('stream'); -var should = require('should'); +require('should'); require('mocha'); describe('isBuffer()', function() { @@ -26,4 +26,4 @@ describe('isBuffer()', function() { isBuffer(testArray).should.equal(false); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isNull.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isNull.js index db70c01..356934a 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isNull.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isNull.js @@ -1,6 +1,5 @@ var isNull = require('../lib/isNull'); -var Stream = require('stream'); -var should = require('should'); +require('should'); require('mocha'); describe('isNull()', function() { @@ -17,7 +16,7 @@ describe('isNull()', function() { it('should return false on defined values', function(done) { isNull(1).should.equal(false); - isNull("test").should.equal(false); + isNull('test').should.equal(false); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isStream.js b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isStream.js index f22584c..5cc0e0b 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isStream.js +++ b/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/test/isStream.js @@ -1,6 +1,6 @@ var isStream = require('../lib/isStream'); var Stream = require('stream'); -var should = require('should'); +require('should'); require('mocha'); describe('isStream()', function() { @@ -26,4 +26,4 @@ describe('isStream()', function() { isStream(testArray).should.equal(false); done(); }); -}); \ No newline at end of file +}); diff --git a/node_modules/gulp/node_modules/vinyl-fs/package.json b/node_modules/gulp/node_modules/vinyl-fs/package.json index aa4fbb1..bf095da 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/package.json +++ b/node_modules/gulp/node_modules/vinyl-fs/package.json @@ -1,7 +1,7 @@ { "name": "vinyl-fs", "description": "Vinyl adapter for the file system", - "version": "0.3.4", + "version": "0.3.7", "homepage": "http://github.com/wearefractal/vinyl-fs", "repository": { "type": "git", @@ -17,21 +17,22 @@ "glob-stream": "^3.1.5", "glob-watcher": "^0.0.6", "graceful-fs": "^3.0.0", - "lodash.defaults": "^2.4.1", + "lodash": "^2.4.1", "mkdirp": "^0.5.0", - "strip-bom": "^0.3.0", - "through2": "^0.5.1", - "vinyl": "^0.2.0" + "strip-bom": "^1.0.0", + "through2": "^0.6.1", + "vinyl": "^0.4.0" }, "devDependencies": { "buffer-equal": "^0.0.1", "coveralls": "^2.6.1", - "istanbul": "^0.2.3", + "istanbul": "^0.3.0", "jshint": "^2.4.1", "mocha": "^1.17.0", "mocha-lcov-reporter": "^0.0.1", "rimraf": "^2.2.5", - "should": "^4.0.0" + "should": "^4.0.0", + "sinon": "^1.10.3" }, "scripts": { "test": "mocha --reporter spec && jshint lib", @@ -47,14 +48,14 @@ "url": "http://github.com/wearefractal/vinyl-fs/raw/master/LICENSE" } ], - "gitHead": "a83eb9a53aa0c4e50306a20845111ccda276146d", + "gitHead": "1a5efe8d1f7d698691103f2fdc21e07dc1bd5634", "bugs": { "url": "https://github.com/wearefractal/vinyl-fs/issues" }, - "_id": "vinyl-fs@0.3.4", - "_shasum": "0df7154a9e07d47b14d2fcff914303439da97a84", - "_from": "vinyl-fs@^0.3.0", - "_npmVersion": "1.4.14", + "_id": "vinyl-fs@0.3.7", + "_shasum": "2e25cfe6df5c80818f97ff417bf5c21a41e4a49b", + "_from": "vinyl-fs@>=0.3.0-0 <0.4.0-0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" @@ -66,10 +67,9 @@ } ], "dist": { - "shasum": "0df7154a9e07d47b14d2fcff914303439da97a84", - "tarball": "http://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.4.tgz" + "shasum": "2e25cfe6df5c80818f97ff417bf5c21a41e4a49b", + "tarball": "http://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.7.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.4.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.7.tgz" } diff --git a/node_modules/gulp/node_modules/vinyl-fs/test/dest.js b/node_modules/gulp/node_modules/vinyl-fs/test/dest.js index 27796a5..7704f8d 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/test/dest.js +++ b/node_modules/gulp/node_modules/vinyl-fs/test/dest.js @@ -1,3 +1,7 @@ +var spies = require('./spy'); +var chmodSpy = spies.chmodSpy; +var statSpy = spies.statSpy; + var vfs = require('../'); var path = require('path'); @@ -13,6 +17,9 @@ require('mocha'); var wipeOut = function(cb) { rimraf(path.join(__dirname, './out-fixtures/'), cb); + spies.setError('false'); + statSpy.reset(); + chmodSpy.reset(); }; var dataWrap = function(fn) { @@ -363,6 +370,245 @@ describe('dest stream', function() { stream1.end(); }); + it('should update file mode to match the vinyl mode', function(done) { + var inputPath = path.join(__dirname, './fixtures/test.coffee'); + var inputBase = path.join(__dirname, './fixtures/'); + var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + var expectedContents = fs.readFileSync(inputPath); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + var startMode = 0655; + var expectedMode = 0722; + + var expectedFile = new File({ + base: inputBase, + cwd: __dirname, + path: inputPath, + contents: expectedContents, + stat: { + mode: expectedMode + } + }); + + var onEnd = function(){ + should(chmodSpy.called).be.ok; + buffered.length.should.equal(1); + buffered[0].should.equal(expectedFile); + fs.existsSync(expectedPath).should.equal(true); + realMode(fs.lstatSync(expectedPath).mode).should.equal(expectedMode); + done(); + }; + + fs.mkdirSync(expectedBase); + fs.closeSync(fs.openSync(expectedPath, 'w')); + fs.chmodSync(expectedPath, startMode); + + chmodSpy.reset(); + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + + var buffered = []; + bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); + + stream.pipe(bufferStream); + stream.write(expectedFile); + stream.end(); + }); + + it('should update directory mode to match the vinyl mode', function(done) { + var inputBase = path.join(__dirname, './fixtures/'); + var inputPath = path.join(__dirname, './fixtures/wow'); + var expectedPath = path.join(__dirname, './out-fixtures/wow'); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + + var firstFile = new File({ + base: inputBase, + cwd: __dirname, + path: expectedPath, + stat: fs.statSync(inputPath) + }); + var startMode = firstFile.stat.mode; + var expectedMode = 0727; + + var expectedFile = new File(firstFile); + expectedFile.stat.mode = (startMode & ~07777) | expectedMode; + + var onEnd = function(){ + buffered.length.should.equal(2); + buffered[0].should.equal(firstFile); + buffered[1].should.equal(expectedFile); + buffered[0].cwd.should.equal(expectedCwd, 'cwd should have changed'); + buffered[0].base.should.equal(expectedBase, 'base should have changed'); + buffered[0].path.should.equal(expectedPath, 'path should have changed'); + realMode(fs.lstatSync(expectedPath).mode).should.equal(expectedMode); + done(); + }; + + fs.mkdirSync(expectedBase); + + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + + var buffered = []; + bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); + + stream.pipe(bufferStream); + stream.write(firstFile); + stream.write(expectedFile); + stream.end(); + }); + + it('should report IO errors', function(done) { + var inputPath = path.join(__dirname, './fixtures/test.coffee'); + var inputBase = path.join(__dirname, './fixtures/'); + var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + var expectedContents = fs.readFileSync(inputPath); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + var expectedMode = 0722; + + var expectedFile = new File({ + base: inputBase, + cwd: __dirname, + path: inputPath, + contents: expectedContents, + stat: { + mode: expectedMode + } + }); + + fs.mkdirSync(expectedBase); + fs.closeSync(fs.openSync(expectedPath, 'w')); + fs.chmodSync(expectedPath, 0); + + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + stream.on('error', function(err) { + err.code.should.equal('EACCES'); + done(); + }); + stream.write(expectedFile); + }); + + it('should report stat errors', function(done) { + var inputPath = path.join(__dirname, './fixtures/test.coffee'); + var inputBase = path.join(__dirname, './fixtures/'); + var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + var expectedContents = fs.readFileSync(inputPath); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + var expectedMode = 0722; + + var expectedFile = new File({ + base: inputBase, + cwd: __dirname, + path: inputPath, + contents: expectedContents, + stat: { + mode: expectedMode + } + }); + + fs.mkdirSync(expectedBase); + fs.closeSync(fs.openSync(expectedPath, 'w')); + + spies.setError(function(mod, fn) { + if (fn === 'stat' && arguments[2] === expectedPath) { + return new Error('stat error'); + } + }); + + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + stream.on('error', function(err) { + err.message.should.equal('stat error'); + done(); + }); + stream.write(expectedFile); + }); + + it('should report chmod errors', function(done) { + var inputPath = path.join(__dirname, './fixtures/test.coffee'); + var inputBase = path.join(__dirname, './fixtures/'); + var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + var expectedContents = fs.readFileSync(inputPath); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + var expectedMode = 0722; + + var expectedFile = new File({ + base: inputBase, + cwd: __dirname, + path: inputPath, + contents: expectedContents, + stat: { + mode: expectedMode + } + }); + + fs.mkdirSync(expectedBase); + fs.closeSync(fs.openSync(expectedPath, 'w')); + + spies.setError(function(mod, fn) { + if (fn === 'chmod' && arguments[2] === expectedPath) { + return new Error('chmod error'); + } + }); + + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + stream.on('error', function(err) { + err.message.should.equal('chmod error'); + done(); + }); + stream.write(expectedFile); + }); + + it('should not chmod a matching file', function(done) { + var inputPath = path.join(__dirname, './fixtures/test.coffee'); + var inputBase = path.join(__dirname, './fixtures/'); + var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + var expectedContents = fs.readFileSync(inputPath); + var expectedCwd = __dirname; + var expectedBase = path.join(__dirname, './out-fixtures'); + var expectedMode = 0722; + + var expectedFile = new File({ + base: inputBase, + cwd: __dirname, + path: inputPath, + contents: expectedContents, + stat: { + mode: expectedMode + } + }); + + var expectedCount = 0; + spies.setError(function(mod, fn) { + if (fn === 'stat' && arguments[2] === expectedPath) { + expectedCount++; + } + }); + + var onEnd = function(){ + expectedCount.should.equal(1); + should(chmodSpy.called).be.not.ok; + realMode(fs.lstatSync(expectedPath).mode).should.equal(expectedMode); + done(); + }; + + fs.mkdirSync(expectedBase); + fs.closeSync(fs.openSync(expectedPath, 'w')); + fs.chmodSync(expectedPath, expectedMode); + + statSpy.reset(); + chmodSpy.reset(); + var stream = vfs.dest('./out-fixtures/', {cwd: __dirname}); + + var buffered = []; + bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); + + stream.pipe(bufferStream); + stream.write(expectedFile); + stream.end(); + }); + ['end', 'finish'].forEach(function(eventName) { it('should emit ' + eventName + ' event', function(done) { var srcPath = path.join(__dirname, './fixtures/test.coffee'); diff --git a/node_modules/gulp/node_modules/vinyl-fs/test/spy.js b/node_modules/gulp/node_modules/vinyl-fs/test/spy.js new file mode 100644 index 0000000..e14512b --- /dev/null +++ b/node_modules/gulp/node_modules/vinyl-fs/test/spy.js @@ -0,0 +1,27 @@ +var fs = require('fs'); +var sinon = require('sinon'); + +var errorfn = false; + +function maybeCallAsync(module, func) { + var original = module[func]; + return sinon.stub(module, func, function() { + var args = Array.prototype.slice.call(arguments); + args.unshift(module, func); + var err = typeof errorfn === 'function' && + errorfn.apply(this, args); + if (!err) { + original.apply(this, arguments); + } else { + arguments[arguments.length - 1](err); + } + }); +} + +module.exports = { + setError: function(fn) { + errorfn = fn; + }, + chmodSpy: maybeCallAsync(fs, 'chmod'), + statSpy: maybeCallAsync(fs, 'stat') +}; diff --git a/node_modules/gulp/node_modules/vinyl-fs/test/src.js b/node_modules/gulp/node_modules/vinyl-fs/test/src.js index 99608e0..ec1eb47 100644 --- a/node_modules/gulp/node_modules/vinyl-fs/test/src.js +++ b/node_modules/gulp/node_modules/vinyl-fs/test/src.js @@ -1,3 +1,7 @@ +var spies = require('./spy'); +var chmodSpy = spies.chmodSpy; +var statSpy = spies.statSpy; + var vfs = require('../'); var path = require('path'); diff --git a/node_modules/gulp/package.json b/node_modules/gulp/package.json index 610dc0e..63b748c 100644 --- a/node_modules/gulp/package.json +++ b/node_modules/gulp/package.json @@ -1,7 +1,7 @@ { "name": "gulp", "description": "The streaming build system", - "version": "3.8.6", + "version": "3.8.7", "homepage": "http://gulpjs.com", "repository": { "type": "git", @@ -37,13 +37,13 @@ "archy": "^0.0.2", "chalk": "^0.5.0", "deprecated": "^0.0.1", - "gulp-util": "^2.2.0", + "gulp-util": "^3.0.0", "interpret": "^0.3.2", "liftoff": "^0.12.0", "minimist": "^0.2.0", "orchestrator": "^0.3.0", "pretty-hrtime": "^0.2.0", - "semver": "^2.2.1", + "semver": "^3.0.1", "tildify": "^0.2.0", "vinyl-fs": "^0.3.0" }, @@ -52,7 +52,7 @@ "graceful-fs": "^3.0.0", "istanbul": "^0.3.0", "jshint": "^2.5.0", - "jshint-stylish": "^0.3.0", + "jshint-stylish": "^0.4.0", "marked-man": "^0.1.3", "mkdirp": "^0.5.0", "mocha": "^1.17.0", @@ -77,13 +77,13 @@ "url": "https://raw.githubusercontent.com/gulpjs/gulp/master/LICENSE" } ], - "gitHead": "4dad0dd9750710effea9f2f52ef0bfeadcf9336d", + "gitHead": "edcf732456409b7b8df9861b1108acbf866e5a39", "bugs": { "url": "https://github.com/gulpjs/gulp/issues" }, - "_id": "gulp@3.8.6", - "_shasum": "ea5af86a434bee4c0a942ff06437837f093e2fc2", - "_from": "gulp@", + "_id": "gulp@3.8.7", + "_shasum": "187e5316d65aa5188de447b41b3c0ee9bf322be1", + "_from": "gulp@3.8.7", "_npmVersion": "1.5.0-alpha-1", "_npmUser": { "name": "fractal", @@ -96,10 +96,9 @@ } ], "dist": { - "shasum": "ea5af86a434bee4c0a942ff06437837f093e2fc2", - "tarball": "http://registry.npmjs.org/gulp/-/gulp-3.8.6.tgz" + "shasum": "187e5316d65aa5188de447b41b3c0ee9bf322be1", + "tarball": "http://registry.npmjs.org/gulp/-/gulp-3.8.7.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/gulp/-/gulp-3.8.6.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/gulp/-/gulp-3.8.7.tgz" } diff --git a/package.json b/package.json index 1ac6dc2..876bf45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pleasejs", - "version": "0.2.2", + "version": "0.2.3", "description": "JS library to generate random pleasing colors/color schemes", "main": "Please.js", "scripts": { diff --git a/src/Please.js b/src/Please.js index ec02006..35614bd 100644 --- a/src/Please.js +++ b/src/Please.js @@ -1,4 +1,4 @@ -/*Please JS v0.2.2, Jordan Checkman 2014, Checkman.io, MIT Liscense, Have fun.*/ +/*Please JS v0.2.3, Jordan Checkman 2014, Checkman.io, MIT Liscense, Have fun.*/ (function( globalName, root, factory ){ if ( typeof define === 'function' && define.amd ) { define( [], factory ); @@ -185,7 +185,7 @@ var make_contrast_default = { golden: false, format: 'hex' - } + }; function random_int( min, max ){ return Math.floor( Math.random() * ( max - min + 1 )) + min; @@ -200,19 +200,20 @@ } function convert_to_format( format_string, array ){ + var i; switch( format_string ){ case 'hex': - for ( var i = 0; i < array.length; i++ ) { + for ( i = 0; i < array.length; i++ ) { array[i] = Please.HSV_to_HEX( array[i] ); } break; case 'rgb': - for ( var i = 0; i < array.length; i++ ) { + for ( i = 0; i < array.length; i++ ) { array[i] = Please.HSV_to_RGB( array[i] ); } break; case 'rgb-string': - for ( var i = 0; i < array.length; i++ ) { + for ( i = 0; i < array.length; i++ ) { var raw_rgb = Please.HSV_to_RGB( array[i] ); array[i] = "rgb(" + @@ -224,7 +225,7 @@ case 'hsv': break; default: - console.log( 'Format not recognized.' ); + console.error( 'Format not recognized.' ); break; } return array; @@ -254,22 +255,22 @@ return color_data[name]; } else{ - console.log( 'Color name not recognized.' ); + console.error( 'Color name not recognized.' ); } - } + }; Please.NAME_to_RGB = function( name ){ return Please.HEX_to_RGB( Please.NAME_to_HEX( name )); - } + }; Please.NAME_to_HSV = function( name ){ return Please.HEX_to_HSV( Please.NAME_to_HEX( name )); - } + }; //accepts hex string, produces RGB object Please.HEX_to_RGB = function( hex ){ var regex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; - hex = hex.replace( regex, function( m, r, g, b ) { + hex = hex.replace( regex, function( r, g, b ) { return r + r + g + g + b + b; }); var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec( hex ); @@ -278,14 +279,14 @@ g: parseInt( result[2], 16 ), b: parseInt( result[3], 16 ) } : null; - } + }; //accepts RGB object, produces hex string Please.RGB_to_HEX = function( RGB ){ return "#" + (( 1 << 24 ) + ( RGB.r << 16 ) + ( RGB.g << 8 ) + RGB.b ) .toString( 16 ).slice( 1 ); - } + }; //accepts HSV object, returns RGB object Please.HSV_to_RGB = function( HSV ){ @@ -299,25 +300,43 @@ var q = v * ( 1 - f * s ); var t = v * ( 1 - ( 1 - f ) * s ); switch( i % 6 ){ - case 0: r = v, g = t, b = p; + case 0: + r = v; + g = t; + b = p; break; - case 1: r = q, g = v, b = p; + case 1: + r = q; + g = v; + b = p; break; - case 2: r = p, g = v, b = t; + case 2: + r = p; + g = v; + b = t; break; - case 3: r = p, g = q, b = v; + case 3: + r = p; + g = q; + b = v; break; - case 4: r = t, g = p, b = v; + case 4: + r = t; + g = p; + b = v; break; - case 5: r = v, g = p, b = q; + case 5: + r = v; + g = p; + b = q; break; } return{ r:Math.floor( r * 255 ), g:Math.floor( g * 255 ), b:Math.floor( b * 255 ) - } - } + }; + }; //accepts RGB object, returns HSV object Please.RGB_to_HSV = function( RGB ){ @@ -337,7 +356,7 @@ h: 0, s: 0, v: computed_V - } + }; } // Colors other than black-gray-white: var d = ( r == min_RGB ) ? g - b : (( b == min_RGB ) ? r - g : b - r); @@ -349,25 +368,30 @@ h: computed_H, s: computed_S, v: computed_V - } - } + }; + }; //accepts HSV object, returns hex string Please.HSV_to_HEX = function( HSV ){ return Please.RGB_to_HEX( Please.HSV_to_RGB( HSV )); - } + }; //accepts hex string, returns HSV object Please.HEX_to_HSV = function( hex ){ return Please.RGB_to_HSV( Please.HEX_to_RGB( hex )); - } + }; //accepts HSV object and options object, returns list or single object depending on options Please.make_scheme = function( HSV, options ){ //clone base please options - var scheme_options = copy_object( make_scheme_default ); - - if( options != null ){ + var scheme_options = copy_object( make_scheme_default ), + adjusted, + adjusted_h, + adjusted_s, + adjusted_v, + i; + + if( options !== null ){ //override base Please options for( var key in options ){ if( options.hasOwnProperty( key )){ @@ -383,18 +407,23 @@ h: HSV.h, s: HSV.s, v: HSV.v - } + }; } switch( scheme_options.scheme_type.toLowerCase() ){ case 'monochromatic': case 'mono': - for ( var i = 1; i <= 2; i++ ) { - var adjusted = clone( HSV ); + // var adjusted = clone( HSV ), + // adjusted_s, + // adjusted_v, + // i; + for ( i = 1; i <= 2; i++ ) { + + adjusted = clone( HSV ); - var adjusted_s = adjusted.s + ( .1 * i ); + adjusted_s = adjusted.s + ( 0.1 * i ); adjusted_s = clamp( adjusted_s, 0, 1 ); - var adjusted_v = adjusted.v + ( .1 * i ); + adjusted_v = adjusted.v + ( 0.1 * i ); adjusted_v = clamp( adjusted_v, 0, 1 ); adjusted.s = adjusted_s; @@ -402,13 +431,14 @@ scheme.push(adjusted); } - for ( var i = 1; i <= 2; i++ ) { - var adjusted = clone( HSV ); + for ( i = 1; i <= 2; i++ ) { - var adjusted_s = adjusted.s - ( .1 * i ); + adjusted = clone( HSV ); + + adjusted_s = adjusted.s - ( 0.1 * i ); adjusted_s = clamp( adjusted_s, 0, 1 ); - var adjusted_v = adjusted.v - ( .1 * i ); + adjusted_v = adjusted.v - ( 0.1 * i ); adjusted_v = clamp( adjusted_v, 0, 1 ); adjusted.s = adjusted_s; @@ -420,7 +450,7 @@ case 'complementary': case 'complement': case 'comp': - var adjusted = clone( HSV ); + adjusted = clone( HSV ); adjusted.h = ( adjusted.h + 180 ) % 360; scheme.push( adjusted ); break; @@ -428,10 +458,10 @@ case 'split-complementary': case 'split-complement': case 'split': - var adjusted = clone( HSV ); + adjusted = clone( HSV ); adjusted.h = ( adjusted.h + 165 ) % 360; scheme.push( adjusted ); - var adjusted = clone( HSV ); + adjusted = clone( HSV ); adjusted.h = Math.abs( ( adjusted.h - 165 ) % 360 ); scheme.push( adjusted ); break; @@ -439,12 +469,12 @@ case 'double-complement': case 'double': //first basic complement - var adjusted = clone( HSV ); + adjusted = clone( HSV ); adjusted.h = ( adjusted.h + 180 ) % 360; scheme.push( adjusted ); //then offset adjusted.h = ( adjusted.h + 30 ) % 360; - var secondary = clone( adjusted ); + secondary = clone( adjusted ); scheme.push( adjusted ); //complement offset adjusted.h = ( adjusted.h + 180 ) % 360; @@ -452,8 +482,8 @@ break; case 'analogous': case 'ana': - for ( var i = 1; i <= 5; i++ ) { - var adjusted = clone( HSV ); + for ( i = 1; i <= 5; i++ ) { + adjusted = clone( HSV ); adjusted.h = ( adjusted.h + ( 20 * i ) ) % 360; scheme.push( adjusted ); } @@ -461,19 +491,19 @@ case 'triadic': case 'triad': case 'tri': - for ( var i = 1; i < 3; i++ ) { - var adjusted = clone( HSV ); + for ( i = 1; i < 3; i++ ) { + adjusted = clone( HSV ); adjusted.h = ( adjusted.h + ( 120 * i ) ) % 360; scheme.push( adjusted ); - }; + } break; default: - console.log( 'Color scheme not recognized.' ) + console.error( 'Color scheme not recognized.' ); break; } convert_to_format( scheme_options.format.toLowerCase(), scheme ); return scheme; - } + }; //accepts options object returns list or single color Please.make_color = function( options ){ @@ -481,7 +511,7 @@ //clone base please options var color_options = copy_object( make_color_default ); - if( options != null ){ + if( options !== null ){ //override base Please options for( var key in options ){ if( options.hasOwnProperty( key )){ @@ -490,9 +520,8 @@ } } //first, check for a base color - var base_color; if ( color_options.base_color.length > 0 ) { - base_color = color_data[color_options.base_color.toLowerCase()]; + var base_color = color_data[color_options.base_color.toLowerCase()]; base_color = Please.HEX_to_HSV( base_color ); } for ( var i = 0; i < color_options.colors_returned; i++ ) { @@ -500,46 +529,46 @@ var hue,saturation,value; if( base_color != null ){ hue = random_int( ( base_color.h - 5 ), ( base_color.h + 5 )); - saturation = random_float( .4, .85 ); - value = random_float( .4, .85 ); + saturation = random_float( 0.4, 0.85 ); + value = random_float( 0.4, 0.85 ); color.push({h: hue, s: saturation, v: value}); } else{ - if( color_options.greyscale == true || color_options.grayscale == true ){ + if( color_options.greyscale === true || color_options.grayscale === true ){ hue = 0; } //make hue goldennnnnnnn - else if( color_options.golden == true ){ + else if( color_options.golden === true ){ hue = ( random_hue + ( random_hue / PHI )) % 360; } - else if( color_options.hue == null || color_options.full_random == true ){ + else if( color_options.hue === null || color_options.full_random === true ){ hue = random_hue; } else{ hue = clamp( color_options.hue, 0, 360 ); } //set saturation - if ( color_options.greyscale == true || color_options.grayscale == true ) { + if ( color_options.greyscale === true || color_options.grayscale === true ) { saturation = 0; //if they want greyscale no saturation allowed } - else if ( color_options.full_random == true ){ + else if ( color_options.full_random === true ){ saturation = random_float( 0, 1 ); } - else if ( color_options.saturation == null ){ - saturation = .4; + else if ( color_options.saturation === null ){ + saturation = 0.4; } else{ saturation = clamp( color_options.saturation, 0, 1 ); } //set value - if( color_options.full_random == true ){ + if( color_options.full_random === true ){ value = random_float( 0, 1 ); } - else if( color_options.greyscale == true || color_options.grayscale == true ){ - value = random_float(.15,.75) + else if( color_options.greyscale === true || color_options.grayscale === true ){ + value = random_float( 0.15, 0.75); } - else if( color_options.value == null ){ - value = .75; + else if( color_options.value === null ){ + value = 0.75; } else{ value = clamp( color_options.value, 0 , 1 ); @@ -551,14 +580,14 @@ convert_to_format( color_options.format.toLowerCase(), color ); return color; - } + }; //accepts HSV object returns contrasting color Please.make_contrast = function( HSV, options ){ //clone base please options var contrast_options = copy_object( make_contrast_default ); - if( options != null ){ + if( options !== null ){ //override base Please options for( var key in options ){ if( options.hasOwnProperty( key )){ @@ -571,7 +600,7 @@ var value_range = contrast_quotient( HSV ); var adjusted_hue; - if( contrast_options.golden == true ){ + if( contrast_options.golden === true ){ adjusted_hue = ( HSV.h * ( 1 + PHI ) ) % 360; } else{ @@ -585,20 +614,20 @@ } var adjusted_value; if ( value_range === 'dark' ){ - adjusted_value = clamp( ( HSV.v - .25 ), 0, 1 ); + adjusted_value = clamp( ( HSV.v - 0.25 ), 0, 1 ); } else if ( value_range === 'light' ){ - adjusted_value = clamp( ( HSV.v + .25 ), 0, 1 ); + adjusted_value = clamp( ( HSV.v + 0.25 ), 0, 1 ); } contrast = [{ h: adjusted_hue, s: HSV.s, v: adjusted_value - }] + }]; convert_to_format( contrast_options.format.toLowerCase(), contrast ); return contrast[0]; - } + }; return Please; }