freezerwatch 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +40 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/freezerwatch +9 -0
- data/bin/setup +7 -0
- data/freezerwatch.gemspec +23 -0
- data/lib/freezerwatch.rb +5 -0
- data/lib/freezerwatch/version.rb +3 -0
- data/node_modules/.bin/freezerwatch +139 -0
- data/node_modules/freezerwatch/.npmignore +3 -0
- data/node_modules/freezerwatch/.ruby-version +1 -0
- data/node_modules/freezerwatch/Gemfile +4 -0
- data/node_modules/freezerwatch/Gemfile.lock +79 -0
- data/node_modules/freezerwatch/LICENSE +23 -0
- data/node_modules/freezerwatch/README.md +41 -0
- data/node_modules/freezerwatch/Rakefile +13 -0
- data/node_modules/freezerwatch/freezerwatch.js +139 -0
- data/node_modules/freezerwatch/metrics/bigfiles_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/cane_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/flay_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/flog_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/punchlist_high_water_mark +2 -0
- data/node_modules/freezerwatch/metrics/reek_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/rubocop_high_water_mark +1 -0
- data/node_modules/freezerwatch/node_modules/async/.jshintrc +25 -0
- data/node_modules/freezerwatch/node_modules/async/.travis.yml +6 -0
- data/node_modules/freezerwatch/node_modules/async/CHANGELOG.md +65 -0
- data/node_modules/freezerwatch/node_modules/async/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/async/README.md +1803 -0
- data/node_modules/freezerwatch/node_modules/async/bower.json +43 -0
- data/node_modules/freezerwatch/node_modules/async/component.json +17 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/base.css +182 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/base.css +182 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/async.js.html +3900 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.css +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.js +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sorter.js +156 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov.info +1452 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lib/async.js.html +3597 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lib/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/prettify.css +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/prettify.js +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/sort-arrow-sprite.png +0 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/sorter.js +156 -0
- data/node_modules/freezerwatch/node_modules/async/lib/async.js +1191 -0
- data/node_modules/freezerwatch/node_modules/async/nyc_output/5074.json +1 -0
- data/node_modules/freezerwatch/node_modules/async/package.json +96 -0
- data/node_modules/freezerwatch/node_modules/async/support/sync-package-managers.js +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/.npmignore +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/Client.js +60 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/Device.js +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceRawReadStream.js +36 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceSingleRawReadStream.js +29 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceStream.js +35 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/LICENSE +23 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/README.md +25 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.travis.yml +12 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/README.md +364 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/index.js +156 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/copy.js +8 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/debug.js +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/getSafe.js +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/optional.js +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/.bin/uuid +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/index.js +202 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/package.json +46 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/index.js +119 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/Readme.md +175 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/lib/form_data.js +351 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/README.md +1647 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/bower.json +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/component.json +16 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +1123 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/package.json +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +132 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +188 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +154 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +99 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +21 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +14 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js +48 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +60 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/package.json +80 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/Makefile +10 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/README.md +627 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/example/usage.js +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/logo.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/browser.js +485 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/client.js +367 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/crypto.js +111 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/index.js +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/server.js +524 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/utils.js +183 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/README.md +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +207 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/package.json +64 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +101 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +33 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +10 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +436 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +132 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +585 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +86 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +1078 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +16 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +25 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +409 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +359 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/browser.js +771 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/client.js +206 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/crypto.js +86 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/index.js +316 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/message.js +246 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/readme.js +98 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/server.js +686 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/uri.js +456 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/utils.js +120 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.dir-locals.el +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.npmignore +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/LICENSE +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/README.md +79 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/http_signing.md +296 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/index.js +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/parser.js +304 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/signer.js +178 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/util.js +304 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/verify.js +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +50 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +27 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +267 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +36 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +317 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +20 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +172 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +296 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +126 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README +82 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +298 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +1485 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +944 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +241 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +129 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +839 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/package.json +72 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/.npmignore +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/CHANGELOG.md +14 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/LICENSE +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/Makefile +35 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/README.md +52 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/package.json +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/stringify.js +27 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/mocha.opts +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/stringify_test.js +246 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/README.md +66 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/mime.js +114 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/package.json +57 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/test.js +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/mime.types +1588 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/node.types +77 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/LICENSE.md +21 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/README.md +243 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/README.md +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +174 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bin/uuid +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bower.json +23 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/component.json +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/compare_v1.js +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.html +17 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.js +228 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/uuid.js +247 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/index.js +43 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/package.json +48 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/test.js +49 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.gitmodules +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.npmignore +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/Readme.md +58 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/index.js +366 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/package.json +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.jshintrc +72 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.npmignore +3 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/LICENSE +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/README.md +380 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +230 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/cookie.js +947 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/memstore.js +102 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +69 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +20 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md +176 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +81 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +530 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/package.json +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/public-suffix.txt +5229 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/test.js +1340 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/index.js +227 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/package.json +74 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/request.js +1244 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/package.json +34 -0
- data/node_modules/freezerwatch/node_modules/optparse/README.md +163 -0
- data/node_modules/freezerwatch/node_modules/optparse/TODO +1 -0
- data/node_modules/freezerwatch/node_modules/optparse/examples/browser-test.html +75 -0
- data/node_modules/freezerwatch/node_modules/optparse/examples/nodejs-test.js +86 -0
- data/node_modules/freezerwatch/node_modules/optparse/lib/optparse.js +309 -0
- data/node_modules/freezerwatch/node_modules/optparse/package.json +46 -0
- data/node_modules/freezerwatch/node_modules/optparse/seed.yml +5 -0
- data/node_modules/freezerwatch/node_modules/osenv/.npmignore +13 -0
- data/node_modules/freezerwatch/node_modules/osenv/.travis.yml +9 -0
- data/node_modules/freezerwatch/node_modules/osenv/LICENSE +15 -0
- data/node_modules/freezerwatch/node_modules/osenv/README.md +63 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/index.js +24 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/license +21 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/readme.md +33 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/index.js +25 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/license +21 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/readme.md +36 -0
- data/node_modules/freezerwatch/node_modules/osenv/osenv.js +72 -0
- data/node_modules/freezerwatch/node_modules/osenv/package.json +76 -0
- data/node_modules/freezerwatch/node_modules/osenv/test/unix.js +71 -0
- data/node_modules/freezerwatch/node_modules/osenv/test/windows.js +74 -0
- data/node_modules/freezerwatch/node_modules/osenv/x.tap +39 -0
- data/node_modules/freezerwatch/package.json +37 -0
- metadata +384 -0
@@ -0,0 +1,73 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Code coverage report for lib/</title>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<link rel="stylesheet" href="../prettify.css">
|
7
|
+
<link rel="stylesheet" href="../base.css">
|
8
|
+
<style type='text/css'>
|
9
|
+
div.coverage-summary .sorter {
|
10
|
+
background-image: url(../sort-arrow-sprite.png);
|
11
|
+
}
|
12
|
+
</style>
|
13
|
+
</head>
|
14
|
+
<body>
|
15
|
+
<div class="header high">
|
16
|
+
<h1>Code coverage report for <span class="entity">lib/</span></h1>
|
17
|
+
<h2>
|
18
|
+
Statements: <span class="metric">94.88% <small>(611 / 644)</small></span>
|
19
|
+
Branches: <span class="metric">86.91% <small>(239 / 275)</small></span>
|
20
|
+
Functions: <span class="metric">95.41% <small>(187 / 196)</small></span>
|
21
|
+
Lines: <span class="metric">94.85% <small>(608 / 641)</small></span>
|
22
|
+
Ignored: <span class="metric"><span class="ignore-none">none</span></span>
|
23
|
+
</h2>
|
24
|
+
<div class="path"><a href="../index.html">All files</a> » lib/</div>
|
25
|
+
</div>
|
26
|
+
<div class="body">
|
27
|
+
<div class="coverage-summary">
|
28
|
+
<table>
|
29
|
+
<thead>
|
30
|
+
<tr>
|
31
|
+
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
32
|
+
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
33
|
+
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
34
|
+
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
35
|
+
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
36
|
+
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
37
|
+
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
38
|
+
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
39
|
+
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
40
|
+
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
41
|
+
</tr>
|
42
|
+
</thead>
|
43
|
+
<tbody><tr>
|
44
|
+
<td class="file high" data-value="async.js"><a href="async.js.html">async.js</a></td>
|
45
|
+
<td data-value="94.88" class="pic high"><span class="cover-fill" style="width: 94px;"></span><span class="cover-empty" style="width:6px;"></span></td>
|
46
|
+
<td data-value="94.88" class="pct high">94.88%</td>
|
47
|
+
<td data-value="644" class="abs high">(611 / 644)</td>
|
48
|
+
<td data-value="86.91" class="pct high">86.91%</td>
|
49
|
+
<td data-value="275" class="abs high">(239 / 275)</td>
|
50
|
+
<td data-value="95.41" class="pct high">95.41%</td>
|
51
|
+
<td data-value="196" class="abs high">(187 / 196)</td>
|
52
|
+
<td data-value="94.85" class="pct high">94.85%</td>
|
53
|
+
<td data-value="641" class="abs high">(608 / 641)</td>
|
54
|
+
</tr>
|
55
|
+
|
56
|
+
</tbody>
|
57
|
+
</table>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
<div class="footer">
|
61
|
+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Jun 01 2015 15:22:05 GMT-0700 (PDT)</div>
|
62
|
+
</div>
|
63
|
+
<script src="../prettify.js"></script>
|
64
|
+
<script>
|
65
|
+
window.onload = function () {
|
66
|
+
if (typeof prettyPrint === 'function') {
|
67
|
+
prettyPrint();
|
68
|
+
}
|
69
|
+
};
|
70
|
+
</script>
|
71
|
+
<script src="../sorter.js"></script>
|
72
|
+
</body>
|
73
|
+
</html>
|
@@ -0,0 +1 @@
|
|
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}
|
@@ -0,0 +1 @@
|
|
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;V<U;++V){var ae=Z[V];if(ae.ignoreCase){ac=true}else{if(/[a-z]/i.test(ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){S=true;ac=false;break}}}var Y={b:8,t:9,n:10,v:11,f:12,r:13};function ab(ah){var ag=ah.charCodeAt(0);if(ag!==92){return ag}var af=ah.charAt(1);ag=Y[af];if(ag){return ag}else{if("0"<=af&&af<="7"){return parseInt(ah.substring(1),8)}else{if(af==="u"||af==="x"){return parseInt(ah.substring(2),16)}else{return ah.charCodeAt(1)}}}}function T(af){if(af<32){return(af<16?"\\x0":"\\x")+af.toString(16)}var ag=String.fromCharCode(af);if(ag==="\\"||ag==="-"||ag==="["||ag==="]"){ag="\\"+ag}return ag}function X(am){var aq=am.substring(1,am.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));var ak=[];var af=[];var ao=aq[0]==="^";for(var ar=ao?1:0,aj=aq.length;ar<aj;++ar){var ah=aq[ar];if(/\\[bdsw]/i.test(ah)){ak.push(ah)}else{var ag=ab(ah);var al;if(ar+2<aj&&"-"===aq[ar+1]){al=ab(aq[ar+2]);ar+=2}else{al=ag}af.push([ag,al]);if(!(al<65||ag>122)){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;ar<af.length;++ar){var at=af[ar];if(at[0]<=ap[1]+1){ap[1]=Math.max(ap[1],at[1])}else{ai.push(ap=at)}}var an=["["];if(ao){an.push("^")}an.push.apply(an,ak);for(var ar=0;ar<ai.length;++ar){var at=ai[ar];an.push(T(at[0]));if(at[1]>at[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<ah;++ak){var ag=aj[ak];if(ag==="("){++am}else{if("\\"===ag.charAt(0)){var af=+ag.substring(1);if(af&&af<=am){an[af]=-1}}}}for(var ak=1;ak<an.length;++ak){if(-1===an[ak]){an[ak]=++ad}}for(var ak=0,am=0;ak<ah;++ak){var ag=aj[ak];if(ag==="("){++am;if(an[am]===undefined){aj[ak]="(?:"}}else{if("\\"===ag.charAt(0)){var af=+ag.substring(1);if(af&&af<=am){aj[ak]="\\"+an[am]}}}}for(var ak=0,am=0;ak<ah;++ak){if("^"===aj[ak]&&"^"!==aj[ak+1]){aj[ak]=""}}if(al.ignoreCase&&S){for(var ak=0;ak<ah;++ak){var ag=aj[ak];var ai=ag.charAt(0);if(ag.length>=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<U;++V){var ae=Z[V];if(ae.global||ae.multiline){throw new Error(""+ae)}aa.push("(?:"+W(ae)+")")}return new RegExp(aa.join("|"),ac?"gi":"g")}function a(V){var U=/(?:^|\s)nocode(?:\s|$)/;var X=[];var T=0;var Z=[];var W=0;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=document.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Y=S&&"pre"===S.substring(0,3);function aa(ab){switch(ab.nodeType){case 1:if(U.test(ab.className)){return}for(var ae=ab.firstChild;ae;ae=ae.nextSibling){aa(ae)}var ad=ab.nodeName;if("BR"===ad||"LI"===ad){X[W]="\n";Z[W<<1]=T++;Z[(W++<<1)|1]=ab}break;case 3:case 4:var ac=ab.nodeValue;if(ac.length){if(!Y){ac=ac.replace(/[ \t\r\n]+/g," ")}else{ac=ac.replace(/\r\n?/g,"\n")}X[W]=ac;Z[W<<1]=T;T+=ac.length;Z[(W++<<1)|1]=ab}break}}aa(V);return{sourceCode:X.join("").replace(/\n$/,""),spans:Z}}function B(S,U,W,T){if(!U){return}var V={sourceCode:U,basePos:S};W(V);T.push.apply(T,V.decorations)}var v=/\S/;function o(S){var V=undefined;for(var U=S.firstChild;U;U=U.nextSibling){var T=U.nodeType;V=(T===1)?(V?S:U):(T===3)?(v.test(U.nodeValue)?S:V):V}return V===S?undefined:V}function g(U,T){var S={};var V;(function(){var ad=U.concat(T);var ah=[];var ag={};for(var ab=0,Z=ad.length;ab<Z;++ab){var Y=ad[ab];var ac=Y[3];if(ac){for(var ae=ac.length;--ae>=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<aq;++ae){var ag=an[ae];var ap=aj[ag];var ai=void 0;var am;if(typeof ap==="string"){am=false}else{var aa=S[ag.charAt(0)];if(aa){ai=ag.match(aa[1]);ap=aa[0]}else{for(var ao=0;ao<X;++ao){aa=T[ao];ai=ag.match(aa[1]);if(ai){ap=aa[0];break}}if(!ai){ap=F}}am=ap.length>=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<W.length;++Y){ae(W[Y])}if(ag===(ag|0)){W[0].setAttribute("value",ag)}var aa=ac.createElement("OL");aa.className="linenums";var X=Math.max(0,((ag-1))|0)||0;for(var Y=0,T=W.length;Y<T;++Y){af=W[Y];af.className="L"+((Y+X)%10);if(!af.firstChild){af.appendChild(ac.createTextNode("\xA0"))}aa.appendChild(af)}V.appendChild(aa)}function D(ac){var aj=/\bMSIE\b/.test(navigator.userAgent);var am=/\n/g;var al=ac.sourceCode;var an=al.length;var V=0;var aa=ac.spans;var T=aa.length;var ah=0;var X=ac.decorations;var Y=X.length;var Z=0;X[Y]=an;var ar,aq;for(aq=ar=0;aq<Y;){if(X[aq]!==X[aq+2]){X[ar++]=X[aq++];X[ar++]=X[aq++]}else{aq+=2}}Y=ar;for(aq=ar=0;aq<Y;){var at=X[aq];var ab=X[aq+1];var W=aq+2;while(W+2<=Y&&X[W+1]===ab){W+=2}X[ar++]=at;X[ar++]=ab;aq=W}Y=X.length=ar;var ae=null;while(ah<T){var af=aa[ah];var S=aa[ah+2]||an;var ag=X[Z];var ap=X[Z+2]||an;var W=Math.min(S,ap);var ak=aa[ah+1];var U;if(ak.nodeType!==1&&(U=al.substring(V,W))){if(aj){U=U.replace(am,"\r")}ak.nodeValue=U;var ai=ak.ownerDocument;var ao=ai.createElement("SPAN");ao.className=X[Z+1];var ad=ak.parentNode;ad.replaceChild(ao,ak);ao.appendChild(ak);if(V<S){aa[ah+1]=ak=ai.createTextNode(al.substring(W,S));ad.insertBefore(ak,ao.nextSibling)}}V=W;if(V>=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*</.test(S)?"default-markup":"default-code"}return t[T]}c(K,["default-code"]);c(g([],[[F,/^[^<?]+/],[E,/^<!\w[^>]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\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<ac.length;++aa){for(var Z=0,V=ac[aa].length;Z<V;++Z){T.push(ac[aa][Z])}}ac=null;var W=Date;if(!W.now){W={now:function(){return +(new Date)}}}var X=0;var S;var ab=/\blang(?:uage)?-([\w.]+)(?!\S)/;var ae=/\bprettyprint\b/;function U(){var ag=(window.PR_SHOULD_USE_CONTINUATION?W.now()+250:Infinity);for(;X<T.length&&W.now()<ag;X++){var aj=T[X];var ai=aj.className;if(ai.indexOf("prettyprint")>=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<T.length){setTimeout(U,250)}else{if(ad){ad()}}}U()}window.prettyPrintOne=y;window.prettyPrint=b;window.PR={createSimpleLexer:g,registerLangHandler:c,sourceDecorator:i,PR_ATTRIB_NAME:P,PR_ATTRIB_VALUE:n,PR_COMMENT:j,PR_DECLARATION:E,PR_KEYWORD:z,PR_LITERAL:G,PR_NOCODE:N,PR_PLAIN:F,PR_PUNCTUATION:L,PR_SOURCE:J,PR_STRING:C,PR_TAG:m,PR_TYPE:O}})();PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_DECLARATION,/^<!\w[^>]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\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"]);
|
@@ -0,0 +1,156 @@
|
|
1
|
+
var addSorting = (function () {
|
2
|
+
"use strict";
|
3
|
+
var cols,
|
4
|
+
currentSort = {
|
5
|
+
index: 0,
|
6
|
+
desc: false
|
7
|
+
};
|
8
|
+
|
9
|
+
// returns the summary table element
|
10
|
+
function getTable() { return document.querySelector('.coverage-summary table'); }
|
11
|
+
// returns the thead element of the summary table
|
12
|
+
function getTableHeader() { return getTable().querySelector('thead tr'); }
|
13
|
+
// returns the tbody element of the summary table
|
14
|
+
function getTableBody() { return getTable().querySelector('tbody'); }
|
15
|
+
// returns the th element for nth column
|
16
|
+
function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; }
|
17
|
+
|
18
|
+
// loads all columns
|
19
|
+
function loadColumns() {
|
20
|
+
var colNodes = getTableHeader().querySelectorAll('th'),
|
21
|
+
colNode,
|
22
|
+
cols = [],
|
23
|
+
col,
|
24
|
+
i;
|
25
|
+
|
26
|
+
for (i = 0; i < colNodes.length; i += 1) {
|
27
|
+
colNode = colNodes[i];
|
28
|
+
col = {
|
29
|
+
key: colNode.getAttribute('data-col'),
|
30
|
+
sortable: !colNode.getAttribute('data-nosort'),
|
31
|
+
type: colNode.getAttribute('data-type') || 'string'
|
32
|
+
};
|
33
|
+
cols.push(col);
|
34
|
+
if (col.sortable) {
|
35
|
+
col.defaultDescSort = col.type === 'number';
|
36
|
+
colNode.innerHTML = colNode.innerHTML + '<span class="sorter"></span>';
|
37
|
+
}
|
38
|
+
}
|
39
|
+
return cols;
|
40
|
+
}
|
41
|
+
// attaches a data attribute to every tr element with an object
|
42
|
+
// of data values keyed by column name
|
43
|
+
function loadRowData(tableRow) {
|
44
|
+
var tableCols = tableRow.querySelectorAll('td'),
|
45
|
+
colNode,
|
46
|
+
col,
|
47
|
+
data = {},
|
48
|
+
i,
|
49
|
+
val;
|
50
|
+
for (i = 0; i < tableCols.length; i += 1) {
|
51
|
+
colNode = tableCols[i];
|
52
|
+
col = cols[i];
|
53
|
+
val = colNode.getAttribute('data-value');
|
54
|
+
if (col.type === 'number') {
|
55
|
+
val = Number(val);
|
56
|
+
}
|
57
|
+
data[col.key] = val;
|
58
|
+
}
|
59
|
+
return data;
|
60
|
+
}
|
61
|
+
// loads all row data
|
62
|
+
function loadData() {
|
63
|
+
var rows = getTableBody().querySelectorAll('tr'),
|
64
|
+
i;
|
65
|
+
|
66
|
+
for (i = 0; i < rows.length; i += 1) {
|
67
|
+
rows[i].data = loadRowData(rows[i]);
|
68
|
+
}
|
69
|
+
}
|
70
|
+
// sorts the table using the data for the ith column
|
71
|
+
function sortByIndex(index, desc) {
|
72
|
+
var key = cols[index].key,
|
73
|
+
sorter = function (a, b) {
|
74
|
+
a = a.data[key];
|
75
|
+
b = b.data[key];
|
76
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
77
|
+
},
|
78
|
+
finalSorter = sorter,
|
79
|
+
tableBody = document.querySelector('.coverage-summary tbody'),
|
80
|
+
rowNodes = tableBody.querySelectorAll('tr'),
|
81
|
+
rows = [],
|
82
|
+
i;
|
83
|
+
|
84
|
+
if (desc) {
|
85
|
+
finalSorter = function (a, b) {
|
86
|
+
return -1 * sorter(a, b);
|
87
|
+
};
|
88
|
+
}
|
89
|
+
|
90
|
+
for (i = 0; i < rowNodes.length; i += 1) {
|
91
|
+
rows.push(rowNodes[i]);
|
92
|
+
tableBody.removeChild(rowNodes[i]);
|
93
|
+
}
|
94
|
+
|
95
|
+
rows.sort(finalSorter);
|
96
|
+
|
97
|
+
for (i = 0; i < rows.length; i += 1) {
|
98
|
+
tableBody.appendChild(rows[i]);
|
99
|
+
}
|
100
|
+
}
|
101
|
+
// removes sort indicators for current column being sorted
|
102
|
+
function removeSortIndicators() {
|
103
|
+
var col = getNthColumn(currentSort.index),
|
104
|
+
cls = col.className;
|
105
|
+
|
106
|
+
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
107
|
+
col.className = cls;
|
108
|
+
}
|
109
|
+
// adds sort indicators for current column being sorted
|
110
|
+
function addSortIndicators() {
|
111
|
+
getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted';
|
112
|
+
}
|
113
|
+
// adds event listeners for all sorter widgets
|
114
|
+
function enableUI() {
|
115
|
+
var i,
|
116
|
+
el,
|
117
|
+
ithSorter = function ithSorter(i) {
|
118
|
+
var col = cols[i];
|
119
|
+
|
120
|
+
return function () {
|
121
|
+
var desc = col.defaultDescSort;
|
122
|
+
|
123
|
+
if (currentSort.index === i) {
|
124
|
+
desc = !currentSort.desc;
|
125
|
+
}
|
126
|
+
sortByIndex(i, desc);
|
127
|
+
removeSortIndicators();
|
128
|
+
currentSort.index = i;
|
129
|
+
currentSort.desc = desc;
|
130
|
+
addSortIndicators();
|
131
|
+
};
|
132
|
+
};
|
133
|
+
for (i =0 ; i < cols.length; i += 1) {
|
134
|
+
if (cols[i].sortable) {
|
135
|
+
el = getNthColumn(i).querySelector('.sorter');
|
136
|
+
if (el.addEventListener) {
|
137
|
+
el.addEventListener('click', ithSorter(i));
|
138
|
+
} else {
|
139
|
+
el.attachEvent('onclick', ithSorter(i));
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
144
|
+
// adds sorting functionality to the UI
|
145
|
+
return function () {
|
146
|
+
if (!getTable()) {
|
147
|
+
return;
|
148
|
+
}
|
149
|
+
cols = loadColumns();
|
150
|
+
loadData(cols);
|
151
|
+
addSortIndicators();
|
152
|
+
enableUI();
|
153
|
+
};
|
154
|
+
})();
|
155
|
+
|
156
|
+
window.addEventListener('load', addSorting);
|
@@ -0,0 +1,1191 @@
|
|
1
|
+
/*!
|
2
|
+
* async
|
3
|
+
* https://github.com/caolan/async
|
4
|
+
*
|
5
|
+
* Copyright 2010-2014 Caolan McMahon
|
6
|
+
* Released under the MIT license
|
7
|
+
*/
|
8
|
+
(function () {
|
9
|
+
|
10
|
+
var async = {};
|
11
|
+
function noop() {}
|
12
|
+
|
13
|
+
// global on the server, window in the browser
|
14
|
+
var root, previous_async;
|
15
|
+
|
16
|
+
if (typeof window == 'object' && this === window) {
|
17
|
+
root = window;
|
18
|
+
}
|
19
|
+
else if (typeof global == 'object' && this === global) {
|
20
|
+
root = global;
|
21
|
+
}
|
22
|
+
else {
|
23
|
+
root = this;
|
24
|
+
}
|
25
|
+
|
26
|
+
if (root != null) {
|
27
|
+
previous_async = root.async;
|
28
|
+
}
|
29
|
+
|
30
|
+
async.noConflict = function () {
|
31
|
+
root.async = previous_async;
|
32
|
+
return async;
|
33
|
+
};
|
34
|
+
|
35
|
+
function only_once(fn) {
|
36
|
+
var called = false;
|
37
|
+
return function() {
|
38
|
+
if (called) throw new Error("Callback was already called.");
|
39
|
+
called = true;
|
40
|
+
fn.apply(this, arguments);
|
41
|
+
};
|
42
|
+
}
|
43
|
+
|
44
|
+
function _once(fn) {
|
45
|
+
var called = false;
|
46
|
+
return function() {
|
47
|
+
if (called) return;
|
48
|
+
called = true;
|
49
|
+
fn.apply(this, arguments);
|
50
|
+
};
|
51
|
+
}
|
52
|
+
|
53
|
+
//// cross-browser compatiblity functions ////
|
54
|
+
|
55
|
+
var _toString = Object.prototype.toString;
|
56
|
+
|
57
|
+
var _isArray = Array.isArray || function (obj) {
|
58
|
+
return _toString.call(obj) === '[object Array]';
|
59
|
+
};
|
60
|
+
|
61
|
+
function _isArrayLike(arr) {
|
62
|
+
return _isArray(arr) || (
|
63
|
+
// has a positive integer length property
|
64
|
+
typeof arr.length === "number" &&
|
65
|
+
arr.length >= 0 &&
|
66
|
+
arr.length % 1 === 0
|
67
|
+
);
|
68
|
+
}
|
69
|
+
|
70
|
+
function _each(coll, iterator) {
|
71
|
+
return _isArrayLike(coll) ?
|
72
|
+
_arrayEach(coll, iterator) :
|
73
|
+
_forEachOf(coll, iterator);
|
74
|
+
}
|
75
|
+
|
76
|
+
function _arrayEach(arr, iterator) {
|
77
|
+
var index = -1,
|
78
|
+
length = arr.length;
|
79
|
+
|
80
|
+
while (++index < length) {
|
81
|
+
iterator(arr[index], index, arr);
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
function _map(arr, iterator) {
|
86
|
+
var index = -1,
|
87
|
+
length = arr.length,
|
88
|
+
result = Array(length);
|
89
|
+
|
90
|
+
while (++index < length) {
|
91
|
+
result[index] = iterator(arr[index], index, arr);
|
92
|
+
}
|
93
|
+
return result;
|
94
|
+
}
|
95
|
+
|
96
|
+
function _range(count) {
|
97
|
+
return _map(Array(count), function (v, i) { return i; });
|
98
|
+
}
|
99
|
+
|
100
|
+
function _reduce(arr, iterator, memo) {
|
101
|
+
_arrayEach(arr, function (x, i, a) {
|
102
|
+
memo = iterator(memo, x, i, a);
|
103
|
+
});
|
104
|
+
return memo;
|
105
|
+
}
|
106
|
+
|
107
|
+
function _forEachOf(object, iterator) {
|
108
|
+
_arrayEach(_keys(object), function (key) {
|
109
|
+
iterator(object[key], key);
|
110
|
+
});
|
111
|
+
}
|
112
|
+
|
113
|
+
var _keys = Object.keys || function (obj) {
|
114
|
+
var keys = [];
|
115
|
+
for (var k in obj) {
|
116
|
+
if (obj.hasOwnProperty(k)) {
|
117
|
+
keys.push(k);
|
118
|
+
}
|
119
|
+
}
|
120
|
+
return keys;
|
121
|
+
};
|
122
|
+
|
123
|
+
function _keyIterator(coll) {
|
124
|
+
var i = -1;
|
125
|
+
var len;
|
126
|
+
var keys;
|
127
|
+
if (_isArrayLike(coll)) {
|
128
|
+
len = coll.length;
|
129
|
+
return function next() {
|
130
|
+
i++;
|
131
|
+
return i < len ? i : null;
|
132
|
+
};
|
133
|
+
} else {
|
134
|
+
keys = _keys(coll);
|
135
|
+
len = keys.length;
|
136
|
+
return function next() {
|
137
|
+
i++;
|
138
|
+
return i < len ? keys[i] : null;
|
139
|
+
};
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
function _baseSlice(arr, start) {
|
144
|
+
start = start || 0;
|
145
|
+
var index = -1;
|
146
|
+
var length = arr.length;
|
147
|
+
|
148
|
+
if (start) {
|
149
|
+
length -= start;
|
150
|
+
length = length < 0 ? 0 : length;
|
151
|
+
}
|
152
|
+
var result = Array(length);
|
153
|
+
|
154
|
+
while (++index < length) {
|
155
|
+
result[index] = arr[index + start];
|
156
|
+
}
|
157
|
+
return result;
|
158
|
+
}
|
159
|
+
|
160
|
+
function _withoutIndex(iterator) {
|
161
|
+
return function (value, index, callback) {
|
162
|
+
return iterator(value, callback);
|
163
|
+
};
|
164
|
+
}
|
165
|
+
|
166
|
+
//// exported async module functions ////
|
167
|
+
|
168
|
+
//// nextTick implementation with browser-compatible fallback ////
|
169
|
+
|
170
|
+
// capture the global reference to guard against fakeTimer mocks
|
171
|
+
var _setImmediate;
|
172
|
+
if (typeof setImmediate === 'function') {
|
173
|
+
_setImmediate = setImmediate;
|
174
|
+
}
|
175
|
+
|
176
|
+
if (typeof process === 'undefined' || !(process.nextTick)) {
|
177
|
+
if (_setImmediate) {
|
178
|
+
async.nextTick = function (fn) {
|
179
|
+
// not a direct alias for IE10 compatibility
|
180
|
+
_setImmediate(fn);
|
181
|
+
};
|
182
|
+
async.setImmediate = async.nextTick;
|
183
|
+
}
|
184
|
+
else {
|
185
|
+
async.nextTick = function (fn) {
|
186
|
+
setTimeout(fn, 0);
|
187
|
+
};
|
188
|
+
async.setImmediate = async.nextTick;
|
189
|
+
}
|
190
|
+
}
|
191
|
+
else {
|
192
|
+
async.nextTick = process.nextTick;
|
193
|
+
if (_setImmediate) {
|
194
|
+
async.setImmediate = function (fn) {
|
195
|
+
// not a direct alias for IE10 compatibility
|
196
|
+
_setImmediate(fn);
|
197
|
+
};
|
198
|
+
}
|
199
|
+
else {
|
200
|
+
async.setImmediate = async.nextTick;
|
201
|
+
}
|
202
|
+
}
|
203
|
+
|
204
|
+
async.forEach =
|
205
|
+
async.each = function (arr, iterator, callback) {
|
206
|
+
return async.eachOf(arr, _withoutIndex(iterator), callback);
|
207
|
+
};
|
208
|
+
|
209
|
+
async.forEachSeries =
|
210
|
+
async.eachSeries = function (arr, iterator, callback) {
|
211
|
+
return async.eachOfSeries(arr, _withoutIndex(iterator), callback);
|
212
|
+
};
|
213
|
+
|
214
|
+
|
215
|
+
async.forEachLimit =
|
216
|
+
async.eachLimit = function (arr, limit, iterator, callback) {
|
217
|
+
return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback);
|
218
|
+
};
|
219
|
+
|
220
|
+
async.forEachOf =
|
221
|
+
async.eachOf = function (object, iterator, callback) {
|
222
|
+
callback = _once(callback || noop);
|
223
|
+
object = object || [];
|
224
|
+
var size = _isArrayLike(object) ? object.length : _keys(object).length;
|
225
|
+
var completed = 0;
|
226
|
+
if (!size) {
|
227
|
+
return callback(null);
|
228
|
+
}
|
229
|
+
_each(object, function (value, key) {
|
230
|
+
iterator(object[key], key, only_once(done));
|
231
|
+
});
|
232
|
+
function done(err) {
|
233
|
+
if (err) {
|
234
|
+
callback(err);
|
235
|
+
}
|
236
|
+
else {
|
237
|
+
completed += 1;
|
238
|
+
if (completed >= size) {
|
239
|
+
callback(null);
|
240
|
+
}
|
241
|
+
}
|
242
|
+
}
|
243
|
+
};
|
244
|
+
|
245
|
+
async.forEachOfSeries =
|
246
|
+
async.eachOfSeries = function (obj, iterator, callback) {
|
247
|
+
callback = _once(callback || noop);
|
248
|
+
obj = obj || [];
|
249
|
+
var nextKey = _keyIterator(obj);
|
250
|
+
var key = nextKey();
|
251
|
+
function iterate() {
|
252
|
+
var sync = true;
|
253
|
+
if (key === null) {
|
254
|
+
return callback(null);
|
255
|
+
}
|
256
|
+
iterator(obj[key], key, only_once(function (err) {
|
257
|
+
if (err) {
|
258
|
+
callback(err);
|
259
|
+
}
|
260
|
+
else {
|
261
|
+
key = nextKey();
|
262
|
+
if (key === null) {
|
263
|
+
return callback(null);
|
264
|
+
} else {
|
265
|
+
if (sync) {
|
266
|
+
async.nextTick(iterate);
|
267
|
+
} else {
|
268
|
+
iterate();
|
269
|
+
}
|
270
|
+
}
|
271
|
+
}
|
272
|
+
}));
|
273
|
+
sync = false;
|
274
|
+
}
|
275
|
+
iterate();
|
276
|
+
};
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
async.forEachOfLimit =
|
281
|
+
async.eachOfLimit = function (obj, limit, iterator, callback) {
|
282
|
+
_eachOfLimit(limit)(obj, iterator, callback);
|
283
|
+
};
|
284
|
+
|
285
|
+
function _eachOfLimit(limit) {
|
286
|
+
|
287
|
+
return function (obj, iterator, callback) {
|
288
|
+
callback = _once(callback || noop);
|
289
|
+
obj = obj || [];
|
290
|
+
var nextKey = _keyIterator(obj);
|
291
|
+
if (limit <= 0) {
|
292
|
+
return callback(null);
|
293
|
+
}
|
294
|
+
var done = false;
|
295
|
+
var running = 0;
|
296
|
+
var errored = false;
|
297
|
+
|
298
|
+
(function replenish () {
|
299
|
+
if (done && running <= 0) {
|
300
|
+
return callback(null);
|
301
|
+
}
|
302
|
+
|
303
|
+
while (running < limit && !errored) {
|
304
|
+
var key = nextKey();
|
305
|
+
if (key === null) {
|
306
|
+
done = true;
|
307
|
+
if (running <= 0) {
|
308
|
+
callback(null);
|
309
|
+
}
|
310
|
+
return;
|
311
|
+
}
|
312
|
+
running += 1;
|
313
|
+
iterator(obj[key], key, only_once(function (err) {
|
314
|
+
running -= 1;
|
315
|
+
if (err) {
|
316
|
+
callback(err);
|
317
|
+
errored = true;
|
318
|
+
}
|
319
|
+
else {
|
320
|
+
replenish();
|
321
|
+
}
|
322
|
+
}));
|
323
|
+
}
|
324
|
+
})();
|
325
|
+
};
|
326
|
+
}
|
327
|
+
|
328
|
+
|
329
|
+
function doParallel(fn) {
|
330
|
+
return function (obj, iterator, callback) {
|
331
|
+
return fn(async.eachOf, obj, iterator, callback);
|
332
|
+
};
|
333
|
+
}
|
334
|
+
function doParallelLimit(limit, fn) {
|
335
|
+
return function (obj, iterator, callback) {
|
336
|
+
return fn(_eachOfLimit(limit), obj, iterator, callback);
|
337
|
+
};
|
338
|
+
}
|
339
|
+
function doSeries(fn) {
|
340
|
+
return function (obj, iterator, callback) {
|
341
|
+
return fn(async.eachOfSeries, obj, iterator, callback);
|
342
|
+
};
|
343
|
+
}
|
344
|
+
|
345
|
+
function _asyncMap(eachfn, arr, iterator, callback) {
|
346
|
+
callback = _once(callback || noop);
|
347
|
+
var results = [];
|
348
|
+
eachfn(arr, function (value, index, callback) {
|
349
|
+
iterator(value, function (err, v) {
|
350
|
+
results[index] = v;
|
351
|
+
callback(err);
|
352
|
+
});
|
353
|
+
}, function (err) {
|
354
|
+
callback(err, results);
|
355
|
+
});
|
356
|
+
}
|
357
|
+
|
358
|
+
async.map = doParallel(_asyncMap);
|
359
|
+
async.mapSeries = doSeries(_asyncMap);
|
360
|
+
async.mapLimit = function (arr, limit, iterator, callback) {
|
361
|
+
return _mapLimit(limit)(arr, iterator, callback);
|
362
|
+
};
|
363
|
+
|
364
|
+
function _mapLimit(limit) {
|
365
|
+
return doParallelLimit(limit, _asyncMap);
|
366
|
+
}
|
367
|
+
|
368
|
+
// reduce only has a series version, as doing reduce in parallel won't
|
369
|
+
// work in many situations.
|
370
|
+
async.inject =
|
371
|
+
async.foldl =
|
372
|
+
async.reduce = function (arr, memo, iterator, callback) {
|
373
|
+
async.eachOfSeries(arr, function (x, i, callback) {
|
374
|
+
iterator(memo, x, function (err, v) {
|
375
|
+
memo = v;
|
376
|
+
callback(err);
|
377
|
+
});
|
378
|
+
}, function (err) {
|
379
|
+
callback(err || null, memo);
|
380
|
+
});
|
381
|
+
};
|
382
|
+
|
383
|
+
async.foldr =
|
384
|
+
async.reduceRight = function (arr, memo, iterator, callback) {
|
385
|
+
var reversed = _map(arr, function (x) {
|
386
|
+
return x;
|
387
|
+
}).reverse();
|
388
|
+
async.reduce(reversed, memo, iterator, callback);
|
389
|
+
};
|
390
|
+
|
391
|
+
function _filter(eachfn, arr, iterator, callback) {
|
392
|
+
var results = [];
|
393
|
+
arr = _map(arr, function (x, i) {
|
394
|
+
return {index: i, value: x};
|
395
|
+
});
|
396
|
+
eachfn(arr, function (x, index, callback) {
|
397
|
+
iterator(x.value, function (v) {
|
398
|
+
if (v) {
|
399
|
+
results.push(x);
|
400
|
+
}
|
401
|
+
callback();
|
402
|
+
});
|
403
|
+
}, function () {
|
404
|
+
callback(_map(results.sort(function (a, b) {
|
405
|
+
return a.index - b.index;
|
406
|
+
}), function (x) {
|
407
|
+
return x.value;
|
408
|
+
}));
|
409
|
+
});
|
410
|
+
}
|
411
|
+
|
412
|
+
async.select =
|
413
|
+
async.filter = doParallel(_filter);
|
414
|
+
|
415
|
+
async.selectSeries =
|
416
|
+
async.filterSeries = doSeries(_filter);
|
417
|
+
|
418
|
+
function _reject(eachfn, arr, iterator, callback) {
|
419
|
+
var results = [];
|
420
|
+
arr = _map(arr, function (x, i) {
|
421
|
+
return {index: i, value: x};
|
422
|
+
});
|
423
|
+
eachfn(arr, function (x, index, callback) {
|
424
|
+
iterator(x.value, function (v) {
|
425
|
+
if (!v) {
|
426
|
+
results.push(x);
|
427
|
+
}
|
428
|
+
callback();
|
429
|
+
});
|
430
|
+
}, function () {
|
431
|
+
callback(_map(results.sort(function (a, b) {
|
432
|
+
return a.index - b.index;
|
433
|
+
}), function (x) {
|
434
|
+
return x.value;
|
435
|
+
}));
|
436
|
+
});
|
437
|
+
}
|
438
|
+
async.reject = doParallel(_reject);
|
439
|
+
async.rejectSeries = doSeries(_reject);
|
440
|
+
|
441
|
+
function _detect(eachfn, arr, iterator, main_callback) {
|
442
|
+
eachfn(arr, function (x, index, callback) {
|
443
|
+
iterator(x, function (result) {
|
444
|
+
if (result) {
|
445
|
+
main_callback(x);
|
446
|
+
main_callback = noop;
|
447
|
+
}
|
448
|
+
else {
|
449
|
+
callback();
|
450
|
+
}
|
451
|
+
});
|
452
|
+
}, function () {
|
453
|
+
main_callback();
|
454
|
+
});
|
455
|
+
}
|
456
|
+
async.detect = doParallel(_detect);
|
457
|
+
async.detectSeries = doSeries(_detect);
|
458
|
+
|
459
|
+
async.any =
|
460
|
+
async.some = function (arr, iterator, main_callback) {
|
461
|
+
async.eachOf(arr, function (x, _, callback) {
|
462
|
+
iterator(x, function (v) {
|
463
|
+
if (v) {
|
464
|
+
main_callback(true);
|
465
|
+
main_callback = noop;
|
466
|
+
}
|
467
|
+
callback();
|
468
|
+
});
|
469
|
+
}, function () {
|
470
|
+
main_callback(false);
|
471
|
+
});
|
472
|
+
};
|
473
|
+
|
474
|
+
async.all =
|
475
|
+
async.every = function (arr, iterator, main_callback) {
|
476
|
+
async.eachOf(arr, function (x, _, callback) {
|
477
|
+
iterator(x, function (v) {
|
478
|
+
if (!v) {
|
479
|
+
main_callback(false);
|
480
|
+
main_callback = noop;
|
481
|
+
}
|
482
|
+
callback();
|
483
|
+
});
|
484
|
+
}, function () {
|
485
|
+
main_callback(true);
|
486
|
+
});
|
487
|
+
};
|
488
|
+
|
489
|
+
async.sortBy = function (arr, iterator, callback) {
|
490
|
+
async.map(arr, function (x, callback) {
|
491
|
+
iterator(x, function (err, criteria) {
|
492
|
+
if (err) {
|
493
|
+
callback(err);
|
494
|
+
}
|
495
|
+
else {
|
496
|
+
callback(null, {value: x, criteria: criteria});
|
497
|
+
}
|
498
|
+
});
|
499
|
+
}, function (err, results) {
|
500
|
+
if (err) {
|
501
|
+
return callback(err);
|
502
|
+
}
|
503
|
+
else {
|
504
|
+
callback(null, _map(results.sort(comparator), function (x) {
|
505
|
+
return x.value;
|
506
|
+
}));
|
507
|
+
}
|
508
|
+
|
509
|
+
});
|
510
|
+
|
511
|
+
function comparator(left, right) {
|
512
|
+
var a = left.criteria, b = right.criteria;
|
513
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
514
|
+
}
|
515
|
+
};
|
516
|
+
|
517
|
+
async.auto = function (tasks, callback) {
|
518
|
+
callback = _once(callback || noop);
|
519
|
+
var keys = _keys(tasks);
|
520
|
+
var remainingTasks = keys.length;
|
521
|
+
if (!remainingTasks) {
|
522
|
+
return callback(null);
|
523
|
+
}
|
524
|
+
|
525
|
+
var results = {};
|
526
|
+
|
527
|
+
var listeners = [];
|
528
|
+
function addListener(fn) {
|
529
|
+
listeners.unshift(fn);
|
530
|
+
}
|
531
|
+
function removeListener(fn) {
|
532
|
+
for (var i = 0; i < listeners.length; i += 1) {
|
533
|
+
if (listeners[i] === fn) {
|
534
|
+
listeners.splice(i, 1);
|
535
|
+
return;
|
536
|
+
}
|
537
|
+
}
|
538
|
+
}
|
539
|
+
function taskComplete() {
|
540
|
+
remainingTasks--;
|
541
|
+
_arrayEach(listeners.slice(0), function (fn) {
|
542
|
+
fn();
|
543
|
+
});
|
544
|
+
}
|
545
|
+
|
546
|
+
addListener(function () {
|
547
|
+
if (!remainingTasks) {
|
548
|
+
callback(null, results);
|
549
|
+
}
|
550
|
+
});
|
551
|
+
|
552
|
+
_arrayEach(keys, function (k) {
|
553
|
+
var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
|
554
|
+
function taskCallback(err) {
|
555
|
+
var args = _baseSlice(arguments, 1);
|
556
|
+
if (args.length <= 1) {
|
557
|
+
args = args[0];
|
558
|
+
}
|
559
|
+
if (err) {
|
560
|
+
var safeResults = {};
|
561
|
+
_arrayEach(_keys(results), function(rkey) {
|
562
|
+
safeResults[rkey] = results[rkey];
|
563
|
+
});
|
564
|
+
safeResults[k] = args;
|
565
|
+
callback(err, safeResults);
|
566
|
+
}
|
567
|
+
else {
|
568
|
+
results[k] = args;
|
569
|
+
async.setImmediate(taskComplete);
|
570
|
+
}
|
571
|
+
}
|
572
|
+
var requires = task.slice(0, Math.abs(task.length - 1)) || [];
|
573
|
+
// prevent dead-locks
|
574
|
+
var len = requires.length;
|
575
|
+
var dep;
|
576
|
+
while (len--) {
|
577
|
+
if (!(dep = tasks[requires[len]])) {
|
578
|
+
throw new Error('Has inexistant dependency');
|
579
|
+
}
|
580
|
+
if (_isArray(dep) && !!~dep.indexOf(k)) {
|
581
|
+
throw new Error('Has cyclic dependencies');
|
582
|
+
}
|
583
|
+
}
|
584
|
+
function ready() {
|
585
|
+
return _reduce(requires, function (a, x) {
|
586
|
+
return (a && results.hasOwnProperty(x));
|
587
|
+
}, true) && !results.hasOwnProperty(k);
|
588
|
+
}
|
589
|
+
if (ready()) {
|
590
|
+
task[task.length - 1](taskCallback, results);
|
591
|
+
}
|
592
|
+
else {
|
593
|
+
addListener(listener);
|
594
|
+
}
|
595
|
+
function listener() {
|
596
|
+
if (ready()) {
|
597
|
+
removeListener(listener);
|
598
|
+
task[task.length - 1](taskCallback, results);
|
599
|
+
}
|
600
|
+
}
|
601
|
+
});
|
602
|
+
};
|
603
|
+
|
604
|
+
async.retry = function(times, task, callback) {
|
605
|
+
var DEFAULT_TIMES = 5;
|
606
|
+
var attempts = [];
|
607
|
+
// Use defaults if times not passed
|
608
|
+
if (typeof times === 'function') {
|
609
|
+
callback = task;
|
610
|
+
task = times;
|
611
|
+
times = DEFAULT_TIMES;
|
612
|
+
}
|
613
|
+
// Make sure times is a number
|
614
|
+
times = parseInt(times, 10) || DEFAULT_TIMES;
|
615
|
+
|
616
|
+
function wrappedTask(wrappedCallback, wrappedResults) {
|
617
|
+
function retryAttempt(task, finalAttempt) {
|
618
|
+
return function(seriesCallback) {
|
619
|
+
task(function(err, result){
|
620
|
+
seriesCallback(!err || finalAttempt, {err: err, result: result});
|
621
|
+
}, wrappedResults);
|
622
|
+
};
|
623
|
+
}
|
624
|
+
|
625
|
+
while (times) {
|
626
|
+
attempts.push(retryAttempt(task, !(times-=1)));
|
627
|
+
}
|
628
|
+
async.series(attempts, function(done, data){
|
629
|
+
data = data[data.length - 1];
|
630
|
+
(wrappedCallback || callback)(data.err, data.result);
|
631
|
+
});
|
632
|
+
}
|
633
|
+
|
634
|
+
// If a callback is passed, run this as a controll flow
|
635
|
+
return callback ? wrappedTask() : wrappedTask;
|
636
|
+
};
|
637
|
+
|
638
|
+
async.waterfall = function (tasks, callback) {
|
639
|
+
callback = _once(callback || noop);
|
640
|
+
if (!_isArray(tasks)) {
|
641
|
+
var err = new Error('First argument to waterfall must be an array of functions');
|
642
|
+
return callback(err);
|
643
|
+
}
|
644
|
+
if (!tasks.length) {
|
645
|
+
return callback();
|
646
|
+
}
|
647
|
+
function wrapIterator(iterator) {
|
648
|
+
return function (err) {
|
649
|
+
if (err) {
|
650
|
+
callback.apply(null, arguments);
|
651
|
+
}
|
652
|
+
else {
|
653
|
+
var args = _baseSlice(arguments, 1);
|
654
|
+
var next = iterator.next();
|
655
|
+
if (next) {
|
656
|
+
args.push(wrapIterator(next));
|
657
|
+
}
|
658
|
+
else {
|
659
|
+
args.push(callback);
|
660
|
+
}
|
661
|
+
ensureAsync(iterator).apply(null, args);
|
662
|
+
}
|
663
|
+
};
|
664
|
+
}
|
665
|
+
wrapIterator(async.iterator(tasks))();
|
666
|
+
};
|
667
|
+
|
668
|
+
function _parallel(eachfn, tasks, callback) {
|
669
|
+
callback = callback || noop;
|
670
|
+
var results = _isArrayLike(tasks) ? [] : {};
|
671
|
+
|
672
|
+
eachfn(tasks, function (task, key, callback) {
|
673
|
+
task(function (err) {
|
674
|
+
var args = _baseSlice(arguments, 1);
|
675
|
+
if (args.length <= 1) {
|
676
|
+
args = args[0];
|
677
|
+
}
|
678
|
+
results[key] = args;
|
679
|
+
callback(err);
|
680
|
+
});
|
681
|
+
}, function (err) {
|
682
|
+
callback(err, results);
|
683
|
+
});
|
684
|
+
}
|
685
|
+
|
686
|
+
async.parallel = function (tasks, callback) {
|
687
|
+
_parallel(async.eachOf, tasks, callback);
|
688
|
+
};
|
689
|
+
|
690
|
+
async.parallelLimit = function(tasks, limit, callback) {
|
691
|
+
_parallel(_eachOfLimit(limit), tasks, callback);
|
692
|
+
};
|
693
|
+
|
694
|
+
async.series = function (tasks, callback) {
|
695
|
+
callback = callback || noop;
|
696
|
+
var results = _isArrayLike(tasks) ? [] : {};
|
697
|
+
|
698
|
+
async.eachOfSeries(tasks, function (task, key, callback) {
|
699
|
+
task(function (err) {
|
700
|
+
var args = _baseSlice(arguments, 1);
|
701
|
+
if (args.length <= 1) {
|
702
|
+
args = args[0];
|
703
|
+
}
|
704
|
+
results[key] = args;
|
705
|
+
callback(err);
|
706
|
+
});
|
707
|
+
}, function (err) {
|
708
|
+
callback(err, results);
|
709
|
+
});
|
710
|
+
};
|
711
|
+
|
712
|
+
async.iterator = function (tasks) {
|
713
|
+
function makeCallback(index) {
|
714
|
+
function fn() {
|
715
|
+
if (tasks.length) {
|
716
|
+
tasks[index].apply(null, arguments);
|
717
|
+
}
|
718
|
+
return fn.next();
|
719
|
+
}
|
720
|
+
fn.next = function () {
|
721
|
+
return (index < tasks.length - 1) ? makeCallback(index + 1): null;
|
722
|
+
};
|
723
|
+
return fn;
|
724
|
+
}
|
725
|
+
return makeCallback(0);
|
726
|
+
};
|
727
|
+
|
728
|
+
async.apply = function (fn) {
|
729
|
+
var args = _baseSlice(arguments, 1);
|
730
|
+
return function () {
|
731
|
+
return fn.apply(
|
732
|
+
null, args.concat(_baseSlice(arguments))
|
733
|
+
);
|
734
|
+
};
|
735
|
+
};
|
736
|
+
|
737
|
+
function _concat(eachfn, arr, fn, callback) {
|
738
|
+
var result = [];
|
739
|
+
eachfn(arr, function (x, index, cb) {
|
740
|
+
fn(x, function (err, y) {
|
741
|
+
result = result.concat(y || []);
|
742
|
+
cb(err);
|
743
|
+
});
|
744
|
+
}, function (err) {
|
745
|
+
callback(err, result);
|
746
|
+
});
|
747
|
+
}
|
748
|
+
async.concat = doParallel(_concat);
|
749
|
+
async.concatSeries = doSeries(_concat);
|
750
|
+
|
751
|
+
async.whilst = function (test, iterator, callback) {
|
752
|
+
if (test()) {
|
753
|
+
iterator(function (err) {
|
754
|
+
if (err) {
|
755
|
+
return callback(err);
|
756
|
+
}
|
757
|
+
async.whilst(test, iterator, callback);
|
758
|
+
});
|
759
|
+
}
|
760
|
+
else {
|
761
|
+
callback(null);
|
762
|
+
}
|
763
|
+
};
|
764
|
+
|
765
|
+
async.doWhilst = function (iterator, test, callback) {
|
766
|
+
iterator(function (err) {
|
767
|
+
if (err) {
|
768
|
+
return callback(err);
|
769
|
+
}
|
770
|
+
var args = _baseSlice(arguments, 1);
|
771
|
+
if (test.apply(null, args)) {
|
772
|
+
async.doWhilst(iterator, test, callback);
|
773
|
+
}
|
774
|
+
else {
|
775
|
+
callback(null);
|
776
|
+
}
|
777
|
+
});
|
778
|
+
};
|
779
|
+
|
780
|
+
async.until = function (test, iterator, callback) {
|
781
|
+
if (!test()) {
|
782
|
+
iterator(function (err) {
|
783
|
+
if (err) {
|
784
|
+
return callback(err);
|
785
|
+
}
|
786
|
+
async.until(test, iterator, callback);
|
787
|
+
});
|
788
|
+
}
|
789
|
+
else {
|
790
|
+
callback(null);
|
791
|
+
}
|
792
|
+
};
|
793
|
+
|
794
|
+
async.doUntil = function (iterator, test, callback) {
|
795
|
+
iterator(function (err) {
|
796
|
+
if (err) {
|
797
|
+
return callback(err);
|
798
|
+
}
|
799
|
+
var args = _baseSlice(arguments, 1);
|
800
|
+
if (!test.apply(null, args)) {
|
801
|
+
async.doUntil(iterator, test, callback);
|
802
|
+
}
|
803
|
+
else {
|
804
|
+
callback(null);
|
805
|
+
}
|
806
|
+
});
|
807
|
+
};
|
808
|
+
|
809
|
+
function _queue(worker, concurrency, payload) {
|
810
|
+
if (concurrency == null) {
|
811
|
+
concurrency = 1;
|
812
|
+
}
|
813
|
+
else if(concurrency === 0) {
|
814
|
+
throw new Error('Concurrency must not be zero');
|
815
|
+
}
|
816
|
+
function _insert(q, data, pos, callback) {
|
817
|
+
if (callback != null && typeof callback !== "function") {
|
818
|
+
throw new Error("task callback must be a function");
|
819
|
+
}
|
820
|
+
q.started = true;
|
821
|
+
if (!_isArray(data)) {
|
822
|
+
data = [data];
|
823
|
+
}
|
824
|
+
if(data.length === 0 && q.idle()) {
|
825
|
+
// call drain immediately if there are no tasks
|
826
|
+
return async.setImmediate(function() {
|
827
|
+
q.drain();
|
828
|
+
});
|
829
|
+
}
|
830
|
+
_arrayEach(data, function(task) {
|
831
|
+
var item = {
|
832
|
+
data: task,
|
833
|
+
callback: callback || noop
|
834
|
+
};
|
835
|
+
|
836
|
+
if (pos) {
|
837
|
+
q.tasks.unshift(item);
|
838
|
+
} else {
|
839
|
+
q.tasks.push(item);
|
840
|
+
}
|
841
|
+
|
842
|
+
if (q.tasks.length === q.concurrency) {
|
843
|
+
q.saturated();
|
844
|
+
}
|
845
|
+
});
|
846
|
+
async.setImmediate(q.process);
|
847
|
+
}
|
848
|
+
function _next(q, tasks) {
|
849
|
+
return function(){
|
850
|
+
workers -= 1;
|
851
|
+
var args = arguments;
|
852
|
+
_arrayEach(tasks, function (task) {
|
853
|
+
task.callback.apply(task, args);
|
854
|
+
});
|
855
|
+
if (q.tasks.length + workers === 0) {
|
856
|
+
q.drain();
|
857
|
+
}
|
858
|
+
q.process();
|
859
|
+
};
|
860
|
+
}
|
861
|
+
|
862
|
+
var workers = 0;
|
863
|
+
var q = {
|
864
|
+
tasks: [],
|
865
|
+
concurrency: concurrency,
|
866
|
+
saturated: noop,
|
867
|
+
empty: noop,
|
868
|
+
drain: noop,
|
869
|
+
started: false,
|
870
|
+
paused: false,
|
871
|
+
push: function (data, callback) {
|
872
|
+
_insert(q, data, false, callback);
|
873
|
+
},
|
874
|
+
kill: function () {
|
875
|
+
q.drain = noop;
|
876
|
+
q.tasks = [];
|
877
|
+
},
|
878
|
+
unshift: function (data, callback) {
|
879
|
+
_insert(q, data, true, callback);
|
880
|
+
},
|
881
|
+
process: function () {
|
882
|
+
if (!q.paused && workers < q.concurrency && q.tasks.length) {
|
883
|
+
while(workers < q.concurrency && q.tasks.length){
|
884
|
+
var tasks = payload ?
|
885
|
+
q.tasks.splice(0, payload) :
|
886
|
+
q.tasks.splice(0, q.tasks.length);
|
887
|
+
|
888
|
+
var data = _map(tasks, function (task) {
|
889
|
+
return task.data;
|
890
|
+
});
|
891
|
+
|
892
|
+
if (q.tasks.length === 0) {
|
893
|
+
q.empty();
|
894
|
+
}
|
895
|
+
workers += 1;
|
896
|
+
var cb = only_once(_next(q, tasks));
|
897
|
+
worker(data, cb);
|
898
|
+
}
|
899
|
+
}
|
900
|
+
},
|
901
|
+
length: function () {
|
902
|
+
return q.tasks.length;
|
903
|
+
},
|
904
|
+
running: function () {
|
905
|
+
return workers;
|
906
|
+
},
|
907
|
+
idle: function() {
|
908
|
+
return q.tasks.length + workers === 0;
|
909
|
+
},
|
910
|
+
pause: function () {
|
911
|
+
q.paused = true;
|
912
|
+
},
|
913
|
+
resume: function () {
|
914
|
+
if (q.paused === false) { return; }
|
915
|
+
q.paused = false;
|
916
|
+
var resumeCount = Math.min(q.concurrency, q.tasks.length);
|
917
|
+
// Need to call q.process once per concurrent
|
918
|
+
// worker to preserve full concurrency after pause
|
919
|
+
for (var w = 1; w <= resumeCount; w++) {
|
920
|
+
async.setImmediate(q.process);
|
921
|
+
}
|
922
|
+
}
|
923
|
+
};
|
924
|
+
return q;
|
925
|
+
}
|
926
|
+
|
927
|
+
async.queue = function (worker, concurrency) {
|
928
|
+
var q = _queue(function (items, cb) {
|
929
|
+
worker(items[0], cb);
|
930
|
+
}, concurrency, 1);
|
931
|
+
|
932
|
+
return q;
|
933
|
+
};
|
934
|
+
|
935
|
+
async.priorityQueue = function (worker, concurrency) {
|
936
|
+
|
937
|
+
function _compareTasks(a, b){
|
938
|
+
return a.priority - b.priority;
|
939
|
+
}
|
940
|
+
|
941
|
+
function _binarySearch(sequence, item, compare) {
|
942
|
+
var beg = -1,
|
943
|
+
end = sequence.length - 1;
|
944
|
+
while (beg < end) {
|
945
|
+
var mid = beg + ((end - beg + 1) >>> 1);
|
946
|
+
if (compare(item, sequence[mid]) >= 0) {
|
947
|
+
beg = mid;
|
948
|
+
} else {
|
949
|
+
end = mid - 1;
|
950
|
+
}
|
951
|
+
}
|
952
|
+
return beg;
|
953
|
+
}
|
954
|
+
|
955
|
+
function _insert(q, data, priority, callback) {
|
956
|
+
if (callback != null && typeof callback !== "function") {
|
957
|
+
throw new Error("task callback must be a function");
|
958
|
+
}
|
959
|
+
q.started = true;
|
960
|
+
if (!_isArray(data)) {
|
961
|
+
data = [data];
|
962
|
+
}
|
963
|
+
if(data.length === 0) {
|
964
|
+
// call drain immediately if there are no tasks
|
965
|
+
return async.setImmediate(function() {
|
966
|
+
q.drain();
|
967
|
+
});
|
968
|
+
}
|
969
|
+
_arrayEach(data, function(task) {
|
970
|
+
var item = {
|
971
|
+
data: task,
|
972
|
+
priority: priority,
|
973
|
+
callback: typeof callback === 'function' ? callback : noop
|
974
|
+
};
|
975
|
+
|
976
|
+
q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);
|
977
|
+
|
978
|
+
if (q.tasks.length === q.concurrency) {
|
979
|
+
q.saturated();
|
980
|
+
}
|
981
|
+
async.setImmediate(q.process);
|
982
|
+
});
|
983
|
+
}
|
984
|
+
|
985
|
+
// Start with a normal queue
|
986
|
+
var q = async.queue(worker, concurrency);
|
987
|
+
|
988
|
+
// Override push to accept second parameter representing priority
|
989
|
+
q.push = function (data, priority, callback) {
|
990
|
+
_insert(q, data, priority, callback);
|
991
|
+
};
|
992
|
+
|
993
|
+
// Remove unshift function
|
994
|
+
delete q.unshift;
|
995
|
+
|
996
|
+
return q;
|
997
|
+
};
|
998
|
+
|
999
|
+
async.cargo = function (worker, payload) {
|
1000
|
+
return _queue(worker, 1, payload);
|
1001
|
+
};
|
1002
|
+
|
1003
|
+
function _console_fn(name) {
|
1004
|
+
return function (fn) {
|
1005
|
+
var args = _baseSlice(arguments, 1);
|
1006
|
+
fn.apply(null, args.concat([function (err) {
|
1007
|
+
var args = _baseSlice(arguments, 1);
|
1008
|
+
if (typeof console !== 'undefined') {
|
1009
|
+
if (err) {
|
1010
|
+
if (console.error) {
|
1011
|
+
console.error(err);
|
1012
|
+
}
|
1013
|
+
}
|
1014
|
+
else if (console[name]) {
|
1015
|
+
_arrayEach(args, function (x) {
|
1016
|
+
console[name](x);
|
1017
|
+
});
|
1018
|
+
}
|
1019
|
+
}
|
1020
|
+
}]));
|
1021
|
+
};
|
1022
|
+
}
|
1023
|
+
async.log = _console_fn('log');
|
1024
|
+
async.dir = _console_fn('dir');
|
1025
|
+
/*async.info = _console_fn('info');
|
1026
|
+
async.warn = _console_fn('warn');
|
1027
|
+
async.error = _console_fn('error');*/
|
1028
|
+
|
1029
|
+
async.memoize = function (fn, hasher) {
|
1030
|
+
var memo = {};
|
1031
|
+
var queues = {};
|
1032
|
+
hasher = hasher || function (x) {
|
1033
|
+
return x;
|
1034
|
+
};
|
1035
|
+
function memoized() {
|
1036
|
+
var args = _baseSlice(arguments);
|
1037
|
+
var callback = args.pop();
|
1038
|
+
var key = hasher.apply(null, args);
|
1039
|
+
if (key in memo) {
|
1040
|
+
async.nextTick(function () {
|
1041
|
+
callback.apply(null, memo[key]);
|
1042
|
+
});
|
1043
|
+
}
|
1044
|
+
else if (key in queues) {
|
1045
|
+
queues[key].push(callback);
|
1046
|
+
}
|
1047
|
+
else {
|
1048
|
+
queues[key] = [callback];
|
1049
|
+
fn.apply(null, args.concat([function () {
|
1050
|
+
memo[key] = _baseSlice(arguments);
|
1051
|
+
var q = queues[key];
|
1052
|
+
delete queues[key];
|
1053
|
+
for (var i = 0, l = q.length; i < l; i++) {
|
1054
|
+
q[i].apply(null, arguments);
|
1055
|
+
}
|
1056
|
+
}]));
|
1057
|
+
}
|
1058
|
+
}
|
1059
|
+
memoized.memo = memo;
|
1060
|
+
memoized.unmemoized = fn;
|
1061
|
+
return memoized;
|
1062
|
+
};
|
1063
|
+
|
1064
|
+
async.unmemoize = function (fn) {
|
1065
|
+
return function () {
|
1066
|
+
return (fn.unmemoized || fn).apply(null, arguments);
|
1067
|
+
};
|
1068
|
+
};
|
1069
|
+
|
1070
|
+
function _times(mapper) {
|
1071
|
+
return function (count, iterator, callback) {
|
1072
|
+
mapper(_range(count), iterator, callback);
|
1073
|
+
};
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
async.times = _times(async.map);
|
1077
|
+
async.timesSeries = _times(async.mapSeries);
|
1078
|
+
async.timesLimit = function (count, limit, iterator, callback) {
|
1079
|
+
return async.mapLimit(_range(count), limit, iterator, callback);
|
1080
|
+
};
|
1081
|
+
|
1082
|
+
async.seq = function (/* functions... */) {
|
1083
|
+
var fns = arguments;
|
1084
|
+
return function () {
|
1085
|
+
var that = this;
|
1086
|
+
var args = _baseSlice(arguments);
|
1087
|
+
|
1088
|
+
var callback = args.slice(-1)[0];
|
1089
|
+
if (typeof callback == 'function') {
|
1090
|
+
args.pop();
|
1091
|
+
} else {
|
1092
|
+
callback = noop;
|
1093
|
+
}
|
1094
|
+
|
1095
|
+
async.reduce(fns, args, function (newargs, fn, cb) {
|
1096
|
+
fn.apply(that, newargs.concat([function () {
|
1097
|
+
var err = arguments[0];
|
1098
|
+
var nextargs = _baseSlice(arguments, 1);
|
1099
|
+
cb(err, nextargs);
|
1100
|
+
}]));
|
1101
|
+
},
|
1102
|
+
function (err, results) {
|
1103
|
+
callback.apply(that, [err].concat(results));
|
1104
|
+
});
|
1105
|
+
};
|
1106
|
+
};
|
1107
|
+
|
1108
|
+
async.compose = function (/* functions... */) {
|
1109
|
+
return async.seq.apply(null, Array.prototype.reverse.call(arguments));
|
1110
|
+
};
|
1111
|
+
|
1112
|
+
|
1113
|
+
function _applyEach(eachfn, fns /*args...*/) {
|
1114
|
+
function go() {
|
1115
|
+
var that = this;
|
1116
|
+
var args = _baseSlice(arguments);
|
1117
|
+
var callback = args.pop();
|
1118
|
+
return eachfn(fns, function (fn, _, cb) {
|
1119
|
+
fn.apply(that, args.concat([cb]));
|
1120
|
+
},
|
1121
|
+
callback);
|
1122
|
+
}
|
1123
|
+
if (arguments.length > 2) {
|
1124
|
+
var args = _baseSlice(arguments, 2);
|
1125
|
+
return go.apply(this, args);
|
1126
|
+
}
|
1127
|
+
else {
|
1128
|
+
return go;
|
1129
|
+
}
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
async.applyEach = function (/*fns, args...*/) {
|
1133
|
+
var args = _baseSlice(arguments);
|
1134
|
+
return _applyEach.apply(null, [async.eachOf].concat(args));
|
1135
|
+
};
|
1136
|
+
async.applyEachSeries = function (/*fns, args...*/) {
|
1137
|
+
var args = _baseSlice(arguments);
|
1138
|
+
return _applyEach.apply(null, [async.eachOfSeries].concat(args));
|
1139
|
+
};
|
1140
|
+
|
1141
|
+
|
1142
|
+
async.forever = function (fn, callback) {
|
1143
|
+
var done = only_once(callback || noop);
|
1144
|
+
var task = ensureAsync(fn);
|
1145
|
+
function next(err) {
|
1146
|
+
if (err) {
|
1147
|
+
return done(err);
|
1148
|
+
}
|
1149
|
+
task(next);
|
1150
|
+
}
|
1151
|
+
next();
|
1152
|
+
};
|
1153
|
+
|
1154
|
+
function ensureAsync(fn) {
|
1155
|
+
return function (/*...args, callback*/) {
|
1156
|
+
var args = _baseSlice(arguments);
|
1157
|
+
var callback = args.pop();
|
1158
|
+
args.push(function () {
|
1159
|
+
var innerArgs = arguments;
|
1160
|
+
if (sync) {
|
1161
|
+
async.setImmediate(function () {
|
1162
|
+
callback.apply(null, innerArgs);
|
1163
|
+
});
|
1164
|
+
} else {
|
1165
|
+
callback.apply(null, innerArgs);
|
1166
|
+
}
|
1167
|
+
});
|
1168
|
+
var sync = true;
|
1169
|
+
fn.apply(this, args);
|
1170
|
+
sync = false;
|
1171
|
+
};
|
1172
|
+
}
|
1173
|
+
|
1174
|
+
async.ensureAsync = ensureAsync;
|
1175
|
+
|
1176
|
+
// Node.js
|
1177
|
+
if (typeof module !== 'undefined' && module.exports) {
|
1178
|
+
module.exports = async;
|
1179
|
+
}
|
1180
|
+
// AMD / RequireJS
|
1181
|
+
else if (typeof define !== 'undefined' && define.amd) {
|
1182
|
+
define([], function () {
|
1183
|
+
return async;
|
1184
|
+
});
|
1185
|
+
}
|
1186
|
+
// included directly via <script> tag
|
1187
|
+
else {
|
1188
|
+
root.async = async;
|
1189
|
+
}
|
1190
|
+
|
1191
|
+
}());
|