embeditor-rails 1.1.1 → 2.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +25 -17
- data/app/assets/javascripts/embeditor/adapter.js.coffee +21 -2
- data/app/assets/javascripts/embeditor/adapters/embedly.js.coffee +4 -40
- data/app/assets/javascripts/embeditor/adapters/oembed.js.coffee +37 -2
- data/app/assets/javascripts/embeditor/embeditor.js.coffee +16 -4
- data/lib/embeditor-rails/version.rb +1 -1
- data/lib/node_modules/npm/AUTHORS +158 -0
- data/lib/node_modules/npm/CONTRIBUTING.md +9 -0
- data/lib/node_modules/npm/LICENSE +235 -0
- data/lib/node_modules/npm/Makefile +216 -0
- data/lib/node_modules/npm/README.md +241 -0
- data/lib/node_modules/npm/bin/node-gyp-bin/node-gyp +2 -0
- data/lib/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd +1 -0
- data/lib/node_modules/npm/bin/npm +13 -0
- data/lib/node_modules/npm/bin/npm-cli.js +87 -0
- data/lib/node_modules/npm/bin/npm.cmd +6 -0
- data/lib/node_modules/npm/bin/read-package-json.js +22 -0
- data/lib/node_modules/npm/cli.js +2 -0
- data/lib/node_modules/npm/configure +33 -0
- data/lib/node_modules/npm/doc/api/npm-bin.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-bugs.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-commands.md +22 -0
- data/lib/node_modules/npm/doc/api/npm-config.md +45 -0
- data/lib/node_modules/npm/doc/api/npm-deprecate.md +34 -0
- data/lib/node_modules/npm/doc/api/npm-docs.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-edit.md +24 -0
- data/lib/node_modules/npm/doc/api/npm-explore.md +18 -0
- data/lib/node_modules/npm/doc/api/npm-help-search.md +30 -0
- data/lib/node_modules/npm/doc/api/npm-init.md +29 -0
- data/lib/node_modules/npm/doc/api/npm-install.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-link.md +33 -0
- data/lib/node_modules/npm/doc/api/npm-load.md +26 -0
- data/lib/node_modules/npm/doc/api/npm-ls.md +56 -0
- data/lib/node_modules/npm/doc/api/npm-outdated.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-owner.md +31 -0
- data/lib/node_modules/npm/doc/api/npm-pack.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-prefix.md +15 -0
- data/lib/node_modules/npm/doc/api/npm-prune.md +17 -0
- data/lib/node_modules/npm/doc/api/npm-publish.md +30 -0
- data/lib/node_modules/npm/doc/api/npm-rebuild.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-repo.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-restart.md +22 -0
- data/lib/node_modules/npm/doc/api/npm-root.md +15 -0
- data/lib/node_modules/npm/doc/api/npm-run-script.md +27 -0
- data/lib/node_modules/npm/doc/api/npm-search.md +35 -0
- data/lib/node_modules/npm/doc/api/npm-shrinkwrap.md +20 -0
- data/lib/node_modules/npm/doc/api/npm-start.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-stop.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-submodule.md +28 -0
- data/lib/node_modules/npm/doc/api/npm-tag.md +23 -0
- data/lib/node_modules/npm/doc/api/npm-test.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-uninstall.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-unpublish.md +20 -0
- data/lib/node_modules/npm/doc/api/npm-update.md +11 -0
- data/lib/node_modules/npm/doc/api/npm-version.md +18 -0
- data/lib/node_modules/npm/doc/api/npm-view.md +93 -0
- data/lib/node_modules/npm/doc/api/npm-whoami.md +15 -0
- data/lib/node_modules/npm/doc/api/npm.md +116 -0
- data/lib/node_modules/npm/doc/cli/npm-adduser.md +38 -0
- data/lib/node_modules/npm/doc/cli/npm-bin.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-bugs.md +42 -0
- data/lib/node_modules/npm/doc/cli/npm-build.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-bundle.md +14 -0
- data/lib/node_modules/npm/doc/cli/npm-cache.md +72 -0
- data/lib/node_modules/npm/doc/cli/npm-completion.md +29 -0
- data/lib/node_modules/npm/doc/cli/npm-config.md +71 -0
- data/lib/node_modules/npm/doc/cli/npm-dedupe.md +58 -0
- data/lib/node_modules/npm/doc/cli/npm-deprecate.md +26 -0
- data/lib/node_modules/npm/doc/cli/npm-docs.md +44 -0
- data/lib/node_modules/npm/doc/cli/npm-edit.md +37 -0
- data/lib/node_modules/npm/doc/cli/npm-explore.md +40 -0
- data/lib/node_modules/npm/doc/cli/npm-help-search.md +35 -0
- data/lib/node_modules/npm/doc/cli/npm-help.md +40 -0
- data/lib/node_modules/npm/doc/cli/npm-init.md +25 -0
- data/lib/node_modules/npm/doc/cli/npm-install.md +252 -0
- data/lib/node_modules/npm/doc/cli/npm-link.md +63 -0
- data/lib/node_modules/npm/doc/cli/npm-ls.md +80 -0
- data/lib/node_modules/npm/doc/cli/npm-outdated.md +58 -0
- data/lib/node_modules/npm/doc/cli/npm-owner.md +33 -0
- data/lib/node_modules/npm/doc/cli/npm-pack.md +27 -0
- data/lib/node_modules/npm/doc/cli/npm-prefix.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-prune.md +25 -0
- data/lib/node_modules/npm/doc/cli/npm-publish.md +30 -0
- data/lib/node_modules/npm/doc/cli/npm-rebuild.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-repo.md +28 -0
- data/lib/node_modules/npm/doc/cli/npm-restart.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-rm.md +23 -0
- data/lib/node_modules/npm/doc/cli/npm-root.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-run-script.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-search.md +36 -0
- data/lib/node_modules/npm/doc/cli/npm-shrinkwrap.md +185 -0
- data/lib/node_modules/npm/doc/cli/npm-star.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-stars.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-start.md +18 -0
- data/lib/node_modules/npm/doc/cli/npm-stop.md +18 -0
- data/lib/node_modules/npm/doc/cli/npm-submodule.md +28 -0
- data/lib/node_modules/npm/doc/cli/npm-tag.md +34 -0
- data/lib/node_modules/npm/doc/cli/npm-test.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-uninstall.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-unpublish.md +32 -0
- data/lib/node_modules/npm/doc/cli/npm-update.md +24 -0
- data/lib/node_modules/npm/doc/cli/npm-version.md +45 -0
- data/lib/node_modules/npm/doc/cli/npm-view.md +90 -0
- data/lib/node_modules/npm/doc/cli/npm-whoami.md +17 -0
- data/lib/node_modules/npm/doc/cli/npm.md +153 -0
- data/lib/node_modules/npm/doc/files/npm-folders.md +211 -0
- data/lib/node_modules/npm/doc/files/npmrc.md +59 -0
- data/lib/node_modules/npm/doc/files/package.json.md +576 -0
- data/lib/node_modules/npm/doc/misc/npm-coding-style.md +181 -0
- data/lib/node_modules/npm/doc/misc/npm-config.md +820 -0
- data/lib/node_modules/npm/doc/misc/npm-developers.md +207 -0
- data/lib/node_modules/npm/doc/misc/npm-disputes.md +99 -0
- data/lib/node_modules/npm/doc/misc/npm-faq.md +364 -0
- data/lib/node_modules/npm/doc/misc/npm-index.md +411 -0
- data/lib/node_modules/npm/doc/misc/npm-registry.md +69 -0
- data/lib/node_modules/npm/doc/misc/npm-scripts.md +245 -0
- data/lib/node_modules/npm/doc/misc/removing-npm.md +54 -0
- data/lib/node_modules/npm/doc/misc/semver.md +111 -0
- data/lib/node_modules/npm/html/doc/README.html +276 -0
- data/lib/node_modules/npm/html/doc/api/npm-bin.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-bugs.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-commands.html +62 -0
- data/lib/node_modules/npm/html/doc/api/npm-config.html +67 -0
- data/lib/node_modules/npm/html/doc/api/npm-deprecate.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-docs.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-edit.html +64 -0
- data/lib/node_modules/npm/html/doc/api/npm-explore.html +58 -0
- data/lib/node_modules/npm/html/doc/api/npm-help-search.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-init.html +69 -0
- data/lib/node_modules/npm/html/doc/api/npm-install.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-link.html +73 -0
- data/lib/node_modules/npm/html/doc/api/npm-load.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-ls.html +93 -0
- data/lib/node_modules/npm/html/doc/api/npm-outdated.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-owner.html +68 -0
- data/lib/node_modules/npm/html/doc/api/npm-pack.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-prefix.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm-prune.html +57 -0
- data/lib/node_modules/npm/html/doc/api/npm-publish.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-rebuild.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-repo.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-restart.html +61 -0
- data/lib/node_modules/npm/html/doc/api/npm-root.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm-run-script.html +63 -0
- data/lib/node_modules/npm/html/doc/api/npm-search.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-shrinkwrap.html +60 -0
- data/lib/node_modules/npm/html/doc/api/npm-start.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-stop.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-submodule.html +67 -0
- data/lib/node_modules/npm/html/doc/api/npm-tag.html +63 -0
- data/lib/node_modules/npm/html/doc/api/npm-test.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-uninstall.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-unpublish.html +60 -0
- data/lib/node_modules/npm/html/doc/api/npm-update.html +52 -0
- data/lib/node_modules/npm/html/doc/api/npm-version.html +58 -0
- data/lib/node_modules/npm/html/doc/api/npm-view.html +133 -0
- data/lib/node_modules/npm/html/doc/api/npm-whoami.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm.html +126 -0
- data/lib/node_modules/npm/html/doc/cli/npm-adduser.html +73 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bin.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bugs.html +72 -0
- data/lib/node_modules/npm/html/doc/cli/npm-build.html +59 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bundle.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-cache.html +100 -0
- data/lib/node_modules/npm/html/doc/cli/npm-completion.html +67 -0
- data/lib/node_modules/npm/html/doc/cli/npm-config.html +107 -0
- data/lib/node_modules/npm/html/doc/cli/npm-dedupe.html +96 -0
- data/lib/node_modules/npm/html/doc/cli/npm-deprecate.html +65 -0
- data/lib/node_modules/npm/html/doc/cli/npm-docs.html +75 -0
- data/lib/node_modules/npm/html/doc/cli/npm-edit.html +71 -0
- data/lib/node_modules/npm/html/doc/cli/npm-explore.html +74 -0
- data/lib/node_modules/npm/html/doc/cli/npm-help-search.html +72 -0
- data/lib/node_modules/npm/html/doc/cli/npm-help.html +70 -0
- data/lib/node_modules/npm/html/doc/cli/npm-init.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-install.html +183 -0
- data/lib/node_modules/npm/html/doc/cli/npm-link.html +96 -0
- data/lib/node_modules/npm/html/doc/cli/npm-ls.html +108 -0
- data/lib/node_modules/npm/html/doc/cli/npm-outdated.html +92 -0
- data/lib/node_modules/npm/html/doc/cli/npm-owner.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-pack.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-prefix.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-prune.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-publish.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-rebuild.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-repo.html +66 -0
- data/lib/node_modules/npm/html/doc/cli/npm-restart.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-rm.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-root.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-run-script.html +57 -0
- data/lib/node_modules/npm/html/doc/cli/npm-search.html +71 -0
- data/lib/node_modules/npm/html/doc/cli/npm-shrinkwrap.html +217 -0
- data/lib/node_modules/npm/html/doc/cli/npm-star.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-stars.html +59 -0
- data/lib/node_modules/npm/html/doc/cli/npm-start.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-stop.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-submodule.html +67 -0
- data/lib/node_modules/npm/html/doc/cli/npm-tag.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-test.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-uninstall.html +56 -0
- data/lib/node_modules/npm/html/doc/cli/npm-unpublish.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-update.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-version.html +83 -0
- data/lib/node_modules/npm/html/doc/cli/npm-view.html +125 -0
- data/lib/node_modules/npm/html/doc/cli/npm-whoami.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm.html +165 -0
- data/lib/node_modules/npm/html/doc/files/npm-folders.html +239 -0
- data/lib/node_modules/npm/html/doc/files/npm-global.html +239 -0
- data/lib/node_modules/npm/html/doc/files/npm-json.html +580 -0
- data/lib/node_modules/npm/html/doc/files/npmrc.html +93 -0
- data/lib/node_modules/npm/html/doc/files/package.json.html +580 -0
- data/lib/node_modules/npm/html/doc/index.html +450 -0
- data/lib/node_modules/npm/html/doc/misc/npm-coding-style.html +216 -0
- data/lib/node_modules/npm/html/doc/misc/npm-config.html +744 -0
- data/lib/node_modules/npm/html/doc/misc/npm-developers.html +208 -0
- data/lib/node_modules/npm/html/doc/misc/npm-disputes.html +126 -0
- data/lib/node_modules/npm/html/doc/misc/npm-faq.html +382 -0
- data/lib/node_modules/npm/html/doc/misc/npm-index.html +450 -0
- data/lib/node_modules/npm/html/doc/misc/npm-registry.html +105 -0
- data/lib/node_modules/npm/html/doc/misc/npm-scripts.html +257 -0
- data/lib/node_modules/npm/html/doc/misc/removing-npm.html +92 -0
- data/lib/node_modules/npm/html/doc/misc/semver.html +128 -0
- data/lib/node_modules/npm/html/docfoot-script.html +31 -0
- data/lib/node_modules/npm/html/docfoot.html +2 -0
- data/lib/node_modules/npm/html/dochead.html +8 -0
- data/lib/node_modules/npm/html/favicon.ico +0 -0
- data/lib/node_modules/npm/html/index.html +95 -0
- data/lib/node_modules/npm/html/static/style.css +329 -0
- data/lib/node_modules/npm/lib/adduser.js +138 -0
- data/lib/node_modules/npm/lib/bin.js +18 -0
- data/lib/node_modules/npm/lib/bugs.js +61 -0
- data/lib/node_modules/npm/lib/build.js +228 -0
- data/lib/node_modules/npm/lib/cache.js +1318 -0
- data/lib/node_modules/npm/lib/completion.js +253 -0
- data/lib/node_modules/npm/lib/config.js +285 -0
- data/lib/node_modules/npm/lib/dedupe.js +357 -0
- data/lib/node_modules/npm/lib/deprecate.js +47 -0
- data/lib/node_modules/npm/lib/docs.js +62 -0
- data/lib/node_modules/npm/lib/edit.js +32 -0
- data/lib/node_modules/npm/lib/explore.js +36 -0
- data/lib/node_modules/npm/lib/faq.js +8 -0
- data/lib/node_modules/npm/lib/get.js +12 -0
- data/lib/node_modules/npm/lib/help-search.js +218 -0
- data/lib/node_modules/npm/lib/help.js +231 -0
- data/lib/node_modules/npm/lib/init.js +36 -0
- data/lib/node_modules/npm/lib/install.js +979 -0
- data/lib/node_modules/npm/lib/link.js +173 -0
- data/lib/node_modules/npm/lib/ls.js +357 -0
- data/lib/node_modules/npm/lib/npm.js +528 -0
- data/lib/node_modules/npm/lib/outdated.js +303 -0
- data/lib/node_modules/npm/lib/owner.js +205 -0
- data/lib/node_modules/npm/lib/pack.js +65 -0
- data/lib/node_modules/npm/lib/prefix.js +11 -0
- data/lib/node_modules/npm/lib/prune.js +53 -0
- data/lib/node_modules/npm/lib/publish.js +118 -0
- data/lib/node_modules/npm/lib/rebuild.js +75 -0
- data/lib/node_modules/npm/lib/repo.js +54 -0
- data/lib/node_modules/npm/lib/restart.js +1 -0
- data/lib/node_modules/npm/lib/root.js +11 -0
- data/lib/node_modules/npm/lib/run-script.js +102 -0
- data/lib/node_modules/npm/lib/search.js +265 -0
- data/lib/node_modules/npm/lib/set.js +13 -0
- data/lib/node_modules/npm/lib/shrinkwrap.js +86 -0
- data/lib/node_modules/npm/lib/star.js +33 -0
- data/lib/node_modules/npm/lib/stars.js +27 -0
- data/lib/node_modules/npm/lib/start.js +1 -0
- data/lib/node_modules/npm/lib/stop.js +1 -0
- data/lib/node_modules/npm/lib/submodule.js +119 -0
- data/lib/node_modules/npm/lib/substack.js +20 -0
- data/lib/node_modules/npm/lib/tag.js +18 -0
- data/lib/node_modules/npm/lib/test.js +14 -0
- data/lib/node_modules/npm/lib/unbuild.js +112 -0
- data/lib/node_modules/npm/lib/uninstall.js +127 -0
- data/lib/node_modules/npm/lib/unpublish.js +83 -0
- data/lib/node_modules/npm/lib/update.js +43 -0
- data/lib/node_modules/npm/lib/utils/completion.sh +54 -0
- data/lib/node_modules/npm/lib/utils/completion/file-completion.js +26 -0
- data/lib/node_modules/npm/lib/utils/completion/installed-deep.js +50 -0
- data/lib/node_modules/npm/lib/utils/completion/installed-shallow.js +79 -0
- data/lib/node_modules/npm/lib/utils/error-handler.js +343 -0
- data/lib/node_modules/npm/lib/utils/fetch.js +93 -0
- data/lib/node_modules/npm/lib/utils/find-prefix.js +57 -0
- data/lib/node_modules/npm/lib/utils/gently-rm.js +61 -0
- data/lib/node_modules/npm/lib/utils/is-git-url.js +13 -0
- data/lib/node_modules/npm/lib/utils/lifecycle.js +360 -0
- data/lib/node_modules/npm/lib/utils/link.js +39 -0
- data/lib/node_modules/npm/lib/utils/tar.js +323 -0
- data/lib/node_modules/npm/lib/version.js +120 -0
- data/lib/node_modules/npm/lib/view.js +246 -0
- data/lib/node_modules/npm/lib/visnup.js +42 -0
- data/lib/node_modules/npm/lib/whoami.js +13 -0
- data/lib/node_modules/npm/lib/xmas.js +56 -0
- data/lib/node_modules/npm/make.bat +3 -0
- data/lib/node_modules/npm/man/man1/npm-README.1 +328 -0
- data/lib/node_modules/npm/man/man1/npm-adduser.1 +63 -0
- data/lib/node_modules/npm/man/man1/npm-bin.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-bugs.1 +78 -0
- data/lib/node_modules/npm/man/man1/npm-build.1 +43 -0
- data/lib/node_modules/npm/man/man1/npm-bundle.1 +23 -0
- data/lib/node_modules/npm/man/man1/npm-cache.1 +104 -0
- data/lib/node_modules/npm/man/man1/npm-completion.1 +47 -0
- data/lib/node_modules/npm/man/man1/npm-config.1 +113 -0
- data/lib/node_modules/npm/man/man1/npm-dedupe.1 +96 -0
- data/lib/node_modules/npm/man/man1/npm-deprecate.1 +48 -0
- data/lib/node_modules/npm/man/man1/npm-docs.1 +78 -0
- data/lib/node_modules/npm/man/man1/npm-edit.1 +66 -0
- data/lib/node_modules/npm/man/man1/npm-explore.1 +76 -0
- data/lib/node_modules/npm/man/man1/npm-help-search.1 +59 -0
- data/lib/node_modules/npm/man/man1/npm-help.1 +77 -0
- data/lib/node_modules/npm/man/man1/npm-init.1 +43 -0
- data/lib/node_modules/npm/man/man1/npm-install.1 +434 -0
- data/lib/node_modules/npm/man/man1/npm-link.1 +119 -0
- data/lib/node_modules/npm/man/man1/npm-ls.1 +146 -0
- data/lib/node_modules/npm/man/man1/npm-outdated.1 +102 -0
- data/lib/node_modules/npm/man/man1/npm-owner.1 +58 -0
- data/lib/node_modules/npm/man/man1/npm-pack.1 +48 -0
- data/lib/node_modules/npm/man/man1/npm-prefix.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-prune.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-publish.1 +53 -0
- data/lib/node_modules/npm/man/man1/npm-rebuild.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-repo.1 +47 -0
- data/lib/node_modules/npm/man/man1/npm-restart.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-rm.1 +44 -0
- data/lib/node_modules/npm/man/man1/npm-root.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-run-script.1 +41 -0
- data/lib/node_modules/npm/man/man1/npm-search.1 +62 -0
- data/lib/node_modules/npm/man/man1/npm-shrinkwrap.1 +275 -0
- data/lib/node_modules/npm/man/man1/npm-star.1 +39 -0
- data/lib/node_modules/npm/man/man1/npm-stars.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-start.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-stop.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-submodule.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-tag.1 +74 -0
- data/lib/node_modules/npm/man/man1/npm-test.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-uninstall.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-unpublish.1 +53 -0
- data/lib/node_modules/npm/man/man1/npm-update.1 +45 -0
- data/lib/node_modules/npm/man/man1/npm-version.1 +75 -0
- data/lib/node_modules/npm/man/man1/npm-view.1 +186 -0
- data/lib/node_modules/npm/man/man1/npm-whoami.1 +34 -0
- data/lib/node_modules/npm/man/man1/npm.1 +230 -0
- data/lib/node_modules/npm/man/man3/npm-bin.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-bugs.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-commands.3 +35 -0
- data/lib/node_modules/npm/man/man3/npm-config.3 +69 -0
- data/lib/node_modules/npm/man/man3/npm-deprecate.3 +57 -0
- data/lib/node_modules/npm/man/man3/npm-docs.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-edit.3 +35 -0
- data/lib/node_modules/npm/man/man3/npm-explore.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-help-search.3 +51 -0
- data/lib/node_modules/npm/man/man3/npm-init.3 +39 -0
- data/lib/node_modules/npm/man/man3/npm-install.3 +29 -0
- data/lib/node_modules/npm/man/man3/npm-link.3 +53 -0
- data/lib/node_modules/npm/man/man3/npm-load.3 +44 -0
- data/lib/node_modules/npm/man/man3/npm-ls.3 +86 -0
- data/lib/node_modules/npm/man/man3/npm-outdated.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-owner.3 +52 -0
- data/lib/node_modules/npm/man/man3/npm-pack.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-prefix.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm-prune.3 +27 -0
- data/lib/node_modules/npm/man/man3/npm-publish.3 +51 -0
- data/lib/node_modules/npm/man/man3/npm-rebuild.3 +22 -0
- data/lib/node_modules/npm/man/man3/npm-repo.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-restart.3 +37 -0
- data/lib/node_modules/npm/man/man3/npm-root.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm-run-script.3 +48 -0
- data/lib/node_modules/npm/man/man3/npm-search.3 +64 -0
- data/lib/node_modules/npm/man/man3/npm-shrinkwrap.3 +30 -0
- data/lib/node_modules/npm/man/man3/npm-start.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-stop.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-submodule.3 +42 -0
- data/lib/node_modules/npm/man/man3/npm-tag.3 +31 -0
- data/lib/node_modules/npm/man/man3/npm-test.3 +25 -0
- data/lib/node_modules/npm/man/man3/npm-uninstall.3 +25 -0
- data/lib/node_modules/npm/man/man3/npm-unpublish.3 +30 -0
- data/lib/node_modules/npm/man/man3/npm-update.3 +18 -0
- data/lib/node_modules/npm/man/man3/npm-version.3 +27 -0
- data/lib/node_modules/npm/man/man3/npm-view.3 +176 -0
- data/lib/node_modules/npm/man/man3/npm-whoami.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm.3 +162 -0
- data/lib/node_modules/npm/man/man5/npm-folders.5 +264 -0
- data/lib/node_modules/npm/man/man5/npm-global.5 +264 -0
- data/lib/node_modules/npm/man/man5/npm-json.5 +807 -0
- data/lib/node_modules/npm/man/man5/npmrc.5 +89 -0
- data/lib/node_modules/npm/man/man5/package.json.5 +807 -0
- data/lib/node_modules/npm/man/man7/npm-coding-style.7 +254 -0
- data/lib/node_modules/npm/man/man7/npm-config.7 +1445 -0
- data/lib/node_modules/npm/man/man7/npm-developers.7 +335 -0
- data/lib/node_modules/npm/man/man7/npm-disputes.7 +146 -0
- data/lib/node_modules/npm/man/man7/npm-faq.7 +479 -0
- data/lib/node_modules/npm/man/man7/npm-index.7 +307 -0
- data/lib/node_modules/npm/man/man7/npm-registry.7 +82 -0
- data/lib/node_modules/npm/man/man7/npm-scripts.7 +354 -0
- data/lib/node_modules/npm/man/man7/removing-npm.7 +107 -0
- data/lib/node_modules/npm/man/man7/semver.7 +172 -0
- data/lib/node_modules/npm/node_modules/abbrev/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/abbrev/README.md +23 -0
- data/lib/node_modules/npm/node_modules/abbrev/lib/abbrev.js +111 -0
- data/lib/node_modules/npm/node_modules/abbrev/package.json +25 -0
- data/lib/node_modules/npm/node_modules/ansi/README.md +91 -0
- data/lib/node_modules/npm/node_modules/ansi/color-spaces.pl +67 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/beep/index.js +16 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/clear/index.js +15 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/cursorPosition.js +32 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/progress/index.js +87 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/starwars.js +46 -0
- data/lib/node_modules/npm/node_modules/ansi/lib/ansi.js +405 -0
- data/lib/node_modules/npm/node_modules/ansi/lib/newlines.js +71 -0
- data/lib/node_modules/npm/node_modules/ansi/package.json +50 -0
- data/lib/node_modules/npm/node_modules/ansicolors/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ansicolors/README.md +62 -0
- data/lib/node_modules/npm/node_modules/ansicolors/ansicolors.js +65 -0
- data/lib/node_modules/npm/node_modules/ansicolors/package.json +34 -0
- data/lib/node_modules/npm/node_modules/ansistyles/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ansistyles/README.md +71 -0
- data/lib/node_modules/npm/node_modules/ansistyles/ansistyles.js +38 -0
- data/lib/node_modules/npm/node_modules/ansistyles/package.json +38 -0
- data/lib/node_modules/npm/node_modules/archy/README.markdown +92 -0
- data/lib/node_modules/npm/node_modules/archy/index.js +35 -0
- data/lib/node_modules/npm/node_modules/archy/package.json +52 -0
- data/lib/node_modules/npm/node_modules/block-stream/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/block-stream/README.md +14 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/block-stream-pause.js +70 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/block-stream.js +68 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/dropper-pause.js +70 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/dropper.js +68 -0
- data/lib/node_modules/npm/node_modules/block-stream/block-stream.js +209 -0
- data/lib/node_modules/npm/node_modules/block-stream/package.json +35 -0
- data/lib/node_modules/npm/node_modules/child-process-close/README.md +45 -0
- data/lib/node_modules/npm/node_modules/child-process-close/index.js +48 -0
- data/lib/node_modules/npm/node_modules/child-process-close/package.json +37 -0
- data/lib/node_modules/npm/node_modules/chmodr/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/chmodr/README.md +3 -0
- data/lib/node_modules/npm/node_modules/chmodr/chmodr.js +54 -0
- data/lib/node_modules/npm/node_modules/chmodr/package.json +28 -0
- data/lib/node_modules/npm/node_modules/chownr/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/chownr/README.md +3 -0
- data/lib/node_modules/npm/node_modules/chownr/chownr.js +41 -0
- data/lib/node_modules/npm/node_modules/chownr/package.json +42 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/README.md +42 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/index.js +180 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/package.json +35 -0
- data/lib/node_modules/npm/node_modules/columnify/Readme.md +189 -0
- data/lib/node_modules/npm/node_modules/columnify/index.js +210 -0
- data/lib/node_modules/npm/node_modules/columnify/package.json +42 -0
- data/lib/node_modules/npm/node_modules/columnify/utils.js +76 -0
- data/lib/node_modules/npm/node_modules/editor/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/editor/README.markdown +54 -0
- data/lib/node_modules/npm/node_modules/editor/example/beep.json +5 -0
- data/lib/node_modules/npm/node_modules/editor/example/edit.js +4 -0
- data/lib/node_modules/npm/node_modules/editor/index.js +26 -0
- data/lib/node_modules/npm/node_modules/editor/package.json +43 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/README.md +18 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/bundle.js +13 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/dir-tar.js +19 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/dir.js +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/example.js +12 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/ig-tar.js +19 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/tar.js +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/fstream-npm.js +323 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md +22 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js +13 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js +275 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json +40 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/package.json +27 -0
- data/lib/node_modules/npm/node_modules/fstream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/fstream/README.md +76 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/filter-pipe.js +131 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/pipe.js +115 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/reader.js +54 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/symlink-write.js +24 -0
- data/lib/node_modules/npm/node_modules/fstream/fstream.js +31 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/abstract.js +85 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/collect.js +67 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/dir-reader.js +251 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js +171 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/file-reader.js +147 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/file-writer.js +100 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/get-type.js +32 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/link-reader.js +54 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/link-writer.js +95 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/proxy-reader.js +93 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/proxy-writer.js +109 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/reader.js +260 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/socket-reader.js +38 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/writer.js +389 -0
- data/lib/node_modules/npm/node_modules/fstream/package.json +43 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/History.md +10 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/Makefile +5 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/Readme.md +41 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/index.js +12 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/package.json +31 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/test.js +40 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/README.md +14 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/index.js +9 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/package.json +33 -0
- data/lib/node_modules/npm/node_modules/glob/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/glob/README.md +250 -0
- data/lib/node_modules/npm/node_modules/glob/examples/g.js +9 -0
- data/lib/node_modules/npm/node_modules/glob/examples/usr-local.js +9 -0
- data/lib/node_modules/npm/node_modules/glob/glob.js +680 -0
- data/lib/node_modules/npm/node_modules/glob/package.json +39 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/README.md +26 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js +161 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/package.json +48 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js +228 -0
- data/lib/node_modules/npm/node_modules/inherits/LICENSE +16 -0
- data/lib/node_modules/npm/node_modules/inherits/README.md +42 -0
- data/lib/node_modules/npm/node_modules/inherits/inherits.js +1 -0
- data/lib/node_modules/npm/node_modules/inherits/inherits_browser.js +23 -0
- data/lib/node_modules/npm/node_modules/inherits/package.json +32 -0
- data/lib/node_modules/npm/node_modules/inherits/test.js +25 -0
- data/lib/node_modules/npm/node_modules/ini/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ini/README.md +79 -0
- data/lib/node_modules/npm/node_modules/ini/ini.js +166 -0
- data/lib/node_modules/npm/node_modules/ini/package.json +29 -0
- data/lib/node_modules/npm/node_modules/init-package-json/README.md +43 -0
- data/lib/node_modules/npm/node_modules/init-package-json/default-input.js +181 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-basic.js +8 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-default.js +7 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-npm.js +13 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/init/basic-init.js +1 -0
- data/lib/node_modules/npm/node_modules/init-package-json/init-package-json.js +129 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/README.md +133 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/index.js +11 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/README.md +8 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/init-input.js +191 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/init.js +37 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/package.json +10 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/substack-input.js +61 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/package.json +32 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/promzard.js +216 -0
- data/lib/node_modules/npm/node_modules/init-package-json/package.json +48 -0
- data/lib/node_modules/npm/node_modules/lockfile/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/lockfile/README.md +81 -0
- data/lib/node_modules/npm/node_modules/lockfile/lockfile.js +272 -0
- data/lib/node_modules/npm/node_modules/lockfile/package.json +45 -0
- data/lib/node_modules/npm/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/lib/node_modules/npm/node_modules/lru-cache/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/lru-cache/README.md +97 -0
- data/lib/node_modules/npm/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/lib/node_modules/npm/node_modules/lru-cache/package.json +33 -0
- data/lib/node_modules/npm/node_modules/minimatch/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/minimatch/README.md +218 -0
- data/lib/node_modules/npm/node_modules/minimatch/minimatch.js +1055 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/lib/node_modules/npm/node_modules/minimatch/package.json +40 -0
- data/lib/node_modules/npm/node_modules/mkdirp/LICENSE +21 -0
- data/lib/node_modules/npm/node_modules/mkdirp/README.markdown +63 -0
- data/lib/node_modules/npm/node_modules/mkdirp/examples/pow.js +6 -0
- data/lib/node_modules/npm/node_modules/mkdirp/index.js +82 -0
- data/lib/node_modules/npm/node_modules/mkdirp/package.json +33 -0
- data/lib/node_modules/npm/node_modules/node-gyp/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/node-gyp/README.md +163 -0
- data/lib/node_modules/npm/node_modules/node-gyp/addon.gypi +59 -0
- data/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js +133 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/AUTHORS +10 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/DEPS +24 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/OWNERS +1 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/PRESUBMIT.py +115 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py +148 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/codereview.settings +10 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +12 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp.bat +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_dummy.c +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py +18 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyptest.py +274 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +340 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +208 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +1051 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +1482 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +58 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +147 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +267 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +407 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +537 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py +513 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +72 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +157 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +103 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +49 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +1069 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +81 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +308 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +87 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +56 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +2172 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +3270 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +37 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +2150 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +44 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +1224 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +23 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +2809 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +90 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +264 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +870 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +160 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +176 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +1324 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +2888 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +69 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylintrc +307 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples +81 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples.bat +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/setup.py +19 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/README +15 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/README +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/README +12 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el +63 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/gyp.el +252 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp +1105 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified +1107 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/graphviz.py +100 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py +155 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py +168 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +329 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/build.js +275 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/clean.js +22 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js +344 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/install.js +362 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/list.js +33 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js +225 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/rebuild.js +16 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/remove.js +56 -0
- data/lib/node_modules/npm/node_modules/node-gyp/package.json +55 -0
- data/lib/node_modules/npm/node_modules/nopt/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/nopt/README.md +210 -0
- data/lib/node_modules/npm/node_modules/nopt/bin/nopt.js +51 -0
- data/lib/node_modules/npm/node_modules/nopt/examples/my-program.js +30 -0
- data/lib/node_modules/npm/node_modules/nopt/lib/nopt.js +407 -0
- data/lib/node_modules/npm/node_modules/nopt/package.json +39 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/LICENSE +234 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/README.md +25 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/index.js +146 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/package.json +43 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/README.md +176 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/index.js +55 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/adduser.js +138 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/bugs.js +9 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/deprecate.js +28 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js +184 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/publish.js +156 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js +270 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/star.js +29 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/stars.js +9 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/tag.js +6 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/unpublish.js +104 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/upload.js +22 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/package.json +43 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/README.md +6 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/npm-user-validate.js +49 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/package.json +37 -0
- data/lib/node_modules/npm/node_modules/npmconf/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npmconf/README.md +33 -0
- data/lib/node_modules/npm/node_modules/npmconf/config-defs.js +353 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/LICENCE +22 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/index.js +282 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md +3 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json +33 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js +81 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/package.json +32 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown +228 -0
- data/lib/node_modules/npm/node_modules/npmconf/npmconf.js +338 -0
- data/lib/node_modules/npm/node_modules/npmconf/package.json +50 -0
- data/lib/node_modules/npm/node_modules/npmlog/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npmlog/README.md +153 -0
- data/lib/node_modules/npm/node_modules/npmlog/example.js +39 -0
- data/lib/node_modules/npm/node_modules/npmlog/log.js +154 -0
- data/lib/node_modules/npm/node_modules/npmlog/package.json +32 -0
- data/lib/node_modules/npm/node_modules/once/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/once/README.md +51 -0
- data/lib/node_modules/npm/node_modules/once/once.js +20 -0
- data/lib/node_modules/npm/node_modules/once/package.json +39 -0
- data/lib/node_modules/npm/node_modules/opener/LICENSE.txt +14 -0
- data/lib/node_modules/npm/node_modules/opener/README.md +44 -0
- data/lib/node_modules/npm/node_modules/opener/opener.js +55 -0
- data/lib/node_modules/npm/node_modules/opener/package.json +34 -0
- data/lib/node_modules/npm/node_modules/osenv/LICENSE +25 -0
- data/lib/node_modules/npm/node_modules/osenv/README.md +63 -0
- data/lib/node_modules/npm/node_modules/osenv/osenv.js +80 -0
- data/lib/node_modules/npm/node_modules/osenv/package.json +38 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/LICENSE.txt +14 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/README.md +35 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/lib/path-is-inside.js +24 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-installed/LICENSE +16 -0
- data/lib/node_modules/npm/node_modules/read-installed/README.md +25 -0
- data/lib/node_modules/npm/node_modules/read-installed/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-installed/read-installed.js +338 -0
- data/lib/node_modules/npm/node_modules/read-package-json/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/read-package-json/README.md +166 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS +4 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/LICENSE +30 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md +101 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/core_module_names.json +29 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js +14 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js +392 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js +36 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/safe_format.js +9 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json +25 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/warning_messages.json +28 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json +53 -0
- data/lib/node_modules/npm/node_modules/read-package-json/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-package-json/read-json.js +368 -0
- data/lib/node_modules/npm/node_modules/read/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/read/README.md +53 -0
- data/lib/node_modules/npm/node_modules/read/example/example.js +13 -0
- data/lib/node_modules/npm/node_modules/read/lib/read.js +113 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/README.md +68 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/mute.js +140 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/package.json +37 -0
- data/lib/node_modules/npm/node_modules/read/package.json +35 -0
- data/lib/node_modules/npm/node_modules/read/rs.js +4 -0
- data/lib/node_modules/npm/node_modules/request/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/README.md +364 -0
- data/lib/node_modules/npm/node_modules/request/index.js +157 -0
- data/lib/node_modules/npm/node_modules/request/lib/copy.js +8 -0
- data/lib/node_modules/npm/node_modules/request/lib/debug.js +7 -0
- data/lib/node_modules/npm/node_modules/request/lib/getSafe.js +34 -0
- data/lib/node_modules/npm/node_modules/request/lib/optional.js +5 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/index.js +202 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/index.js +119 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/Readme.md +163 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/lib/form_data.js +325 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/README.md +1414 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/component.json +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +955 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +132 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +185 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +154 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +99 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +32 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/package.json +46 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/Makefile +10 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/README.md +627 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/example/usage.js +78 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/images/logo.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/browser.js +485 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/client.js +367 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/crypto.js +111 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/index.js +15 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/server.js +524 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/utils.js +183 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md +6 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +207 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json +47 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +6 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +68 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +48 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +33 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +10 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +436 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +132 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +585 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +68 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +16 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +25 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +409 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +48 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/package.json +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/README.md +75 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/http_signing.md +296 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/index.js +25 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/parser.js +304 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/signer.js +179 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/util.js +249 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/verify.js +42 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +50 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +27 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +267 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +317 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +172 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +296 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +126 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +196 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +71 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README +82 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +298 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +245 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +1485 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +944 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +241 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +129 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +839 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json +104 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js +39 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js +17 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js +15 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js +767 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js +753 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js +638 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js +101 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js +92 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js +451 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js +81 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js +95 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js +156 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js +50 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js +44 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js +42 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js +45 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js +128 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/package.json +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/README.md +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/package.json +33 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/stringify.js +39 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/test.js +128 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/README.md +66 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/mime.js +114 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/package.json +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/test.js +84 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/types/mime.types +1588 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/types/node.types +77 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/LICENSE.md +2 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/README.md +207 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/README.md +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +174 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +34 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +34 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +84 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/component.json +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/package.json +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/uuid.js +245 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/index.js +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/package.json +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/test.js +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/Readme.md +58 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/index.js +366 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/package.json +38 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/LICENSE +78 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/README.md +380 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +230 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js +947 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/memstore.js +102 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +69 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt +278 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +73 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +508 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js +2 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md +69 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php +38 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php +226 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php +442 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php +563 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/package.json +46 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/public-suffix.txt +5229 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/test.js +1340 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js +227 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/package.json +57 -0
- data/lib/node_modules/npm/node_modules/request/request.js +1260 -0
- data/lib/node_modules/npm/node_modules/retry/License +21 -0
- data/lib/node_modules/npm/node_modules/retry/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/retry/Readme.md +167 -0
- data/lib/node_modules/npm/node_modules/retry/equation.gif +0 -0
- data/lib/node_modules/npm/node_modules/retry/example/dns.js +31 -0
- data/lib/node_modules/npm/node_modules/retry/index.js +1 -0
- data/lib/node_modules/npm/node_modules/retry/lib/retry.js +50 -0
- data/lib/node_modules/npm/node_modules/retry/lib/retry_operation.js +109 -0
- data/lib/node_modules/npm/node_modules/retry/package.json +29 -0
- data/lib/node_modules/npm/node_modules/rimraf/AUTHORS +6 -0
- data/lib/node_modules/npm/node_modules/rimraf/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/rimraf/README.md +30 -0
- data/lib/node_modules/npm/node_modules/rimraf/bin.js +33 -0
- data/lib/node_modules/npm/node_modules/rimraf/package.json +56 -0
- data/lib/node_modules/npm/node_modules/rimraf/rimraf.js +178 -0
- data/lib/node_modules/npm/node_modules/semver/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/semver/Makefile +24 -0
- data/lib/node_modules/npm/node_modules/semver/README.md +142 -0
- data/lib/node_modules/npm/node_modules/semver/bin/semver +124 -0
- data/lib/node_modules/npm/node_modules/semver/foot.js +6 -0
- data/lib/node_modules/npm/node_modules/semver/head.js +2 -0
- data/lib/node_modules/npm/node_modules/semver/package.json +32 -0
- data/lib/node_modules/npm/node_modules/semver/semver.browser.js +1007 -0
- data/lib/node_modules/npm/node_modules/semver/semver.browser.js.gz +0 -0
- data/lib/node_modules/npm/node_modules/semver/semver.js +1011 -0
- data/lib/node_modules/npm/node_modules/semver/semver.min.js +1 -0
- data/lib/node_modules/npm/node_modules/semver/semver.min.js.gz +0 -0
- data/lib/node_modules/npm/node_modules/sha/LICENSE +46 -0
- data/lib/node_modules/npm/node_modules/sha/README.md +49 -0
- data/lib/node_modules/npm/node_modules/sha/index.js +120 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/README.md +768 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/duplex.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/float.patch +68 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js +69 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js +41 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js +927 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js +205 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js +369 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/package.json +36 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/passthrough.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/readable.js +6 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/transform.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/writable.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/package.json +32 -0
- data/lib/node_modules/npm/node_modules/slide/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/slide/README.md +143 -0
- data/lib/node_modules/npm/node_modules/slide/index.js +1 -0
- data/lib/node_modules/npm/node_modules/slide/lib/async-map-ordered.js +65 -0
- data/lib/node_modules/npm/node_modules/slide/lib/async-map.js +56 -0
- data/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js +16 -0
- data/lib/node_modules/npm/node_modules/slide/lib/chain.js +20 -0
- data/lib/node_modules/npm/node_modules/slide/lib/slide.js +3 -0
- data/lib/node_modules/npm/node_modules/slide/package.json +35 -0
- data/lib/node_modules/npm/node_modules/tar/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/tar/README.md +46 -0
- data/lib/node_modules/npm/node_modules/tar/examples/extracter.js +11 -0
- data/lib/node_modules/npm/node_modules/tar/examples/reader.js +36 -0
- data/lib/node_modules/npm/node_modules/tar/lib/buffer-entry.js +30 -0
- data/lib/node_modules/npm/node_modules/tar/lib/entry-writer.js +169 -0
- data/lib/node_modules/npm/node_modules/tar/lib/entry.js +213 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extended-header-writer.js +191 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extended-header.js +140 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extract.js +78 -0
- data/lib/node_modules/npm/node_modules/tar/lib/global-header-writer.js +14 -0
- data/lib/node_modules/npm/node_modules/tar/lib/header.js +385 -0
- data/lib/node_modules/npm/node_modules/tar/lib/pack.js +231 -0
- data/lib/node_modules/npm/node_modules/tar/lib/parse.js +270 -0
- data/lib/node_modules/npm/node_modules/tar/package.json +40 -0
- data/lib/node_modules/npm/node_modules/tar/tar.js +173 -0
- data/lib/node_modules/npm/node_modules/text-table/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/text-table/example/align.js +8 -0
- data/lib/node_modules/npm/node_modules/text-table/example/center.js +8 -0
- data/lib/node_modules/npm/node_modules/text-table/example/dotalign.js +9 -0
- data/lib/node_modules/npm/node_modules/text-table/example/doubledot.js +11 -0
- data/lib/node_modules/npm/node_modules/text-table/example/table.js +6 -0
- data/lib/node_modules/npm/node_modules/text-table/index.js +86 -0
- data/lib/node_modules/npm/node_modules/text-table/package.json +52 -0
- data/lib/node_modules/npm/node_modules/text-table/readme.markdown +134 -0
- data/lib/node_modules/npm/node_modules/uid-number/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/uid-number/README.md +17 -0
- data/lib/node_modules/npm/node_modules/uid-number/get-uid-gid.js +24 -0
- data/lib/node_modules/npm/node_modules/uid-number/package.json +35 -0
- data/lib/node_modules/npm/node_modules/uid-number/uid-number.js +54 -0
- data/lib/node_modules/npm/node_modules/which/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/which/README.md +5 -0
- data/lib/node_modules/npm/node_modules/which/bin/which +14 -0
- data/lib/node_modules/npm/node_modules/which/package.json +34 -0
- data/lib/node_modules/npm/node_modules/which/which.js +104 -0
- data/lib/node_modules/npm/package.json +155 -0
- data/lib/node_modules/npm/scripts/clean-old.sh +165 -0
- data/lib/node_modules/npm/scripts/doc-build.sh +84 -0
- data/lib/node_modules/npm/scripts/index-build.js +62 -0
- data/lib/node_modules/npm/scripts/install.sh +313 -0
- data/lib/node_modules/npm/scripts/release.sh +36 -0
- data/lib/node_modules/npm/scripts/relocate.sh +26 -0
- metadata +1052 -36
- checksums.yaml +0 -7
data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2010 Caolan McMahon
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/README.md
ADDED
@@ -0,0 +1,1414 @@
|
|
1
|
+
# Async.js
|
2
|
+
|
3
|
+
Async is a utility module which provides straight-forward, powerful functions
|
4
|
+
for working with asynchronous JavaScript. Although originally designed for
|
5
|
+
use with [node.js](http://nodejs.org), it can also be used directly in the
|
6
|
+
browser. Also supports [component](https://github.com/component/component).
|
7
|
+
|
8
|
+
Async provides around 20 functions that include the usual 'functional'
|
9
|
+
suspects (map, reduce, filter, each…) as well as some common patterns
|
10
|
+
for asynchronous control flow (parallel, series, waterfall…). All these
|
11
|
+
functions assume you follow the node.js convention of providing a single
|
12
|
+
callback as the last argument of your async function.
|
13
|
+
|
14
|
+
|
15
|
+
## Quick Examples
|
16
|
+
|
17
|
+
```javascript
|
18
|
+
async.map(['file1','file2','file3'], fs.stat, function(err, results){
|
19
|
+
// results is now an array of stats for each file
|
20
|
+
});
|
21
|
+
|
22
|
+
async.filter(['file1','file2','file3'], fs.exists, function(results){
|
23
|
+
// results now equals an array of the existing files
|
24
|
+
});
|
25
|
+
|
26
|
+
async.parallel([
|
27
|
+
function(){ ... },
|
28
|
+
function(){ ... }
|
29
|
+
], callback);
|
30
|
+
|
31
|
+
async.series([
|
32
|
+
function(){ ... },
|
33
|
+
function(){ ... }
|
34
|
+
]);
|
35
|
+
```
|
36
|
+
|
37
|
+
There are many more functions available so take a look at the docs below for a
|
38
|
+
full list. This module aims to be comprehensive, so if you feel anything is
|
39
|
+
missing please create a GitHub issue for it.
|
40
|
+
|
41
|
+
## Common Pitfalls
|
42
|
+
|
43
|
+
### Binding a context to an iterator
|
44
|
+
|
45
|
+
This section is really about bind, not about async. If you are wondering how to
|
46
|
+
make async execute your iterators in a given context, or are confused as to why
|
47
|
+
a method of another library isn't working as an iterator, study this example:
|
48
|
+
|
49
|
+
```js
|
50
|
+
// Here is a simple object with an (unnecessarily roundabout) squaring method
|
51
|
+
var AsyncSquaringLibrary = {
|
52
|
+
squareExponent: 2,
|
53
|
+
square: function(number, callback){
|
54
|
+
var result = Math.pow(number, this.squareExponent);
|
55
|
+
setTimeout(function(){
|
56
|
+
callback(null, result);
|
57
|
+
}, 200);
|
58
|
+
}
|
59
|
+
};
|
60
|
+
|
61
|
+
async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){
|
62
|
+
// result is [NaN, NaN, NaN]
|
63
|
+
// This fails because the `this.squareExponent` expression in the square
|
64
|
+
// function is not evaluated in the context of AsyncSquaringLibrary, and is
|
65
|
+
// therefore undefined.
|
66
|
+
});
|
67
|
+
|
68
|
+
async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){
|
69
|
+
// result is [1, 4, 9]
|
70
|
+
// With the help of bind we can attach a context to the iterator before
|
71
|
+
// passing it to async. Now the square function will be executed in its
|
72
|
+
// 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`
|
73
|
+
// will be as expected.
|
74
|
+
});
|
75
|
+
```
|
76
|
+
|
77
|
+
## Download
|
78
|
+
|
79
|
+
The source is available for download from
|
80
|
+
[GitHub](http://github.com/caolan/async).
|
81
|
+
Alternatively, you can install using Node Package Manager (npm):
|
82
|
+
|
83
|
+
npm install async
|
84
|
+
|
85
|
+
__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed
|
86
|
+
|
87
|
+
## In the Browser
|
88
|
+
|
89
|
+
So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:
|
90
|
+
|
91
|
+
```html
|
92
|
+
<script type="text/javascript" src="async.js"></script>
|
93
|
+
<script type="text/javascript">
|
94
|
+
|
95
|
+
async.map(data, asyncProcess, function(err, results){
|
96
|
+
alert(results);
|
97
|
+
});
|
98
|
+
|
99
|
+
</script>
|
100
|
+
```
|
101
|
+
|
102
|
+
## Documentation
|
103
|
+
|
104
|
+
### Collections
|
105
|
+
|
106
|
+
* [each](#each)
|
107
|
+
* [map](#map)
|
108
|
+
* [filter](#filter)
|
109
|
+
* [reject](#reject)
|
110
|
+
* [reduce](#reduce)
|
111
|
+
* [detect](#detect)
|
112
|
+
* [sortBy](#sortBy)
|
113
|
+
* [some](#some)
|
114
|
+
* [every](#every)
|
115
|
+
* [concat](#concat)
|
116
|
+
|
117
|
+
### Control Flow
|
118
|
+
|
119
|
+
* [series](#series)
|
120
|
+
* [parallel](#parallel)
|
121
|
+
* [whilst](#whilst)
|
122
|
+
* [doWhilst](#doWhilst)
|
123
|
+
* [until](#until)
|
124
|
+
* [doUntil](#doUntil)
|
125
|
+
* [forever](#forever)
|
126
|
+
* [waterfall](#waterfall)
|
127
|
+
* [compose](#compose)
|
128
|
+
* [applyEach](#applyEach)
|
129
|
+
* [queue](#queue)
|
130
|
+
* [cargo](#cargo)
|
131
|
+
* [auto](#auto)
|
132
|
+
* [iterator](#iterator)
|
133
|
+
* [apply](#apply)
|
134
|
+
* [nextTick](#nextTick)
|
135
|
+
* [times](#times)
|
136
|
+
* [timesSeries](#timesSeries)
|
137
|
+
|
138
|
+
### Utils
|
139
|
+
|
140
|
+
* [memoize](#memoize)
|
141
|
+
* [unmemoize](#unmemoize)
|
142
|
+
* [log](#log)
|
143
|
+
* [dir](#dir)
|
144
|
+
* [noConflict](#noConflict)
|
145
|
+
|
146
|
+
|
147
|
+
## Collections
|
148
|
+
|
149
|
+
<a name="forEach" />
|
150
|
+
<a name="each" />
|
151
|
+
### each(arr, iterator, callback)
|
152
|
+
|
153
|
+
Applies an iterator function to each item in an array, in parallel.
|
154
|
+
The iterator is called with an item from the list and a callback for when it
|
155
|
+
has finished. If the iterator passes an error to this callback, the main
|
156
|
+
callback for the each function is immediately called with the error.
|
157
|
+
|
158
|
+
Note, that since this function applies the iterator to each item in parallel
|
159
|
+
there is no guarantee that the iterator functions will complete in order.
|
160
|
+
|
161
|
+
__Arguments__
|
162
|
+
|
163
|
+
* arr - An array to iterate over.
|
164
|
+
* iterator(item, callback) - A function to apply to each item in the array.
|
165
|
+
The iterator is passed a callback(err) which must be called once it has
|
166
|
+
completed. If no error has occured, the callback should be run without
|
167
|
+
arguments or with an explicit null argument.
|
168
|
+
* callback(err) - A callback which is called after all the iterator functions
|
169
|
+
have finished, or an error has occurred.
|
170
|
+
|
171
|
+
__Example__
|
172
|
+
|
173
|
+
```js
|
174
|
+
// assuming openFiles is an array of file names and saveFile is a function
|
175
|
+
// to save the modified contents of that file:
|
176
|
+
|
177
|
+
async.each(openFiles, saveFile, function(err){
|
178
|
+
// if any of the saves produced an error, err would equal that error
|
179
|
+
});
|
180
|
+
```
|
181
|
+
|
182
|
+
---------------------------------------
|
183
|
+
|
184
|
+
<a name="forEachSeries" />
|
185
|
+
<a name="eachSeries" />
|
186
|
+
### eachSeries(arr, iterator, callback)
|
187
|
+
|
188
|
+
The same as each only the iterator is applied to each item in the array in
|
189
|
+
series. The next iterator is only called once the current one has completed
|
190
|
+
processing. This means the iterator functions will complete in order.
|
191
|
+
|
192
|
+
|
193
|
+
---------------------------------------
|
194
|
+
|
195
|
+
<a name="forEachLimit" />
|
196
|
+
<a name="eachLimit" />
|
197
|
+
### eachLimit(arr, limit, iterator, callback)
|
198
|
+
|
199
|
+
The same as each only no more than "limit" iterators will be simultaneously
|
200
|
+
running at any time.
|
201
|
+
|
202
|
+
Note that the items are not processed in batches, so there is no guarantee that
|
203
|
+
the first "limit" iterator functions will complete before any others are
|
204
|
+
started.
|
205
|
+
|
206
|
+
__Arguments__
|
207
|
+
|
208
|
+
* arr - An array to iterate over.
|
209
|
+
* limit - The maximum number of iterators to run at any time.
|
210
|
+
* iterator(item, callback) - A function to apply to each item in the array.
|
211
|
+
The iterator is passed a callback(err) which must be called once it has
|
212
|
+
completed. If no error has occured, the callback should be run without
|
213
|
+
arguments or with an explicit null argument.
|
214
|
+
* callback(err) - A callback which is called after all the iterator functions
|
215
|
+
have finished, or an error has occurred.
|
216
|
+
|
217
|
+
__Example__
|
218
|
+
|
219
|
+
```js
|
220
|
+
// Assume documents is an array of JSON objects and requestApi is a
|
221
|
+
// function that interacts with a rate-limited REST api.
|
222
|
+
|
223
|
+
async.eachLimit(documents, 20, requestApi, function(err){
|
224
|
+
// if any of the saves produced an error, err would equal that error
|
225
|
+
});
|
226
|
+
```
|
227
|
+
|
228
|
+
---------------------------------------
|
229
|
+
|
230
|
+
<a name="map" />
|
231
|
+
### map(arr, iterator, callback)
|
232
|
+
|
233
|
+
Produces a new array of values by mapping each value in the given array through
|
234
|
+
the iterator function. The iterator is called with an item from the array and a
|
235
|
+
callback for when it has finished processing. The callback takes 2 arguments,
|
236
|
+
an error and the transformed item from the array. If the iterator passes an
|
237
|
+
error to this callback, the main callback for the map function is immediately
|
238
|
+
called with the error.
|
239
|
+
|
240
|
+
Note, that since this function applies the iterator to each item in parallel
|
241
|
+
there is no guarantee that the iterator functions will complete in order, however
|
242
|
+
the results array will be in the same order as the original array.
|
243
|
+
|
244
|
+
__Arguments__
|
245
|
+
|
246
|
+
* arr - An array to iterate over.
|
247
|
+
* iterator(item, callback) - A function to apply to each item in the array.
|
248
|
+
The iterator is passed a callback(err, transformed) which must be called once
|
249
|
+
it has completed with an error (which can be null) and a transformed item.
|
250
|
+
* callback(err, results) - A callback which is called after all the iterator
|
251
|
+
functions have finished, or an error has occurred. Results is an array of the
|
252
|
+
transformed items from the original array.
|
253
|
+
|
254
|
+
__Example__
|
255
|
+
|
256
|
+
```js
|
257
|
+
async.map(['file1','file2','file3'], fs.stat, function(err, results){
|
258
|
+
// results is now an array of stats for each file
|
259
|
+
});
|
260
|
+
```
|
261
|
+
|
262
|
+
---------------------------------------
|
263
|
+
|
264
|
+
<a name="mapSeries" />
|
265
|
+
### mapSeries(arr, iterator, callback)
|
266
|
+
|
267
|
+
The same as map only the iterator is applied to each item in the array in
|
268
|
+
series. The next iterator is only called once the current one has completed
|
269
|
+
processing. The results array will be in the same order as the original.
|
270
|
+
|
271
|
+
|
272
|
+
---------------------------------------
|
273
|
+
|
274
|
+
<a name="mapLimit" />
|
275
|
+
### mapLimit(arr, limit, iterator, callback)
|
276
|
+
|
277
|
+
The same as map only no more than "limit" iterators will be simultaneously
|
278
|
+
running at any time.
|
279
|
+
|
280
|
+
Note that the items are not processed in batches, so there is no guarantee that
|
281
|
+
the first "limit" iterator functions will complete before any others are
|
282
|
+
started.
|
283
|
+
|
284
|
+
__Arguments__
|
285
|
+
|
286
|
+
* arr - An array to iterate over.
|
287
|
+
* limit - The maximum number of iterators to run at any time.
|
288
|
+
* iterator(item, callback) - A function to apply to each item in the array.
|
289
|
+
The iterator is passed a callback(err, transformed) which must be called once
|
290
|
+
it has completed with an error (which can be null) and a transformed item.
|
291
|
+
* callback(err, results) - A callback which is called after all the iterator
|
292
|
+
functions have finished, or an error has occurred. Results is an array of the
|
293
|
+
transformed items from the original array.
|
294
|
+
|
295
|
+
__Example__
|
296
|
+
|
297
|
+
```js
|
298
|
+
async.map(['file1','file2','file3'], 1, fs.stat, function(err, results){
|
299
|
+
// results is now an array of stats for each file
|
300
|
+
});
|
301
|
+
```
|
302
|
+
|
303
|
+
---------------------------------------
|
304
|
+
|
305
|
+
<a name="filter" />
|
306
|
+
### filter(arr, iterator, callback)
|
307
|
+
|
308
|
+
__Alias:__ select
|
309
|
+
|
310
|
+
Returns a new array of all the values which pass an async truth test.
|
311
|
+
_The callback for each iterator call only accepts a single argument of true or
|
312
|
+
false, it does not accept an error argument first!_ This is in-line with the
|
313
|
+
way node libraries work with truth tests like fs.exists. This operation is
|
314
|
+
performed in parallel, but the results array will be in the same order as the
|
315
|
+
original.
|
316
|
+
|
317
|
+
__Arguments__
|
318
|
+
|
319
|
+
* arr - An array to iterate over.
|
320
|
+
* iterator(item, callback) - A truth test to apply to each item in the array.
|
321
|
+
The iterator is passed a callback(truthValue) which must be called with a
|
322
|
+
boolean argument once it has completed.
|
323
|
+
* callback(results) - A callback which is called after all the iterator
|
324
|
+
functions have finished.
|
325
|
+
|
326
|
+
__Example__
|
327
|
+
|
328
|
+
```js
|
329
|
+
async.filter(['file1','file2','file3'], fs.exists, function(results){
|
330
|
+
// results now equals an array of the existing files
|
331
|
+
});
|
332
|
+
```
|
333
|
+
|
334
|
+
---------------------------------------
|
335
|
+
|
336
|
+
<a name="filterSeries" />
|
337
|
+
### filterSeries(arr, iterator, callback)
|
338
|
+
|
339
|
+
__alias:__ selectSeries
|
340
|
+
|
341
|
+
The same as filter only the iterator is applied to each item in the array in
|
342
|
+
series. The next iterator is only called once the current one has completed
|
343
|
+
processing. The results array will be in the same order as the original.
|
344
|
+
|
345
|
+
---------------------------------------
|
346
|
+
|
347
|
+
<a name="reject" />
|
348
|
+
### reject(arr, iterator, callback)
|
349
|
+
|
350
|
+
The opposite of filter. Removes values that pass an async truth test.
|
351
|
+
|
352
|
+
---------------------------------------
|
353
|
+
|
354
|
+
<a name="rejectSeries" />
|
355
|
+
### rejectSeries(arr, iterator, callback)
|
356
|
+
|
357
|
+
The same as reject, only the iterator is applied to each item in the array
|
358
|
+
in series.
|
359
|
+
|
360
|
+
|
361
|
+
---------------------------------------
|
362
|
+
|
363
|
+
<a name="reduce" />
|
364
|
+
### reduce(arr, memo, iterator, callback)
|
365
|
+
|
366
|
+
__aliases:__ inject, foldl
|
367
|
+
|
368
|
+
Reduces a list of values into a single value using an async iterator to return
|
369
|
+
each successive step. Memo is the initial state of the reduction. This
|
370
|
+
function only operates in series. For performance reasons, it may make sense to
|
371
|
+
split a call to this function into a parallel map, then use the normal
|
372
|
+
Array.prototype.reduce on the results. This function is for situations where
|
373
|
+
each step in the reduction needs to be async, if you can get the data before
|
374
|
+
reducing it then it's probably a good idea to do so.
|
375
|
+
|
376
|
+
__Arguments__
|
377
|
+
|
378
|
+
* arr - An array to iterate over.
|
379
|
+
* memo - The initial state of the reduction.
|
380
|
+
* iterator(memo, item, callback) - A function applied to each item in the
|
381
|
+
array to produce the next step in the reduction. The iterator is passed a
|
382
|
+
callback(err, reduction) which accepts an optional error as its first
|
383
|
+
argument, and the state of the reduction as the second. If an error is
|
384
|
+
passed to the callback, the reduction is stopped and the main callback is
|
385
|
+
immediately called with the error.
|
386
|
+
* callback(err, result) - A callback which is called after all the iterator
|
387
|
+
functions have finished. Result is the reduced value.
|
388
|
+
|
389
|
+
__Example__
|
390
|
+
|
391
|
+
```js
|
392
|
+
async.reduce([1,2,3], 0, function(memo, item, callback){
|
393
|
+
// pointless async:
|
394
|
+
process.nextTick(function(){
|
395
|
+
callback(null, memo + item)
|
396
|
+
});
|
397
|
+
}, function(err, result){
|
398
|
+
// result is now equal to the last value of memo, which is 6
|
399
|
+
});
|
400
|
+
```
|
401
|
+
|
402
|
+
---------------------------------------
|
403
|
+
|
404
|
+
<a name="reduceRight" />
|
405
|
+
### reduceRight(arr, memo, iterator, callback)
|
406
|
+
|
407
|
+
__Alias:__ foldr
|
408
|
+
|
409
|
+
Same as reduce, only operates on the items in the array in reverse order.
|
410
|
+
|
411
|
+
|
412
|
+
---------------------------------------
|
413
|
+
|
414
|
+
<a name="detect" />
|
415
|
+
### detect(arr, iterator, callback)
|
416
|
+
|
417
|
+
Returns the first value in a list that passes an async truth test. The
|
418
|
+
iterator is applied in parallel, meaning the first iterator to return true will
|
419
|
+
fire the detect callback with that result. That means the result might not be
|
420
|
+
the first item in the original array (in terms of order) that passes the test.
|
421
|
+
|
422
|
+
If order within the original array is important then look at detectSeries.
|
423
|
+
|
424
|
+
__Arguments__
|
425
|
+
|
426
|
+
* arr - An array to iterate over.
|
427
|
+
* iterator(item, callback) - A truth test to apply to each item in the array.
|
428
|
+
The iterator is passed a callback(truthValue) which must be called with a
|
429
|
+
boolean argument once it has completed.
|
430
|
+
* callback(result) - A callback which is called as soon as any iterator returns
|
431
|
+
true, or after all the iterator functions have finished. Result will be
|
432
|
+
the first item in the array that passes the truth test (iterator) or the
|
433
|
+
value undefined if none passed.
|
434
|
+
|
435
|
+
__Example__
|
436
|
+
|
437
|
+
```js
|
438
|
+
async.detect(['file1','file2','file3'], fs.exists, function(result){
|
439
|
+
// result now equals the first file in the list that exists
|
440
|
+
});
|
441
|
+
```
|
442
|
+
|
443
|
+
---------------------------------------
|
444
|
+
|
445
|
+
<a name="detectSeries" />
|
446
|
+
### detectSeries(arr, iterator, callback)
|
447
|
+
|
448
|
+
The same as detect, only the iterator is applied to each item in the array
|
449
|
+
in series. This means the result is always the first in the original array (in
|
450
|
+
terms of array order) that passes the truth test.
|
451
|
+
|
452
|
+
|
453
|
+
---------------------------------------
|
454
|
+
|
455
|
+
<a name="sortBy" />
|
456
|
+
### sortBy(arr, iterator, callback)
|
457
|
+
|
458
|
+
Sorts a list by the results of running each value through an async iterator.
|
459
|
+
|
460
|
+
__Arguments__
|
461
|
+
|
462
|
+
* arr - An array to iterate over.
|
463
|
+
* iterator(item, callback) - A function to apply to each item in the array.
|
464
|
+
The iterator is passed a callback(err, sortValue) which must be called once it
|
465
|
+
has completed with an error (which can be null) and a value to use as the sort
|
466
|
+
criteria.
|
467
|
+
* callback(err, results) - A callback which is called after all the iterator
|
468
|
+
functions have finished, or an error has occurred. Results is the items from
|
469
|
+
the original array sorted by the values returned by the iterator calls.
|
470
|
+
|
471
|
+
__Example__
|
472
|
+
|
473
|
+
```js
|
474
|
+
async.sortBy(['file1','file2','file3'], function(file, callback){
|
475
|
+
fs.stat(file, function(err, stats){
|
476
|
+
callback(err, stats.mtime);
|
477
|
+
});
|
478
|
+
}, function(err, results){
|
479
|
+
// results is now the original array of files sorted by
|
480
|
+
// modified date
|
481
|
+
});
|
482
|
+
```
|
483
|
+
|
484
|
+
---------------------------------------
|
485
|
+
|
486
|
+
<a name="some" />
|
487
|
+
### some(arr, iterator, callback)
|
488
|
+
|
489
|
+
__Alias:__ any
|
490
|
+
|
491
|
+
Returns true if at least one element in the array satisfies an async test.
|
492
|
+
_The callback for each iterator call only accepts a single argument of true or
|
493
|
+
false, it does not accept an error argument first!_ This is in-line with the
|
494
|
+
way node libraries work with truth tests like fs.exists. Once any iterator
|
495
|
+
call returns true, the main callback is immediately called.
|
496
|
+
|
497
|
+
__Arguments__
|
498
|
+
|
499
|
+
* arr - An array to iterate over.
|
500
|
+
* iterator(item, callback) - A truth test to apply to each item in the array.
|
501
|
+
The iterator is passed a callback(truthValue) which must be called with a
|
502
|
+
boolean argument once it has completed.
|
503
|
+
* callback(result) - A callback which is called as soon as any iterator returns
|
504
|
+
true, or after all the iterator functions have finished. Result will be
|
505
|
+
either true or false depending on the values of the async tests.
|
506
|
+
|
507
|
+
__Example__
|
508
|
+
|
509
|
+
```js
|
510
|
+
async.some(['file1','file2','file3'], fs.exists, function(result){
|
511
|
+
// if result is true then at least one of the files exists
|
512
|
+
});
|
513
|
+
```
|
514
|
+
|
515
|
+
---------------------------------------
|
516
|
+
|
517
|
+
<a name="every" />
|
518
|
+
### every(arr, iterator, callback)
|
519
|
+
|
520
|
+
__Alias:__ all
|
521
|
+
|
522
|
+
Returns true if every element in the array satisfies an async test.
|
523
|
+
_The callback for each iterator call only accepts a single argument of true or
|
524
|
+
false, it does not accept an error argument first!_ This is in-line with the
|
525
|
+
way node libraries work with truth tests like fs.exists.
|
526
|
+
|
527
|
+
__Arguments__
|
528
|
+
|
529
|
+
* arr - An array to iterate over.
|
530
|
+
* iterator(item, callback) - A truth test to apply to each item in the array.
|
531
|
+
The iterator is passed a callback(truthValue) which must be called with a
|
532
|
+
boolean argument once it has completed.
|
533
|
+
* callback(result) - A callback which is called after all the iterator
|
534
|
+
functions have finished. Result will be either true or false depending on
|
535
|
+
the values of the async tests.
|
536
|
+
|
537
|
+
__Example__
|
538
|
+
|
539
|
+
```js
|
540
|
+
async.every(['file1','file2','file3'], fs.exists, function(result){
|
541
|
+
// if result is true then every file exists
|
542
|
+
});
|
543
|
+
```
|
544
|
+
|
545
|
+
---------------------------------------
|
546
|
+
|
547
|
+
<a name="concat" />
|
548
|
+
### concat(arr, iterator, callback)
|
549
|
+
|
550
|
+
Applies an iterator to each item in a list, concatenating the results. Returns the
|
551
|
+
concatenated list. The iterators are called in parallel, and the results are
|
552
|
+
concatenated as they return. There is no guarantee that the results array will
|
553
|
+
be returned in the original order of the arguments passed to the iterator function.
|
554
|
+
|
555
|
+
__Arguments__
|
556
|
+
|
557
|
+
* arr - An array to iterate over
|
558
|
+
* iterator(item, callback) - A function to apply to each item in the array.
|
559
|
+
The iterator is passed a callback(err, results) which must be called once it
|
560
|
+
has completed with an error (which can be null) and an array of results.
|
561
|
+
* callback(err, results) - A callback which is called after all the iterator
|
562
|
+
functions have finished, or an error has occurred. Results is an array containing
|
563
|
+
the concatenated results of the iterator function.
|
564
|
+
|
565
|
+
__Example__
|
566
|
+
|
567
|
+
```js
|
568
|
+
async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){
|
569
|
+
// files is now a list of filenames that exist in the 3 directories
|
570
|
+
});
|
571
|
+
```
|
572
|
+
|
573
|
+
---------------------------------------
|
574
|
+
|
575
|
+
<a name="concatSeries" />
|
576
|
+
### concatSeries(arr, iterator, callback)
|
577
|
+
|
578
|
+
Same as async.concat, but executes in series instead of parallel.
|
579
|
+
|
580
|
+
|
581
|
+
## Control Flow
|
582
|
+
|
583
|
+
<a name="series" />
|
584
|
+
### series(tasks, [callback])
|
585
|
+
|
586
|
+
Run an array of functions in series, each one running once the previous
|
587
|
+
function has completed. If any functions in the series pass an error to its
|
588
|
+
callback, no more functions are run and the callback for the series is
|
589
|
+
immediately called with the value of the error. Once the tasks have completed,
|
590
|
+
the results are passed to the final callback as an array.
|
591
|
+
|
592
|
+
It is also possible to use an object instead of an array. Each property will be
|
593
|
+
run as a function and the results will be passed to the final callback as an object
|
594
|
+
instead of an array. This can be a more readable way of handling results from
|
595
|
+
async.series.
|
596
|
+
|
597
|
+
|
598
|
+
__Arguments__
|
599
|
+
|
600
|
+
* tasks - An array or object containing functions to run, each function is passed
|
601
|
+
a callback(err, result) it must call on completion with an error (which can
|
602
|
+
be null) and an optional result value.
|
603
|
+
* callback(err, results) - An optional callback to run once all the functions
|
604
|
+
have completed. This function gets a results array (or object) containing all
|
605
|
+
the result arguments passed to the task callbacks.
|
606
|
+
|
607
|
+
__Example__
|
608
|
+
|
609
|
+
```js
|
610
|
+
async.series([
|
611
|
+
function(callback){
|
612
|
+
// do some stuff ...
|
613
|
+
callback(null, 'one');
|
614
|
+
},
|
615
|
+
function(callback){
|
616
|
+
// do some more stuff ...
|
617
|
+
callback(null, 'two');
|
618
|
+
}
|
619
|
+
],
|
620
|
+
// optional callback
|
621
|
+
function(err, results){
|
622
|
+
// results is now equal to ['one', 'two']
|
623
|
+
});
|
624
|
+
|
625
|
+
|
626
|
+
// an example using an object instead of an array
|
627
|
+
async.series({
|
628
|
+
one: function(callback){
|
629
|
+
setTimeout(function(){
|
630
|
+
callback(null, 1);
|
631
|
+
}, 200);
|
632
|
+
},
|
633
|
+
two: function(callback){
|
634
|
+
setTimeout(function(){
|
635
|
+
callback(null, 2);
|
636
|
+
}, 100);
|
637
|
+
}
|
638
|
+
},
|
639
|
+
function(err, results) {
|
640
|
+
// results is now equal to: {one: 1, two: 2}
|
641
|
+
});
|
642
|
+
```
|
643
|
+
|
644
|
+
---------------------------------------
|
645
|
+
|
646
|
+
<a name="parallel" />
|
647
|
+
### parallel(tasks, [callback])
|
648
|
+
|
649
|
+
Run an array of functions in parallel, without waiting until the previous
|
650
|
+
function has completed. If any of the functions pass an error to its
|
651
|
+
callback, the main callback is immediately called with the value of the error.
|
652
|
+
Once the tasks have completed, the results are passed to the final callback as an
|
653
|
+
array.
|
654
|
+
|
655
|
+
It is also possible to use an object instead of an array. Each property will be
|
656
|
+
run as a function and the results will be passed to the final callback as an object
|
657
|
+
instead of an array. This can be a more readable way of handling results from
|
658
|
+
async.parallel.
|
659
|
+
|
660
|
+
|
661
|
+
__Arguments__
|
662
|
+
|
663
|
+
* tasks - An array or object containing functions to run, each function is passed
|
664
|
+
a callback(err, result) it must call on completion with an error (which can
|
665
|
+
be null) and an optional result value.
|
666
|
+
* callback(err, results) - An optional callback to run once all the functions
|
667
|
+
have completed. This function gets a results array (or object) containing all
|
668
|
+
the result arguments passed to the task callbacks.
|
669
|
+
|
670
|
+
__Example__
|
671
|
+
|
672
|
+
```js
|
673
|
+
async.parallel([
|
674
|
+
function(callback){
|
675
|
+
setTimeout(function(){
|
676
|
+
callback(null, 'one');
|
677
|
+
}, 200);
|
678
|
+
},
|
679
|
+
function(callback){
|
680
|
+
setTimeout(function(){
|
681
|
+
callback(null, 'two');
|
682
|
+
}, 100);
|
683
|
+
}
|
684
|
+
],
|
685
|
+
// optional callback
|
686
|
+
function(err, results){
|
687
|
+
// the results array will equal ['one','two'] even though
|
688
|
+
// the second function had a shorter timeout.
|
689
|
+
});
|
690
|
+
|
691
|
+
|
692
|
+
// an example using an object instead of an array
|
693
|
+
async.parallel({
|
694
|
+
one: function(callback){
|
695
|
+
setTimeout(function(){
|
696
|
+
callback(null, 1);
|
697
|
+
}, 200);
|
698
|
+
},
|
699
|
+
two: function(callback){
|
700
|
+
setTimeout(function(){
|
701
|
+
callback(null, 2);
|
702
|
+
}, 100);
|
703
|
+
}
|
704
|
+
},
|
705
|
+
function(err, results) {
|
706
|
+
// results is now equals to: {one: 1, two: 2}
|
707
|
+
});
|
708
|
+
```
|
709
|
+
|
710
|
+
---------------------------------------
|
711
|
+
|
712
|
+
<a name="parallel" />
|
713
|
+
### parallelLimit(tasks, limit, [callback])
|
714
|
+
|
715
|
+
The same as parallel only the tasks are executed in parallel with a maximum of "limit"
|
716
|
+
tasks executing at any time.
|
717
|
+
|
718
|
+
Note that the tasks are not executed in batches, so there is no guarantee that
|
719
|
+
the first "limit" tasks will complete before any others are started.
|
720
|
+
|
721
|
+
__Arguments__
|
722
|
+
|
723
|
+
* tasks - An array or object containing functions to run, each function is passed
|
724
|
+
a callback(err, result) it must call on completion with an error (which can
|
725
|
+
be null) and an optional result value.
|
726
|
+
* limit - The maximum number of tasks to run at any time.
|
727
|
+
* callback(err, results) - An optional callback to run once all the functions
|
728
|
+
have completed. This function gets a results array (or object) containing all
|
729
|
+
the result arguments passed to the task callbacks.
|
730
|
+
|
731
|
+
---------------------------------------
|
732
|
+
|
733
|
+
<a name="whilst" />
|
734
|
+
### whilst(test, fn, callback)
|
735
|
+
|
736
|
+
Repeatedly call fn, while test returns true. Calls the callback when stopped,
|
737
|
+
or an error occurs.
|
738
|
+
|
739
|
+
__Arguments__
|
740
|
+
|
741
|
+
* test() - synchronous truth test to perform before each execution of fn.
|
742
|
+
* fn(callback) - A function to call each time the test passes. The function is
|
743
|
+
passed a callback(err) which must be called once it has completed with an
|
744
|
+
optional error argument.
|
745
|
+
* callback(err) - A callback which is called after the test fails and repeated
|
746
|
+
execution of fn has stopped.
|
747
|
+
|
748
|
+
__Example__
|
749
|
+
|
750
|
+
```js
|
751
|
+
var count = 0;
|
752
|
+
|
753
|
+
async.whilst(
|
754
|
+
function () { return count < 5; },
|
755
|
+
function (callback) {
|
756
|
+
count++;
|
757
|
+
setTimeout(callback, 1000);
|
758
|
+
},
|
759
|
+
function (err) {
|
760
|
+
// 5 seconds have passed
|
761
|
+
}
|
762
|
+
);
|
763
|
+
```
|
764
|
+
|
765
|
+
---------------------------------------
|
766
|
+
|
767
|
+
<a name="doWhilst" />
|
768
|
+
### doWhilst(fn, test, callback)
|
769
|
+
|
770
|
+
The post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
|
771
|
+
|
772
|
+
---------------------------------------
|
773
|
+
|
774
|
+
<a name="until" />
|
775
|
+
### until(test, fn, callback)
|
776
|
+
|
777
|
+
Repeatedly call fn, until test returns true. Calls the callback when stopped,
|
778
|
+
or an error occurs.
|
779
|
+
|
780
|
+
The inverse of async.whilst.
|
781
|
+
|
782
|
+
---------------------------------------
|
783
|
+
|
784
|
+
<a name="doUntil" />
|
785
|
+
### doUntil(fn, test, callback)
|
786
|
+
|
787
|
+
Like doWhilst except the test is inverted. Note the argument ordering differs from `until`.
|
788
|
+
|
789
|
+
---------------------------------------
|
790
|
+
|
791
|
+
<a name="forever" />
|
792
|
+
### forever(fn, callback)
|
793
|
+
|
794
|
+
Calls the asynchronous function 'fn' repeatedly, in series, indefinitely.
|
795
|
+
If an error is passed to fn's callback then 'callback' is called with the
|
796
|
+
error, otherwise it will never be called.
|
797
|
+
|
798
|
+
---------------------------------------
|
799
|
+
|
800
|
+
<a name="waterfall" />
|
801
|
+
### waterfall(tasks, [callback])
|
802
|
+
|
803
|
+
Runs an array of functions in series, each passing their results to the next in
|
804
|
+
the array. However, if any of the functions pass an error to the callback, the
|
805
|
+
next function is not executed and the main callback is immediately called with
|
806
|
+
the error.
|
807
|
+
|
808
|
+
__Arguments__
|
809
|
+
|
810
|
+
* tasks - An array of functions to run, each function is passed a
|
811
|
+
callback(err, result1, result2, ...) it must call on completion. The first
|
812
|
+
argument is an error (which can be null) and any further arguments will be
|
813
|
+
passed as arguments in order to the next task.
|
814
|
+
* callback(err, [results]) - An optional callback to run once all the functions
|
815
|
+
have completed. This will be passed the results of the last task's callback.
|
816
|
+
|
817
|
+
|
818
|
+
|
819
|
+
__Example__
|
820
|
+
|
821
|
+
```js
|
822
|
+
async.waterfall([
|
823
|
+
function(callback){
|
824
|
+
callback(null, 'one', 'two');
|
825
|
+
},
|
826
|
+
function(arg1, arg2, callback){
|
827
|
+
callback(null, 'three');
|
828
|
+
},
|
829
|
+
function(arg1, callback){
|
830
|
+
// arg1 now equals 'three'
|
831
|
+
callback(null, 'done');
|
832
|
+
}
|
833
|
+
], function (err, result) {
|
834
|
+
// result now equals 'done'
|
835
|
+
});
|
836
|
+
```
|
837
|
+
|
838
|
+
---------------------------------------
|
839
|
+
<a name="compose" />
|
840
|
+
### compose(fn1, fn2...)
|
841
|
+
|
842
|
+
Creates a function which is a composition of the passed asynchronous
|
843
|
+
functions. Each function consumes the return value of the function that
|
844
|
+
follows. Composing functions f(), g() and h() would produce the result of
|
845
|
+
f(g(h())), only this version uses callbacks to obtain the return values.
|
846
|
+
|
847
|
+
Each function is executed with the `this` binding of the composed function.
|
848
|
+
|
849
|
+
__Arguments__
|
850
|
+
|
851
|
+
* functions... - the asynchronous functions to compose
|
852
|
+
|
853
|
+
|
854
|
+
__Example__
|
855
|
+
|
856
|
+
```js
|
857
|
+
function add1(n, callback) {
|
858
|
+
setTimeout(function () {
|
859
|
+
callback(null, n + 1);
|
860
|
+
}, 10);
|
861
|
+
}
|
862
|
+
|
863
|
+
function mul3(n, callback) {
|
864
|
+
setTimeout(function () {
|
865
|
+
callback(null, n * 3);
|
866
|
+
}, 10);
|
867
|
+
}
|
868
|
+
|
869
|
+
var add1mul3 = async.compose(mul3, add1);
|
870
|
+
|
871
|
+
add1mul3(4, function (err, result) {
|
872
|
+
// result now equals 15
|
873
|
+
});
|
874
|
+
```
|
875
|
+
|
876
|
+
---------------------------------------
|
877
|
+
<a name="applyEach" />
|
878
|
+
### applyEach(fns, args..., callback)
|
879
|
+
|
880
|
+
Applies the provided arguments to each function in the array, calling the
|
881
|
+
callback after all functions have completed. If you only provide the first
|
882
|
+
argument then it will return a function which lets you pass in the
|
883
|
+
arguments as if it were a single function call.
|
884
|
+
|
885
|
+
__Arguments__
|
886
|
+
|
887
|
+
* fns - the asynchronous functions to all call with the same arguments
|
888
|
+
* args... - any number of separate arguments to pass to the function
|
889
|
+
* callback - the final argument should be the callback, called when all
|
890
|
+
functions have completed processing
|
891
|
+
|
892
|
+
|
893
|
+
__Example__
|
894
|
+
|
895
|
+
```js
|
896
|
+
async.applyEach([enableSearch, updateSchema], 'bucket', callback);
|
897
|
+
|
898
|
+
// partial application example:
|
899
|
+
async.each(
|
900
|
+
buckets,
|
901
|
+
async.applyEach([enableSearch, updateSchema]),
|
902
|
+
callback
|
903
|
+
);
|
904
|
+
```
|
905
|
+
|
906
|
+
---------------------------------------
|
907
|
+
|
908
|
+
<a name="applyEachSeries" />
|
909
|
+
### applyEachSeries(arr, iterator, callback)
|
910
|
+
|
911
|
+
The same as applyEach only the functions are applied in series.
|
912
|
+
|
913
|
+
---------------------------------------
|
914
|
+
|
915
|
+
<a name="queue" />
|
916
|
+
### queue(worker, concurrency)
|
917
|
+
|
918
|
+
Creates a queue object with the specified concurrency. Tasks added to the
|
919
|
+
queue will be processed in parallel (up to the concurrency limit). If all
|
920
|
+
workers are in progress, the task is queued until one is available. Once
|
921
|
+
a worker has completed a task, the task's callback is called.
|
922
|
+
|
923
|
+
__Arguments__
|
924
|
+
|
925
|
+
* worker(task, callback) - An asynchronous function for processing a queued
|
926
|
+
task, which must call its callback(err) argument when finished, with an
|
927
|
+
optional error as an argument.
|
928
|
+
* concurrency - An integer for determining how many worker functions should be
|
929
|
+
run in parallel.
|
930
|
+
|
931
|
+
__Queue objects__
|
932
|
+
|
933
|
+
The queue object returned by this function has the following properties and
|
934
|
+
methods:
|
935
|
+
|
936
|
+
* length() - a function returning the number of items waiting to be processed.
|
937
|
+
* concurrency - an integer for determining how many worker functions should be
|
938
|
+
run in parallel. This property can be changed after a queue is created to
|
939
|
+
alter the concurrency on-the-fly.
|
940
|
+
* push(task, [callback]) - add a new task to the queue, the callback is called
|
941
|
+
once the worker has finished processing the task.
|
942
|
+
instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.
|
943
|
+
* unshift(task, [callback]) - add a new task to the front of the queue.
|
944
|
+
* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued
|
945
|
+
* empty - a callback that is called when the last item from the queue is given to a worker
|
946
|
+
* drain - a callback that is called when the last item from the queue has returned from the worker
|
947
|
+
|
948
|
+
__Example__
|
949
|
+
|
950
|
+
```js
|
951
|
+
// create a queue object with concurrency 2
|
952
|
+
|
953
|
+
var q = async.queue(function (task, callback) {
|
954
|
+
console.log('hello ' + task.name);
|
955
|
+
callback();
|
956
|
+
}, 2);
|
957
|
+
|
958
|
+
|
959
|
+
// assign a callback
|
960
|
+
q.drain = function() {
|
961
|
+
console.log('all items have been processed');
|
962
|
+
}
|
963
|
+
|
964
|
+
// add some items to the queue
|
965
|
+
|
966
|
+
q.push({name: 'foo'}, function (err) {
|
967
|
+
console.log('finished processing foo');
|
968
|
+
});
|
969
|
+
q.push({name: 'bar'}, function (err) {
|
970
|
+
console.log('finished processing bar');
|
971
|
+
});
|
972
|
+
|
973
|
+
// add some items to the queue (batch-wise)
|
974
|
+
|
975
|
+
q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {
|
976
|
+
console.log('finished processing bar');
|
977
|
+
});
|
978
|
+
|
979
|
+
// add some items to the front of the queue
|
980
|
+
|
981
|
+
q.unshift({name: 'bar'}, function (err) {
|
982
|
+
console.log('finished processing bar');
|
983
|
+
});
|
984
|
+
```
|
985
|
+
|
986
|
+
---------------------------------------
|
987
|
+
|
988
|
+
<a name="cargo" />
|
989
|
+
### cargo(worker, [payload])
|
990
|
+
|
991
|
+
Creates a cargo object with the specified payload. Tasks added to the
|
992
|
+
cargo will be processed altogether (up to the payload limit). If the
|
993
|
+
worker is in progress, the task is queued until it is available. Once
|
994
|
+
the worker has completed some tasks, each callback of those tasks is called.
|
995
|
+
|
996
|
+
__Arguments__
|
997
|
+
|
998
|
+
* worker(tasks, callback) - An asynchronous function for processing an array of
|
999
|
+
queued tasks, which must call its callback(err) argument when finished, with
|
1000
|
+
an optional error as an argument.
|
1001
|
+
* payload - An optional integer for determining how many tasks should be
|
1002
|
+
processed per round; if omitted, the default is unlimited.
|
1003
|
+
|
1004
|
+
__Cargo objects__
|
1005
|
+
|
1006
|
+
The cargo object returned by this function has the following properties and
|
1007
|
+
methods:
|
1008
|
+
|
1009
|
+
* length() - a function returning the number of items waiting to be processed.
|
1010
|
+
* payload - an integer for determining how many tasks should be
|
1011
|
+
process per round. This property can be changed after a cargo is created to
|
1012
|
+
alter the payload on-the-fly.
|
1013
|
+
* push(task, [callback]) - add a new task to the queue, the callback is called
|
1014
|
+
once the worker has finished processing the task.
|
1015
|
+
instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.
|
1016
|
+
* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued
|
1017
|
+
* empty - a callback that is called when the last item from the queue is given to a worker
|
1018
|
+
* drain - a callback that is called when the last item from the queue has returned from the worker
|
1019
|
+
|
1020
|
+
__Example__
|
1021
|
+
|
1022
|
+
```js
|
1023
|
+
// create a cargo object with payload 2
|
1024
|
+
|
1025
|
+
var cargo = async.cargo(function (tasks, callback) {
|
1026
|
+
for(var i=0; i<tasks.length; i++){
|
1027
|
+
console.log('hello ' + tasks[i].name);
|
1028
|
+
}
|
1029
|
+
callback();
|
1030
|
+
}, 2);
|
1031
|
+
|
1032
|
+
|
1033
|
+
// add some items
|
1034
|
+
|
1035
|
+
cargo.push({name: 'foo'}, function (err) {
|
1036
|
+
console.log('finished processing foo');
|
1037
|
+
});
|
1038
|
+
cargo.push({name: 'bar'}, function (err) {
|
1039
|
+
console.log('finished processing bar');
|
1040
|
+
});
|
1041
|
+
cargo.push({name: 'baz'}, function (err) {
|
1042
|
+
console.log('finished processing baz');
|
1043
|
+
});
|
1044
|
+
```
|
1045
|
+
|
1046
|
+
---------------------------------------
|
1047
|
+
|
1048
|
+
<a name="auto" />
|
1049
|
+
### auto(tasks, [callback])
|
1050
|
+
|
1051
|
+
Determines the best order for running functions based on their requirements.
|
1052
|
+
Each function can optionally depend on other functions being completed first,
|
1053
|
+
and each function is run as soon as its requirements are satisfied. If any of
|
1054
|
+
the functions pass an error to their callback, that function will not complete
|
1055
|
+
(so any other functions depending on it will not run) and the main callback
|
1056
|
+
will be called immediately with the error. Functions also receive an object
|
1057
|
+
containing the results of functions which have completed so far.
|
1058
|
+
|
1059
|
+
Note, all functions are called with a results object as a second argument,
|
1060
|
+
so it is unsafe to pass functions in the tasks object which cannot handle the
|
1061
|
+
extra argument. For example, this snippet of code:
|
1062
|
+
|
1063
|
+
```js
|
1064
|
+
async.auto({
|
1065
|
+
readData: async.apply(fs.readFile, 'data.txt', 'utf-8');
|
1066
|
+
}, callback);
|
1067
|
+
```
|
1068
|
+
|
1069
|
+
will have the effect of calling readFile with the results object as the last
|
1070
|
+
argument, which will fail:
|
1071
|
+
|
1072
|
+
```js
|
1073
|
+
fs.readFile('data.txt', 'utf-8', cb, {});
|
1074
|
+
```
|
1075
|
+
|
1076
|
+
Instead, wrap the call to readFile in a function which does not forward the
|
1077
|
+
results object:
|
1078
|
+
|
1079
|
+
```js
|
1080
|
+
async.auto({
|
1081
|
+
readData: function(cb, results){
|
1082
|
+
fs.readFile('data.txt', 'utf-8', cb);
|
1083
|
+
}
|
1084
|
+
}, callback);
|
1085
|
+
```
|
1086
|
+
|
1087
|
+
__Arguments__
|
1088
|
+
|
1089
|
+
* tasks - An object literal containing named functions or an array of
|
1090
|
+
requirements, with the function itself the last item in the array. The key
|
1091
|
+
used for each function or array is used when specifying requirements. The
|
1092
|
+
function receives two arguments: (1) a callback(err, result) which must be
|
1093
|
+
called when finished, passing an error (which can be null) and the result of
|
1094
|
+
the function's execution, and (2) a results object, containing the results of
|
1095
|
+
the previously executed functions.
|
1096
|
+
* callback(err, results) - An optional callback which is called when all the
|
1097
|
+
tasks have been completed. The callback will receive an error as an argument
|
1098
|
+
if any tasks pass an error to their callback. Results will always be passed
|
1099
|
+
but if an error occurred, no other tasks will be performed, and the results
|
1100
|
+
object will only contain partial results.
|
1101
|
+
|
1102
|
+
|
1103
|
+
__Example__
|
1104
|
+
|
1105
|
+
```js
|
1106
|
+
async.auto({
|
1107
|
+
get_data: function(callback){
|
1108
|
+
// async code to get some data
|
1109
|
+
},
|
1110
|
+
make_folder: function(callback){
|
1111
|
+
// async code to create a directory to store a file in
|
1112
|
+
// this is run at the same time as getting the data
|
1113
|
+
},
|
1114
|
+
write_file: ['get_data', 'make_folder', function(callback){
|
1115
|
+
// once there is some data and the directory exists,
|
1116
|
+
// write the data to a file in the directory
|
1117
|
+
callback(null, filename);
|
1118
|
+
}],
|
1119
|
+
email_link: ['write_file', function(callback, results){
|
1120
|
+
// once the file is written let's email a link to it...
|
1121
|
+
// results.write_file contains the filename returned by write_file.
|
1122
|
+
}]
|
1123
|
+
});
|
1124
|
+
```
|
1125
|
+
|
1126
|
+
This is a fairly trivial example, but to do this using the basic parallel and
|
1127
|
+
series functions would look like this:
|
1128
|
+
|
1129
|
+
```js
|
1130
|
+
async.parallel([
|
1131
|
+
function(callback){
|
1132
|
+
// async code to get some data
|
1133
|
+
},
|
1134
|
+
function(callback){
|
1135
|
+
// async code to create a directory to store a file in
|
1136
|
+
// this is run at the same time as getting the data
|
1137
|
+
}
|
1138
|
+
],
|
1139
|
+
function(err, results){
|
1140
|
+
async.series([
|
1141
|
+
function(callback){
|
1142
|
+
// once there is some data and the directory exists,
|
1143
|
+
// write the data to a file in the directory
|
1144
|
+
},
|
1145
|
+
function(callback){
|
1146
|
+
// once the file is written let's email a link to it...
|
1147
|
+
}
|
1148
|
+
]);
|
1149
|
+
});
|
1150
|
+
```
|
1151
|
+
|
1152
|
+
For a complicated series of async tasks using the auto function makes adding
|
1153
|
+
new tasks much easier and makes the code more readable.
|
1154
|
+
|
1155
|
+
|
1156
|
+
---------------------------------------
|
1157
|
+
|
1158
|
+
<a name="iterator" />
|
1159
|
+
### iterator(tasks)
|
1160
|
+
|
1161
|
+
Creates an iterator function which calls the next function in the array,
|
1162
|
+
returning a continuation to call the next one after that. It's also possible to
|
1163
|
+
'peek' the next iterator by doing iterator.next().
|
1164
|
+
|
1165
|
+
This function is used internally by the async module but can be useful when
|
1166
|
+
you want to manually control the flow of functions in series.
|
1167
|
+
|
1168
|
+
__Arguments__
|
1169
|
+
|
1170
|
+
* tasks - An array of functions to run.
|
1171
|
+
|
1172
|
+
__Example__
|
1173
|
+
|
1174
|
+
```js
|
1175
|
+
var iterator = async.iterator([
|
1176
|
+
function(){ sys.p('one'); },
|
1177
|
+
function(){ sys.p('two'); },
|
1178
|
+
function(){ sys.p('three'); }
|
1179
|
+
]);
|
1180
|
+
|
1181
|
+
node> var iterator2 = iterator();
|
1182
|
+
'one'
|
1183
|
+
node> var iterator3 = iterator2();
|
1184
|
+
'two'
|
1185
|
+
node> iterator3();
|
1186
|
+
'three'
|
1187
|
+
node> var nextfn = iterator2.next();
|
1188
|
+
node> nextfn();
|
1189
|
+
'three'
|
1190
|
+
```
|
1191
|
+
|
1192
|
+
---------------------------------------
|
1193
|
+
|
1194
|
+
<a name="apply" />
|
1195
|
+
### apply(function, arguments..)
|
1196
|
+
|
1197
|
+
Creates a continuation function with some arguments already applied, a useful
|
1198
|
+
shorthand when combined with other control flow functions. Any arguments
|
1199
|
+
passed to the returned function are added to the arguments originally passed
|
1200
|
+
to apply.
|
1201
|
+
|
1202
|
+
__Arguments__
|
1203
|
+
|
1204
|
+
* function - The function you want to eventually apply all arguments to.
|
1205
|
+
* arguments... - Any number of arguments to automatically apply when the
|
1206
|
+
continuation is called.
|
1207
|
+
|
1208
|
+
__Example__
|
1209
|
+
|
1210
|
+
```js
|
1211
|
+
// using apply
|
1212
|
+
|
1213
|
+
async.parallel([
|
1214
|
+
async.apply(fs.writeFile, 'testfile1', 'test1'),
|
1215
|
+
async.apply(fs.writeFile, 'testfile2', 'test2'),
|
1216
|
+
]);
|
1217
|
+
|
1218
|
+
|
1219
|
+
// the same process without using apply
|
1220
|
+
|
1221
|
+
async.parallel([
|
1222
|
+
function(callback){
|
1223
|
+
fs.writeFile('testfile1', 'test1', callback);
|
1224
|
+
},
|
1225
|
+
function(callback){
|
1226
|
+
fs.writeFile('testfile2', 'test2', callback);
|
1227
|
+
}
|
1228
|
+
]);
|
1229
|
+
```
|
1230
|
+
|
1231
|
+
It's possible to pass any number of additional arguments when calling the
|
1232
|
+
continuation:
|
1233
|
+
|
1234
|
+
```js
|
1235
|
+
node> var fn = async.apply(sys.puts, 'one');
|
1236
|
+
node> fn('two', 'three');
|
1237
|
+
one
|
1238
|
+
two
|
1239
|
+
three
|
1240
|
+
```
|
1241
|
+
|
1242
|
+
---------------------------------------
|
1243
|
+
|
1244
|
+
<a name="nextTick" />
|
1245
|
+
### nextTick(callback)
|
1246
|
+
|
1247
|
+
Calls the callback on a later loop around the event loop. In node.js this just
|
1248
|
+
calls process.nextTick, in the browser it falls back to setImmediate(callback)
|
1249
|
+
if available, otherwise setTimeout(callback, 0), which means other higher priority
|
1250
|
+
events may precede the execution of the callback.
|
1251
|
+
|
1252
|
+
This is used internally for browser-compatibility purposes.
|
1253
|
+
|
1254
|
+
__Arguments__
|
1255
|
+
|
1256
|
+
* callback - The function to call on a later loop around the event loop.
|
1257
|
+
|
1258
|
+
__Example__
|
1259
|
+
|
1260
|
+
```js
|
1261
|
+
var call_order = [];
|
1262
|
+
async.nextTick(function(){
|
1263
|
+
call_order.push('two');
|
1264
|
+
// call_order now equals ['one','two']
|
1265
|
+
});
|
1266
|
+
call_order.push('one')
|
1267
|
+
```
|
1268
|
+
|
1269
|
+
<a name="times" />
|
1270
|
+
### times(n, callback)
|
1271
|
+
|
1272
|
+
Calls the callback n times and accumulates results in the same manner
|
1273
|
+
you would use with async.map.
|
1274
|
+
|
1275
|
+
__Arguments__
|
1276
|
+
|
1277
|
+
* n - The number of times to run the function.
|
1278
|
+
* callback - The function to call n times.
|
1279
|
+
|
1280
|
+
__Example__
|
1281
|
+
|
1282
|
+
```js
|
1283
|
+
// Pretend this is some complicated async factory
|
1284
|
+
var createUser = function(id, callback) {
|
1285
|
+
callback(null, {
|
1286
|
+
id: 'user' + id
|
1287
|
+
})
|
1288
|
+
}
|
1289
|
+
// generate 5 users
|
1290
|
+
async.times(5, function(n, next){
|
1291
|
+
createUser(n, function(err, user) {
|
1292
|
+
next(err, user)
|
1293
|
+
})
|
1294
|
+
}, function(err, users) {
|
1295
|
+
// we should now have 5 users
|
1296
|
+
});
|
1297
|
+
```
|
1298
|
+
|
1299
|
+
<a name="timesSeries" />
|
1300
|
+
### timesSeries(n, callback)
|
1301
|
+
|
1302
|
+
The same as times only the iterator is applied to each item in the array in
|
1303
|
+
series. The next iterator is only called once the current one has completed
|
1304
|
+
processing. The results array will be in the same order as the original.
|
1305
|
+
|
1306
|
+
|
1307
|
+
## Utils
|
1308
|
+
|
1309
|
+
<a name="memoize" />
|
1310
|
+
### memoize(fn, [hasher])
|
1311
|
+
|
1312
|
+
Caches the results of an async function. When creating a hash to store function
|
1313
|
+
results against, the callback is omitted from the hash and an optional hash
|
1314
|
+
function can be used.
|
1315
|
+
|
1316
|
+
The cache of results is exposed as the `memo` property of the function returned
|
1317
|
+
by `memoize`.
|
1318
|
+
|
1319
|
+
__Arguments__
|
1320
|
+
|
1321
|
+
* fn - the function you to proxy and cache results from.
|
1322
|
+
* hasher - an optional function for generating a custom hash for storing
|
1323
|
+
results, it has all the arguments applied to it apart from the callback, and
|
1324
|
+
must be synchronous.
|
1325
|
+
|
1326
|
+
__Example__
|
1327
|
+
|
1328
|
+
```js
|
1329
|
+
var slow_fn = function (name, callback) {
|
1330
|
+
// do something
|
1331
|
+
callback(null, result);
|
1332
|
+
};
|
1333
|
+
var fn = async.memoize(slow_fn);
|
1334
|
+
|
1335
|
+
// fn can now be used as if it were slow_fn
|
1336
|
+
fn('some name', function () {
|
1337
|
+
// callback
|
1338
|
+
});
|
1339
|
+
```
|
1340
|
+
|
1341
|
+
<a name="unmemoize" />
|
1342
|
+
### unmemoize(fn)
|
1343
|
+
|
1344
|
+
Undoes a memoized function, reverting it to the original, unmemoized
|
1345
|
+
form. Comes handy in tests.
|
1346
|
+
|
1347
|
+
__Arguments__
|
1348
|
+
|
1349
|
+
* fn - the memoized function
|
1350
|
+
|
1351
|
+
<a name="log" />
|
1352
|
+
### log(function, arguments)
|
1353
|
+
|
1354
|
+
Logs the result of an async function to the console. Only works in node.js or
|
1355
|
+
in browsers that support console.log and console.error (such as FF and Chrome).
|
1356
|
+
If multiple arguments are returned from the async function, console.log is
|
1357
|
+
called on each argument in order.
|
1358
|
+
|
1359
|
+
__Arguments__
|
1360
|
+
|
1361
|
+
* function - The function you want to eventually apply all arguments to.
|
1362
|
+
* arguments... - Any number of arguments to apply to the function.
|
1363
|
+
|
1364
|
+
__Example__
|
1365
|
+
|
1366
|
+
```js
|
1367
|
+
var hello = function(name, callback){
|
1368
|
+
setTimeout(function(){
|
1369
|
+
callback(null, 'hello ' + name);
|
1370
|
+
}, 1000);
|
1371
|
+
};
|
1372
|
+
```
|
1373
|
+
```js
|
1374
|
+
node> async.log(hello, 'world');
|
1375
|
+
'hello world'
|
1376
|
+
```
|
1377
|
+
|
1378
|
+
---------------------------------------
|
1379
|
+
|
1380
|
+
<a name="dir" />
|
1381
|
+
### dir(function, arguments)
|
1382
|
+
|
1383
|
+
Logs the result of an async function to the console using console.dir to
|
1384
|
+
display the properties of the resulting object. Only works in node.js or
|
1385
|
+
in browsers that support console.dir and console.error (such as FF and Chrome).
|
1386
|
+
If multiple arguments are returned from the async function, console.dir is
|
1387
|
+
called on each argument in order.
|
1388
|
+
|
1389
|
+
__Arguments__
|
1390
|
+
|
1391
|
+
* function - The function you want to eventually apply all arguments to.
|
1392
|
+
* arguments... - Any number of arguments to apply to the function.
|
1393
|
+
|
1394
|
+
__Example__
|
1395
|
+
|
1396
|
+
```js
|
1397
|
+
var hello = function(name, callback){
|
1398
|
+
setTimeout(function(){
|
1399
|
+
callback(null, {hello: name});
|
1400
|
+
}, 1000);
|
1401
|
+
};
|
1402
|
+
```
|
1403
|
+
```js
|
1404
|
+
node> async.dir(hello, 'world');
|
1405
|
+
{hello: 'world'}
|
1406
|
+
```
|
1407
|
+
|
1408
|
+
---------------------------------------
|
1409
|
+
|
1410
|
+
<a name="noConflict" />
|
1411
|
+
### noConflict()
|
1412
|
+
|
1413
|
+
Changes the value of async back to its original value, returning a reference to the
|
1414
|
+
async object.
|