diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/.codeclimate.yml b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/.codeclimate.yml
new file mode 100644
index 00000000..7df06714
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/.codeclimate.yml
@@ -0,0 +1,7 @@
+languages:
+ TypeScript: true
+exclude_paths:
+- out/**/*
+- .vscode/*
+- images/*
+- typings/**/*
\ No newline at end of file
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/.travis.yml b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/.travis.yml
new file mode 100644
index 00000000..b85ca91b
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/.travis.yml
@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+ - "5.0"
+
+before_script:
+ - npm install -g gulp
+
+script:
+ - gulp
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/.vsixmanifest b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/.vsixmanifest
new file mode 100644
index 00000000..ec8ce584
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/.vsixmanifest
@@ -0,0 +1,32 @@
+
+
+
+
+ Rusty Code
+ Rust language integration for VSCode
+ vscode
+ Languages,Linters,Snippets
+ Public
+
+
+
+
+
+
+
+
+
+
+
+
+ extension/images/icon.png
+
+
+
+
+
+
+
+
+
+
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/CHANGELOG.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/CHANGELOG.md
new file mode 100644
index 00000000..e8bfb4ce
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/CHANGELOG.md
@@ -0,0 +1,119 @@
+# Changelog
+
+# 0.18.0
+- Added support for separate check command for libraries (@vhbit)
+- Added support for exit code 4 when using diff mode in recent(master) versions of rustfmt (@trixnz)
+
+# 0.17.0
+- Added support for `rustsym` version 0.3.0 which enables searching for macros (@trixnz)
+- Added support for JSON error format and new (RUST_NEW_ERROR_FORMAT=true) error style (@trixnz)
+
+# 0.16.1
+- Fixed bug with filter for formatting (@trixnz)
+
+# 0.16.0
+- Snippets! (@trixnz)
+- Fix for `rustsym` intergration
+
+# 0.15.1
+- Fixed a bug with check on save not working if formatting failed (@trixnz)
+
+# 0.15.0
+- Prevent the formatter from running on non-rust code files (@mooman219)
+- Support for `rustsym` (@trixnz)
+
+# 0.14.7
+- Fix for issue when returned by `rustfmt` error code `3` brokes formatting functionality integration (@trixnz)
+
+# 0.14.6
+- Fix for `rustfmt` integration (@nlordell)
+
+# 0.14.5
+- Small typo fix for settings description (@juanfra684)
+
+# 0.14.4
+- Fixes for `rustfmt` integration (@junjieliang)
+
+# 0.14.3
+- Small fixes for `cargoHomePath` setting (@saviorisdead)
+
+# 0.14.2
+- Fixed some issues with `rustfmt` (@Draivin)
+- Change extension options format (@fulmicoton)
+
+# 0.14.1
+- Preserve focus when opening `racer error` channel (@KalitaAlexey)
+
+# 0.14.0
+- Stabilized `rustfmt` functionality (@Draivin)
+- Bumped version of `vscode` engine (@Draivin)
+- Added option to specify `CARGO_HOME` via settings (@saviorisdead)
+
+## 0.13.1
+- Improved visual style of hover tooltips (@Draivin)
+
+## 0.13.0
+- Now it's possible to check Rust code with `cargo build` (@JohanSJA)
+- Moved indication for racer to status bar (@KalitaAlexey)
+
+## 0.12.0
+- Added ability to load and work on multiple crates in one workspace (@KalitaAlexey)
+- Added ability to display doc-comments in hover popup (@Soaa)
+- Added `help` and `note` modes to diagnostic detection (@swgillespie)
+- Various bug fixes and small improvements (@KalitaAlexey, @Soaa, )
+
+## 0.11.0
+- Added support for linting via `clippy` (@White-Oak)
+
+## 0.10.0
+- Added support for racer `tabbed text` mode.
+
+## 0.9.1
+- Fixed bug with missing commands (@KalitaAlexey)
+
+## 0.9.0
+- Removed unnecessary warnings (@KalitaAlexey)
+- Added some default key-bindings (@KalitaAlaexey)
+
+## 0.8.0
+- Added linting on save support (@White-Oak)
+
+## 0.7.1
+- Fixed bug with incorrect signature help (@henriiik)
+
+## 0.7.0
+- Added support for multiline function call signature help (@henriiik)
+
+## 0.6.0
+- Added cargo commands for examples (@KalitaAlexey)
+
+## 0.5.5
+- Fixed issue with racer crashing on parentheses (@saviorisdead)
+
+## 0.5.4
+- Show errors after failed `cargo build` (@henriiik)
+
+## 0.5.0
+- Added `cargo terminate` command (@Draivin)
+
+## 0.4.4
+- Added standard messaged for missing executables (@Draivin)
+
+## 0.4.3
+- Added `cargoPath` option to extenstion options (@saviorisdead)
+
+## 0.4.2
+- Clear diagnostic collection on cargo run (@saviorisdead)
+
+## 0.4.1
+- Spelling corrected (@skade, @CryZe, @crumblingstatue)
+- Added `cargo check` command and diagnostic handling to editor (@Draivin)
+- Added option to view full racer error and restart error automatically (@Draivin)
+
+## 0.4.0
+- Various fixes of rustfmt integration (@saviorisdead, @KalitaAlexey, @Draivin)
+- Cargo commands integration (@saviorisdead)
+- Tests for formatting (@Draivin)
+
+## 0.3.3
+- Fixed bug with formatting using 'rustfmt' (@Draivin)
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/LICENSE b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/LICENSE
new file mode 100644
index 00000000..ce33409f
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Constantine Akhantyev
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/README.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/README.md
new file mode 100644
index 00000000..2025d23e
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/README.md
@@ -0,0 +1,80 @@
+[![Build Status](https://travis-ci.org/saviorisdead/RustyCode.svg)](https://travis-ci.org/saviorisdead/RustyCode)
+
+# Rust for Visual Studio Code (Latest: 0.18.0)
+
+[Changelog](https://github.com/saviorisdead/RustyCode/blob/master/CHANGELOG.md)
+
+[Roadmap](https://github.com/saviorisdead/RustyCode/blob/master/ROADMAP.md)
+
+This extension adds advanced language support for the Rust language to VS Code, including:
+
+- Autocompletion (using `racer`)
+- Go To Definition (using `racer`)
+- Go To Symbol (using `rustsym`)
+- Format (using `rustfmt`)
+- Linter *checkOnSave is experimental*
+- Linting can be done via *checkWith is experimental*
+ - `check`. This is the default. Runs rust compiler but skips codegen pass.
+ - `check-lib`. As above, but is limited only to library if project has library + multiple binaries
+ - `clippy` if `cargo-clippy` is installed
+ - `build`
+- Cargo tasks (Open Command Pallete and they will be there)
+- Snippets
+
+
+### IDE Features
+![IDE](https://github.com/saviorisdead/RustyCode/raw/master/images/ide_features.png)
+
+## Using
+
+First, you will need to install Visual Studio Code `1.0` or newer. In the command pallete (`cmd-shift-p`) select `Install Extension` and choose `RustyCode`.
+
+Then, you need to install Racer (instructions and source code [here](https://github.com/phildawes/racer)). Please, note that we only support latest versions of `Racer`.
+
+Also, you need to install Rustfmt (instructions and source code [here](https://github.com/rust-lang-nursery/rustfmt))
+
+And last step is downloading Rust language source files from [here](https://github.com/rust-lang/rust).
+
+### Options
+
+The following Visual Studio Code settings are available for the RustyCode extension. These can be set in user preferences or workspace settings (`.vscode/settings.json`)
+
+```json
+{
+ "rust.racerPath": null, // Specifies path to Racer binary if it's not in PATH
+ "rust.rustLangSrcPath": null, // Specifies path to /src directory of local copy of Rust sources
+ "rust.rustfmtPath": null, // Specifies path to Rustfmt binary if it's not in PATH
+ "rust.rustsymPath": null, // Specifies path to Rustsym binary if it's not in PATH
+ "rust.cargoPath": null, // Specifies path to Cargo binary if it's not in PATH
+ "rust.cargoHomePath": null, // Path to Cargo home directory, mostly needed for racer. Needed only if using custom rust installation.
+ "rust.formatOnSave": false, // Turn on/off autoformatting file on save (EXPERIMENTAL)
+ "rust.checkOnSave": false, // Turn on/off `cargo check` project on save (EXPERIMENTAL)
+ "rust.checkWith": "build", // Specifies the linter to use. (EXPERIMENTAL)
+ "rust.useJsonErrors": false, // Enable the use of JSON errors (requires Rust 1.7+). Note: This is an unstable feature of Rust and is still in the process of being stablised
+ "rust.useNewErrorFormat": false, // "Use the new Rust error format (RUST_NEW_ERROR_FORMAT=true). Note: This flag is mutually exclusive with `useJsonErrors`.
+}
+```
+
+## Building and Debugging the Extension
+
+[Repository](https://github.com/saviorisdead/RustyCode)
+
+You can set up a development enviroment for debugging the extension during extension development.
+
+First make sure you do not have the extension installed in `~/.vscode/extensions`. Then clone the repo somewhere else on your machine, run `npm install` and open a development instance of Code.
+
+```bash
+rm -rf ~/.vscode/extensions/RustyCode
+cd ~
+git clone https://github.com/saviorisdead/RustyCode
+cd RustyCode
+npm install
+npm run-script compile
+code .
+```
+
+You can now go to the Debug viewlet and select `Launch Extension` then hit run (`F5`).
+If you make edits in the extension `.ts` files, just reload (`cmd-r`) the `[Extension Development Host]` instance of Code to load in the new extension code. The debugging instance will automatically reattach.
+
+## License
+[MIT](https://github.com/saviorisdead/RustyCode/blob/master/LICENSE)
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/ROADMAP.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/ROADMAP.md
new file mode 100644
index 00000000..856a3fbd
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/ROADMAP.md
@@ -0,0 +1,4 @@
+## Roadmap:
+- Debugging
+
+Pull requests with suggestions and implementations are welcome.
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/gulpfile.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/gulpfile.js
new file mode 100644
index 00000000..16def122
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/gulpfile.js
@@ -0,0 +1,20 @@
+var gulp = require('gulp');
+var tslint = require('gulp-tslint');
+var shell = require('gulp-shell');
+
+var files = {
+ src: 'src/**/*.ts',
+ test: 'test/**/*.ts'
+};
+
+gulp.task('compile', shell.task([
+ 'node ./node_modules/vscode/bin/compile -p ./'
+]));
+
+gulp.task('tslint', function() {
+ return gulp.src([files.src, files.test, '!test/index.ts'])
+ .pipe(tslint())
+ .pipe(tslint.report('verbose'));
+});
+
+gulp.task('default', ['compile', 'tslint']);
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/images/icon.png b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/images/icon.png
new file mode 100644
index 00000000..74b4bd69
Binary files /dev/null and b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/images/icon.png differ
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/images/ide_features.png b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/images/ide_features.png
new file mode 100644
index 00000000..b6a2104f
Binary files /dev/null and b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/images/ide_features.png differ
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/_mocha b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/_mocha
new file mode 100755
index 00000000..8a53888e
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/_mocha
@@ -0,0 +1,499 @@
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander'),
+ path = require('path'),
+ fs = require('fs'),
+ resolve = path.resolve,
+ exists = fs.existsSync || path.existsSync,
+ Mocha = require('../'),
+ utils = Mocha.utils,
+ join = path.join,
+ cwd = process.cwd(),
+ getOptions = require('./options'),
+ mocha = new Mocha;
+
+/**
+ * Save timer references to avoid Sinon interfering (see GH-237).
+ */
+
+var Date = global.Date
+ , setTimeout = global.setTimeout
+ , setInterval = global.setInterval
+ , clearTimeout = global.clearTimeout
+ , clearInterval = global.clearInterval;
+
+/**
+ * Files.
+ */
+
+var files = [];
+
+/**
+ * Globals.
+ */
+
+var globals = [];
+
+/**
+ * Requires.
+ */
+
+var requires = [];
+
+/**
+ * Images.
+ */
+
+var images = {
+ fail: __dirname + '/../images/error.png'
+ , pass: __dirname + '/../images/ok.png'
+};
+
+// options
+
+program
+ .version(JSON.parse(fs.readFileSync(__dirname + '/../package.json', 'utf8')).version)
+ .usage('[debug] [options] [files]')
+ .option('-A, --async-only', "force all tests to take a callback (async) or return a promise")
+ .option('-c, --colors', 'force enabling of colors')
+ .option('-C, --no-colors', 'force disabling of colors')
+ .option('-G, --growl', 'enable growl notification support')
+ .option('-O, --reporter-options ', 'reporter-specific options')
+ .option('-R, --reporter ', 'specify the reporter to use', 'spec')
+ .option('-S, --sort', "sort test files")
+ .option('-b, --bail', "bail after first test failure")
+ .option('-d, --debug', "enable node's debugger, synonym for node --debug")
+ .option('-g, --grep ', 'only run tests matching ')
+ .option('-f, --fgrep ', 'only run tests containing ')
+ .option('-gc, --expose-gc', 'expose gc extension')
+ .option('-i, --invert', 'inverts --grep and --fgrep matches')
+ .option('-r, --require ', 'require the given module')
+ .option('-s, --slow ', '"slow" test threshold in milliseconds [75]')
+ .option('-t, --timeout ', 'set test-case timeout in milliseconds [2000]')
+ .option('-u, --ui ', 'specify user-interface (bdd|tdd|exports)', 'bdd')
+ .option('-w, --watch', 'watch files for changes')
+ .option('--check-leaks', 'check for global variable leaks')
+ .option('--full-trace', 'display the full stack trace')
+ .option('--compilers :,...', 'use the given module(s) to compile files', list, [])
+ .option('--debug-brk', "enable node's debugger breaking on the first line")
+ .option('--globals ', 'allow the given comma-delimited global [names]', list, [])
+ .option('--es_staging', 'enable all staged features')
+ .option('--harmony<_classes,_generators,...>', 'all node --harmony* flags are available')
+ .option('--inline-diffs', 'display actual/expected differences inline within each string')
+ .option('--interfaces', 'display available interfaces')
+ .option('--no-deprecation', 'silence deprecation warnings')
+ .option('--no-exit', 'require a clean shutdown of the event loop: mocha will not call process.exit')
+ .option('--no-timeouts', 'disables timeouts, given implicitly with --debug')
+ .option('--opts ', 'specify opts path', 'test/mocha.opts')
+ .option('--perf-basic-prof', 'enable perf linux profiler (basic support)')
+ .option('--prof', 'log statistical profiling information')
+ .option('--log-timer-events', 'Time events including external callbacks')
+ .option('--recursive', 'include sub directories')
+ .option('--reporters', 'display available reporters')
+ .option('--retries ', 'set numbers of time to retry a failed test case')
+ .option('--throw-deprecation', 'throw an exception anytime a deprecated function is used')
+ .option('--trace', 'trace function calls')
+ .option('--trace-deprecation', 'show stack traces on deprecations')
+ .option('--use_strict', 'enforce strict mode')
+ .option('--watch-extensions ,...', 'additional extensions to monitor with --watch', list, [])
+ .option('--delay', 'wait for async suite definition')
+
+program.name = 'mocha';
+
+// init command
+
+program
+ .command('init ')
+ .description('initialize a client-side mocha setup at ')
+ .action(function(path){
+ var mkdir = require('mkdirp');
+ mkdir.sync(path);
+ var css = fs.readFileSync(join(__dirname, '..', 'mocha.css'));
+ var js = fs.readFileSync(join(__dirname, '..', 'mocha.js'));
+ var tmpl = fs.readFileSync(join(__dirname, '..', 'lib/template.html'));
+ fs.writeFileSync(join(path, 'mocha.css'), css);
+ fs.writeFileSync(join(path, 'mocha.js'), js);
+ fs.writeFileSync(join(path, 'tests.js'), '');
+ fs.writeFileSync(join(path, 'index.html'), tmpl);
+ process.exit(0);
+ });
+
+// --globals
+
+program.on('globals', function(val){
+ globals = globals.concat(list(val));
+});
+
+// --reporters
+
+program.on('reporters', function(){
+ console.log();
+ console.log(' dot - dot matrix');
+ console.log(' doc - html documentation');
+ console.log(' spec - hierarchical spec list');
+ console.log(' json - single json object');
+ console.log(' progress - progress bar');
+ console.log(' list - spec-style listing');
+ console.log(' tap - test-anything-protocol');
+ console.log(' landing - unicode landing strip');
+ console.log(' xunit - xunit reporter');
+ console.log(' html-cov - HTML test coverage');
+ console.log(' json-cov - JSON test coverage');
+ console.log(' min - minimal reporter (great with --watch)');
+ console.log(' json-stream - newline delimited json events');
+ console.log(' markdown - markdown documentation (github flavour)');
+ console.log(' nyan - nyan cat!');
+ console.log();
+ process.exit();
+});
+
+// --interfaces
+
+program.on('interfaces', function(){
+ console.log('');
+ console.log(' bdd');
+ console.log(' tdd');
+ console.log(' qunit');
+ console.log(' exports');
+ console.log('');
+ process.exit();
+});
+
+// -r, --require
+
+module.paths.push(cwd, join(cwd, 'node_modules'));
+
+program.on('require', function(mod){
+ var abs = exists(mod) || exists(mod + '.js');
+ if (abs) mod = resolve(mod);
+ requires.push(mod);
+});
+
+// If not already done, load mocha.opts
+if (!process.env.LOADED_MOCHA_OPTS) {
+ getOptions();
+}
+
+// parse args
+
+program.parse(process.argv);
+
+// infinite stack traces
+
+Error.stackTraceLimit = Infinity; // TODO: config
+
+// reporter options
+
+var reporterOptions = {};
+if (program.reporterOptions !== undefined) {
+ program.reporterOptions.split(",").forEach(function(opt) {
+ var L = opt.split("=");
+ if (L.length > 2 || L.length === 0) {
+ throw new Error("invalid reporter option '" + opt + "'");
+ } else if (L.length === 2) {
+ reporterOptions[L[0]] = L[1];
+ } else {
+ reporterOptions[L[0]] = true;
+ }
+ });
+}
+
+// reporter
+
+mocha.reporter(program.reporter, reporterOptions);
+
+// load reporter
+
+var Reporter = null;
+try {
+ Reporter = require('../lib/reporters/' + program.reporter);
+} catch (err) {
+ try {
+ Reporter = require(program.reporter);
+ } catch (err) {
+ throw new Error('reporter "' + program.reporter + '" does not exist');
+ }
+}
+
+// --no-colors
+
+if (!program.colors) mocha.useColors(false);
+
+// --colors
+
+if (~process.argv.indexOf('--colors') ||
+ ~process.argv.indexOf('-c')) {
+ mocha.useColors(true);
+}
+
+// --inline-diffs
+
+if (program.inlineDiffs) mocha.useInlineDiffs(true);
+
+// --slow
+
+if (program.slow) mocha.suite.slow(program.slow);
+
+// --no-timeouts
+
+if (!program.timeouts) mocha.enableTimeouts(false);
+
+// --timeout
+
+if (program.timeout) mocha.suite.timeout(program.timeout);
+
+// --bail
+
+mocha.suite.bail(program.bail);
+
+// --grep
+
+if (program.grep) mocha.grep(new RegExp(program.grep));
+
+// --fgrep
+
+if (program.fgrep) mocha.grep(program.fgrep);
+
+// --invert
+
+if (program.invert) mocha.invert();
+
+// --check-leaks
+
+if (program.checkLeaks) mocha.checkLeaks();
+
+// --stack-trace
+
+if(program.fullTrace) mocha.fullTrace();
+
+// --growl
+
+if (program.growl) mocha.growl();
+
+// --async-only
+
+if (program.asyncOnly) mocha.asyncOnly();
+
+// --delay
+
+if (program.delay) mocha.delay();
+
+// --globals
+
+mocha.globals(globals);
+
+// --retries
+
+if (program.retries) mocha.suite.retries(program.retries);
+
+// custom compiler support
+
+var extensions = ['js'];
+program.compilers.forEach(function(c) {
+ var compiler = c.split(':')
+ , ext = compiler[0]
+ , mod = compiler[1];
+
+ if (mod[0] == '.') mod = join(process.cwd(), mod);
+ require(mod);
+ extensions.push(ext);
+ program.watchExtensions.push(ext);
+});
+
+// requires
+
+requires.forEach(function(mod) {
+ require(mod);
+});
+
+// interface
+
+mocha.ui(program.ui);
+
+//args
+
+var args = program.args;
+
+// default files to test/*.{js,coffee}
+
+if (!args.length) args.push('test');
+
+args.forEach(function(arg){
+ files = files.concat(utils.lookupFiles(arg, extensions, program.recursive));
+});
+
+// resolve
+
+files = files.map(function(path){
+ return resolve(path);
+});
+
+if (program.sort) {
+ files.sort();
+}
+
+// --watch
+
+var runner;
+if (program.watch) {
+ console.log();
+ hideCursor();
+ process.on('SIGINT', function(){
+ showCursor();
+ console.log('\n');
+ process.exit();
+ });
+
+
+ var watchFiles = utils.files(cwd, [ 'js' ].concat(program.watchExtensions));
+ var runAgain = false;
+
+ function loadAndRun() {
+ try {
+ mocha.files = files;
+ runAgain = false;
+ runner = mocha.run(function(){
+ runner = null;
+ if (runAgain) {
+ rerun();
+ }
+ });
+ } catch(e) {
+ console.log(e.stack);
+ }
+ }
+
+ function purge() {
+ watchFiles.forEach(function(file){
+ delete require.cache[file];
+ });
+ }
+
+ loadAndRun();
+
+ function rerun() {
+ purge();
+ stop()
+ if (!program.grep)
+ mocha.grep(null);
+ mocha.suite = mocha.suite.clone();
+ mocha.suite.ctx = new Mocha.Context;
+ mocha.ui(program.ui);
+ loadAndRun();
+ }
+
+ utils.watch(watchFiles, function(){
+ runAgain = true;
+ if (runner) {
+ runner.abort();
+ } else {
+ rerun();
+ }
+ });
+
+} else {
+
+// load
+
+ mocha.files = files;
+ runner = mocha.run(program.exit ? exit : exitLater);
+
+}
+
+function exitLater(code) {
+ process.on('exit', function() { process.exit(code) })
+}
+
+function exit(code) {
+ // flush output for Node.js Windows pipe bug
+ // https://github.com/joyent/node/issues/6247 is just one bug example
+ // https://github.com/visionmedia/mocha/issues/333 has a good discussion
+ function done() {
+ if (!(draining--)) process.exit(code);
+ }
+
+ var draining = 0;
+ var streams = [process.stdout, process.stderr];
+
+ streams.forEach(function(stream){
+ // submit empty write request and wait for completion
+ draining += 1;
+ stream.write('', done);
+ });
+
+ done();
+}
+
+process.on('SIGINT', function() { runner.abort(); })
+
+// enable growl notifications
+
+function growl(runner, reporter) {
+ var notify = require('growl');
+
+ runner.on('end', function(){
+ var stats = reporter.stats;
+ if (stats.failures) {
+ var msg = stats.failures + ' of ' + runner.total + ' tests failed';
+ notify(msg, { name: 'mocha', title: 'Failed', image: images.fail });
+ } else {
+ notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {
+ name: 'mocha'
+ , title: 'Passed'
+ , image: images.pass
+ });
+ }
+ });
+}
+
+/**
+ * Parse list.
+ */
+
+function list(str) {
+ return str.split(/ *, */);
+}
+
+/**
+ * Hide the cursor.
+ */
+
+function hideCursor(){
+ process.stdout.write('\u001b[?25l');
+}
+
+/**
+ * Show the cursor.
+ */
+
+function showCursor(){
+ process.stdout.write('\u001b[?25h');
+}
+
+/**
+ * Stop play()ing.
+ */
+
+function stop() {
+ process.stdout.write('\u001b[2K');
+ clearInterval(play.timer);
+}
+
+/**
+ * Play the given array of strings.
+ */
+
+function play(arr, interval) {
+ var len = arr.length
+ , interval = interval || 100
+ , i = 0;
+
+ play.timer = setInterval(function(){
+ var str = arr[i++ % len];
+ process.stdout.write('\u001b[0G' + str);
+ }, interval);
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/dateformat b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/dateformat
new file mode 100755
index 00000000..e095ddc6
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/dateformat
@@ -0,0 +1,75 @@
+#!/usr/bin/env node
+/**
+ * dateformat
+ *
+ * Copyright (c) 2014 Charlike Mike Reagent (cli), contributors.
+ * Released under the MIT license.
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ */
+
+var dateFormat = require('../lib/dateformat');
+var meow = require('meow');
+var stdin = require('get-stdin');
+
+var cli = meow({
+ pkg: '../package.json',
+ help: [
+ 'Options',
+ ' --help Show this help',
+ ' --version Current version of package',
+ ' -d | --date Date that want to format (Date object as Number or String)',
+ ' -m | --mask Mask that will use to format the date',
+ ' -u | --utc Convert local time to UTC time or use `UTC:` prefix in mask',
+ ' -g | --gmt You can use `GMT:` prefix in mask',
+ '',
+ 'Usage',
+ ' dateformat [date] [mask]',
+ ' dateformat "Nov 26 2014" "fullDate"',
+ ' dateformat 1416985417095 "dddd, mmmm dS, yyyy, h:MM:ss TT"',
+ ' dateformat 1315361943159 "W"',
+ ' dateformat "UTC:h:MM:ss TT Z"',
+ ' dateformat "longTime" true',
+ ' dateformat "longTime" false true',
+ ' dateformat "Jun 9 2007" "fullDate" true',
+ ' date +%s | dateformat',
+ ''
+ ].join('\n')
+})
+
+var date = cli.input[0] || cli.flags.d || cli.flags.date || Date.now();
+var mask = cli.input[1] || cli.flags.m || cli.flags.mask || dateFormat.masks.default;
+var utc = cli.input[2] || cli.flags.u || cli.flags.utc || false;
+var gmt = cli.input[3] || cli.flags.g || cli.flags.gmt || false;
+
+utc = utc === 'true' ? true : false;
+gmt = gmt === 'true' ? true : false;
+
+if (!cli.input.length) {
+ stdin(function(date) {
+ console.log(dateFormat(date, dateFormat.masks.default, utc, gmt));
+ });
+ return;
+}
+
+if (cli.input.length === 1 && date) {
+ mask = date;
+ date = Date.now();
+ console.log(dateFormat(date, mask, utc, gmt));
+ return;
+}
+
+if (cli.input.length >= 2 && date && mask) {
+ if (mask === 'true' || mask === 'false') {
+ utc = mask === 'true' ? true : false;
+ gmt = !utc;
+ mask = date
+ date = Date.now();
+ }
+ console.log(dateFormat(date, mask, utc, gmt));
+ return;
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/gulp b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/gulp
new file mode 100755
index 00000000..a5374c11
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/gulp
@@ -0,0 +1,212 @@
+#!/usr/bin/env node
+
+'use strict';
+var gutil = require('gulp-util');
+var prettyTime = require('pretty-hrtime');
+var chalk = require('chalk');
+var semver = require('semver');
+var archy = require('archy');
+var Liftoff = require('liftoff');
+var tildify = require('tildify');
+var interpret = require('interpret');
+var v8flags = require('v8flags');
+var completion = require('../lib/completion');
+var argv = require('minimist')(process.argv.slice(2));
+var taskTree = require('../lib/taskTree');
+
+// Set env var for ORIGINAL cwd
+// before anything touches it
+process.env.INIT_CWD = process.cwd();
+
+var cli = new Liftoff({
+ name: 'gulp',
+ completions: completion,
+ extensions: interpret.jsVariants,
+ v8flags: v8flags,
+});
+
+// Exit with 0 or 1
+var failed = false;
+process.once('exit', function(code) {
+ if (code === 0 && failed) {
+ process.exit(1);
+ }
+});
+
+// Parse those args m8
+var cliPackage = require('../package');
+var versionFlag = argv.v || argv.version;
+var tasksFlag = argv.T || argv.tasks;
+var tasks = argv._;
+var toRun = tasks.length ? tasks : ['default'];
+
+// This is a hold-over until we have a better logging system
+// with log levels
+var simpleTasksFlag = argv['tasks-simple'];
+var shouldLog = !argv.silent && !simpleTasksFlag;
+
+if (!shouldLog) {
+ gutil.log = function() {};
+}
+
+cli.on('require', function(name) {
+ gutil.log('Requiring external module', chalk.magenta(name));
+});
+
+cli.on('requireFail', function(name) {
+ gutil.log(chalk.red('Failed to load external module'), chalk.magenta(name));
+});
+
+cli.on('respawn', function(flags, child) {
+ var nodeFlags = chalk.magenta(flags.join(', '));
+ var pid = chalk.magenta(child.pid);
+ gutil.log('Node flags detected:', nodeFlags);
+ gutil.log('Respawned to PID:', pid);
+});
+
+cli.launch({
+ cwd: argv.cwd,
+ configPath: argv.gulpfile,
+ require: argv.require,
+ completion: argv.completion,
+}, handleArguments);
+
+// The actual logic
+function handleArguments(env) {
+ if (versionFlag && tasks.length === 0) {
+ gutil.log('CLI version', cliPackage.version);
+ if (env.modulePackage && typeof env.modulePackage.version !== 'undefined') {
+ gutil.log('Local version', env.modulePackage.version);
+ }
+ process.exit(0);
+ }
+
+ if (!env.modulePath) {
+ gutil.log(
+ chalk.red('Local gulp not found in'),
+ chalk.magenta(tildify(env.cwd))
+ );
+ gutil.log(chalk.red('Try running: npm install gulp'));
+ process.exit(1);
+ }
+
+ if (!env.configPath) {
+ gutil.log(chalk.red('No gulpfile found'));
+ process.exit(1);
+ }
+
+ // Check for semver difference between cli and local installation
+ if (semver.gt(cliPackage.version, env.modulePackage.version)) {
+ gutil.log(chalk.red('Warning: gulp version mismatch:'));
+ gutil.log(chalk.red('Global gulp is', cliPackage.version));
+ gutil.log(chalk.red('Local gulp is', env.modulePackage.version));
+ }
+
+ // Chdir before requiring gulpfile to make sure
+ // we let them chdir as needed
+ if (process.cwd() !== env.cwd) {
+ process.chdir(env.cwd);
+ gutil.log(
+ 'Working directory changed to',
+ chalk.magenta(tildify(env.cwd))
+ );
+ }
+
+ // This is what actually loads up the gulpfile
+ require(env.configPath);
+ gutil.log('Using gulpfile', chalk.magenta(tildify(env.configPath)));
+
+ var gulpInst = require(env.modulePath);
+ logEvents(gulpInst);
+
+ process.nextTick(function() {
+ if (simpleTasksFlag) {
+ return logTasksSimple(env, gulpInst);
+ }
+ if (tasksFlag) {
+ return logTasks(env, gulpInst);
+ }
+ gulpInst.start.apply(gulpInst, toRun);
+ });
+}
+
+function logTasks(env, localGulp) {
+ var tree = taskTree(localGulp.tasks);
+ tree.label = 'Tasks for ' + chalk.magenta(tildify(env.configPath));
+ archy(tree)
+ .split('\n')
+ .forEach(function(v) {
+ if (v.trim().length === 0) {
+ return;
+ }
+ gutil.log(v);
+ });
+}
+
+function logTasksSimple(env, localGulp) {
+ console.log(Object.keys(localGulp.tasks)
+ .join('\n')
+ .trim());
+}
+
+// Format orchestrator errors
+function formatError(e) {
+ if (!e.err) {
+ return e.message;
+ }
+
+ // PluginError
+ if (typeof e.err.showStack === 'boolean') {
+ return e.err.toString();
+ }
+
+ // Normal error
+ if (e.err.stack) {
+ return e.err.stack;
+ }
+
+ // Unknown (string, number, etc.)
+ return new Error(String(e.err)).stack;
+}
+
+// Wire up logging events
+function logEvents(gulpInst) {
+
+ // Total hack due to poor error management in orchestrator
+ gulpInst.on('err', function() {
+ failed = true;
+ });
+
+ gulpInst.on('task_start', function(e) {
+ // TODO: batch these
+ // so when 5 tasks start at once it only logs one time with all 5
+ gutil.log('Starting', '\'' + chalk.cyan(e.task) + '\'...');
+ });
+
+ gulpInst.on('task_stop', function(e) {
+ var time = prettyTime(e.hrDuration);
+ gutil.log(
+ 'Finished', '\'' + chalk.cyan(e.task) + '\'',
+ 'after', chalk.magenta(time)
+ );
+ });
+
+ gulpInst.on('task_err', function(e) {
+ var msg = formatError(e);
+ var time = prettyTime(e.hrDuration);
+ gutil.log(
+ '\'' + chalk.cyan(e.task) + '\'',
+ chalk.red('errored after'),
+ chalk.magenta(time)
+ );
+ gutil.log(msg);
+ });
+
+ gulpInst.on('task_not_found', function(err) {
+ gutil.log(
+ chalk.red('Task \'' + err.task + '\' is not in your gulpfile')
+ );
+ gutil.log('Please check the documentation for proper gulpfile formatting');
+ process.exit(1);
+ });
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/har-validator b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/har-validator
new file mode 100755
index 00000000..ab1db256
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/har-validator
@@ -0,0 +1,45 @@
+#!/usr/bin/env node
+
+'use strict'
+
+var Promise = require('bluebird')
+
+var chalk = require('chalk')
+var cmd = require('commander')
+var fs = Promise.promisifyAll(require('fs'))
+var path = require('path')
+var pkg = require('../package.json')
+var validate = Promise.promisifyAll(require('..'))
+
+cmd
+ .version(pkg.version)
+ .usage('[options] ')
+ .option('-s, --schema [name]', 'validate schema name (log, request, response, etc ...)')
+ .parse(process.argv)
+
+if (!cmd.args.length) {
+ cmd.help()
+}
+
+if (!cmd.schema) {
+ cmd.schema = 'har'
+}
+
+cmd.args.map(function (fileName) {
+ var file = chalk.yellow.italic(path.basename(fileName))
+
+ fs.readFileAsync(fileName)
+ .then(JSON.parse)
+ .then(validate[cmd.schema + 'Async'])
+ .then(function () {
+ console.log('%s [%s] is valid', chalk.green('✓'), file)
+ })
+ .catch(SyntaxError, function (e) {
+ console.error('%s [%s] failed to read JSON: %s', chalk.red('✖'), file, chalk.red(e.message))
+ })
+ .catch(function (e) {
+ e.errors.map(function (err) {
+ console.error('%s [%s] failed validation: (%s: %s) %s', chalk.red('✖'), file, chalk.cyan.italic(err.field), chalk.magenta.italic(err.value), chalk.red(err.message))
+ })
+ })
+})
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/jade b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/jade
new file mode 100755
index 00000000..7e6002f9
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/jade
@@ -0,0 +1,147 @@
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs')
+ , program = require('commander')
+ , path = require('path')
+ , basename = path.basename
+ , dirname = path.dirname
+ , resolve = path.resolve
+ , join = path.join
+ , mkdirp = require('mkdirp')
+ , jade = require('../');
+
+// jade options
+
+var options = {};
+
+// options
+
+program
+ .version(jade.version)
+ .usage('[options] [dir|file ...]')
+ .option('-o, --obj ', 'javascript options object')
+ .option('-O, --out ', 'output the compiled html to ')
+ .option('-p, --path ', 'filename used to resolve includes')
+ .option('-P, --pretty', 'compile pretty html output')
+ .option('-c, --client', 'compile for client-side runtime.js')
+ .option('-D, --no-debug', 'compile without debugging (smaller functions)')
+
+program.on('--help', function(){
+ console.log(' Examples:');
+ console.log('');
+ console.log(' # translate jade the templates dir');
+ console.log(' $ jade templates');
+ console.log('');
+ console.log(' # create {foo,bar}.html');
+ console.log(' $ jade {foo,bar}.jade');
+ console.log('');
+ console.log(' # jade over stdio');
+ console.log(' $ jade < my.jade > my.html');
+ console.log('');
+ console.log(' # jade over stdio');
+ console.log(' $ echo "h1 Jade!" | jade');
+ console.log('');
+ console.log(' # foo, bar dirs rendering to /tmp');
+ console.log(' $ jade foo bar --out /tmp ');
+ console.log('');
+});
+
+program.parse(process.argv);
+
+// options given, parse them
+
+if (program.obj) options = eval('(' + program.obj + ')');
+
+// --filename
+
+if (program.path) options.filename = program.path;
+
+// --no-debug
+
+options.compileDebug = program.debug;
+
+// --client
+
+options.client = program.client;
+
+// --pretty
+
+options.pretty = program.pretty;
+
+// left-over args are file paths
+
+var files = program.args;
+
+// compile files
+
+if (files.length) {
+ console.log();
+ files.forEach(renderFile);
+ process.on('exit', console.log);
+// stdio
+} else {
+ stdin();
+}
+
+/**
+ * Compile from stdin.
+ */
+
+function stdin() {
+ var buf = '';
+ process.stdin.setEncoding('utf8');
+ process.stdin.on('data', function(chunk){ buf += chunk; });
+ process.stdin.on('end', function(){
+ var fn = jade.compile(buf, options);
+ var output = options.client
+ ? fn.toString()
+ : fn(options);
+ process.stdout.write(output);
+ }).resume();
+}
+
+/**
+ * Process the given path, compiling the jade files found.
+ * Always walk the subdirectories.
+ */
+
+function renderFile(path) {
+ var re = /\.jade$/;
+ fs.lstat(path, function(err, stat) {
+ if (err) throw err;
+ // Found jade file
+ if (stat.isFile() && re.test(path)) {
+ fs.readFile(path, 'utf8', function(err, str){
+ if (err) throw err;
+ options.filename = path;
+ var fn = jade.compile(str, options);
+ var extname = options.client ? '.js' : '.html';
+ path = path.replace(re, extname);
+ if (program.out) path = join(program.out, basename(path));
+ var dir = resolve(dirname(path));
+ mkdirp(dir, 0755, function(err){
+ if (err) throw err;
+ var output = options.client
+ ? fn.toString()
+ : fn(options);
+ fs.writeFile(path, output, function(err){
+ if (err) throw err;
+ console.log(' \033[90mrendered \033[36m%s\033[0m', path);
+ });
+ });
+ });
+ // Found directory
+ } else if (stat.isDirectory()) {
+ fs.readdir(path, function(err, files) {
+ if (err) throw err;
+ files.map(function(filename) {
+ return path + '/' + filename;
+ }).forEach(renderFile);
+ });
+ }
+ });
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/mkdirp b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/mkdirp
new file mode 100755
index 00000000..d95de15a
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/mkdirp
@@ -0,0 +1,33 @@
+#!/usr/bin/env node
+
+var mkdirp = require('../');
+var minimist = require('minimist');
+var fs = require('fs');
+
+var argv = minimist(process.argv.slice(2), {
+ alias: { m: 'mode', h: 'help' },
+ string: [ 'mode' ]
+});
+if (argv.help) {
+ fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
+ return;
+}
+
+var paths = argv._.slice();
+var mode = argv.mode ? parseInt(argv.mode, 8) : undefined;
+
+(function next () {
+ if (paths.length === 0) return;
+ var p = paths.shift();
+
+ if (mode === undefined) mkdirp(p, cb)
+ else mkdirp(p, mode, cb)
+
+ function cb (err) {
+ if (err) {
+ console.error(err.message);
+ process.exit(1);
+ }
+ else next();
+ }
+})();
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/mocha b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/mocha
new file mode 100755
index 00000000..3a392379
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/mocha
@@ -0,0 +1,72 @@
+#!/usr/bin/env node
+
+/**
+ * This tiny wrapper file checks for known node flags and appends them
+ * when found, before invoking the "real" _mocha(1) executable.
+ */
+
+var spawn = require('child_process').spawn,
+ path = require('path'),
+ fs = require('fs'),
+ getOptions = require('./options'),
+ args = [path.join(__dirname, '_mocha')];
+
+// Load mocha.opts into process.argv
+// Must be loaded here to handle node-specific options
+getOptions();
+
+process.argv.slice(2).forEach(function(arg){
+ var flag = arg.split('=')[0];
+
+ switch (flag) {
+ case '-d':
+ args.unshift('--debug');
+ args.push('--no-timeouts');
+ break;
+ case 'debug':
+ case '--debug':
+ case '--debug-brk':
+ args.unshift(arg);
+ args.push('--no-timeouts');
+ break;
+ case '-gc':
+ case '--expose-gc':
+ args.unshift('--expose-gc');
+ break;
+ case '--gc-global':
+ case '--es_staging':
+ case '--no-deprecation':
+ case '--prof':
+ case '--log-timer-events':
+ case '--throw-deprecation':
+ case '--trace-deprecation':
+ case '--use_strict':
+ case '--allow-natives-syntax':
+ case '--perf-basic-prof':
+ args.unshift(arg);
+ break;
+ default:
+ if (0 == arg.indexOf('--harmony')) args.unshift(arg);
+ else if (0 == arg.indexOf('--trace')) args.unshift(arg);
+ else if (0 == arg.indexOf('--max-old-space-size')) args.unshift(arg);
+ else args.push(arg);
+ break;
+ }
+});
+
+var proc = spawn(process.execPath, args, { stdio: 'inherit' });
+proc.on('exit', function (code, signal) {
+ process.on('exit', function(){
+ if (signal) {
+ process.kill(process.pid, signal);
+ } else {
+ process.exit(code);
+ }
+ });
+});
+
+// terminate children.
+process.on('SIGINT', function () {
+ proc.kill('SIGINT'); // calls runner.abort()
+ proc.kill('SIGTERM'); // if that didn't work, we're probably in an infinite loop, so make it die.
+});
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/semver b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/semver
new file mode 100755
index 00000000..c5f2e857
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/semver
@@ -0,0 +1,133 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+var argv = process.argv.slice(2)
+ , versions = []
+ , range = []
+ , gt = []
+ , lt = []
+ , eq = []
+ , inc = null
+ , version = require("../package.json").version
+ , loose = false
+ , identifier = undefined
+ , semver = require("../semver")
+ , reverse = false
+
+main()
+
+function main () {
+ if (!argv.length) return help()
+ while (argv.length) {
+ var a = argv.shift()
+ var i = a.indexOf('=')
+ if (i !== -1) {
+ a = a.slice(0, i)
+ argv.unshift(a.slice(i + 1))
+ }
+ switch (a) {
+ case "-rv": case "-rev": case "--rev": case "--reverse":
+ reverse = true
+ break
+ case "-l": case "--loose":
+ loose = true
+ break
+ case "-v": case "--version":
+ versions.push(argv.shift())
+ break
+ case "-i": case "--inc": case "--increment":
+ switch (argv[0]) {
+ case "major": case "minor": case "patch": case "prerelease":
+ case "premajor": case "preminor": case "prepatch":
+ inc = argv.shift()
+ break
+ default:
+ inc = "patch"
+ break
+ }
+ break
+ case "--preid":
+ identifier = argv.shift()
+ break
+ case "-r": case "--range":
+ range.push(argv.shift())
+ break
+ case "-h": case "--help": case "-?":
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ versions = versions.filter(function (v) {
+ return semver.valid(v, loose)
+ })
+ if (!versions.length) return fail()
+ if (inc && (versions.length !== 1 || range.length))
+ return failInc()
+
+ for (var i = 0, l = range.length; i < l ; i ++) {
+ versions = versions.filter(function (v) {
+ return semver.satisfies(v, range[i], loose)
+ })
+ if (!versions.length) return fail()
+ }
+ return success(versions)
+}
+
+function failInc () {
+ console.error("--inc can only be used on a single version with no range")
+ fail()
+}
+
+function fail () { process.exit(1) }
+
+function success () {
+ var compare = reverse ? "rcompare" : "compare"
+ versions.sort(function (a, b) {
+ return semver[compare](a, b, loose)
+ }).map(function (v) {
+ return semver.clean(v, loose)
+ }).map(function (v) {
+ return inc ? semver.inc(v, inc, loose, identifier) : v
+ }).forEach(function (v,i,_) { console.log(v) })
+}
+
+function help () {
+ console.log(["SemVer " + version
+ ,""
+ ,"A JavaScript implementation of the http://semver.org/ specification"
+ ,"Copyright Isaac Z. Schlueter"
+ ,""
+ ,"Usage: semver [options] [ [...]]"
+ ,"Prints valid versions sorted by SemVer precedence"
+ ,""
+ ,"Options:"
+ ,"-r --range "
+ ," Print versions that match the specified range."
+ ,""
+ ,"-i --increment []"
+ ," Increment a version by the specified level. Level can"
+ ," be one of: major, minor, patch, premajor, preminor,"
+ ," prepatch, or prerelease. Default level is 'patch'."
+ ," Only one version may be specified."
+ ,""
+ ,"--preid "
+ ," Identifier to be used to prefix premajor, preminor,"
+ ," prepatch or prerelease version increments."
+ ,""
+ ,"-l --loose"
+ ," Interpret versions and ranges loosely"
+ ,""
+ ,"Program exits successfully if any valid version satisfies"
+ ,"all supplied ranges, and prints all satisfying versions."
+ ,""
+ ,"If no satisfying versions are found, then exits failure."
+ ,""
+ ,"Versions are printed in ascending order, so supplying"
+ ,"multiple versions to the utility will just sort them."
+ ].join("\n"))
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/sshpk-conv b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/sshpk-conv
new file mode 100755
index 00000000..a1205a45
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/sshpk-conv
@@ -0,0 +1,195 @@
+#!/usr/bin/env node
+// -*- mode: js -*-
+// vim: set filetype=javascript :
+// Copyright 2015 Joyent, Inc. All rights reserved.
+
+var dashdash = require('dashdash');
+var sshpk = require('../lib/index');
+var fs = require('fs');
+var path = require('path');
+var tty = require('tty');
+var readline = require('readline');
+var getPassword = require('getpass').getPass;
+
+var options = [
+ {
+ names: ['outformat', 't'],
+ type: 'string',
+ help: 'Output format'
+ },
+ {
+ names: ['informat', 'T'],
+ type: 'string',
+ help: 'Input format'
+ },
+ {
+ names: ['file', 'f'],
+ type: 'string',
+ help: 'Input file name (default stdin)'
+ },
+ {
+ names: ['out', 'o'],
+ type: 'string',
+ help: 'Output file name (default stdout)'
+ },
+ {
+ names: ['private', 'p'],
+ type: 'bool',
+ help: 'Produce a private key as output'
+ },
+ {
+ names: ['derive', 'd'],
+ type: 'string',
+ help: 'Output a new key derived from this one, with given algo'
+ },
+ {
+ names: ['identify', 'i'],
+ type: 'bool',
+ help: 'Print key metadata instead of converting'
+ },
+ {
+ names: ['comment', 'c'],
+ type: 'string',
+ help: 'Set key comment, if output format supports'
+ },
+ {
+ names: ['help', 'h'],
+ type: 'bool',
+ help: 'Shows this help text'
+ }
+];
+
+if (require.main === module) {
+ var parser = dashdash.createParser({
+ options: options
+ });
+
+ try {
+ var opts = parser.parse(process.argv);
+ } catch (e) {
+ console.error('sshpk-conv: error: %s', e.message);
+ process.exit(1);
+ }
+
+ if (opts.help || opts._args.length > 1) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-conv: converts between SSH key formats\n');
+ console.error(help);
+ console.error('\navailable formats:');
+ console.error(' - pem, pkcs1 eg id_rsa');
+ console.error(' - ssh eg id_rsa.pub');
+ console.error(' - pkcs8 format you want for openssl');
+ console.error(' - openssh like output of ssh-keygen -o');
+ console.error(' - rfc4253 raw OpenSSH wire format');
+ process.exit(1);
+ }
+
+ /*
+ * Key derivation can only be done on private keys, so use of the -d
+ * option necessarily implies -p.
+ */
+ if (opts.derive)
+ opts.private = true;
+
+ var inFile = process.stdin;
+ var inFileName = 'stdin';
+
+ var inFilePath;
+ if (opts.file) {
+ inFilePath = opts.file;
+ } else if (opts._args.length === 1) {
+ inFilePath = opts._args[0];
+ }
+
+ if (inFilePath)
+ inFileName = path.basename(inFilePath);
+
+ try {
+ if (inFilePath) {
+ fs.accessSync(inFilePath, fs.R_OK);
+ inFile = fs.createReadStream(inFilePath);
+ }
+ } catch (e) {
+ console.error('sshpk-conv: error opening input file' +
+ ': ' + e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ var outFile = process.stdout;
+
+ try {
+ if (opts.out && !opts.identify) {
+ fs.accessSync(path.dirname(opts.out), fs.W_OK);
+ outFile = fs.createWriteStream(opts.out);
+ }
+ } catch (e) {
+ console.error('sshpk-conv: error opening output file' +
+ ': ' + e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ var bufs = [];
+ inFile.on('readable', function () {
+ var data;
+ while ((data = inFile.read()))
+ bufs.push(data);
+ });
+ var parseOpts = {};
+ parseOpts.filename = inFileName;
+ inFile.on('end', function processKey() {
+ var buf = Buffer.concat(bufs);
+ var fmt = 'auto';
+ if (opts.informat)
+ fmt = opts.informat;
+ var f = sshpk.parseKey;
+ if (opts.private)
+ f = sshpk.parsePrivateKey;
+ try {
+ var key = f(buf, fmt, parseOpts);
+ } catch (e) {
+ if (e.name === 'KeyEncryptedError') {
+ getPassword(function (err, pw) {
+ parseOpts.passphrase = pw;
+ processKey();
+ });
+ return;
+ }
+ console.error('sshpk-conv: ' +
+ e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ if (opts.derive)
+ key = key.derive(opts.derive);
+
+ if (opts.comment)
+ key.comment = opts.comment;
+
+ if (!opts.identify) {
+ fmt = undefined;
+ if (opts.outformat)
+ fmt = opts.outformat;
+ outFile.write(key.toBuffer(fmt));
+ if (fmt === 'ssh' ||
+ (!opts.private && fmt === undefined))
+ outFile.write('\n');
+ outFile.once('drain', function () {
+ process.exit(0);
+ });
+ } else {
+ var kind = 'public';
+ if (sshpk.PrivateKey.isPrivateKey(key))
+ kind = 'private';
+ console.log('%s: a %d bit %s %s key', inFileName,
+ key.size, key.type.toUpperCase(), kind);
+ if (key.type === 'ecdsa')
+ console.log('ECDSA curve: %s', key.curve);
+ if (key.comment)
+ console.log('Comment: %s', key.comment);
+ console.log('Fingerprint:');
+ console.log(' ' + key.fingerprint().toString());
+ console.log(' ' + key.fingerprint('md5').toString());
+ process.exit(0);
+ }
+ });
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/sshpk-sign b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/sshpk-sign
new file mode 100755
index 00000000..673fc986
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/sshpk-sign
@@ -0,0 +1,191 @@
+#!/usr/bin/env node
+// -*- mode: js -*-
+// vim: set filetype=javascript :
+// Copyright 2015 Joyent, Inc. All rights reserved.
+
+var dashdash = require('dashdash');
+var sshpk = require('../lib/index');
+var fs = require('fs');
+var path = require('path');
+var getPassword = require('getpass').getPass;
+
+var options = [
+ {
+ names: ['hash', 'H'],
+ type: 'string',
+ help: 'Hash algorithm (sha1, sha256, sha384, sha512)'
+ },
+ {
+ names: ['verbose', 'v'],
+ type: 'bool',
+ help: 'Display verbose info about key and hash used'
+ },
+ {
+ names: ['identity', 'i'],
+ type: 'string',
+ help: 'Path to key to use'
+ },
+ {
+ names: ['file', 'f'],
+ type: 'string',
+ help: 'Input filename'
+ },
+ {
+ names: ['out', 'o'],
+ type: 'string',
+ help: 'Output filename'
+ },
+ {
+ names: ['format', 't'],
+ type: 'string',
+ help: 'Signature format (asn1, ssh, raw)'
+ },
+ {
+ names: ['binary', 'b'],
+ type: 'bool',
+ help: 'Output raw binary instead of base64'
+ },
+ {
+ names: ['help', 'h'],
+ type: 'bool',
+ help: 'Shows this help text'
+ }
+];
+
+var parseOpts = {};
+
+if (require.main === module) {
+ var parser = dashdash.createParser({
+ options: options
+ });
+
+ try {
+ var opts = parser.parse(process.argv);
+ } catch (e) {
+ console.error('sshpk-sign: error: %s', e.message);
+ process.exit(1);
+ }
+
+ if (opts.help || opts._args.length > 1) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-sign: sign data using an SSH key\n');
+ console.error(help);
+ process.exit(1);
+ }
+
+ if (!opts.identity) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-sign: the -i or --identity option ' +
+ 'is required\n');
+ console.error(help);
+ process.exit(1);
+ }
+
+ var keyData = fs.readFileSync(opts.identity);
+ parseOpts.filename = opts.identity;
+
+ run();
+}
+
+function run() {
+ var key;
+ try {
+ key = sshpk.parsePrivateKey(keyData, 'auto', parseOpts);
+ } catch (e) {
+ if (e.name === 'KeyEncryptedError') {
+ getPassword(function (err, pw) {
+ parseOpts.passphrase = pw;
+ run();
+ });
+ return;
+ }
+ console.error('sshpk-sign: error loading private key "' +
+ opts.identity + '": ' + e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ var hash = opts.hash || key.defaultHashAlgorithm();
+
+ var signer;
+ try {
+ signer = key.createSign(hash);
+ } catch (e) {
+ console.error('sshpk-sign: error creating signer: ' +
+ e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ if (opts.verbose) {
+ console.error('sshpk-sign: using %s-%s with a %d bit key',
+ key.type, hash, key.size);
+ }
+
+ var inFile = process.stdin;
+ var inFileName = 'stdin';
+
+ var inFilePath;
+ if (opts.file) {
+ inFilePath = opts.file;
+ } else if (opts._args.length === 1) {
+ inFilePath = opts._args[0];
+ }
+
+ if (inFilePath)
+ inFileName = path.basename(inFilePath);
+
+ try {
+ if (inFilePath) {
+ fs.accessSync(inFilePath, fs.R_OK);
+ inFile = fs.createReadStream(inFilePath);
+ }
+ } catch (e) {
+ console.error('sshpk-sign: error opening input file' +
+ ': ' + e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ var outFile = process.stdout;
+
+ try {
+ if (opts.out && !opts.identify) {
+ fs.accessSync(path.dirname(opts.out), fs.W_OK);
+ outFile = fs.createWriteStream(opts.out);
+ }
+ } catch (e) {
+ console.error('sshpk-sign: error opening output file' +
+ ': ' + e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ inFile.pipe(signer);
+ inFile.on('end', function () {
+ var sig;
+ try {
+ sig = signer.sign();
+ } catch (e) {
+ console.error('sshpk-sign: error signing data: ' +
+ e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ var fmt = opts.format || 'asn1';
+ var output;
+ try {
+ output = sig.toBuffer(fmt);
+ if (!opts.binary)
+ output = output.toString('base64');
+ } catch (e) {
+ console.error('sshpk-sign: error converting signature' +
+ ' to ' + fmt + ' format: ' + e.name + ': ' +
+ e.message);
+ process.exit(1);
+ }
+
+ outFile.write(output);
+ if (!opts.binary)
+ outFile.write('\n');
+ outFile.once('drain', function () {
+ process.exit(0);
+ });
+ });
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/sshpk-verify b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/sshpk-verify
new file mode 100755
index 00000000..a1669f40
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/sshpk-verify
@@ -0,0 +1,166 @@
+#!/usr/bin/env node
+// -*- mode: js -*-
+// vim: set filetype=javascript :
+// Copyright 2015 Joyent, Inc. All rights reserved.
+
+var dashdash = require('dashdash');
+var sshpk = require('../lib/index');
+var fs = require('fs');
+var path = require('path');
+
+var options = [
+ {
+ names: ['hash', 'H'],
+ type: 'string',
+ help: 'Hash algorithm (sha1, sha256, sha384, sha512)'
+ },
+ {
+ names: ['verbose', 'v'],
+ type: 'bool',
+ help: 'Display verbose info about key and hash used'
+ },
+ {
+ names: ['identity', 'i'],
+ type: 'string',
+ help: 'Path to (public) key to use'
+ },
+ {
+ names: ['file', 'f'],
+ type: 'string',
+ help: 'Input filename'
+ },
+ {
+ names: ['format', 't'],
+ type: 'string',
+ help: 'Signature format (asn1, ssh, raw)'
+ },
+ {
+ names: ['signature', 's'],
+ type: 'string',
+ help: 'base64-encoded signature data'
+ },
+ {
+ names: ['help', 'h'],
+ type: 'bool',
+ help: 'Shows this help text'
+ }
+];
+
+if (require.main === module) {
+ var parser = dashdash.createParser({
+ options: options
+ });
+
+ try {
+ var opts = parser.parse(process.argv);
+ } catch (e) {
+ console.error('sshpk-verify: error: %s', e.message);
+ process.exit(3);
+ }
+
+ if (opts.help || opts._args.length > 1) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-verify: sign data using an SSH key\n');
+ console.error(help);
+ process.exit(3);
+ }
+
+ if (!opts.identity) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-verify: the -i or --identity option ' +
+ 'is required\n');
+ console.error(help);
+ process.exit(3);
+ }
+
+ if (!opts.signature) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-verify: the -s or --signature option ' +
+ 'is required\n');
+ console.error(help);
+ process.exit(3);
+ }
+
+ var keyData = fs.readFileSync(opts.identity);
+
+ var key;
+ try {
+ key = sshpk.parseKey(keyData);
+ } catch (e) {
+ console.error('sshpk-verify: error loading key "' +
+ opts.identity + '": ' + e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ var fmt = opts.format || 'asn1';
+ var sigData = new Buffer(opts.signature, 'base64');
+
+ var sig;
+ try {
+ sig = sshpk.parseSignature(sigData, key.type, fmt);
+ } catch (e) {
+ console.error('sshpk-verify: error parsing signature: ' +
+ e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ var hash = opts.hash || key.defaultHashAlgorithm();
+
+ var verifier;
+ try {
+ verifier = key.createVerify(hash);
+ } catch (e) {
+ console.error('sshpk-verify: error creating verifier: ' +
+ e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ if (opts.verbose) {
+ console.error('sshpk-verify: using %s-%s with a %d bit key',
+ key.type, hash, key.size);
+ }
+
+ var inFile = process.stdin;
+ var inFileName = 'stdin';
+
+ var inFilePath;
+ if (opts.file) {
+ inFilePath = opts.file;
+ } else if (opts._args.length === 1) {
+ inFilePath = opts._args[0];
+ }
+
+ if (inFilePath)
+ inFileName = path.basename(inFilePath);
+
+ try {
+ if (inFilePath) {
+ fs.accessSync(inFilePath, fs.R_OK);
+ inFile = fs.createReadStream(inFilePath);
+ }
+ } catch (e) {
+ console.error('sshpk-verify: error opening input file' +
+ ': ' + e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ inFile.pipe(verifier);
+ inFile.on('end', function () {
+ var ret;
+ try {
+ ret = verifier.verify(sig);
+ } catch (e) {
+ console.error('sshpk-verify: error verifying data: ' +
+ e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ if (ret) {
+ console.error('OK');
+ process.exit(0);
+ }
+
+ console.error('NOT OK');
+ process.exit(1);
+ });
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/strip-indent b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/strip-indent
new file mode 100755
index 00000000..bcd5f8d1
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/strip-indent
@@ -0,0 +1,49 @@
+#!/usr/bin/env node
+'use strict';
+var fs = require('fs');
+var stdin = require('get-stdin');
+var pkg = require('./package.json');
+var stripIndent = require('./');
+var argv = process.argv.slice(2);
+var input = argv[0];
+
+function help() {
+ console.log([
+ '',
+ ' ' + pkg.description,
+ '',
+ ' Usage',
+ ' strip-indent ',
+ ' echo | strip-indent',
+ '',
+ ' Example',
+ ' echo \'\\tunicorn\\n\\t\\tcake\' | strip-indent',
+ ' unicorn',
+ ' \tcake'
+ ].join('\n'));
+}
+
+function init(data) {
+ console.log(stripIndent(data));
+}
+
+if (argv.indexOf('--help') !== -1) {
+ help();
+ return;
+}
+
+if (argv.indexOf('--version') !== -1) {
+ console.log(pkg.version);
+ return;
+}
+
+if (process.stdin.isTTY) {
+ if (!input) {
+ help();
+ return;
+ }
+
+ init(fs.readFileSync(input, 'utf8'));
+} else {
+ stdin(init);
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/tsc b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/tsc
new file mode 100755
index 00000000..19c62bf7
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/tsc
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+require('../lib/tsc.js')
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/tslint b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/tslint
new file mode 100755
index 00000000..e052e09d
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/tslint
@@ -0,0 +1,3 @@
+#!/usr/bin/env node
+
+require("../lib/tslint-cli");
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/tsserver b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/tsserver
new file mode 100755
index 00000000..7143b6a7
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/tsserver
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+require('../lib/tsserver.js')
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/user-home b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/user-home
new file mode 100755
index 00000000..bacbd227
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/user-home
@@ -0,0 +1,26 @@
+#!/usr/bin/env node
+'use strict';
+var pkg = require('./package.json');
+var userHome = require('./');
+
+function help() {
+ console.log([
+ pkg.description,
+ '',
+ 'Example',
+ ' $ user-home',
+ ' /Users/sindresorhus'
+ ].join('\n'));
+}
+
+if (process.argv.indexOf('--help') !== -1) {
+ help();
+ return;
+}
+
+if (process.argv.indexOf('--version') !== -1) {
+ console.log(pkg.version);
+ return;
+}
+
+process.stdout.write(userHome);
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/uuid b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/uuid
new file mode 100755
index 00000000..f732e991
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/.bin/uuid
@@ -0,0 +1,26 @@
+#!/usr/bin/env node
+
+var path = require('path');
+var uuid = require(path.join(__dirname, '..'));
+
+var arg = process.argv[2];
+
+if ('--help' === arg) {
+ console.log('\n USAGE: uuid [version] [options]\n\n');
+ console.log(' options:\n');
+ console.log(' --help Display this message and exit\n');
+ process.exit(0);
+}
+
+if (null == arg) {
+ console.log(uuid());
+ process.exit(0);
+}
+
+if ('v1' !== arg && 'v4' !== arg) {
+ console.error('Version must be RFC4122 version 1 or version 4, denoted as "v1" or "v4"');
+ process.exit(1);
+}
+
+console.log(uuid[arg]());
+process.exit(0);
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/LICENSE b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/LICENSE
new file mode 100644
index 00000000..af46c6df
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/LICENSE
@@ -0,0 +1,58 @@
+amdefine is released under two licenses: new BSD, and MIT. You may pick the
+license that best suits your development needs. The text of both licenses are
+provided below.
+
+
+The "New" BSD License:
+----------------------
+
+Copyright (c) 2011-2015, The Dojo Foundation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of the Dojo Foundation nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+MIT License
+-----------
+
+Copyright (c) 2011-2015, The Dojo Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/README.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/README.md
new file mode 100644
index 00000000..037a6e81
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/README.md
@@ -0,0 +1,171 @@
+# amdefine
+
+A module that can be used to implement AMD's define() in Node. This allows you
+to code to the AMD API and have the module work in node programs without
+requiring those other programs to use AMD.
+
+## Usage
+
+**1)** Update your package.json to indicate amdefine as a dependency:
+
+```javascript
+ "dependencies": {
+ "amdefine": ">=0.1.0"
+ }
+```
+
+Then run `npm install` to get amdefine into your project.
+
+**2)** At the top of each module that uses define(), place this code:
+
+```javascript
+if (typeof define !== 'function') { var define = require('amdefine')(module) }
+```
+
+**Only use these snippets** when loading amdefine. If you preserve the basic structure,
+with the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer).
+
+You can add spaces, line breaks and even require amdefine with a local path, but
+keep the rest of the structure to get the stripping behavior.
+
+As you may know, because `if` statements in JavaScript don't have their own scope, the var
+declaration in the above snippet is made whether the `if` expression is truthy or not. If
+RequireJS is loaded then the declaration is superfluous because `define` is already already
+declared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var`
+declarations of the same variable in the same scope gracefully.
+
+If you want to deliver amdefine.js with your code rather than specifying it as a dependency
+with npm, then just download the latest release and refer to it using a relative path:
+
+[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js)
+
+### amdefine/intercept
+
+Consider this very experimental.
+
+Instead of pasting the piece of text for the amdefine setup of a `define`
+variable in each module you create or consume, you can use `amdefine/intercept`
+instead. It will automatically insert the above snippet in each .js file loaded
+by Node.
+
+**Warning**: you should only use this if you are creating an application that
+is consuming AMD style defined()'d modules that are distributed via npm and want
+to run that code in Node.
+
+For library code where you are not sure if it will be used by others in Node or
+in the browser, then explicitly depending on amdefine and placing the code
+snippet above is suggested path, instead of using `amdefine/intercept`. The
+intercept module affects all .js files loaded in the Node app, and it is
+inconsiderate to modify global state like that unless you are also controlling
+the top level app.
+
+#### Why distribute AMD-style modules via npm?
+
+npm has a lot of weaknesses for front-end use (installed layout is not great,
+should have better support for the `baseUrl + moduleID + '.js' style of loading,
+single file JS installs), but some people want a JS package manager and are
+willing to live with those constraints. If that is you, but still want to author
+in AMD style modules to get dynamic require([]), better direct source usage and
+powerful loader plugin support in the browser, then this tool can help.
+
+#### amdefine/intercept usage
+
+Just require it in your top level app module (for example index.js, server.js):
+
+```javascript
+require('amdefine/intercept');
+```
+
+The module does not return a value, so no need to assign the result to a local
+variable.
+
+Then just require() code as you normally would with Node's require(). Any .js
+loaded after the intercept require will have the amdefine check injected in
+the .js source as it is loaded. It does not modify the source on disk, just
+prepends some content to the text of the module as it is loaded by Node.
+
+#### How amdefine/intercept works
+
+It overrides the `Module._extensions['.js']` in Node to automatically prepend
+the amdefine snippet above. So, it will affect any .js file loaded by your
+app.
+
+## define() usage
+
+It is best if you use the anonymous forms of define() in your module:
+
+```javascript
+define(function (require) {
+ var dependency = require('dependency');
+});
+```
+
+or
+
+```javascript
+define(['dependency'], function (dependency) {
+
+});
+```
+
+## RequireJS optimizer integration.
+
+Version 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html)
+will have support for stripping the `if (typeof define !== 'function')` check
+mentioned above, so you can include this snippet for code that runs in the
+browser, but avoid taking the cost of the if() statement once the code is
+optimized for deployment.
+
+## Node 0.4 Support
+
+If you want to support Node 0.4, then add `require` as the second parameter to amdefine:
+
+```javascript
+//Only if you want Node 0.4. If using 0.5 or later, use the above snippet.
+if (typeof define !== 'function') { var define = require('amdefine')(module, require) }
+```
+
+## Limitations
+
+### Synchronous vs Asynchronous
+
+amdefine creates a define() function that is callable by your code. It will
+execute and trace dependencies and call the factory function *synchronously*,
+to keep the behavior in line with Node's synchronous dependency tracing.
+
+The exception: calling AMD's callback-style require() from inside a factory
+function. The require callback is called on process.nextTick():
+
+```javascript
+define(function (require) {
+ require(['a'], function(a) {
+ //'a' is loaded synchronously, but
+ //this callback is called on process.nextTick().
+ });
+});
+```
+
+### Loader Plugins
+
+Loader plugins are supported as long as they call their load() callbacks
+synchronously. So ones that do network requests will not work. However plugins
+like [text](http://requirejs.org/docs/api.html#text) can load text files locally.
+
+The plugin API's `load.fromText()` is **not supported** in amdefine, so this means
+transpiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs)
+will not work. This may be fixable, but it is a bit complex, and I do not have
+enough node-fu to figure it out yet. See the source for amdefine.js if you want
+to get an idea of the issues involved.
+
+## Tests
+
+To run the tests, cd to **tests** and run:
+
+```
+node all.js
+node all-intercept.js
+```
+
+## License
+
+New BSD and MIT. Check the LICENSE file for all the details.
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/amdefine.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/amdefine.js
new file mode 100644
index 00000000..0c4a954a
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/amdefine.js
@@ -0,0 +1,301 @@
+/** vim: et:ts=4:sw=4:sts=4
+ * @license amdefine 1.0.0 Copyright (c) 2011-2015, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/jrburke/amdefine for details
+ */
+
+/*jslint node: true */
+/*global module, process */
+'use strict';
+
+/**
+ * Creates a define for node.
+ * @param {Object} module the "module" object that is defined by Node for the
+ * current module.
+ * @param {Function} [requireFn]. Node's require function for the current module.
+ * It only needs to be passed in Node versions before 0.5, when module.require
+ * did not exist.
+ * @returns {Function} a define function that is usable for the current node
+ * module.
+ */
+function amdefine(module, requireFn) {
+ 'use strict';
+ var defineCache = {},
+ loaderCache = {},
+ alreadyCalled = false,
+ path = require('path'),
+ makeRequire, stringRequire;
+
+ /**
+ * Trims the . and .. from an array of path segments.
+ * It will keep a leading path segment if a .. will become
+ * the first path segment, to help with module name lookups,
+ * which act like paths, but can be remapped. But the end result,
+ * all paths that use this function should look normalized.
+ * NOTE: this method MODIFIES the input array.
+ * @param {Array} ary the array of path segments.
+ */
+ function trimDots(ary) {
+ var i, part;
+ for (i = 0; ary[i]; i+= 1) {
+ part = ary[i];
+ if (part === '.') {
+ ary.splice(i, 1);
+ i -= 1;
+ } else if (part === '..') {
+ if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
+ //End of the line. Keep at least one non-dot
+ //path segment at the front so it can be mapped
+ //correctly to disk. Otherwise, there is likely
+ //no path mapping for a path starting with '..'.
+ //This can still fail, but catches the most reasonable
+ //uses of ..
+ break;
+ } else if (i > 0) {
+ ary.splice(i - 1, 2);
+ i -= 2;
+ }
+ }
+ }
+ }
+
+ function normalize(name, baseName) {
+ var baseParts;
+
+ //Adjust any relative paths.
+ if (name && name.charAt(0) === '.') {
+ //If have a base name, try to normalize against it,
+ //otherwise, assume it is a top-level require that will
+ //be relative to baseUrl in the end.
+ if (baseName) {
+ baseParts = baseName.split('/');
+ baseParts = baseParts.slice(0, baseParts.length - 1);
+ baseParts = baseParts.concat(name.split('/'));
+ trimDots(baseParts);
+ name = baseParts.join('/');
+ }
+ }
+
+ return name;
+ }
+
+ /**
+ * Create the normalize() function passed to a loader plugin's
+ * normalize method.
+ */
+ function makeNormalize(relName) {
+ return function (name) {
+ return normalize(name, relName);
+ };
+ }
+
+ function makeLoad(id) {
+ function load(value) {
+ loaderCache[id] = value;
+ }
+
+ load.fromText = function (id, text) {
+ //This one is difficult because the text can/probably uses
+ //define, and any relative paths and requires should be relative
+ //to that id was it would be found on disk. But this would require
+ //bootstrapping a module/require fairly deeply from node core.
+ //Not sure how best to go about that yet.
+ throw new Error('amdefine does not implement load.fromText');
+ };
+
+ return load;
+ }
+
+ makeRequire = function (systemRequire, exports, module, relId) {
+ function amdRequire(deps, callback) {
+ if (typeof deps === 'string') {
+ //Synchronous, single module require('')
+ return stringRequire(systemRequire, exports, module, deps, relId);
+ } else {
+ //Array of dependencies with a callback.
+
+ //Convert the dependencies to modules.
+ deps = deps.map(function (depName) {
+ return stringRequire(systemRequire, exports, module, depName, relId);
+ });
+
+ //Wait for next tick to call back the require call.
+ if (callback) {
+ process.nextTick(function () {
+ callback.apply(null, deps);
+ });
+ }
+ }
+ }
+
+ amdRequire.toUrl = function (filePath) {
+ if (filePath.indexOf('.') === 0) {
+ return normalize(filePath, path.dirname(module.filename));
+ } else {
+ return filePath;
+ }
+ };
+
+ return amdRequire;
+ };
+
+ //Favor explicit value, passed in if the module wants to support Node 0.4.
+ requireFn = requireFn || function req() {
+ return module.require.apply(module, arguments);
+ };
+
+ function runFactory(id, deps, factory) {
+ var r, e, m, result;
+
+ if (id) {
+ e = loaderCache[id] = {};
+ m = {
+ id: id,
+ uri: __filename,
+ exports: e
+ };
+ r = makeRequire(requireFn, e, m, id);
+ } else {
+ //Only support one define call per file
+ if (alreadyCalled) {
+ throw new Error('amdefine with no module ID cannot be called more than once per file.');
+ }
+ alreadyCalled = true;
+
+ //Use the real variables from node
+ //Use module.exports for exports, since
+ //the exports in here is amdefine exports.
+ e = module.exports;
+ m = module;
+ r = makeRequire(requireFn, e, m, module.id);
+ }
+
+ //If there are dependencies, they are strings, so need
+ //to convert them to dependency values.
+ if (deps) {
+ deps = deps.map(function (depName) {
+ return r(depName);
+ });
+ }
+
+ //Call the factory with the right dependencies.
+ if (typeof factory === 'function') {
+ result = factory.apply(m.exports, deps);
+ } else {
+ result = factory;
+ }
+
+ if (result !== undefined) {
+ m.exports = result;
+ if (id) {
+ loaderCache[id] = m.exports;
+ }
+ }
+ }
+
+ stringRequire = function (systemRequire, exports, module, id, relId) {
+ //Split the ID by a ! so that
+ var index = id.indexOf('!'),
+ originalId = id,
+ prefix, plugin;
+
+ if (index === -1) {
+ id = normalize(id, relId);
+
+ //Straight module lookup. If it is one of the special dependencies,
+ //deal with it, otherwise, delegate to node.
+ if (id === 'require') {
+ return makeRequire(systemRequire, exports, module, relId);
+ } else if (id === 'exports') {
+ return exports;
+ } else if (id === 'module') {
+ return module;
+ } else if (loaderCache.hasOwnProperty(id)) {
+ return loaderCache[id];
+ } else if (defineCache[id]) {
+ runFactory.apply(null, defineCache[id]);
+ return loaderCache[id];
+ } else {
+ if(systemRequire) {
+ return systemRequire(originalId);
+ } else {
+ throw new Error('No module with ID: ' + id);
+ }
+ }
+ } else {
+ //There is a plugin in play.
+ prefix = id.substring(0, index);
+ id = id.substring(index + 1, id.length);
+
+ plugin = stringRequire(systemRequire, exports, module, prefix, relId);
+
+ if (plugin.normalize) {
+ id = plugin.normalize(id, makeNormalize(relId));
+ } else {
+ //Normalize the ID normally.
+ id = normalize(id, relId);
+ }
+
+ if (loaderCache[id]) {
+ return loaderCache[id];
+ } else {
+ plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {});
+
+ return loaderCache[id];
+ }
+ }
+ };
+
+ //Create a define function specific to the module asking for amdefine.
+ function define(id, deps, factory) {
+ if (Array.isArray(id)) {
+ factory = deps;
+ deps = id;
+ id = undefined;
+ } else if (typeof id !== 'string') {
+ factory = id;
+ id = deps = undefined;
+ }
+
+ if (deps && !Array.isArray(deps)) {
+ factory = deps;
+ deps = undefined;
+ }
+
+ if (!deps) {
+ deps = ['require', 'exports', 'module'];
+ }
+
+ //Set up properties for this module. If an ID, then use
+ //internal cache. If no ID, then use the external variables
+ //for this node module.
+ if (id) {
+ //Put the module in deep freeze until there is a
+ //require call for it.
+ defineCache[id] = [id, deps, factory];
+ } else {
+ runFactory(id, deps, factory);
+ }
+ }
+
+ //define.require, which has access to all the values in the
+ //cache. Useful for AMD modules that all have IDs in the file,
+ //but need to finally export a value to node based on one of those
+ //IDs.
+ define.require = function (id) {
+ if (loaderCache[id]) {
+ return loaderCache[id];
+ }
+
+ if (defineCache[id]) {
+ runFactory.apply(null, defineCache[id]);
+ return loaderCache[id];
+ }
+ };
+
+ define.amd = {};
+
+ return define;
+}
+
+module.exports = amdefine;
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/intercept.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/intercept.js
new file mode 100644
index 00000000..771a9830
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/intercept.js
@@ -0,0 +1,36 @@
+/*jshint node: true */
+var inserted,
+ Module = require('module'),
+ fs = require('fs'),
+ existingExtFn = Module._extensions['.js'],
+ amdefineRegExp = /amdefine\.js/;
+
+inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}";
+
+//From the node/lib/module.js source:
+function stripBOM(content) {
+ // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
+ // because the buffer-to-string conversion in `fs.readFileSync()`
+ // translates it to FEFF, the UTF-16 BOM.
+ if (content.charCodeAt(0) === 0xFEFF) {
+ content = content.slice(1);
+ }
+ return content;
+}
+
+//Also adapted from the node/lib/module.js source:
+function intercept(module, filename) {
+ var content = stripBOM(fs.readFileSync(filename, 'utf8'));
+
+ if (!amdefineRegExp.test(module.id)) {
+ content = inserted + content;
+ }
+
+ module._compile(content, filename);
+}
+
+intercept._id = 'amdefine/intercept';
+
+if (!existingExtFn._id || existingExtFn._id !== intercept._id) {
+ Module._extensions['.js'] = intercept;
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/package.json b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/package.json
new file mode 100644
index 00000000..f34eb8c1
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/amdefine/package.json
@@ -0,0 +1,74 @@
+{
+ "_args": [
+ [
+ "amdefine@>=0.0.4",
+ "/Users/sid/Desktop/code/RustyCode/node_modules/source-map-support/node_modules/source-map"
+ ]
+ ],
+ "_from": "amdefine@>=0.0.4",
+ "_id": "amdefine@1.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/amdefine",
+ "_nodeVersion": "0.10.36",
+ "_npmUser": {
+ "email": "jrburke@gmail.com",
+ "name": "jrburke"
+ },
+ "_npmVersion": "2.12.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "amdefine",
+ "raw": "amdefine@>=0.0.4",
+ "rawSpec": ">=0.0.4",
+ "scope": null,
+ "spec": ">=0.0.4",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/source-map-support/source-map"
+ ],
+ "_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz",
+ "_shasum": "fd17474700cb5cc9c2b709f0be9d23ce3c198c33",
+ "_shrinkwrap": null,
+ "_spec": "amdefine@>=0.0.4",
+ "_where": "/Users/sid/Desktop/code/RustyCode/node_modules/source-map-support/node_modules/source-map",
+ "author": {
+ "email": "jrburke@gmail.com",
+ "name": "James Burke",
+ "url": "http://github.com/jrburke"
+ },
+ "bugs": {
+ "url": "https://github.com/jrburke/amdefine/issues"
+ },
+ "dependencies": {},
+ "description": "Provide AMD's define() API for declaring modules in the AMD format",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "fd17474700cb5cc9c2b709f0be9d23ce3c198c33",
+ "tarball": "http://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.4.2"
+ },
+ "gitHead": "578bc4a3f7dede33f3f3e10edde0c1607005d761",
+ "homepage": "http://github.com/jrburke/amdefine",
+ "license": "BSD-3-Clause AND MIT",
+ "main": "./amdefine.js",
+ "maintainers": [
+ {
+ "email": "jrburke@gmail.com",
+ "name": "jrburke"
+ }
+ ],
+ "name": "amdefine",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jrburke/amdefine.git"
+ },
+ "scripts": {},
+ "version": "1.0.0"
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/index.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/index.js
new file mode 100644
index 00000000..4906755b
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/index.js
@@ -0,0 +1,4 @@
+'use strict';
+module.exports = function () {
+ return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
+};
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/license b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/license
new file mode 100644
index 00000000..654d0bfe
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/package.json b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/package.json
new file mode 100644
index 00000000..741585ed
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/package.json
@@ -0,0 +1,113 @@
+{
+ "_args": [
+ [
+ "ansi-regex@^2.0.0",
+ "/Users/sid/Desktop/code/RustyCode/node_modules/has-ansi"
+ ]
+ ],
+ "_from": "ansi-regex@>=2.0.0 <3.0.0",
+ "_id": "ansi-regex@2.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/ansi-regex",
+ "_nodeVersion": "0.12.5",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "2.11.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "ansi-regex",
+ "raw": "ansi-regex@^2.0.0",
+ "rawSpec": "^2.0.0",
+ "scope": null,
+ "spec": ">=2.0.0 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/has-ansi",
+ "/strip-ansi"
+ ],
+ "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz",
+ "_shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107",
+ "_shrinkwrap": null,
+ "_spec": "ansi-regex@^2.0.0",
+ "_where": "/Users/sid/Desktop/code/RustyCode/node_modules/has-ansi",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/ansi-regex/issues"
+ },
+ "dependencies": {},
+ "description": "Regular expression for matching ANSI escape codes",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107",
+ "tarball": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "57c3f2941a73079fa8b081e02a522e3d29913e2f",
+ "homepage": "https://github.com/sindresorhus/ansi-regex",
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "text",
+ "regex",
+ "regexp",
+ "re",
+ "match",
+ "test",
+ "find",
+ "pattern"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ {
+ "email": "jappelman@xebia.com",
+ "name": "jbnicolai"
+ }
+ ],
+ "name": "ansi-regex",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/ansi-regex.git"
+ },
+ "scripts": {
+ "test": "mocha test/test.js",
+ "view-supported": "node test/viewCodes.js"
+ },
+ "version": "2.0.0"
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/readme.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/readme.md
new file mode 100644
index 00000000..1a4894ec
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-regex/readme.md
@@ -0,0 +1,31 @@
+# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex)
+
+> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install --save ansi-regex
+```
+
+
+## Usage
+
+```js
+var ansiRegex = require('ansi-regex');
+
+ansiRegex().test('\u001b[4mcake\u001b[0m');
+//=> true
+
+ansiRegex().test('cake');
+//=> false
+
+'\u001b[4mcake\u001b[0m'.match(ansiRegex());
+//=> ['\u001b[4m', '\u001b[0m']
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/index.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/index.js
new file mode 100644
index 00000000..78945278
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/index.js
@@ -0,0 +1,65 @@
+'use strict';
+
+function assembleStyles () {
+ var styles = {
+ modifiers: {
+ reset: [0, 0],
+ bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29]
+ },
+ colors: {
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+ gray: [90, 39]
+ },
+ bgColors: {
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49]
+ }
+ };
+
+ // fix humans
+ styles.colors.grey = styles.colors.gray;
+
+ Object.keys(styles).forEach(function (groupName) {
+ var group = styles[groupName];
+
+ Object.keys(group).forEach(function (styleName) {
+ var style = group[styleName];
+
+ styles[styleName] = group[styleName] = {
+ open: '\u001b[' + style[0] + 'm',
+ close: '\u001b[' + style[1] + 'm'
+ };
+ });
+
+ Object.defineProperty(styles, groupName, {
+ value: group,
+ enumerable: false
+ });
+ });
+
+ return styles;
+}
+
+Object.defineProperty(module, 'exports', {
+ enumerable: true,
+ get: assembleStyles
+});
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/license b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/license
new file mode 100644
index 00000000..654d0bfe
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/package.json b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/package.json
new file mode 100644
index 00000000..cad3f266
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/package.json
@@ -0,0 +1,106 @@
+{
+ "_args": [
+ [
+ "ansi-styles@^2.2.1",
+ "/Users/sid/Desktop/code/RustyCode/node_modules/chalk"
+ ]
+ ],
+ "_from": "ansi-styles@>=2.2.1 <3.0.0",
+ "_id": "ansi-styles@2.2.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/ansi-styles",
+ "_nodeVersion": "4.3.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/ansi-styles-2.2.1.tgz_1459197317833_0.9694824463222176"
+ },
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "3.8.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "ansi-styles",
+ "raw": "ansi-styles@^2.2.1",
+ "rawSpec": "^2.2.1",
+ "scope": null,
+ "spec": ">=2.2.1 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/chalk"
+ ],
+ "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "_shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe",
+ "_shrinkwrap": null,
+ "_spec": "ansi-styles@^2.2.1",
+ "_where": "/Users/sid/Desktop/code/RustyCode/node_modules/chalk",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/ansi-styles/issues"
+ },
+ "dependencies": {},
+ "description": "ANSI escape codes for styling strings in the terminal",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe",
+ "tarball": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "95c59b23be760108b6530ca1c89477c21b258032",
+ "homepage": "https://github.com/chalk/ansi-styles#readme",
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ }
+ ],
+ "name": "ansi-styles",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/ansi-styles.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "2.2.1"
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/readme.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/readme.md
new file mode 100644
index 00000000..3f933f61
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/ansi-styles/readme.md
@@ -0,0 +1,86 @@
+# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
+
+> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
+
+You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
+
+![](screenshot.png)
+
+
+## Install
+
+```
+$ npm install --save ansi-styles
+```
+
+
+## Usage
+
+```js
+var ansi = require('ansi-styles');
+
+console.log(ansi.green.open + 'Hello world!' + ansi.green.close);
+```
+
+
+## API
+
+Each style has an `open` and `close` property.
+
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(not widely supported)*
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `gray`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+
+
+## Advanced usage
+
+By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
+
+- `ansi.modifiers`
+- `ansi.colors`
+- `ansi.bgColors`
+
+
+###### Example
+
+```js
+console.log(ansi.colors.green.open);
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/.travis.yml b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/.travis.yml
new file mode 100644
index 00000000..895dbd36
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.6
+ - 0.8
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/LICENSE b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/LICENSE
new file mode 100644
index 00000000..ee27ba4b
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/examples/beep.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/examples/beep.js
new file mode 100644
index 00000000..9c070479
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/examples/beep.js
@@ -0,0 +1,24 @@
+var archy = require('../');
+var s = archy({
+ label : 'beep',
+ nodes : [
+ 'ity',
+ {
+ label : 'boop',
+ nodes : [
+ {
+ label : 'o_O',
+ nodes : [
+ {
+ label : 'oh',
+ nodes : [ 'hello', 'puny' ]
+ },
+ 'human'
+ ]
+ },
+ 'party\ntime!'
+ ]
+ }
+ ]
+});
+console.log(s);
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/examples/multi_line.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/examples/multi_line.js
new file mode 100644
index 00000000..8afdfada
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/examples/multi_line.js
@@ -0,0 +1,25 @@
+var archy = require('../');
+
+var s = archy({
+ label : 'beep\none\ntwo',
+ nodes : [
+ 'ity',
+ {
+ label : 'boop',
+ nodes : [
+ {
+ label : 'o_O\nwheee',
+ nodes : [
+ {
+ label : 'oh',
+ nodes : [ 'hello', 'puny\nmeat' ]
+ },
+ 'creature'
+ ]
+ },
+ 'party\ntime!'
+ ]
+ }
+ ]
+});
+console.log(s);
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/index.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/index.js
new file mode 100644
index 00000000..869d64e6
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/index.js
@@ -0,0 +1,35 @@
+module.exports = function archy (obj, prefix, opts) {
+ if (prefix === undefined) prefix = '';
+ if (!opts) opts = {};
+ var chr = function (s) {
+ var chars = {
+ '│' : '|',
+ '└' : '`',
+ '├' : '+',
+ '─' : '-',
+ '┬' : '-'
+ };
+ return opts.unicode === false ? chars[s] : s;
+ };
+
+ if (typeof obj === 'string') obj = { label : obj };
+
+ var nodes = obj.nodes || [];
+ var lines = (obj.label || '').split('\n');
+ var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' ';
+
+ return prefix
+ + lines.join(splitter) + '\n'
+ + nodes.map(function (node, ix) {
+ var last = ix === nodes.length - 1;
+ var more = node.nodes && node.nodes.length;
+ var prefix_ = prefix + (last ? ' ' : chr('│')) + ' ';
+
+ return prefix
+ + (last ? chr('└') : chr('├')) + chr('─')
+ + (more ? chr('┬') : chr('─')) + ' '
+ + archy(node, prefix_, opts).slice(prefix.length + 2)
+ ;
+ }).join('')
+ ;
+};
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/package.json b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/package.json
new file mode 100644
index 00000000..2485972c
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/package.json
@@ -0,0 +1,106 @@
+{
+ "_args": [
+ [
+ "archy@^1.0.0",
+ "/Users/sid/Desktop/code/RustyCode/node_modules/gulp"
+ ]
+ ],
+ "_from": "archy@>=1.0.0 <2.0.0",
+ "_id": "archy@1.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/archy",
+ "_npmUser": {
+ "email": "mail@substack.net",
+ "name": "substack"
+ },
+ "_npmVersion": "1.4.25",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "archy",
+ "raw": "archy@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulp"
+ ],
+ "_resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
+ "_shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40",
+ "_shrinkwrap": null,
+ "_spec": "archy@^1.0.0",
+ "_where": "/Users/sid/Desktop/code/RustyCode/node_modules/gulp",
+ "author": {
+ "email": "mail@substack.net",
+ "name": "James Halliday",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/node-archy/issues"
+ },
+ "dependencies": {},
+ "description": "render nested hierarchies `npm ls` style with unicode pipes",
+ "devDependencies": {
+ "tap": "~0.3.3",
+ "tape": "~0.1.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40",
+ "tarball": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz"
+ },
+ "gitHead": "30223c16191e877bf027b15b12daf077b9b55b84",
+ "homepage": "https://github.com/substack/node-archy",
+ "keywords": [
+ "hierarchy",
+ "npm ls",
+ "unicode",
+ "pretty",
+ "print"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "email": "mail@substack.net",
+ "name": "substack"
+ }
+ ],
+ "name": "archy",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/substack/node-archy.git"
+ },
+ "scripts": {
+ "test": "tap test"
+ },
+ "testling": {
+ "browsers": {
+ "chrome": [
+ "20.0"
+ ],
+ "firefox": [
+ "10.0",
+ "15.0"
+ ],
+ "iexplore": [
+ "6.0",
+ "7.0",
+ "8.0",
+ "9.0"
+ ],
+ "opera": [
+ "12.0"
+ ],
+ "safari": [
+ "5.1"
+ ]
+ },
+ "files": "test/*.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/readme.markdown b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/readme.markdown
new file mode 100644
index 00000000..ef7a5cf3
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/readme.markdown
@@ -0,0 +1,88 @@
+# archy
+
+Render nested hierarchies `npm ls` style with unicode pipes.
+
+[![browser support](http://ci.testling.com/substack/node-archy.png)](http://ci.testling.com/substack/node-archy)
+
+[![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy)
+
+# example
+
+``` js
+var archy = require('archy');
+var s = archy({
+ label : 'beep',
+ nodes : [
+ 'ity',
+ {
+ label : 'boop',
+ nodes : [
+ {
+ label : 'o_O',
+ nodes : [
+ {
+ label : 'oh',
+ nodes : [ 'hello', 'puny' ]
+ },
+ 'human'
+ ]
+ },
+ 'party\ntime!'
+ ]
+ }
+ ]
+});
+console.log(s);
+```
+
+output
+
+```
+beep
+├── ity
+└─┬ boop
+ ├─┬ o_O
+ │ ├─┬ oh
+ │ │ ├── hello
+ │ │ └── puny
+ │ └── human
+ └── party
+ time!
+```
+
+# methods
+
+var archy = require('archy')
+
+## archy(obj, prefix='', opts={})
+
+Return a string representation of `obj` with unicode pipe characters like how
+`npm ls` looks.
+
+`obj` should be a tree of nested objects with `'label'` and `'nodes'` fields.
+`'label'` is a string of text to display at a node level and `'nodes'` is an
+array of the descendents of the current node.
+
+If a node is a string, that string will be used as the `'label'` and an empty
+array of `'nodes'` will be used.
+
+`prefix` gets prepended to all the lines and is used by the algorithm to
+recursively update.
+
+If `'label'` has newlines they will be indented at the present indentation level
+with the current prefix.
+
+To disable unicode results in favor of all-ansi output set `opts.unicode` to
+`false`.
+
+# install
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install archy
+```
+
+# license
+
+MIT
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/test/beep.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/test/beep.js
new file mode 100644
index 00000000..4ea74f9c
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/test/beep.js
@@ -0,0 +1,40 @@
+var test = require('tape');
+var archy = require('../');
+
+test('beep', function (t) {
+ var s = archy({
+ label : 'beep',
+ nodes : [
+ 'ity',
+ {
+ label : 'boop',
+ nodes : [
+ {
+ label : 'o_O',
+ nodes : [
+ {
+ label : 'oh',
+ nodes : [ 'hello', 'puny' ]
+ },
+ 'human'
+ ]
+ },
+ 'party!'
+ ]
+ }
+ ]
+ });
+ t.equal(s, [
+ 'beep',
+ '├── ity',
+ '└─┬ boop',
+ ' ├─┬ o_O',
+ ' │ ├─┬ oh',
+ ' │ │ ├── hello',
+ ' │ │ └── puny',
+ ' │ └── human',
+ ' └── party!',
+ ''
+ ].join('\n'));
+ t.end();
+});
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/test/multi_line.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/test/multi_line.js
new file mode 100644
index 00000000..2cf2154d
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/test/multi_line.js
@@ -0,0 +1,45 @@
+var test = require('tape');
+var archy = require('../');
+
+test('multi-line', function (t) {
+ var s = archy({
+ label : 'beep\none\ntwo',
+ nodes : [
+ 'ity',
+ {
+ label : 'boop',
+ nodes : [
+ {
+ label : 'o_O\nwheee',
+ nodes : [
+ {
+ label : 'oh',
+ nodes : [ 'hello', 'puny\nmeat' ]
+ },
+ 'creature'
+ ]
+ },
+ 'party\ntime!'
+ ]
+ }
+ ]
+ });
+ t.equal(s, [
+ 'beep',
+ '│ one',
+ '│ two',
+ '├── ity',
+ '└─┬ boop',
+ ' ├─┬ o_O',
+ ' │ │ wheee',
+ ' │ ├─┬ oh',
+ ' │ │ ├── hello',
+ ' │ │ └── puny',
+ ' │ │ meat',
+ ' │ └── creature',
+ ' └── party',
+ ' time!',
+ ''
+ ].join('\n'));
+ t.end();
+});
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/test/non_unicode.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/test/non_unicode.js
new file mode 100644
index 00000000..7204d332
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/archy/test/non_unicode.js
@@ -0,0 +1,40 @@
+var test = require('tape');
+var archy = require('../');
+
+test('beep', function (t) {
+ var s = archy({
+ label : 'beep',
+ nodes : [
+ 'ity',
+ {
+ label : 'boop',
+ nodes : [
+ {
+ label : 'o_O',
+ nodes : [
+ {
+ label : 'oh',
+ nodes : [ 'hello', 'puny' ]
+ },
+ 'human'
+ ]
+ },
+ 'party!'
+ ]
+ }
+ ]
+ }, '', { unicode : false });
+ t.equal(s, [
+ 'beep',
+ '+-- ity',
+ '`-- boop',
+ ' +-- o_O',
+ ' | +-- oh',
+ ' | | +-- hello',
+ ' | | `-- puny',
+ ' | `-- human',
+ ' `-- party!',
+ ''
+ ].join('\n'));
+ t.end();
+});
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-differ/index.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-differ/index.js
new file mode 100644
index 00000000..fbe2ed2c
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-differ/index.js
@@ -0,0 +1,7 @@
+'use strict';
+module.exports = function (arr) {
+ var rest = [].concat.apply([], [].slice.call(arguments, 1));
+ return arr.filter(function (el) {
+ return rest.indexOf(el) === -1;
+ });
+};
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-differ/package.json b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-differ/package.json
new file mode 100644
index 00000000..a817afb7
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-differ/package.json
@@ -0,0 +1,87 @@
+{
+ "_args": [
+ [
+ "array-differ@^1.0.0",
+ "/Users/sid/Desktop/code/RustyCode/node_modules/gulp-util"
+ ]
+ ],
+ "_from": "array-differ@>=1.0.0 <2.0.0",
+ "_id": "array-differ@1.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/array-differ",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "1.4.14",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "array-differ",
+ "raw": "array-differ@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulp-util"
+ ],
+ "_resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
+ "_shasum": "eff52e3758249d33be402b8bb8e564bb2b5d4031",
+ "_shrinkwrap": null,
+ "_spec": "array-differ@^1.0.0",
+ "_where": "/Users/sid/Desktop/code/RustyCode/node_modules/gulp-util",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/array-differ/issues"
+ },
+ "dependencies": {},
+ "description": "Create an array with values that are present in the first input array but not additional ones",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "eff52e3758249d33be402b8bb8e564bb2b5d4031",
+ "tarball": "http://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "e91802976c4710eef8dea2090d48e48525cf41b1",
+ "homepage": "https://github.com/sindresorhus/array-differ",
+ "keywords": [
+ "array",
+ "difference",
+ "diff",
+ "differ",
+ "filter",
+ "exclude"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ }
+ ],
+ "name": "array-differ",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/sindresorhus/array-differ.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "1.0.0"
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-differ/readme.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-differ/readme.md
new file mode 100644
index 00000000..68f5d360
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-differ/readme.md
@@ -0,0 +1,41 @@
+# array-differ [![Build Status](https://travis-ci.org/sindresorhus/array-differ.svg?branch=master)](https://travis-ci.org/sindresorhus/array-differ)
+
+> Create an array with values that are present in the first input array but not additional ones
+
+
+## Install
+
+```sh
+$ npm install --save array-differ
+```
+
+
+## Usage
+
+```js
+var arrayDiffer = require('array-differ');
+
+arrayDiffer([2, 3, 4], [3, 50]);
+//=> [2, 4]
+```
+
+## API
+
+### arrayDiffer(input, values, [values, ...])
+
+Returns the new array.
+
+#### input
+
+Type: `array`
+
+#### values
+
+Type: `array`
+
+Arrays of values to exclude.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/index.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/index.js
new file mode 100644
index 00000000..e2dcd9a0
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/index.js
@@ -0,0 +1,25 @@
+'use strict';
+module.exports = function (arr, predicate, ctx) {
+ if (typeof Array.prototype.findIndex === 'function') {
+ return arr.findIndex(predicate, ctx);
+ }
+
+ if (typeof predicate !== 'function') {
+ throw new TypeError('predicate must be a function');
+ }
+
+ var list = Object(arr);
+ var len = list.length;
+
+ if (len === 0) {
+ return -1;
+ }
+
+ for (var i = 0; i < len; i++) {
+ if (predicate.call(ctx, list[i], i, list)) {
+ return i;
+ }
+ }
+
+ return -1;
+};
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/license b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/license
new file mode 100644
index 00000000..654d0bfe
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/package.json b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/package.json
new file mode 100644
index 00000000..2f106eec
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/package.json
@@ -0,0 +1,92 @@
+{
+ "_args": [
+ [
+ "array-find-index@^1.0.0",
+ "/Users/sid/Desktop/code/RustyCode/node_modules/loud-rejection"
+ ]
+ ],
+ "_from": "array-find-index@>=1.0.0 <2.0.0",
+ "_id": "array-find-index@1.0.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/array-find-index",
+ "_nodeVersion": "4.2.4",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "2.14.12",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "array-find-index",
+ "raw": "array-find-index@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/loud-rejection"
+ ],
+ "_resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.1.tgz",
+ "_shasum": "0bc25ddac941ec8a496ae258fd4ac188003ef3af",
+ "_shrinkwrap": null,
+ "_spec": "array-find-index@^1.0.0",
+ "_where": "/Users/sid/Desktop/code/RustyCode/node_modules/loud-rejection",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/array-find-index/issues"
+ },
+ "dependencies": {},
+ "description": "ES2015 `Array#findIndex()` ponyfill",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "0bc25ddac941ec8a496ae258fd4ac188003ef3af",
+ "tarball": "http://registry.npmjs.org/array-find-index/-/array-find-index-1.0.1.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "0b2eea2c3e42aeb97be82b50f64a5672d2847036",
+ "homepage": "https://github.com/sindresorhus/array-find-index",
+ "keywords": [
+ "es6",
+ "es2015",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "find",
+ "index",
+ "findindex",
+ "array"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ }
+ ],
+ "name": "array-find-index",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/array-find-index.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.1"
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/readme.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/readme.md
new file mode 100644
index 00000000..cf06dd3b
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-find-index/readme.md
@@ -0,0 +1,32 @@
+# array-find-index [![Build Status](https://travis-ci.org/sindresorhus/array-find-index.svg?branch=master)](https://travis-ci.org/sindresorhus/array-find-index)
+
+> ES2015 [`Array#findIndex()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) ponyfill
+
+> Ponyfill: A polyfill that doesn't overwrite the native method
+
+
+## Install
+
+```
+$ npm install --save array-find-index
+```
+
+
+## Usage
+
+```js
+arrayFindIndex = require('array-find-index');
+
+arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn');
+//=> 1
+```
+
+
+## API
+
+Same as `Array#findIndex()`, but with the input array as the first argument.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-uniq/index.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-uniq/index.js
new file mode 100644
index 00000000..40f81b8a
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-uniq/index.js
@@ -0,0 +1,60 @@
+'use strict';
+
+// there's 3 implementations written in increasing order of efficiency
+
+// 1 - no Set type is defined
+function uniqNoSet(arr) {
+ var ret = [];
+
+ for (var i = 0; i < arr.length; i++) {
+ if (ret.indexOf(arr[i]) === -1) {
+ ret.push(arr[i]);
+ }
+ }
+
+ return ret;
+}
+
+// 2 - a simple Set type is defined
+function uniqSet(arr) {
+ var seen = new Set();
+ return arr.filter(function (el) {
+ if (!seen.has(el)) {
+ seen.add(el);
+ return true;
+ }
+ });
+}
+
+// 3 - a standard Set type is defined and it has a forEach method
+function uniqSetWithForEach(arr) {
+ var ret = [];
+
+ (new Set(arr)).forEach(function (el) {
+ ret.push(el);
+ });
+
+ return ret;
+}
+
+// V8 currently has a broken implementation
+// https://github.com/joyent/node/issues/8449
+function doesForEachActuallyWork() {
+ var ret = false;
+
+ (new Set([true])).forEach(function (el) {
+ ret = el;
+ });
+
+ return ret === true;
+}
+
+if ('Set' in global) {
+ if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) {
+ module.exports = uniqSetWithForEach;
+ } else {
+ module.exports = uniqSet;
+ }
+} else {
+ module.exports = uniqNoSet;
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-uniq/package.json b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-uniq/package.json
new file mode 100644
index 00000000..f0e8d0fe
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-uniq/package.json
@@ -0,0 +1,92 @@
+{
+ "_args": [
+ [
+ "array-uniq@^1.0.2",
+ "/Users/sid/Desktop/code/RustyCode/node_modules/gulp-util"
+ ]
+ ],
+ "_from": "array-uniq@>=1.0.2 <2.0.0",
+ "_id": "array-uniq@1.0.2",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/array-uniq",
+ "_nodeVersion": "0.10.32",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "2.1.5",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "array-uniq",
+ "raw": "array-uniq@^1.0.2",
+ "rawSpec": "^1.0.2",
+ "scope": null,
+ "spec": ">=1.0.2 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulp-util"
+ ],
+ "_resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz",
+ "_shasum": "5fcc373920775723cfd64d65c64bef53bf9eba6d",
+ "_shrinkwrap": null,
+ "_spec": "array-uniq@^1.0.2",
+ "_where": "/Users/sid/Desktop/code/RustyCode/node_modules/gulp-util",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/array-uniq/issues"
+ },
+ "dependencies": {},
+ "description": "Create an array without duplicates",
+ "devDependencies": {
+ "es6-set": "^0.1.0",
+ "mocha": "*",
+ "require-uncached": "^1.0.2"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "5fcc373920775723cfd64d65c64bef53bf9eba6d",
+ "tarball": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "d5e311f37692dfd25ec216490df10632ce5f69f3",
+ "homepage": "https://github.com/sindresorhus/array-uniq",
+ "keywords": [
+ "array",
+ "arr",
+ "set",
+ "uniq",
+ "unique",
+ "es6",
+ "duplicate",
+ "remove"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ }
+ ],
+ "name": "array-uniq",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/array-uniq.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "1.0.2"
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-uniq/readme.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-uniq/readme.md
new file mode 100644
index 00000000..5183d07e
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/array-uniq/readme.md
@@ -0,0 +1,30 @@
+# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq)
+
+> Create an array without duplicates
+
+It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays).
+
+
+## Install
+
+```sh
+$ npm install --save array-uniq
+```
+
+
+## Usage
+
+```js
+var arrayUniq = require('array-uniq');
+
+arrayUniq([1, 1, 2, 3, 3]);
+//=> [1, 2, 3]
+
+arrayUniq(['foo', 'foo', 'bar', 'foo']);
+//=> ['foo', 'bar']
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/.npmignore b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/.npmignore
new file mode 100644
index 00000000..eb03e3e1
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/.npmignore
@@ -0,0 +1,2 @@
+node_modules
+*.log
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/LICENSE b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/LICENSE
new file mode 100644
index 00000000..9b5dcdb7
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Mark Cavage, All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/README.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/README.md
new file mode 100644
index 00000000..7cebf7a2
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/README.md
@@ -0,0 +1,50 @@
+node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS.
+Currently BER encoding is supported; at some point I'll likely have to do DER.
+
+## Usage
+
+Mostly, if you're *actually* needing to read and write ASN.1, you probably don't
+need this readme to explain what and why. If you have no idea what ASN.1 is,
+see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc
+
+The source is pretty much self-explanatory, and has read/write methods for the
+common types out there.
+
+### Decoding
+
+The following reads an ASN.1 sequence with a boolean.
+
+ var Ber = require('asn1').Ber;
+
+ var reader = new Ber.Reader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff]));
+
+ reader.readSequence();
+ console.log('Sequence len: ' + reader.length);
+ if (reader.peek() === Ber.Boolean)
+ console.log(reader.readBoolean());
+
+### Encoding
+
+The following generates the same payload as above.
+
+ var Ber = require('asn1').Ber;
+
+ var writer = new Ber.Writer();
+
+ writer.startSequence();
+ writer.writeBoolean(true);
+ writer.endSequence();
+
+ console.log(writer.buffer);
+
+## Installation
+
+ npm install asn1
+
+## License
+
+MIT.
+
+## Bugs
+
+See .
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/errors.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/errors.js
new file mode 100644
index 00000000..ff21d4fa
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/errors.js
@@ -0,0 +1,13 @@
+// Copyright 2011 Mark Cavage All rights reserved.
+
+
+module.exports = {
+
+ newInvalidAsn1Error: function(msg) {
+ var e = new Error();
+ e.name = 'InvalidAsn1Error';
+ e.message = msg || '';
+ return e;
+ }
+
+};
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/index.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/index.js
new file mode 100644
index 00000000..4fb90aea
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/index.js
@@ -0,0 +1,27 @@
+// Copyright 2011 Mark Cavage All rights reserved.
+
+var errors = require('./errors');
+var types = require('./types');
+
+var Reader = require('./reader');
+var Writer = require('./writer');
+
+
+///--- Exports
+
+module.exports = {
+
+ Reader: Reader,
+
+ Writer: Writer
+
+};
+
+for (var t in types) {
+ if (types.hasOwnProperty(t))
+ module.exports[t] = types[t];
+}
+for (var e in errors) {
+ if (errors.hasOwnProperty(e))
+ module.exports[e] = errors[e];
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/reader.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/reader.js
new file mode 100644
index 00000000..bd3357a6
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/reader.js
@@ -0,0 +1,267 @@
+// Copyright 2011 Mark Cavage All rights reserved.
+
+var assert = require('assert');
+
+var ASN1 = require('./types');
+var errors = require('./errors');
+
+
+///--- Globals
+
+var newInvalidAsn1Error = errors.newInvalidAsn1Error;
+
+
+
+///--- API
+
+function Reader(data) {
+ if (!data || !Buffer.isBuffer(data))
+ throw new TypeError('data must be a node Buffer');
+
+ this._buf = data;
+ this._size = data.length;
+
+ // These hold the "current" state
+ this._len = 0;
+ this._offset = 0;
+
+ var self = this;
+ this.__defineGetter__('length', function() { return self._len; });
+ this.__defineGetter__('offset', function() { return self._offset; });
+ this.__defineGetter__('remain', function() {
+ return self._size - self._offset;
+ });
+ this.__defineGetter__('buffer', function() {
+ return self._buf.slice(self._offset);
+ });
+}
+
+
+/**
+ * Reads a single byte and advances offset; you can pass in `true` to make this
+ * a "peek" operation (i.e., get the byte, but don't advance the offset).
+ *
+ * @param {Boolean} peek true means don't move offset.
+ * @return {Number} the next byte, null if not enough data.
+ */
+Reader.prototype.readByte = function(peek) {
+ if (this._size - this._offset < 1)
+ return null;
+
+ var b = this._buf[this._offset] & 0xff;
+
+ if (!peek)
+ this._offset += 1;
+
+ return b;
+};
+
+
+Reader.prototype.peek = function() {
+ return this.readByte(true);
+};
+
+
+/**
+ * Reads a (potentially) variable length off the BER buffer. This call is
+ * not really meant to be called directly, as callers have to manipulate
+ * the internal buffer afterwards.
+ *
+ * As a result of this call, you can call `Reader.length`, until the
+ * next thing called that does a readLength.
+ *
+ * @return {Number} the amount of offset to advance the buffer.
+ * @throws {InvalidAsn1Error} on bad ASN.1
+ */
+Reader.prototype.readLength = function(offset) {
+ if (offset === undefined)
+ offset = this._offset;
+
+ if (offset >= this._size)
+ return null;
+
+ var lenB = this._buf[offset++] & 0xff;
+ if (lenB === null)
+ return null;
+
+ if ((lenB & 0x80) == 0x80) {
+ lenB &= 0x7f;
+
+ if (lenB == 0)
+ throw newInvalidAsn1Error('Indefinite length not supported');
+
+ if (lenB > 4)
+ throw newInvalidAsn1Error('encoding too long');
+
+ if (this._size - offset < lenB)
+ return null;
+
+ this._len = 0;
+ for (var i = 0; i < lenB; i++)
+ this._len = (this._len << 8) + (this._buf[offset++] & 0xff);
+
+ } else {
+ // Wasn't a variable length
+ this._len = lenB;
+ }
+
+ return offset;
+};
+
+
+/**
+ * Parses the next sequence in this BER buffer.
+ *
+ * To get the length of the sequence, call `Reader.length`.
+ *
+ * @return {Number} the sequence's tag.
+ */
+Reader.prototype.readSequence = function(tag) {
+ var seq = this.peek();
+ if (seq === null)
+ return null;
+ if (tag !== undefined && tag !== seq)
+ throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
+ ': got 0x' + seq.toString(16));
+
+ var o = this.readLength(this._offset + 1); // stored in `length`
+ if (o === null)
+ return null;
+
+ this._offset = o;
+ return seq;
+};
+
+
+Reader.prototype.readInt = function() {
+ return this._readTag(ASN1.Integer);
+};
+
+
+Reader.prototype.readBoolean = function() {
+ return (this._readTag(ASN1.Boolean) === 0 ? false : true);
+};
+
+
+Reader.prototype.readEnumeration = function() {
+ return this._readTag(ASN1.Enumeration);
+};
+
+
+Reader.prototype.readString = function(tag, retbuf) {
+ if (!tag)
+ tag = ASN1.OctetString;
+
+ var b = this.peek();
+ if (b === null)
+ return null;
+
+ if (b !== tag)
+ throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
+ ': got 0x' + b.toString(16));
+
+ var o = this.readLength(this._offset + 1); // stored in `length`
+
+ if (o === null)
+ return null;
+
+ if (this.length > this._size - o)
+ return null;
+
+ this._offset = o;
+
+ if (this.length === 0)
+ return '';
+
+ var str = this._buf.slice(this._offset, this._offset + this.length);
+ this._offset += this.length;
+
+ return retbuf ? str : str.toString('utf8');
+};
+
+Reader.prototype.readOID = function(tag) {
+ if (!tag)
+ tag = ASN1.OID;
+
+ var b = this.peek();
+ if (b === null)
+ return null;
+
+ if (b !== tag)
+ throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
+ ': got 0x' + b.toString(16));
+
+ var o = this.readLength(this._offset + 1); // stored in `length`
+ if (o === null)
+ return null;
+
+ if (this.length > this._size - o)
+ return null;
+
+ this._offset = o;
+
+ var values = [];
+ var value = 0;
+
+ for (var i = 0; i < this.length; i++) {
+ var byte = this._buf[this._offset++] & 0xff;
+
+ value <<= 7;
+ value += byte & 0x7f;
+ if ((byte & 0x80) == 0) {
+ values.push(value);
+ value = 0;
+ }
+ }
+
+ value = values.shift();
+ values.unshift(value % 40);
+ values.unshift((value / 40) >> 0);
+
+ return values.join('.');
+};
+
+
+Reader.prototype._readTag = function(tag) {
+ assert.ok(tag !== undefined);
+
+ var b = this.peek();
+
+ if (b === null)
+ return null;
+
+ if (b !== tag)
+ throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
+ ': got 0x' + b.toString(16));
+
+ var o = this.readLength(this._offset + 1); // stored in `length`
+ if (o === null)
+ return null;
+
+ if (this.length > 4)
+ throw newInvalidAsn1Error('Integer too long: ' + this.length);
+
+ if (this.length > this._size - o)
+ return null;
+ this._offset = o;
+
+ var fb = this._buf[this._offset++];
+ var value = 0;
+
+ value = fb & 0x7F;
+ for (var i = 1; i < this.length; i++) {
+ value <<= 8;
+ value |= (this._buf[this._offset++] & 0xff);
+ }
+
+ if ((fb & 0x80) == 0x80)
+ value = -value;
+
+ return value;
+};
+
+
+
+///--- Exported API
+
+module.exports = Reader;
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/types.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/types.js
new file mode 100644
index 00000000..8aea0001
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/types.js
@@ -0,0 +1,36 @@
+// Copyright 2011 Mark Cavage All rights reserved.
+
+
+module.exports = {
+ EOC: 0,
+ Boolean: 1,
+ Integer: 2,
+ BitString: 3,
+ OctetString: 4,
+ Null: 5,
+ OID: 6,
+ ObjectDescriptor: 7,
+ External: 8,
+ Real: 9, // float
+ Enumeration: 10,
+ PDV: 11,
+ Utf8String: 12,
+ RelativeOID: 13,
+ Sequence: 16,
+ Set: 17,
+ NumericString: 18,
+ PrintableString: 19,
+ T61String: 20,
+ VideotexString: 21,
+ IA5String: 22,
+ UTCTime: 23,
+ GeneralizedTime: 24,
+ GraphicString: 25,
+ VisibleString: 26,
+ GeneralString: 28,
+ UniversalString: 29,
+ CharacterString: 30,
+ BMPString: 31,
+ Constructor: 32,
+ Context: 128
+};
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/writer.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/writer.js
new file mode 100644
index 00000000..7b445cc6
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/ber/writer.js
@@ -0,0 +1,317 @@
+// Copyright 2011 Mark Cavage All rights reserved.
+
+var assert = require('assert');
+var ASN1 = require('./types');
+var errors = require('./errors');
+
+
+///--- Globals
+
+var newInvalidAsn1Error = errors.newInvalidAsn1Error;
+
+var DEFAULT_OPTS = {
+ size: 1024,
+ growthFactor: 8
+};
+
+
+///--- Helpers
+
+function merge(from, to) {
+ assert.ok(from);
+ assert.equal(typeof(from), 'object');
+ assert.ok(to);
+ assert.equal(typeof(to), 'object');
+
+ var keys = Object.getOwnPropertyNames(from);
+ keys.forEach(function(key) {
+ if (to[key])
+ return;
+
+ var value = Object.getOwnPropertyDescriptor(from, key);
+ Object.defineProperty(to, key, value);
+ });
+
+ return to;
+}
+
+
+
+///--- API
+
+function Writer(options) {
+ options = merge(DEFAULT_OPTS, options || {});
+
+ this._buf = new Buffer(options.size || 1024);
+ this._size = this._buf.length;
+ this._offset = 0;
+ this._options = options;
+
+ // A list of offsets in the buffer where we need to insert
+ // sequence tag/len pairs.
+ this._seq = [];
+
+ var self = this;
+ this.__defineGetter__('buffer', function() {
+ if (self._seq.length)
+ throw new InvalidAsn1Error(self._seq.length + ' unended sequence(s)');
+
+ return self._buf.slice(0, self._offset);
+ });
+}
+
+
+Writer.prototype.writeByte = function(b) {
+ if (typeof(b) !== 'number')
+ throw new TypeError('argument must be a Number');
+
+ this._ensure(1);
+ this._buf[this._offset++] = b;
+};
+
+
+Writer.prototype.writeInt = function(i, tag) {
+ if (typeof(i) !== 'number')
+ throw new TypeError('argument must be a Number');
+ if (typeof(tag) !== 'number')
+ tag = ASN1.Integer;
+
+ var sz = 4;
+
+ while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000)) &&
+ (sz > 1)) {
+ sz--;
+ i <<= 8;
+ }
+
+ if (sz > 4)
+ throw new InvalidAsn1Error('BER ints cannot be > 0xffffffff');
+
+ this._ensure(2 + sz);
+ this._buf[this._offset++] = tag;
+ this._buf[this._offset++] = sz;
+
+ while (sz-- > 0) {
+ this._buf[this._offset++] = ((i & 0xff000000) >> 24);
+ i <<= 8;
+ }
+
+};
+
+
+Writer.prototype.writeNull = function() {
+ this.writeByte(ASN1.Null);
+ this.writeByte(0x00);
+};
+
+
+Writer.prototype.writeEnumeration = function(i, tag) {
+ if (typeof(i) !== 'number')
+ throw new TypeError('argument must be a Number');
+ if (typeof(tag) !== 'number')
+ tag = ASN1.Enumeration;
+
+ return this.writeInt(i, tag);
+};
+
+
+Writer.prototype.writeBoolean = function(b, tag) {
+ if (typeof(b) !== 'boolean')
+ throw new TypeError('argument must be a Boolean');
+ if (typeof(tag) !== 'number')
+ tag = ASN1.Boolean;
+
+ this._ensure(3);
+ this._buf[this._offset++] = tag;
+ this._buf[this._offset++] = 0x01;
+ this._buf[this._offset++] = b ? 0xff : 0x00;
+};
+
+
+Writer.prototype.writeString = function(s, tag) {
+ if (typeof(s) !== 'string')
+ throw new TypeError('argument must be a string (was: ' + typeof(s) + ')');
+ if (typeof(tag) !== 'number')
+ tag = ASN1.OctetString;
+
+ var len = Buffer.byteLength(s);
+ this.writeByte(tag);
+ this.writeLength(len);
+ if (len) {
+ this._ensure(len);
+ this._buf.write(s, this._offset);
+ this._offset += len;
+ }
+};
+
+
+Writer.prototype.writeBuffer = function(buf, tag) {
+ if (typeof(tag) !== 'number')
+ throw new TypeError('tag must be a number');
+ if (!Buffer.isBuffer(buf))
+ throw new TypeError('argument must be a buffer');
+
+ this.writeByte(tag);
+ this.writeLength(buf.length);
+ this._ensure(buf.length);
+ buf.copy(this._buf, this._offset, 0, buf.length);
+ this._offset += buf.length;
+};
+
+
+Writer.prototype.writeStringArray = function(strings) {
+ if ((!strings instanceof Array))
+ throw new TypeError('argument must be an Array[String]');
+
+ var self = this;
+ strings.forEach(function(s) {
+ self.writeString(s);
+ });
+};
+
+// This is really to solve DER cases, but whatever for now
+Writer.prototype.writeOID = function(s, tag) {
+ if (typeof(s) !== 'string')
+ throw new TypeError('argument must be a string');
+ if (typeof(tag) !== 'number')
+ tag = ASN1.OID;
+
+ if (!/^([0-9]+\.){3,}[0-9]+$/.test(s))
+ throw new Error('argument is not a valid OID string');
+
+ function encodeOctet(bytes, octet) {
+ if (octet < 128) {
+ bytes.push(octet);
+ } else if (octet < 16384) {
+ bytes.push((octet >>> 7) | 0x80);
+ bytes.push(octet & 0x7F);
+ } else if (octet < 2097152) {
+ bytes.push((octet >>> 14) | 0x80);
+ bytes.push(((octet >>> 7) | 0x80) & 0xFF);
+ bytes.push(octet & 0x7F);
+ } else if (octet < 268435456) {
+ bytes.push((octet >>> 21) | 0x80);
+ bytes.push(((octet >>> 14) | 0x80) & 0xFF);
+ bytes.push(((octet >>> 7) | 0x80) & 0xFF);
+ bytes.push(octet & 0x7F);
+ } else {
+ bytes.push(((octet >>> 28) | 0x80) & 0xFF);
+ bytes.push(((octet >>> 21) | 0x80) & 0xFF);
+ bytes.push(((octet >>> 14) | 0x80) & 0xFF);
+ bytes.push(((octet >>> 7) | 0x80) & 0xFF);
+ bytes.push(octet & 0x7F);
+ }
+ }
+
+ var tmp = s.split('.');
+ var bytes = [];
+ bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10));
+ tmp.slice(2).forEach(function(b) {
+ encodeOctet(bytes, parseInt(b, 10));
+ });
+
+ var self = this;
+ this._ensure(2 + bytes.length);
+ this.writeByte(tag);
+ this.writeLength(bytes.length);
+ bytes.forEach(function(b) {
+ self.writeByte(b);
+ });
+};
+
+
+Writer.prototype.writeLength = function(len) {
+ if (typeof(len) !== 'number')
+ throw new TypeError('argument must be a Number');
+
+ this._ensure(4);
+
+ if (len <= 0x7f) {
+ this._buf[this._offset++] = len;
+ } else if (len <= 0xff) {
+ this._buf[this._offset++] = 0x81;
+ this._buf[this._offset++] = len;
+ } else if (len <= 0xffff) {
+ this._buf[this._offset++] = 0x82;
+ this._buf[this._offset++] = len >> 8;
+ this._buf[this._offset++] = len;
+ } else if (len <= 0xffffff) {
+ this._shift(start, len, 1);
+ this._buf[this._offset++] = 0x83;
+ this._buf[this._offset++] = len >> 16;
+ this._buf[this._offset++] = len >> 8;
+ this._buf[this._offset++] = len;
+ } else {
+ throw new InvalidAsn1ERror('Length too long (> 4 bytes)');
+ }
+};
+
+Writer.prototype.startSequence = function(tag) {
+ if (typeof(tag) !== 'number')
+ tag = ASN1.Sequence | ASN1.Constructor;
+
+ this.writeByte(tag);
+ this._seq.push(this._offset);
+ this._ensure(3);
+ this._offset += 3;
+};
+
+
+Writer.prototype.endSequence = function() {
+ var seq = this._seq.pop();
+ var start = seq + 3;
+ var len = this._offset - start;
+
+ if (len <= 0x7f) {
+ this._shift(start, len, -2);
+ this._buf[seq] = len;
+ } else if (len <= 0xff) {
+ this._shift(start, len, -1);
+ this._buf[seq] = 0x81;
+ this._buf[seq + 1] = len;
+ } else if (len <= 0xffff) {
+ this._buf[seq] = 0x82;
+ this._buf[seq + 1] = len >> 8;
+ this._buf[seq + 2] = len;
+ } else if (len <= 0xffffff) {
+ this._shift(start, len, 1);
+ this._buf[seq] = 0x83;
+ this._buf[seq + 1] = len >> 16;
+ this._buf[seq + 2] = len >> 8;
+ this._buf[seq + 3] = len;
+ } else {
+ throw new InvalidAsn1Error('Sequence too long');
+ }
+};
+
+
+Writer.prototype._shift = function(start, len, shift) {
+ assert.ok(start !== undefined);
+ assert.ok(len !== undefined);
+ assert.ok(shift);
+
+ this._buf.copy(this._buf, start + shift, start, start + len);
+ this._offset += shift;
+};
+
+Writer.prototype._ensure = function(len) {
+ assert.ok(len);
+
+ if (this._size - this._offset < len) {
+ var sz = this._size * this._options.growthFactor;
+ if (sz - this._offset < len)
+ sz += len;
+
+ var buf = new Buffer(sz);
+
+ this._buf.copy(buf, 0, 0, this._offset);
+ this._buf = buf;
+ this._size = sz;
+ }
+};
+
+
+
+///--- Exported API
+
+module.exports = Writer;
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/index.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/index.js
new file mode 100644
index 00000000..d1766e7a
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/lib/index.js
@@ -0,0 +1,20 @@
+// Copyright 2011 Mark Cavage All rights reserved.
+
+// If you have no idea what ASN.1 or BER is, see this:
+// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc
+
+var Ber = require('./ber/index');
+
+
+
+///--- Exported API
+
+module.exports = {
+
+ Ber: Ber,
+
+ BerReader: Ber.Reader,
+
+ BerWriter: Ber.Writer
+
+};
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/package.json b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/package.json
new file mode 100644
index 00000000..c2dd0468
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/package.json
@@ -0,0 +1,88 @@
+{
+ "_args": [
+ [
+ "asn1@0.1.11",
+ "/Users/sid/Desktop/code/RustyCode/node_modules/http-signature"
+ ]
+ ],
+ "_defaultsLoaded": true,
+ "_engineSupported": true,
+ "_from": "asn1@0.1.11",
+ "_id": "asn1@0.1.11",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/asn1",
+ "_nodeVersion": "v0.6.6",
+ "_npmUser": {
+ "email": "mcavage@gmail.com",
+ "name": "mcavage"
+ },
+ "_npmVersion": "1.1.0-beta-4",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "asn1",
+ "raw": "asn1@0.1.11",
+ "rawSpec": "0.1.11",
+ "scope": null,
+ "spec": "0.1.11",
+ "type": "version"
+ },
+ "_requiredBy": [
+ "/http-signature"
+ ],
+ "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz",
+ "_shasum": "559be18376d08a4ec4dbe80877d27818639b2df7",
+ "_shrinkwrap": null,
+ "_spec": "asn1@0.1.11",
+ "_where": "/Users/sid/Desktop/code/RustyCode/node_modules/http-signature",
+ "author": {
+ "email": "mcavage@gmail.com",
+ "name": "Mark Cavage"
+ },
+ "bugs": {
+ "url": "https://github.com/mcavage/node-asn1/issues"
+ },
+ "contributors": [
+ {
+ "email": "loki@animata.net",
+ "name": "David Gwynne"
+ },
+ {
+ "email": "yunong@joyent.com",
+ "name": "Yunong Xiao"
+ }
+ ],
+ "dependencies": {},
+ "description": "Contains parsers and serializers for ASN.1 (currently BER only)",
+ "devDependencies": {
+ "tap": "0.1.4"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "559be18376d08a4ec4dbe80877d27818639b2df7",
+ "tarball": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz"
+ },
+ "engines": {
+ "node": ">=0.4.9"
+ },
+ "homepage": "https://github.com/mcavage/node-asn1#readme",
+ "main": "lib/index.js",
+ "maintainers": [
+ {
+ "email": "mcavage@gmail.com",
+ "name": "mcavage"
+ }
+ ],
+ "name": "asn1",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mcavage/node-asn1.git"
+ },
+ "scripts": {
+ "pretest": "which gjslint; if [[ \"$?\" = 0 ]] ; then gjslint --nojsdoc -r lib -r tst; else echo \"Missing gjslint. Skipping lint\"; fi",
+ "test": "./node_modules/.bin/tap ./tst"
+ },
+ "version": "0.1.11"
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/tst/ber/reader.test.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/tst/ber/reader.test.js
new file mode 100644
index 00000000..0b78b474
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/tst/ber/reader.test.js
@@ -0,0 +1,172 @@
+// Copyright 2011 Mark Cavage All rights reserved.
+
+var test = require('tap').test;
+
+
+
+///--- Globals
+
+var BerReader;
+
+
+
+///--- Tests
+
+test('load library', function(t) {
+ BerReader = require('../../lib/index').BerReader;
+ t.ok(BerReader);
+ try {
+ new BerReader();
+ t.fail('Should have thrown');
+ } catch (e) {
+ t.ok(e instanceof TypeError, 'Should have been a type error');
+ }
+ t.end();
+});
+
+
+test('read byte', function(t) {
+ var reader = new BerReader(new Buffer([0xde]));
+ t.ok(reader);
+ t.equal(reader.readByte(), 0xde, 'wrong value');
+ t.end();
+});
+
+
+test('read 1 byte int', function(t) {
+ var reader = new BerReader(new Buffer([0x02, 0x01, 0x03]));
+ t.ok(reader);
+ t.equal(reader.readInt(), 0x03, 'wrong value');
+ t.equal(reader.length, 0x01, 'wrong length');
+ t.end();
+});
+
+
+test('read 2 byte int', function(t) {
+ var reader = new BerReader(new Buffer([0x02, 0x02, 0x7e, 0xde]));
+ t.ok(reader);
+ t.equal(reader.readInt(), 0x7ede, 'wrong value');
+ t.equal(reader.length, 0x02, 'wrong length');
+ t.end();
+});
+
+
+test('read 3 byte int', function(t) {
+ var reader = new BerReader(new Buffer([0x02, 0x03, 0x7e, 0xde, 0x03]));
+ t.ok(reader);
+ t.equal(reader.readInt(), 0x7ede03, 'wrong value');
+ t.equal(reader.length, 0x03, 'wrong length');
+ t.end();
+});
+
+
+test('read 4 byte int', function(t) {
+ var reader = new BerReader(new Buffer([0x02, 0x04, 0x7e, 0xde, 0x03, 0x01]));
+ t.ok(reader);
+ t.equal(reader.readInt(), 0x7ede0301, 'wrong value');
+ t.equal(reader.length, 0x04, 'wrong length');
+ t.end();
+});
+
+
+test('read boolean true', function(t) {
+ var reader = new BerReader(new Buffer([0x01, 0x01, 0xff]));
+ t.ok(reader);
+ t.equal(reader.readBoolean(), true, 'wrong value');
+ t.equal(reader.length, 0x01, 'wrong length');
+ t.end();
+});
+
+
+test('read boolean false', function(t) {
+ var reader = new BerReader(new Buffer([0x01, 0x01, 0x00]));
+ t.ok(reader);
+ t.equal(reader.readBoolean(), false, 'wrong value');
+ t.equal(reader.length, 0x01, 'wrong length');
+ t.end();
+});
+
+
+test('read enumeration', function(t) {
+ var reader = new BerReader(new Buffer([0x0a, 0x01, 0x20]));
+ t.ok(reader);
+ t.equal(reader.readEnumeration(), 0x20, 'wrong value');
+ t.equal(reader.length, 0x01, 'wrong length');
+ t.end();
+});
+
+
+test('read string', function(t) {
+ var dn = 'cn=foo,ou=unit,o=test';
+ var buf = new Buffer(dn.length + 2);
+ buf[0] = 0x04;
+ buf[1] = Buffer.byteLength(dn);
+ buf.write(dn, 2);
+ var reader = new BerReader(buf);
+ t.ok(reader);
+ t.equal(reader.readString(), dn, 'wrong value');
+ t.equal(reader.length, dn.length, 'wrong length');
+ t.end();
+});
+
+
+test('read sequence', function(t) {
+ var reader = new BerReader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff]));
+ t.ok(reader);
+ t.equal(reader.readSequence(), 0x30, 'wrong value');
+ t.equal(reader.length, 0x03, 'wrong length');
+ t.equal(reader.readBoolean(), true, 'wrong value');
+ t.equal(reader.length, 0x01, 'wrong length');
+ t.end();
+});
+
+
+test('anonymous LDAPv3 bind', function(t) {
+ var BIND = new Buffer(14);
+ BIND[0] = 0x30; // Sequence
+ BIND[1] = 12; // len
+ BIND[2] = 0x02; // ASN.1 Integer
+ BIND[3] = 1; // len
+ BIND[4] = 0x04; // msgid (make up 4)
+ BIND[5] = 0x60; // Bind Request
+ BIND[6] = 7; // len
+ BIND[7] = 0x02; // ASN.1 Integer
+ BIND[8] = 1; // len
+ BIND[9] = 0x03; // v3
+ BIND[10] = 0x04; // String (bind dn)
+ BIND[11] = 0; // len
+ BIND[12] = 0x80; // ContextSpecific (choice)
+ BIND[13] = 0; // simple bind
+
+ // Start testing ^^
+ var ber = new BerReader(BIND);
+ t.equal(ber.readSequence(), 48, 'Not an ASN.1 Sequence');
+ t.equal(ber.length, 12, 'Message length should be 12');
+ t.equal(ber.readInt(), 4, 'Message id should have been 4');
+ t.equal(ber.readSequence(), 96, 'Bind Request should have been 96');
+ t.equal(ber.length, 7, 'Bind length should have been 7');
+ t.equal(ber.readInt(), 3, 'LDAP version should have been 3');
+ t.equal(ber.readString(), '', 'Bind DN should have been empty');
+ t.equal(ber.length, 0, 'string length should have been 0');
+ t.equal(ber.readByte(), 0x80, 'Should have been ContextSpecific (choice)');
+ t.equal(ber.readByte(), 0, 'Should have been simple bind');
+ t.equal(null, ber.readByte(), 'Should be out of data');
+ t.end();
+});
+
+
+test('long string', function(t) {
+ var buf = new Buffer(256);
+ var o;
+ var s =
+ '2;649;CN=Red Hat CS 71GA Demo,O=Red Hat CS 71GA Demo,C=US;' +
+ 'CN=RHCS Agent - admin01,UID=admin01,O=redhat,C=US [1] This is ' +
+ 'Teena Vradmin\'s description.';
+ buf[0] = 0x04;
+ buf[1] = 0x81;
+ buf[2] = 0x94;
+ buf.write(s, 3);
+ var ber = new BerReader(buf.slice(0, 3 + s.length));
+ t.equal(ber.readString(), s);
+ t.end();
+});
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/tst/ber/writer.test.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/tst/ber/writer.test.js
new file mode 100644
index 00000000..add0b9fd
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/asn1/tst/ber/writer.test.js
@@ -0,0 +1,296 @@
+// Copyright 2011 Mark Cavage All rights reserved.
+
+var test = require('tap').test;
+var sys = require('sys');
+
+///--- Globals
+
+var BerWriter;
+
+var BerReader;
+
+
+///--- Tests
+
+test('load library', function(t) {
+ BerWriter = require('../../lib/index').BerWriter;
+ t.ok(BerWriter);
+ t.ok(new BerWriter());
+ t.end();
+});
+
+
+test('write byte', function(t) {
+ var writer = new BerWriter();
+
+ writer.writeByte(0xC2);
+ var ber = writer.buffer;
+
+ t.ok(ber);
+ t.equal(ber.length, 1, 'Wrong length');
+ t.equal(ber[0], 0xC2, 'value wrong');
+
+ t.end();
+});
+
+
+test('write 1 byte int', function(t) {
+ var writer = new BerWriter();
+
+ writer.writeInt(0x7f);
+ var ber = writer.buffer;
+
+ t.ok(ber);
+ t.equal(ber.length, 3, 'Wrong length for an int: ' + ber.length);
+ t.equal(ber[0], 0x02, 'ASN.1 tag wrong (2) -> ' + ber[0]);
+ t.equal(ber[1], 0x01, 'length wrong(1) -> ' + ber[1]);
+ t.equal(ber[2], 0x7f, 'value wrong(3) -> ' + ber[2]);
+
+ t.end();
+});
+
+
+test('write 2 byte int', function(t) {
+ var writer = new BerWriter();
+
+ writer.writeInt(0x7ffe);
+ var ber = writer.buffer;
+
+ t.ok(ber);
+ t.equal(ber.length, 4, 'Wrong length for an int');
+ t.equal(ber[0], 0x02, 'ASN.1 tag wrong');
+ t.equal(ber[1], 0x02, 'length wrong');
+ t.equal(ber[2], 0x7f, 'value wrong (byte 1)');
+ t.equal(ber[3], 0xfe, 'value wrong (byte 2)');
+
+ t.end();
+});
+
+
+test('write 3 byte int', function(t) {
+ var writer = new BerWriter();
+
+ writer.writeInt(0x7ffffe);
+ var ber = writer.buffer;
+
+ t.ok(ber);
+ t.equal(ber.length, 5, 'Wrong length for an int');
+ t.equal(ber[0], 0x02, 'ASN.1 tag wrong');
+ t.equal(ber[1], 0x03, 'length wrong');
+ t.equal(ber[2], 0x7f, 'value wrong (byte 1)');
+ t.equal(ber[3], 0xff, 'value wrong (byte 2)');
+ t.equal(ber[4], 0xfe, 'value wrong (byte 3)');
+
+ t.end();
+});
+
+
+test('write 4 byte int', function(t) {
+ var writer = new BerWriter();
+
+ writer.writeInt(0x7ffffffe);
+ var ber = writer.buffer;
+
+ t.ok(ber);
+
+ t.equal(ber.length, 6, 'Wrong length for an int');
+ t.equal(ber[0], 0x02, 'ASN.1 tag wrong');
+ t.equal(ber[1], 0x04, 'length wrong');
+ t.equal(ber[2], 0x7f, 'value wrong (byte 1)');
+ t.equal(ber[3], 0xff, 'value wrong (byte 2)');
+ t.equal(ber[4], 0xff, 'value wrong (byte 3)');
+ t.equal(ber[5], 0xfe, 'value wrong (byte 4)');
+
+ t.end();
+});
+
+
+test('write boolean', function(t) {
+ var writer = new BerWriter();
+
+ writer.writeBoolean(true);
+ writer.writeBoolean(false);
+ var ber = writer.buffer;
+
+ t.ok(ber);
+ t.equal(ber.length, 6, 'Wrong length');
+ t.equal(ber[0], 0x01, 'tag wrong');
+ t.equal(ber[1], 0x01, 'length wrong');
+ t.equal(ber[2], 0xff, 'value wrong');
+ t.equal(ber[3], 0x01, 'tag wrong');
+ t.equal(ber[4], 0x01, 'length wrong');
+ t.equal(ber[5], 0x00, 'value wrong');
+
+ t.end();
+});
+
+
+test('write string', function(t) {
+ var writer = new BerWriter();
+ writer.writeString('hello world');
+ var ber = writer.buffer;
+
+ t.ok(ber);
+ t.equal(ber.length, 13, 'wrong length');
+ t.equal(ber[0], 0x04, 'wrong tag');
+ t.equal(ber[1], 11, 'wrong length');
+ t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value');
+
+ t.end();
+});
+
+test('write buffer', function(t) {
+ var writer = new BerWriter();
+ // write some stuff to start with
+ writer.writeString('hello world');
+ var ber = writer.buffer;
+ var buf = new Buffer([0x04, 0x0b, 0x30, 0x09, 0x02, 0x01, 0x0f, 0x01, 0x01,
+ 0xff, 0x01, 0x01, 0xff]);
+ writer.writeBuffer(buf.slice(2, buf.length), 0x04);
+ ber = writer.buffer;
+
+ t.ok(ber);
+ t.equal(ber.length, 26, 'wrong length');
+ t.equal(ber[0], 0x04, 'wrong tag');
+ t.equal(ber[1], 11, 'wrong length');
+ t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value');
+ t.equal(ber[13], buf[0], 'wrong tag');
+ t.equal(ber[14], buf[1], 'wrong length');
+ for (var i = 13, j = 0; i < ber.length && j < buf.length; i++, j++) {
+ t.equal(ber[i], buf[j], 'buffer contents not identical');
+ }
+ t.end();
+});
+
+test('write string array', function(t) {
+ var writer = new BerWriter();
+ writer.writeStringArray(['hello world', 'fubar!']);
+ var ber = writer.buffer;
+
+ t.ok(ber);
+
+ t.equal(ber.length, 21, 'wrong length');
+ t.equal(ber[0], 0x04, 'wrong tag');
+ t.equal(ber[1], 11, 'wrong length');
+ t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value');
+
+ t.equal(ber[13], 0x04, 'wrong tag');
+ t.equal(ber[14], 6, 'wrong length');
+ t.equal(ber.slice(15).toString('utf8'), 'fubar!', 'wrong value');
+
+ t.end();
+});
+
+
+test('resize internal buffer', function(t) {
+ var writer = new BerWriter({size: 2});
+ writer.writeString('hello world');
+ var ber = writer.buffer;
+
+ t.ok(ber);
+ t.equal(ber.length, 13, 'wrong length');
+ t.equal(ber[0], 0x04, 'wrong tag');
+ t.equal(ber[1], 11, 'wrong length');
+ t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value');
+
+ t.end();
+});
+
+
+test('sequence', function(t) {
+ var writer = new BerWriter({size: 25});
+ writer.startSequence();
+ writer.writeString('hello world');
+ writer.endSequence();
+ var ber = writer.buffer;
+
+ t.ok(ber);
+ console.log(ber);
+ t.equal(ber.length, 15, 'wrong length');
+ t.equal(ber[0], 0x30, 'wrong tag');
+ t.equal(ber[1], 13, 'wrong length');
+ t.equal(ber[2], 0x04, 'wrong tag');
+ t.equal(ber[3], 11, 'wrong length');
+ t.equal(ber.slice(4).toString('utf8'), 'hello world', 'wrong value');
+
+ t.end();
+});
+
+
+test('nested sequence', function(t) {
+ var writer = new BerWriter({size: 25});
+ writer.startSequence();
+ writer.writeString('hello world');
+ writer.startSequence();
+ writer.writeString('hello world');
+ writer.endSequence();
+ writer.endSequence();
+ var ber = writer.buffer;
+
+ t.ok(ber);
+ t.equal(ber.length, 30, 'wrong length');
+ t.equal(ber[0], 0x30, 'wrong tag');
+ t.equal(ber[1], 28, 'wrong length');
+ t.equal(ber[2], 0x04, 'wrong tag');
+ t.equal(ber[3], 11, 'wrong length');
+ t.equal(ber.slice(4, 15).toString('utf8'), 'hello world', 'wrong value');
+ t.equal(ber[15], 0x30, 'wrong tag');
+ t.equal(ber[16], 13, 'wrong length');
+ t.equal(ber[17], 0x04, 'wrong tag');
+ t.equal(ber[18], 11, 'wrong length');
+ t.equal(ber.slice(19, 30).toString('utf8'), 'hello world', 'wrong value');
+
+ t.end();
+});
+
+
+test('LDAP bind message', function(t) {
+ var dn = 'cn=foo,ou=unit,o=test';
+ var writer = new BerWriter();
+ writer.startSequence();
+ writer.writeInt(3); // msgid = 3
+ writer.startSequence(0x60); // ldap bind
+ writer.writeInt(3); // ldap v3
+ writer.writeString(dn);
+ writer.writeByte(0x80);
+ writer.writeByte(0x00);
+ writer.endSequence();
+ writer.endSequence();
+ var ber = writer.buffer;
+
+ t.ok(ber);
+ t.equal(ber.length, 35, 'wrong length (buffer)');
+ t.equal(ber[0], 0x30, 'wrong tag');
+ t.equal(ber[1], 33, 'wrong length');
+ t.equal(ber[2], 0x02, 'wrong tag');
+ t.equal(ber[3], 1, 'wrong length');
+ t.equal(ber[4], 0x03, 'wrong value');
+ t.equal(ber[5], 0x60, 'wrong tag');
+ t.equal(ber[6], 28, 'wrong length');
+ t.equal(ber[7], 0x02, 'wrong tag');
+ t.equal(ber[8], 1, 'wrong length');
+ t.equal(ber[9], 0x03, 'wrong value');
+ t.equal(ber[10], 0x04, 'wrong tag');
+ t.equal(ber[11], dn.length, 'wrong length');
+ t.equal(ber.slice(12, 33).toString('utf8'), dn, 'wrong value');
+ t.equal(ber[33], 0x80, 'wrong tag');
+ t.equal(ber[34], 0x00, 'wrong len');
+
+ t.end();
+});
+
+
+test('Write OID', function(t) {
+ var oid = '1.2.840.113549.1.1.1';
+ var writer = new BerWriter();
+ writer.writeOID(oid);
+
+ var ber = writer.buffer;
+ t.ok(ber);
+ console.log(require('util').inspect(ber));
+ console.log(require('util').inspect(new Buffer([0x06, 0x09, 0x2a, 0x86,
+ 0x48, 0x86, 0xf7, 0x0d,
+ 0x01, 0x01, 0x01])));
+
+ t.end();
+});
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/assert-plus/README.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/assert-plus/README.md
new file mode 100644
index 00000000..c0c3a530
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/assert-plus/README.md
@@ -0,0 +1,126 @@
+# node-assert-plus
+
+This library is a super small wrapper over node's assert module that has two
+things: (1) the ability to disable assertions with the environment variable
+NODE_NDEBUG, and (2) some API wrappers for argument testing. Like
+`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
+like this:
+
+ var assert = require('assert-plus');
+
+ function fooAccount(options, callback) {
+ assert.object(options, 'options');
+ assert.number(options.id, 'options.id);
+ assert.bool(options.isManager, 'options.isManager');
+ assert.string(options.name, 'options.name');
+ assert.arrayOfString(options.email, 'options.email');
+ assert.func(callback, 'callback');
+
+ // Do stuff
+ callback(null, {});
+ }
+
+# API
+
+All methods that *aren't* part of node's core assert API are simply assumed to
+take an argument, and then a string 'name' that's not a message; `AssertionError`
+will be thrown if the assertion fails with a message like:
+
+ AssertionError: foo (string) is required
+ at test (/home/mark/work/foo/foo.js:3:9)
+ at Object. (/home/mark/work/foo/foo.js:15:1)
+ at Module._compile (module.js:446:26)
+ at Object..js (module.js:464:10)
+ at Module.load (module.js:353:31)
+ at Function._load (module.js:311:12)
+ at Array.0 (module.js:484:10)
+ at EventEmitter._tickCallback (node.js:190:38)
+
+from:
+
+ function test(foo) {
+ assert.string(foo, 'foo');
+ }
+
+There you go. You can check that arrays are of a homogenous type with `Arrayof$Type`:
+
+ function test(foo) {
+ assert.arrayOfString(foo, 'foo');
+ }
+
+You can assert IFF an argument is not `undefined` (i.e., an optional arg):
+
+ assert.optionalString(foo, 'foo');
+
+Lastly, you can opt-out of assertion checking altogether by setting the
+environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
+lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
+production.
+
+The complete list of APIs is:
+
+* assert.bool
+* assert.buffer
+* assert.func
+* assert.number
+* assert.object
+* assert.string
+* assert.arrayOfBool
+* assert.arrayOfFunc
+* assert.arrayOfNumber
+* assert.arrayOfObject
+* assert.arrayOfString
+* assert.optionalBool
+* assert.optionalBuffer
+* assert.optionalFunc
+* assert.optionalNumber
+* assert.optionalObject
+* assert.optionalString
+* assert.optionalArrayOfBool
+* assert.optionalArrayOfFunc
+* assert.optionalArrayOfNumber
+* assert.optionalArrayOfObject
+* assert.optionalArrayOfString
+* assert.AssertionError
+* assert.fail
+* assert.ok
+* assert.equal
+* assert.notEqual
+* assert.deepEqual
+* assert.notDeepEqual
+* assert.strictEqual
+* assert.notStrictEqual
+* assert.throws
+* assert.doesNotThrow
+* assert.ifError
+
+# Installation
+
+ npm install assert-plus
+
+## License
+
+The MIT License (MIT)
+Copyright (c) 2012 Mark Cavage
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+## Bugs
+
+See .
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/assert-plus/assert.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/assert-plus/assert.js
new file mode 100644
index 00000000..ff2ba02d
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/assert-plus/assert.js
@@ -0,0 +1,245 @@
+// Copyright (c) 2012, Mark Cavage. All rights reserved.
+
+var assert = require('assert');
+var Stream = require('stream').Stream;
+var util = require('util');
+
+
+
+///--- Globals
+
+var NDEBUG = process.env.NODE_NDEBUG || false;
+var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
+
+
+
+///--- Messages
+
+var ARRAY_TYPE_REQUIRED = '%s ([%s]) required';
+var TYPE_REQUIRED = '%s (%s) is required';
+
+
+
+///--- Internal
+
+function capitalize(str) {
+ return (str.charAt(0).toUpperCase() + str.slice(1));
+}
+
+function uncapitalize(str) {
+ return (str.charAt(0).toLowerCase() + str.slice(1));
+}
+
+function _() {
+ return (util.format.apply(util, arguments));
+}
+
+
+function _assert(arg, type, name, stackFunc) {
+ if (!NDEBUG) {
+ name = name || type;
+ stackFunc = stackFunc || _assert.caller;
+ var t = typeof (arg);
+
+ if (t !== type) {
+ throw new assert.AssertionError({
+ message: _(TYPE_REQUIRED, name, type),
+ actual: t,
+ expected: type,
+ operator: '===',
+ stackStartFunction: stackFunc
+ });
+ }
+ }
+}
+
+
+function _instanceof(arg, type, name, stackFunc) {
+ if (!NDEBUG) {
+ name = name || type;
+ stackFunc = stackFunc || _instanceof.caller;
+
+ if (!(arg instanceof type)) {
+ throw new assert.AssertionError({
+ message: _(TYPE_REQUIRED, name, type.name),
+ actual: _getClass(arg),
+ expected: type.name,
+ operator: 'instanceof',
+ stackStartFunction: stackFunc
+ });
+ }
+ }
+}
+
+function _getClass(object) {
+ return (Object.prototype.toString.call(object).slice(8, -1));
+};
+
+
+
+///--- API
+
+function array(arr, type, name) {
+ if (!NDEBUG) {
+ name = name || type;
+
+ if (!Array.isArray(arr)) {
+ throw new assert.AssertionError({
+ message: _(ARRAY_TYPE_REQUIRED, name, type),
+ actual: typeof (arr),
+ expected: 'array',
+ operator: 'Array.isArray',
+ stackStartFunction: array.caller
+ });
+ }
+
+ for (var i = 0; i < arr.length; i++) {
+ _assert(arr[i], type, name, array);
+ }
+ }
+}
+
+
+function bool(arg, name) {
+ _assert(arg, 'boolean', name, bool);
+}
+
+
+function buffer(arg, name) {
+ if (!Buffer.isBuffer(arg)) {
+ throw new assert.AssertionError({
+ message: _(TYPE_REQUIRED, name || '', 'Buffer'),
+ actual: typeof (arg),
+ expected: 'buffer',
+ operator: 'Buffer.isBuffer',
+ stackStartFunction: buffer
+ });
+ }
+}
+
+
+function func(arg, name) {
+ _assert(arg, 'function', name);
+}
+
+
+function number(arg, name) {
+ _assert(arg, 'number', name);
+ if (!NDEBUG && (isNaN(arg) || !isFinite(arg))) {
+ throw new assert.AssertionError({
+ message: _(TYPE_REQUIRED, name, 'number'),
+ actual: arg,
+ expected: 'number',
+ operator: 'isNaN',
+ stackStartFunction: number
+ });
+ }
+}
+
+
+function object(arg, name) {
+ _assert(arg, 'object', name);
+}
+
+
+function stream(arg, name) {
+ _instanceof(arg, Stream, name);
+}
+
+
+function date(arg, name) {
+ _instanceof(arg, Date, name);
+}
+
+function regexp(arg, name) {
+ _instanceof(arg, RegExp, name);
+}
+
+
+function string(arg, name) {
+ _assert(arg, 'string', name);
+}
+
+
+function uuid(arg, name) {
+ string(arg, name);
+ if (!NDEBUG && !UUID_REGEXP.test(arg)) {
+ throw new assert.AssertionError({
+ message: _(TYPE_REQUIRED, name, 'uuid'),
+ actual: 'string',
+ expected: 'uuid',
+ operator: 'test',
+ stackStartFunction: uuid
+ });
+ }
+}
+
+
+///--- Exports
+
+module.exports = {
+ bool: bool,
+ buffer: buffer,
+ date: date,
+ func: func,
+ number: number,
+ object: object,
+ regexp: regexp,
+ stream: stream,
+ string: string,
+ uuid: uuid
+};
+
+
+Object.keys(module.exports).forEach(function (k) {
+ if (k === 'buffer')
+ return;
+
+ var name = 'arrayOf' + capitalize(k);
+
+ if (k === 'bool')
+ k = 'boolean';
+ if (k === 'func')
+ k = 'function';
+ module.exports[name] = function (arg, name) {
+ array(arg, k, name);
+ };
+});
+
+Object.keys(module.exports).forEach(function (k) {
+ var _name = 'optional' + capitalize(k);
+ var s = uncapitalize(k.replace('arrayOf', ''));
+ if (s === 'bool')
+ s = 'boolean';
+ if (s === 'func')
+ s = 'function';
+
+ if (k.indexOf('arrayOf') !== -1) {
+ module.exports[_name] = function (arg, name) {
+ if (!NDEBUG && arg !== undefined) {
+ array(arg, s, name);
+ }
+ };
+ } else {
+ module.exports[_name] = function (arg, name) {
+ if (!NDEBUG && arg !== undefined) {
+ _assert(arg, s, name);
+ }
+ };
+ }
+});
+
+
+// Reexport built-in assertions
+Object.keys(assert).forEach(function (k) {
+ if (k === 'AssertionError') {
+ module.exports[k] = assert[k];
+ return;
+ }
+
+ module.exports[k] = function () {
+ if (!NDEBUG) {
+ assert[k].apply(assert[k], arguments);
+ }
+ };
+});
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/assert-plus/package.json b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/assert-plus/package.json
new file mode 100644
index 00000000..6b73446a
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/assert-plus/package.json
@@ -0,0 +1,69 @@
+{
+ "_args": [
+ [
+ "assert-plus@^0.1.5",
+ "/Users/sid/Desktop/code/RustyCode/node_modules/http-signature"
+ ]
+ ],
+ "_from": "assert-plus@>=0.1.5 <0.2.0",
+ "_id": "assert-plus@0.1.5",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/assert-plus",
+ "_npmUser": {
+ "email": "mcavage@gmail.com",
+ "name": "mcavage"
+ },
+ "_npmVersion": "1.3.11",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "assert-plus",
+ "raw": "assert-plus@^0.1.5",
+ "rawSpec": "^0.1.5",
+ "scope": null,
+ "spec": ">=0.1.5 <0.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/http-signature"
+ ],
+ "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz",
+ "_shasum": "ee74009413002d84cec7219c6ac811812e723160",
+ "_shrinkwrap": null,
+ "_spec": "assert-plus@^0.1.5",
+ "_where": "/Users/sid/Desktop/code/RustyCode/node_modules/http-signature",
+ "author": {
+ "email": "mcavage@gmail.com",
+ "name": "Mark Cavage"
+ },
+ "bugs": {
+ "url": "https://github.com/mcavage/node-assert-plus/issues"
+ },
+ "dependencies": {},
+ "description": "Extra assertions on top of node's assert module",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "ee74009413002d84cec7219c6ac811812e723160",
+ "tarball": "http://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "homepage": "https://github.com/mcavage/node-assert-plus#readme",
+ "main": "./assert.js",
+ "maintainers": [
+ {
+ "email": "mcavage@gmail.com",
+ "name": "mcavage"
+ }
+ ],
+ "name": "assert-plus",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mcavage/node-assert-plus.git"
+ },
+ "version": "0.1.5"
+}
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/CHANGELOG.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/CHANGELOG.md
new file mode 100644
index 00000000..f15e0812
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/CHANGELOG.md
@@ -0,0 +1,125 @@
+# v1.5.2
+- Allow using `"consructor"` as an argument in `memoize` (#998)
+- Give a better error messsage when `auto` dependency checking fails (#994)
+- Various doc updates (#936, #956, #979, #1002)
+
+# v1.5.1
+- Fix issue with `pause` in `queue` with concurrency enabled (#946)
+- `while` and `until` now pass the final result to callback (#963)
+- `auto` will properly handle concurrency when there is no callback (#966)
+- `auto` will now properly stop execution when an error occurs (#988, #993)
+- Various doc fixes (#971, #980)
+
+# v1.5.0
+
+- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) (#892)
+- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. (#873)
+- `auto` now accepts an optional `concurrency` argument to limit the number of running tasks (#637)
+- Added `queue#workersList()`, to retrieve the list of currently running tasks. (#891)
+- Various code simplifications (#896, #904)
+- Various doc fixes :scroll: (#890, #894, #903, #905, #912)
+
+# v1.4.2
+
+- Ensure coverage files don't get published on npm (#879)
+
+# v1.4.1
+
+- Add in overlooked `detectLimit` method (#866)
+- Removed unnecessary files from npm releases (#861)
+- Removed usage of a reserved word to prevent :boom: in older environments (#870)
+
+# v1.4.0
+
+- `asyncify` now supports promises (#840)
+- Added `Limit` versions of `filter` and `reject` (#836)
+- Add `Limit` versions of `detect`, `some` and `every` (#828, #829)
+- `some`, `every` and `detect` now short circuit early (#828, #829)
+- Improve detection of the global object (#804), enabling use in WebWorkers
+- `whilst` now called with arguments from iterator (#823)
+- `during` now gets called with arguments from iterator (#824)
+- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0))
+
+
+# v1.3.0
+
+New Features:
+- Added `constant`
+- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. (#671, #806)
+- Added `during` and `doDuring`, which are like `whilst` with an async truth test. (#800)
+- `retry` now accepts an `interval` parameter to specify a delay between retries. (#793)
+- `async` should work better in Web Workers due to better `root` detection (#804)
+- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` (#642)
+- Various internal updates (#786, #801, #802, #803)
+- Various doc fixes (#790, #794)
+
+Bug Fixes:
+- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. (#740, #744, #783)
+
+
+# v1.2.1
+
+Bug Fix:
+
+- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
+
+
+# v1.2.0
+
+New Features:
+
+- Added `timesLimit` (#743)
+- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. (#747, #772)
+
+Bug Fixes:
+
+- Fixed a regression in `each` and family with empty arrays that have additional properties. (#775, #777)
+
+
+# v1.1.1
+
+Bug Fix:
+
+- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
+
+
+# v1.1.0
+
+New Features:
+
+- `cargo` now supports all of the same methods and event callbacks as `queue`.
+- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. (#769)
+- Optimized `map`, `eachOf`, and `waterfall` families of functions
+- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array (#667).
+- The callback is now optional for the composed results of `compose` and `seq`. (#618)
+- Reduced file size by 4kb, (minified version by 1kb)
+- Added code coverage through `nyc` and `coveralls` (#768)
+
+Bug Fixes:
+
+- `forever` will no longer stack overflow with a synchronous iterator (#622)
+- `eachLimit` and other limit functions will stop iterating once an error occurs (#754)
+- Always pass `null` in callbacks when there is no error (#439)
+- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue (#668)
+- `each` and family will properly handle an empty array (#578)
+- `eachSeries` and family will finish if the underlying array is modified during execution (#557)
+- `queue` will throw if a non-function is passed to `q.push()` (#593)
+- Doc fixes (#629, #766)
+
+
+# v1.0.0
+
+No known breaking changes, we are simply complying with semver from here on out.
+
+Changes:
+
+- Start using a changelog!
+- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) (#168 #704 #321)
+- Detect deadlocks in `auto` (#663)
+- Better support for require.js (#527)
+- Throw if queue created with concurrency `0` (#714)
+- Fix unneeded iteration in `queue.resume()` (#758)
+- Guard against timer mocking overriding `setImmediate` (#609 #611)
+- Miscellaneous doc fixes (#542 #596 #615 #628 #631 #690 #729)
+- Use single noop function internally (#546)
+- Optimize internal `_each`, `_map` and `_keys` functions.
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/LICENSE b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/LICENSE
new file mode 100644
index 00000000..8f296985
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010-2014 Caolan McMahon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/README.md b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/README.md
new file mode 100644
index 00000000..316c4050
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/README.md
@@ -0,0 +1,1877 @@
+# Async.js
+
+[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async)
+[![NPM version](http://img.shields.io/npm/v/async.svg)](https://www.npmjs.org/package/async)
+[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master)
+[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+
+Async is a utility module which provides straight-forward, powerful functions
+for working with asynchronous JavaScript. Although originally designed for
+use with [Node.js](http://nodejs.org) and installable via `npm install async`,
+it can also be used directly in the browser.
+
+Async is also installable via:
+
+- [bower](http://bower.io/): `bower install async`
+- [component](https://github.com/component/component): `component install
+ caolan/async`
+- [jam](http://jamjs.org/): `jam install async`
+- [spm](http://spmjs.io/): `spm install async`
+
+Async provides around 20 functions that include the usual 'functional'
+suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns
+for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these
+functions assume you follow the Node.js convention of providing a single
+callback as the last argument of your `async` function.
+
+
+## Quick Examples
+
+```javascript
+async.map(['file1','file2','file3'], fs.stat, function(err, results){
+ // results is now an array of stats for each file
+});
+
+async.filter(['file1','file2','file3'], fs.exists, function(results){
+ // results now equals an array of the existing files
+});
+
+async.parallel([
+ function(){ ... },
+ function(){ ... }
+], callback);
+
+async.series([
+ function(){ ... },
+ function(){ ... }
+]);
+```
+
+There are many more functions available so take a look at the docs below for a
+full list. This module aims to be comprehensive, so if you feel anything is
+missing please create a GitHub issue for it.
+
+## Common Pitfalls [(StackOverflow)](http://stackoverflow.com/questions/tagged/async.js)
+### Synchronous iteration functions
+
+If you get an error like `RangeError: Maximum call stack size exceeded.` or other stack overflow issues when using async, you are likely using a synchronous iterator. By *synchronous* we mean a function that calls its callback on the same tick in the javascript event loop, without doing any I/O or using any timers. Calling many callbacks iteratively will quickly overflow the stack. If you run into this issue, just defer your callback with `async.setImmediate` to start a new call stack on the next tick of the event loop.
+
+This can also arise by accident if you callback early in certain cases:
+
+```js
+async.eachSeries(hugeArray, function iterator(item, callback) {
+ if (inCache(item)) {
+ callback(null, cache[item]); // if many items are cached, you'll overflow
+ } else {
+ doSomeIO(item, callback);
+ }
+}, function done() {
+ //...
+});
+```
+
+Just change it to:
+
+```js
+async.eachSeries(hugeArray, function iterator(item, callback) {
+ if (inCache(item)) {
+ async.setImmediate(function () {
+ callback(null, cache[item]);
+ });
+ } else {
+ doSomeIO(item, callback);
+ //...
+```
+
+Async guards against synchronous functions in some, but not all, cases. If you are still running into stack overflows, you can defer as suggested above, or wrap functions with [`async.ensureAsync`](#ensureAsync) Functions that are asynchronous by their nature do not have this problem and don't need the extra callback deferral.
+
+If JavaScript's event loop is still a bit nebulous, check out [this article](http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/) or [this talk](http://2014.jsconf.eu/speakers/philip-roberts-what-the-heck-is-the-event-loop-anyway.html) for more detailed information about how it works.
+
+
+### Multiple callbacks
+
+Make sure to always `return` when calling a callback early, otherwise you will cause multiple callbacks and unpredictable behavior in many cases.
+
+```js
+async.waterfall([
+ function (callback) {
+ getSomething(options, function (err, result) {
+ if (err) {
+ callback(new Error("failed getting something:" + err.message));
+ // we should return here
+ }
+ // since we did not return, this callback still will be called and
+ // `processData` will be called twice
+ callback(null, result);
+ });
+ },
+ processData
+], done)
+```
+
+It is always good practice to `return callback(err, result)` whenever a callback call is not the last statement of a function.
+
+
+### Binding a context to an iterator
+
+This section is really about `bind`, not about `async`. If you are wondering how to
+make `async` execute your iterators in a given context, or are confused as to why
+a method of another library isn't working as an iterator, study this example:
+
+```js
+// Here is a simple object with an (unnecessarily roundabout) squaring method
+var AsyncSquaringLibrary = {
+ squareExponent: 2,
+ square: function(number, callback){
+ var result = Math.pow(number, this.squareExponent);
+ setTimeout(function(){
+ callback(null, result);
+ }, 200);
+ }
+};
+
+async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){
+ // result is [NaN, NaN, NaN]
+ // This fails because the `this.squareExponent` expression in the square
+ // function is not evaluated in the context of AsyncSquaringLibrary, and is
+ // therefore undefined.
+});
+
+async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){
+ // result is [1, 4, 9]
+ // With the help of bind we can attach a context to the iterator before
+ // passing it to async. Now the square function will be executed in its
+ // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`
+ // will be as expected.
+});
+```
+
+## Download
+
+The source is available for download from
+[GitHub](https://github.com/caolan/async/blob/master/lib/async.js).
+Alternatively, you can install using Node Package Manager (`npm`):
+
+ npm install async
+
+As well as using Bower:
+
+ bower install async
+
+__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed
+
+## In the Browser
+
+So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5.
+
+Usage:
+
+```html
+
+
+```
+
+## Documentation
+
+Some functions are also available in the following forms:
+* `Series` - the same as `` but runs only a single async operation at a time
+* `Limit` - the same as `` but runs a maximum of `limit` async operations at a time
+
+### Collections
+
+* [`each`](#each), `eachSeries`, `eachLimit`
+* [`forEachOf`](#forEachOf), `forEachOfSeries`, `forEachOfLimit`
+* [`map`](#map), `mapSeries`, `mapLimit`
+* [`filter`](#filter), `filterSeries`, `filterLimit`
+* [`reject`](#reject), `rejectSeries`, `rejectLimit`
+* [`reduce`](#reduce), [`reduceRight`](#reduceRight)
+* [`detect`](#detect), `detectSeries`, `detectLimit`
+* [`sortBy`](#sortBy)
+* [`some`](#some), `someLimit`
+* [`every`](#every), `everyLimit`
+* [`concat`](#concat), `concatSeries`
+
+### Control Flow
+
+* [`series`](#seriestasks-callback)
+* [`parallel`](#parallel), `parallelLimit`
+* [`whilst`](#whilst), [`doWhilst`](#doWhilst)
+* [`until`](#until), [`doUntil`](#doUntil)
+* [`during`](#during), [`doDuring`](#doDuring)
+* [`forever`](#forever)
+* [`waterfall`](#waterfall)
+* [`compose`](#compose)
+* [`seq`](#seq)
+* [`applyEach`](#applyEach), `applyEachSeries`
+* [`queue`](#queue), [`priorityQueue`](#priorityQueue)
+* [`cargo`](#cargo)
+* [`auto`](#auto)
+* [`retry`](#retry)
+* [`iterator`](#iterator)
+* [`times`](#times), `timesSeries`, `timesLimit`
+
+### Utils
+
+* [`apply`](#apply)
+* [`nextTick`](#nextTick)
+* [`memoize`](#memoize)
+* [`unmemoize`](#unmemoize)
+* [`ensureAsync`](#ensureAsync)
+* [`constant`](#constant)
+* [`asyncify`](#asyncify)
+* [`wrapSync`](#wrapSync)
+* [`log`](#log)
+* [`dir`](#dir)
+* [`noConflict`](#noConflict)
+
+## Collections
+
+
+
+### each(arr, iterator, [callback])
+
+Applies the function `iterator` to each item in `arr`, in parallel.
+The `iterator` is called with an item from the list, and a callback for when it
+has finished. If the `iterator` passes an error to its `callback`, the main
+`callback` (for the `each` function) is immediately called with the error.
+
+Note, that since this function applies `iterator` to each item in parallel,
+there is no guarantee that the iterator functions will complete in order.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A function to apply to each item in `arr`.
+ The iterator is passed a `callback(err)` which must be called once it has
+ completed. If no error has occurred, the `callback` should be run without
+ arguments or with an explicit `null` argument. The array index is not passed
+ to the iterator. If you need the index, use [`forEachOf`](#forEachOf).
+* `callback(err)` - *Optional* A callback which is called when all `iterator` functions
+ have finished, or an error occurs.
+
+__Examples__
+
+
+```js
+// assuming openFiles is an array of file names and saveFile is a function
+// to save the modified contents of that file:
+
+async.each(openFiles, saveFile, function(err){
+ // if any of the saves produced an error, err would equal that error
+});
+```
+
+```js
+// assuming openFiles is an array of file names
+
+async.each(openFiles, function(file, callback) {
+
+ // Perform operation on file here.
+ console.log('Processing file ' + file);
+
+ if( file.length > 32 ) {
+ console.log('This file name is too long');
+ callback('File name too long');
+ } else {
+ // Do work to process file here
+ console.log('File processed');
+ callback();
+ }
+}, function(err){
+ // if any of the file processing produced an error, err would equal that error
+ if( err ) {
+ // One of the iterations produced an error.
+ // All processing will now stop.
+ console.log('A file failed to process');
+ } else {
+ console.log('All files have been processed successfully');
+ }
+});
+```
+
+__Related__
+
+* eachSeries(arr, iterator, [callback])
+* eachLimit(arr, limit, iterator, [callback])
+
+---------------------------------------
+
+
+
+
+### forEachOf(obj, iterator, [callback])
+
+Like `each`, except that it iterates over objects, and passes the key as the second argument to the iterator.
+
+__Arguments__
+
+* `obj` - An object or array to iterate over.
+* `iterator(item, key, callback)` - A function to apply to each item in `obj`.
+The `key` is the item's key, or index in the case of an array. The iterator is
+passed a `callback(err)` which must be called once it has completed. If no
+error has occurred, the callback should be run without arguments or with an
+explicit `null` argument.
+* `callback(err)` - *Optional* A callback which is called when all `iterator` functions have finished, or an error occurs.
+
+__Example__
+
+```js
+var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
+var configs = {};
+
+async.forEachOf(obj, function (value, key, callback) {
+ fs.readFile(__dirname + value, "utf8", function (err, data) {
+ if (err) return callback(err);
+ try {
+ configs[key] = JSON.parse(data);
+ } catch (e) {
+ return callback(e);
+ }
+ callback();
+ })
+}, function (err) {
+ if (err) console.error(err.message);
+ // configs is now a map of JSON data
+ doSomethingWith(configs);
+})
+```
+
+__Related__
+
+* forEachOfSeries(obj, iterator, [callback])
+* forEachOfLimit(obj, limit, iterator, [callback])
+
+---------------------------------------
+
+
+### map(arr, iterator, [callback])
+
+Produces a new array of values by mapping each value in `arr` through
+the `iterator` function. The `iterator` is called with an item from `arr` and a
+callback for when it has finished processing. Each of these callback takes 2 arguments:
+an `error`, and the transformed item from `arr`. If `iterator` passes an error to its
+callback, the main `callback` (for the `map` function) is immediately called with the error.
+
+Note, that since this function applies the `iterator` to each item in parallel,
+there is no guarantee that the `iterator` functions will complete in order.
+However, the results array will be in the same order as the original `arr`.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A function to apply to each item in `arr`.
+ The iterator is passed a `callback(err, transformed)` which must be called once
+ it has completed with an error (which can be `null`) and a transformed item.
+* `callback(err, results)` - *Optional* A callback which is called when all `iterator`
+ functions have finished, or an error occurs. Results is an array of the
+ transformed items from the `arr`.
+
+__Example__
+
+```js
+async.map(['file1','file2','file3'], fs.stat, function(err, results){
+ // results is now an array of stats for each file
+});
+```
+
+__Related__
+* mapSeries(arr, iterator, [callback])
+* mapLimit(arr, limit, iterator, [callback])
+
+---------------------------------------
+
+
+
+### filter(arr, iterator, [callback])
+
+__Alias:__ `select`
+
+Returns a new array of all the values in `arr` which pass an async truth test.
+_The callback for each `iterator` call only accepts a single argument of `true` or
+`false`; it does not accept an error argument first!_ This is in-line with the
+way node libraries work with truth tests like `fs.exists`. This operation is
+performed in parallel, but the results array will be in the same order as the
+original.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
+ The `iterator` is passed a `callback(truthValue)`, which must be called with a
+ boolean argument once it has completed.
+* `callback(results)` - *Optional* A callback which is called after all the `iterator`
+ functions have finished.
+
+__Example__
+
+```js
+async.filter(['file1','file2','file3'], fs.exists, function(results){
+ // results now equals an array of the existing files
+});
+```
+
+__Related__
+
+* filterSeries(arr, iterator, [callback])
+* filterLimit(arr, limit, iterator, [callback])
+
+---------------------------------------
+
+
+### reject(arr, iterator, [callback])
+
+The opposite of [`filter`](#filter). Removes values that pass an `async` truth test.
+
+__Related__
+
+* rejectSeries(arr, iterator, [callback])
+* rejectLimit(arr, limit, iterator, [callback])
+
+---------------------------------------
+
+
+### reduce(arr, memo, iterator, [callback])
+
+__Aliases:__ `inject`, `foldl`
+
+Reduces `arr` into a single value using an async `iterator` to return
+each successive step. `memo` is the initial state of the reduction.
+This function only operates in series.
+
+For performance reasons, it may make sense to split a call to this function into
+a parallel map, and then use the normal `Array.prototype.reduce` on the results.
+This function is for situations where each step in the reduction needs to be async;
+if you can get the data before reducing it, then it's probably a good idea to do so.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `memo` - The initial state of the reduction.
+* `iterator(memo, item, callback)` - A function applied to each item in the
+ array to produce the next step in the reduction. The `iterator` is passed a
+ `callback(err, reduction)` which accepts an optional error as its first
+ argument, and the state of the reduction as the second. If an error is
+ passed to the callback, the reduction is stopped and the main `callback` is
+ immediately called with the error.
+* `callback(err, result)` - *Optional* A callback which is called after all the `iterator`
+ functions have finished. Result is the reduced value.
+
+__Example__
+
+```js
+async.reduce([1,2,3], 0, function(memo, item, callback){
+ // pointless async:
+ process.nextTick(function(){
+ callback(null, memo + item)
+ });
+}, function(err, result){
+ // result is now equal to the last value of memo, which is 6
+});
+```
+
+---------------------------------------
+
+
+### reduceRight(arr, memo, iterator, [callback])
+
+__Alias:__ `foldr`
+
+Same as [`reduce`](#reduce), only operates on `arr` in reverse order.
+
+
+---------------------------------------
+
+
+### detect(arr, iterator, [callback])
+
+Returns the first value in `arr` that passes an async truth test. The
+`iterator` is applied in parallel, meaning the first iterator to return `true` will
+fire the detect `callback` with that result. That means the result might not be
+the first item in the original `arr` (in terms of order) that passes the test.
+
+If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries).
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
+ The iterator is passed a `callback(truthValue)` which must be called with a
+ boolean argument once it has completed. **Note: this callback does not take an error as its first argument.**
+* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns
+ `true`, or after all the `iterator` functions have finished. Result will be
+ the first item in the array that passes the truth test (iterator) or the
+ value `undefined` if none passed. **Note: this callback does not take an error as its first argument.**
+
+__Example__
+
+```js
+async.detect(['file1','file2','file3'], fs.exists, function(result){
+ // result now equals the first file in the list that exists
+});
+```
+
+__Related__
+
+* detectSeries(arr, iterator, [callback])
+* detectLimit(arr, limit, iterator, [callback])
+
+---------------------------------------
+
+
+### sortBy(arr, iterator, [callback])
+
+Sorts a list by the results of running each `arr` value through an async `iterator`.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A function to apply to each item in `arr`.
+ The iterator is passed a `callback(err, sortValue)` which must be called once it
+ has completed with an error (which can be `null`) and a value to use as the sort
+ criteria.
+* `callback(err, results)` - *Optional* A callback which is called after all the `iterator`
+ functions have finished, or an error occurs. Results is the items from
+ the original `arr` sorted by the values returned by the `iterator` calls.
+
+__Example__
+
+```js
+async.sortBy(['file1','file2','file3'], function(file, callback){
+ fs.stat(file, function(err, stats){
+ callback(err, stats.mtime);
+ });
+}, function(err, results){
+ // results is now the original array of files sorted by
+ // modified date
+});
+```
+
+__Sort Order__
+
+By modifying the callback parameter the sorting order can be influenced:
+
+```js
+//ascending order
+async.sortBy([1,9,3,5], function(x, callback){
+ callback(null, x);
+}, function(err,result){
+ //result callback
+} );
+
+//descending order
+async.sortBy([1,9,3,5], function(x, callback){
+ callback(null, x*-1); //<- x*-1 instead of x, turns the order around
+}, function(err,result){
+ //result callback
+} );
+```
+
+---------------------------------------
+
+
+### some(arr, iterator, [callback])
+
+__Alias:__ `any`
+
+Returns `true` if at least one element in the `arr` satisfies an async test.
+_The callback for each iterator call only accepts a single argument of `true` or
+`false`; it does not accept an error argument first!_ This is in-line with the
+way node libraries work with truth tests like `fs.exists`. Once any iterator
+call returns `true`, the main `callback` is immediately called.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A truth test to apply to each item in the array
+ in parallel. The iterator is passed a `callback(truthValue)`` which must be
+ called with a boolean argument once it has completed.
+* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns
+ `true`, or after all the iterator functions have finished. Result will be
+ either `true` or `false` depending on the values of the async tests.
+
+ **Note: the callbacks do not take an error as their first argument.**
+__Example__
+
+```js
+async.some(['file1','file2','file3'], fs.exists, function(result){
+ // if result is true then at least one of the files exists
+});
+```
+
+__Related__
+
+* someLimit(arr, limit, iterator, callback)
+
+---------------------------------------
+
+
+### every(arr, iterator, [callback])
+
+__Alias:__ `all`
+
+Returns `true` if every element in `arr` satisfies an async test.
+_The callback for each `iterator` call only accepts a single argument of `true` or
+`false`; it does not accept an error argument first!_ This is in-line with the
+way node libraries work with truth tests like `fs.exists`.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A truth test to apply to each item in the array
+ in parallel. The iterator is passed a `callback(truthValue)` which must be
+ called with a boolean argument once it has completed.
+* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns
+ `false`, or after all the iterator functions have finished. Result will be
+ either `true` or `false` depending on the values of the async tests.
+
+ **Note: the callbacks do not take an error as their first argument.**
+
+__Example__
+
+```js
+async.every(['file1','file2','file3'], fs.exists, function(result){
+ // if result is true then every file exists
+});
+```
+
+__Related__
+
+* everyLimit(arr, limit, iterator, callback)
+
+---------------------------------------
+
+
+### concat(arr, iterator, [callback])
+
+Applies `iterator` to each item in `arr`, concatenating the results. Returns the
+concatenated list. The `iterator`s are called in parallel, and the results are
+concatenated as they return. There is no guarantee that the results array will
+be returned in the original order of `arr` passed to the `iterator` function.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A function to apply to each item in `arr`.
+ The iterator is passed a `callback(err, results)` which must be called once it
+ has completed with an error (which can be `null`) and an array of results.
+* `callback(err, results)` - *Optional* A callback which is called after all the `iterator`
+ functions have finished, or an error occurs. Results is an array containing
+ the concatenated results of the `iterator` function.
+
+__Example__
+
+```js
+async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){
+ // files is now a list of filenames that exist in the 3 directories
+});
+```
+
+__Related__
+
+* concatSeries(arr, iterator, [callback])
+
+
+## Control Flow
+
+
+### series(tasks, [callback])
+
+Run the functions in the `tasks` array in series, each one running once the previous
+function has completed. If any functions in the series pass an error to its
+callback, no more functions are run, and `callback` is immediately called with the value of the error.
+Otherwise, `callback` receives an array of results when `tasks` have completed.
+
+It is also possible to use an object instead of an array. Each property will be
+run as a function, and the results will be passed to the final `callback` as an object
+instead of an array. This can be a more readable way of handling results from
+[`series`](#series).
+
+**Note** that while many implementations preserve the order of object properties, the
+[ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
+explicitly states that
+
+> The mechanics and order of enumerating the properties is not specified.
+
+So if you rely on the order in which your series of functions are executed, and want
+this to work on all platforms, consider using an array.
+
+__Arguments__
+
+* `tasks` - An array or object containing functions to run, each function is passed
+ a `callback(err, result)` it must call on completion with an error `err` (which can
+ be `null`) and an optional `result` value.
+* `callback(err, results)` - An optional callback to run once all the functions
+ have completed. This function gets a results array (or object) containing all
+ the result arguments passed to the `task` callbacks.
+
+__Example__
+
+```js
+async.series([
+ function(callback){
+ // do some stuff ...
+ callback(null, 'one');
+ },
+ function(callback){
+ // do some more stuff ...
+ callback(null, 'two');
+ }
+],
+// optional callback
+function(err, results){
+ // results is now equal to ['one', 'two']
+});
+
+
+// an example using an object instead of an array
+async.series({
+ one: function(callback){
+ setTimeout(function(){
+ callback(null, 1);
+ }, 200);
+ },
+ two: function(callback){
+ setTimeout(function(){
+ callback(null, 2);
+ }, 100);
+ }
+},
+function(err, results) {
+ // results is now equal to: {one: 1, two: 2}
+});
+```
+
+---------------------------------------
+
+
+### parallel(tasks, [callback])
+
+Run the `tasks` array of functions in parallel, without waiting until the previous
+function has completed. If any of the functions pass an error to its
+callback, the main `callback` is immediately called with the value of the error.
+Once the `tasks` have completed, the results are passed to the final `callback` as an
+array.
+
+**Note:** `parallel` is about kicking-off I/O tasks in parallel, not about parallel execution of code. If your tasks do not use any timers or perform any I/O, they will actually be executed in series. Any synchronous setup sections for each task will happen one after the other. JavaScript remains single-threaded.
+
+It is also possible to use an object instead of an array. Each property will be
+run as a function and the results will be passed to the final `callback` as an object
+instead of an array. This can be a more readable way of handling results from
+[`parallel`](#parallel).
+
+
+__Arguments__
+
+* `tasks` - An array or object containing functions to run. Each function is passed
+ a `callback(err, result)` which it must call on completion with an error `err`
+ (which can be `null`) and an optional `result` value.
+* `callback(err, results)` - An optional callback to run once all the functions
+ have completed successfully. This function gets a results array (or object) containing all
+ the result arguments passed to the task callbacks.
+
+__Example__
+
+```js
+async.parallel([
+ function(callback){
+ setTimeout(function(){
+ callback(null, 'one');
+ }, 200);
+ },
+ function(callback){
+ setTimeout(function(){
+ callback(null, 'two');
+ }, 100);
+ }
+],
+// optional callback
+function(err, results){
+ // the results array will equal ['one','two'] even though
+ // the second function had a shorter timeout.
+});
+
+
+// an example using an object instead of an array
+async.parallel({
+ one: function(callback){
+ setTimeout(function(){
+ callback(null, 1);
+ }, 200);
+ },
+ two: function(callback){
+ setTimeout(function(){
+ callback(null, 2);
+ }, 100);
+ }
+},
+function(err, results) {
+ // results is now equals to: {one: 1, two: 2}
+});
+```
+
+__Related__
+
+* parallelLimit(tasks, limit, [callback])
+
+---------------------------------------
+
+
+### whilst(test, fn, callback)
+
+Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped,
+or an error occurs.
+
+__Arguments__
+
+* `test()` - synchronous truth test to perform before each execution of `fn`.
+* `fn(callback)` - A function which is called each time `test` passes. The function is
+ passed a `callback(err)`, which must be called once it has completed with an
+ optional `err` argument.
+* `callback(err, [results])` - A callback which is called after the test
+ function has failed and repeated execution of `fn` has stopped. `callback`
+ will be passed an error and any arguments passed to the final `fn`'s callback.
+
+__Example__
+
+```js
+var count = 0;
+
+async.whilst(
+ function () { return count < 5; },
+ function (callback) {
+ count++;
+ setTimeout(function () {
+ callback(null, count);
+ }, 1000);
+ },
+ function (err, n) {
+ // 5 seconds have passed, n = 5
+ }
+);
+```
+
+---------------------------------------
+
+
+### doWhilst(fn, test, callback)
+
+The post-check version of [`whilst`](#whilst). To reflect the difference in
+the order of operations, the arguments `test` and `fn` are switched.
+
+`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
+
+---------------------------------------
+
+
+### until(test, fn, callback)
+
+Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped,
+or an error occurs. `callback` will be passed an error and any arguments passed
+to the final `fn`'s callback.
+
+The inverse of [`whilst`](#whilst).
+
+---------------------------------------
+
+
+### doUntil(fn, test, callback)
+
+Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`.
+
+---------------------------------------
+
+
+### during(test, fn, callback)
+
+Like [`whilst`](#whilst), except the `test` is an asynchronous function that is passed a callback in the form of `function (err, truth)`. If error is passed to `test` or `fn`, the main callback is immediately called with the value of the error.
+
+__Example__
+
+```js
+var count = 0;
+
+async.during(
+ function (callback) {
+ return callback(null, count < 5);
+ },
+ function (callback) {
+ count++;
+ setTimeout(callback, 1000);
+ },
+ function (err) {
+ // 5 seconds have passed
+ }
+);
+```
+
+---------------------------------------
+
+
+### doDuring(fn, test, callback)
+
+The post-check version of [`during`](#during). To reflect the difference in
+the order of operations, the arguments `test` and `fn` are switched.
+
+Also a version of [`doWhilst`](#doWhilst) with asynchronous `test` function.
+
+---------------------------------------
+
+
+### forever(fn, [errback])
+
+Calls the asynchronous function `fn` with a callback parameter that allows it to
+call itself again, in series, indefinitely.
+
+If an error is passed to the callback then `errback` is called with the
+error, and execution stops, otherwise it will never be called.
+
+```js
+async.forever(
+ function(next) {
+ // next is suitable for passing to things that need a callback(err [, whatever]);
+ // it will result in this function being called again.
+ },
+ function(err) {
+ // if next is called with a value in its first parameter, it will appear
+ // in here as 'err', and execution will stop.
+ }
+);
+```
+
+---------------------------------------
+
+
+### waterfall(tasks, [callback])
+
+Runs the `tasks` array of functions in series, each passing their results to the next in
+the array. However, if any of the `tasks` pass an error to their own callback, the
+next function is not executed, and the main `callback` is immediately called with
+the error.
+
+__Arguments__
+
+* `tasks` - An array of functions to run, each function is passed a
+ `callback(err, result1, result2, ...)` it must call on completion. The first
+ argument is an error (which can be `null`) and any further arguments will be
+ passed as arguments in order to the next task.
+* `callback(err, [results])` - An optional callback to run once all the functions
+ have completed. This will be passed the results of the last task's callback.
+
+
+
+__Example__
+
+```js
+async.waterfall([
+ function(callback) {
+ callback(null, 'one', 'two');
+ },
+ function(arg1, arg2, callback) {
+ // arg1 now equals 'one' and arg2 now equals 'two'
+ callback(null, 'three');
+ },
+ function(arg1, callback) {
+ // arg1 now equals 'three'
+ callback(null, 'done');
+ }
+], function (err, result) {
+ // result now equals 'done'
+});
+```
+Or, with named functions:
+
+```js
+async.waterfall([
+ myFirstFunction,
+ mySecondFunction,
+ myLastFunction,
+], function (err, result) {
+ // result now equals 'done'
+});
+function myFirstFunction(callback) {
+ callback(null, 'one', 'two');
+}
+function mySecondFunction(arg1, arg2, callback) {
+ // arg1 now equals 'one' and arg2 now equals 'two'
+ callback(null, 'three');
+}
+function myLastFunction(arg1, callback) {
+ // arg1 now equals 'three'
+ callback(null, 'done');
+}
+```
+
+Or, if you need to pass any argument to the first function:
+
+```js
+async.waterfall([
+ async.apply(myFirstFunction, 'zero'),
+ mySecondFunction,
+ myLastFunction,
+], function (err, result) {
+ // result now equals 'done'
+});
+function myFirstFunction(arg1, callback) {
+ // arg1 now equals 'zero'
+ callback(null, 'one', 'two');
+}
+function mySecondFunction(arg1, arg2, callback) {
+ // arg1 now equals 'one' and arg2 now equals 'two'
+ callback(null, 'three');
+}
+function myLastFunction(arg1, callback) {
+ // arg1 now equals 'three'
+ callback(null, 'done');
+}
+```
+
+---------------------------------------
+
+### compose(fn1, fn2...)
+
+Creates a function which is a composition of the passed asynchronous
+functions. Each function consumes the return value of the function that
+follows. Composing functions `f()`, `g()`, and `h()` would produce the result of
+`f(g(h()))`, only this version uses callbacks to obtain the return values.
+
+Each function is executed with the `this` binding of the composed function.
+
+__Arguments__
+
+* `functions...` - the asynchronous functions to compose
+
+
+__Example__
+
+```js
+function add1(n, callback) {
+ setTimeout(function () {
+ callback(null, n + 1);
+ }, 10);
+}
+
+function mul3(n, callback) {
+ setTimeout(function () {
+ callback(null, n * 3);
+ }, 10);
+}
+
+var add1mul3 = async.compose(mul3, add1);
+
+add1mul3(4, function (err, result) {
+ // result now equals 15
+});
+```
+
+---------------------------------------
+
+### seq(fn1, fn2...)
+
+Version of the compose function that is more natural to read.
+Each function consumes the return value of the previous function.
+It is the equivalent of [`compose`](#compose) with the arguments reversed.
+
+Each function is executed with the `this` binding of the composed function.
+
+__Arguments__
+
+* `functions...` - the asynchronous functions to compose
+
+
+__Example__
+
+```js
+// Requires lodash (or underscore), express3 and dresende's orm2.
+// Part of an app, that fetches cats of the logged user.
+// This example uses `seq` function to avoid overnesting and error
+// handling clutter.
+app.get('/cats', function(request, response) {
+ var User = request.models.User;
+ async.seq(
+ _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))
+ function(user, fn) {
+ user.getCats(fn); // 'getCats' has signature (callback(err, data))
+ }
+ )(req.session.user_id, function (err, cats) {
+ if (err) {
+ console.error(err);
+ response.json({ status: 'error', message: err.message });
+ } else {
+ response.json({ status: 'ok', message: 'Cats found', data: cats });
+ }
+ });
+});
+```
+
+---------------------------------------
+
+### applyEach(fns, args..., callback)
+
+Applies the provided arguments to each function in the array, calling
+`callback` after all functions have completed. If you only provide the first
+argument, then it will return a function which lets you pass in the
+arguments as if it were a single function call.
+
+__Arguments__
+
+* `fns` - the asynchronous functions to all call with the same arguments
+* `args...` - any number of separate arguments to pass to the function
+* `callback` - the final argument should be the callback, called when all
+ functions have completed processing
+
+
+__Example__
+
+```js
+async.applyEach([enableSearch, updateSchema], 'bucket', callback);
+
+// partial application example:
+async.each(
+ buckets,
+ async.applyEach([enableSearch, updateSchema]),
+ callback
+);
+```
+
+__Related__
+
+* applyEachSeries(tasks, args..., [callback])
+
+---------------------------------------
+
+
+### queue(worker, [concurrency])
+
+Creates a `queue` object with the specified `concurrency`. Tasks added to the
+`queue` are processed in parallel (up to the `concurrency` limit). If all
+`worker`s are in progress, the task is queued until one becomes available.
+Once a `worker` completes a `task`, that `task`'s callback is called.
+
+__Arguments__
+
+* `worker(task, callback)` - An asynchronous function for processing a queued
+ task, which must call its `callback(err)` argument when finished, with an
+ optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`.
+* `concurrency` - An `integer` for determining how many `worker` functions should be
+ run in parallel. If omitted, the concurrency defaults to `1`. If the concurrency is `0`, an error is thrown.
+
+__Queue objects__
+
+The `queue` object returned by this function has the following properties and
+methods:
+
+* `length()` - a function returning the number of items waiting to be processed.
+* `started` - a function returning whether or not any items have been pushed and processed by the queue
+* `running()` - a function returning the number of items currently being processed.
+* `workersList()` - a function returning the array of items currently being processed.
+* `idle()` - a function returning false if there are items waiting or being processed, or true if not.
+* `concurrency` - an integer for determining how many `worker` functions should be
+ run in parallel. This property can be changed after a `queue` is created to
+ alter the concurrency on-the-fly.
+* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once
+ the `worker` has finished processing the task. Instead of a single task, a `tasks` array
+ can be submitted. The respective callback is used for every task in the list.
+* `unshift(task, [callback])` - add a new task to the front of the `queue`.
+* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit,
+ and further tasks will be queued.
+* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`.
+* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`.
+* `paused` - a boolean for determining whether the queue is in a paused state
+* `pause()` - a function that pauses the processing of tasks until `resume()` is called.
+* `resume()` - a function that resumes the processing of queued tasks when the queue is paused.
+* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle.
+
+__Example__
+
+```js
+// create a queue object with concurrency 2
+
+var q = async.queue(function (task, callback) {
+ console.log('hello ' + task.name);
+ callback();
+}, 2);
+
+
+// assign a callback
+q.drain = function() {
+ console.log('all items have been processed');
+}
+
+// add some items to the queue
+
+q.push({name: 'foo'}, function (err) {
+ console.log('finished processing foo');
+});
+q.push({name: 'bar'}, function (err) {
+ console.log('finished processing bar');
+});
+
+// add some items to the queue (batch-wise)
+
+q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {
+ console.log('finished processing item');
+});
+
+// add some items to the front of the queue
+
+q.unshift({name: 'bar'}, function (err) {
+ console.log('finished processing bar');
+});
+```
+
+
+---------------------------------------
+
+
+### priorityQueue(worker, concurrency)
+
+The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects:
+
+* `push(task, priority, [callback])` - `priority` should be a number. If an array of
+ `tasks` is given, all tasks will be assigned the same priority.
+* The `unshift` method was removed.
+
+---------------------------------------
+
+
+### cargo(worker, [payload])
+
+Creates a `cargo` object with the specified payload. Tasks added to the
+cargo will be processed altogether (up to the `payload` limit). If the
+`worker` is in progress, the task is queued until it becomes available. Once
+the `worker` has completed some tasks, each callback of those tasks is called.
+Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) for how `cargo` and `queue` work.
+
+While [queue](#queue) passes only one task to one of a group of workers
+at a time, cargo passes an array of tasks to a single worker, repeating
+when the worker is finished.
+
+__Arguments__
+
+* `worker(tasks, callback)` - An asynchronous function for processing an array of
+ queued tasks, which must call its `callback(err)` argument when finished, with
+ an optional `err` argument.
+* `payload` - An optional `integer` for determining how many tasks should be
+ processed per round; if omitted, the default is unlimited.
+
+__Cargo objects__
+
+The `cargo` object returned by this function has the following properties and
+methods:
+
+* `length()` - A function returning the number of items waiting to be processed.
+* `payload` - An `integer` for determining how many tasks should be
+ process per round. This property can be changed after a `cargo` is created to
+ alter the payload on-the-fly.
+* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called
+ once the `worker` has finished processing the task. Instead of a single task, an array of `tasks`
+ can be submitted. The respective callback is used for every task in the list.
+* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued.
+* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`.
+* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`.
+* `idle()`, `pause()`, `resume()`, `kill()` - cargo inherits all of the same methods and event calbacks as [`queue`](#queue)
+
+__Example__
+
+```js
+// create a cargo object with payload 2
+
+var cargo = async.cargo(function (tasks, callback) {
+ for(var i=0; i
+### auto(tasks, [concurrency], [callback])
+
+Determines the best order for running the functions in `tasks`, based on their requirements. Each function can optionally depend on other functions being completed first, and each function is run as soon as its requirements are satisfied.
+
+If any of the functions pass an error to their callback, the `auto` sequence will stop. Further tasks will not execute (so any other functions depending on it will not run), and the main `callback` is immediately called with the error. Functions also receive an object containing the results of functions which have completed so far.
+
+Note, all functions are called with a `results` object as a second argument,
+so it is unsafe to pass functions in the `tasks` object which cannot handle the
+extra argument.
+
+For example, this snippet of code:
+
+```js
+async.auto({
+ readData: async.apply(fs.readFile, 'data.txt', 'utf-8')
+}, callback);
+```
+
+will have the effect of calling `readFile` with the results object as the last
+argument, which will fail:
+
+```js
+fs.readFile('data.txt', 'utf-8', cb, {});
+```
+
+Instead, wrap the call to `readFile` in a function which does not forward the
+`results` object:
+
+```js
+async.auto({
+ readData: function(cb, results){
+ fs.readFile('data.txt', 'utf-8', cb);
+ }
+}, callback);
+```
+
+__Arguments__
+
+* `tasks` - An object. Each of its properties is either a function or an array of
+ requirements, with the function itself the last item in the array. The object's key
+ of a property serves as the name of the task defined by that property,
+ i.e. can be used when specifying requirements for other tasks.
+ The function receives two arguments: (1) a `callback(err, result)` which must be
+ called when finished, passing an `error` (which can be `null`) and the result of
+ the function's execution, and (2) a `results` object, containing the results of
+ the previously executed functions.
+* `concurrency` - An optional `integer` for determining the maximum number of tasks that can be run in parallel. By default, as many as possible.
+* `callback(err, results)` - An optional callback which is called when all the
+ tasks have been completed. It receives the `err` argument if any `tasks`
+ pass an error to their callback. Results are always returned; however, if
+ an error occurs, no further `tasks` will be performed, and the results
+ object will only contain partial results.
+
+
+__Example__
+
+```js
+async.auto({
+ get_data: function(callback){
+ console.log('in get_data');
+ // async code to get some data
+ callback(null, 'data', 'converted to array');
+ },
+ make_folder: function(callback){
+ console.log('in make_folder');
+ // async code to create a directory to store a file in
+ // this is run at the same time as getting the data
+ callback(null, 'folder');
+ },
+ write_file: ['get_data', 'make_folder', function(callback, results){
+ console.log('in write_file', JSON.stringify(results));
+ // once there is some data and the directory exists,
+ // write the data to a file in the directory
+ callback(null, 'filename');
+ }],
+ email_link: ['write_file', function(callback, results){
+ console.log('in email_link', JSON.stringify(results));
+ // once the file is written let's email a link to it...
+ // results.write_file contains the filename returned by write_file.
+ callback(null, {'file':results.write_file, 'email':'user@example.com'});
+ }]
+}, function(err, results) {
+ console.log('err = ', err);
+ console.log('results = ', results);
+});
+```
+
+This is a fairly trivial example, but to do this using the basic parallel and
+series functions would look like this:
+
+```js
+async.parallel([
+ function(callback){
+ console.log('in get_data');
+ // async code to get some data
+ callback(null, 'data', 'converted to array');
+ },
+ function(callback){
+ console.log('in make_folder');
+ // async code to create a directory to store a file in
+ // this is run at the same time as getting the data
+ callback(null, 'folder');
+ }
+],
+function(err, results){
+ async.series([
+ function(callback){
+ console.log('in write_file', JSON.stringify(results));
+ // once there is some data and the directory exists,
+ // write the data to a file in the directory
+ results.push('filename');
+ callback(null);
+ },
+ function(callback){
+ console.log('in email_link', JSON.stringify(results));
+ // once the file is written let's email a link to it...
+ callback(null, {'file':results.pop(), 'email':'user@example.com'});
+ }
+ ]);
+});
+```
+
+For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding
+new tasks much easier (and the code more readable).
+
+
+---------------------------------------
+
+
+### retry([opts = {times: 5, interval: 0}| 5], task, [callback])
+
+Attempts to get a successful response from `task` no more than `times` times before
+returning an error. If the task is successful, the `callback` will be passed the result
+of the successful task. If all attempts fail, the callback will be passed the error and
+result (if any) of the final attempt.
+
+__Arguments__
+
+* `opts` - Can be either an object with `times` and `interval` or a number.
+ * `times` - The number of attempts to make before giving up. The default is `5`.
+ * `interval` - The time to wait between retries, in milliseconds. The default is `0`.
+ * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`.
+* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)`
+ which must be called when finished, passing `err` (which can be `null`) and the `result` of
+ the function's execution, and (2) a `results` object, containing the results of
+ the previously executed functions (if nested inside another control flow).
+* `callback(err, results)` - An optional callback which is called when the
+ task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`.
+
+The [`retry`](#retry) function can be used as a stand-alone control flow by passing a callback, as shown below:
+
+```js
+// try calling apiMethod 3 times
+async.retry(3, apiMethod, function(err, result) {
+ // do something with the result
+});
+```
+
+```js
+// try calling apiMethod 3 times, waiting 200 ms between each retry
+async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {
+ // do something with the result
+});
+```
+
+```js
+// try calling apiMethod the default 5 times no delay between each retry
+async.retry(apiMethod, function(err, result) {
+ // do something with the result
+});
+```
+
+It can also be embedded within other control flow functions to retry individual methods
+that are not as reliable, like this:
+
+```js
+async.auto({
+ users: api.getUsers.bind(api),
+ payments: async.retry(3, api.getPayments.bind(api))
+}, function(err, results) {
+ // do something with the results
+});
+```
+
+
+---------------------------------------
+
+
+### iterator(tasks)
+
+Creates an iterator function which calls the next function in the `tasks` array,
+returning a continuation to call the next one after that. It's also possible to
+“peek” at the next iterator with `iterator.next()`.
+
+This function is used internally by the `async` module, but can be useful when
+you want to manually control the flow of functions in series.
+
+__Arguments__
+
+* `tasks` - An array of functions to run.
+
+__Example__
+
+```js
+var iterator = async.iterator([
+ function(){ sys.p('one'); },
+ function(){ sys.p('two'); },
+ function(){ sys.p('three'); }
+]);
+
+node> var iterator2 = iterator();
+'one'
+node> var iterator3 = iterator2();
+'two'
+node> iterator3();
+'three'
+node> var nextfn = iterator2.next();
+node> nextfn();
+'three'
+```
+
+---------------------------------------
+
+
+### apply(function, arguments..)
+
+Creates a continuation function with some arguments already applied.
+
+Useful as a shorthand when combined with other control flow functions. Any arguments
+passed to the returned function are added to the arguments originally passed
+to apply.
+
+__Arguments__
+
+* `function` - The function you want to eventually apply all arguments to.
+* `arguments...` - Any number of arguments to automatically apply when the
+ continuation is called.
+
+__Example__
+
+```js
+// using apply
+
+async.parallel([
+ async.apply(fs.writeFile, 'testfile1', 'test1'),
+ async.apply(fs.writeFile, 'testfile2', 'test2'),
+]);
+
+
+// the same process without using apply
+
+async.parallel([
+ function(callback){
+ fs.writeFile('testfile1', 'test1', callback);
+ },
+ function(callback){
+ fs.writeFile('testfile2', 'test2', callback);
+ }
+]);
+```
+
+It's possible to pass any number of additional arguments when calling the
+continuation:
+
+```js
+node> var fn = async.apply(sys.puts, 'one');
+node> fn('two', 'three');
+one
+two
+three
+```
+
+---------------------------------------
+
+
+### nextTick(callback), setImmediate(callback)
+
+Calls `callback` on a later loop around the event loop. In Node.js this just
+calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)`
+if available, otherwise `setTimeout(callback, 0)`, which means other higher priority
+events may precede the execution of `callback`.
+
+This is used internally for browser-compatibility purposes.
+
+__Arguments__
+
+* `callback` - The function to call on a later loop around the event loop.
+
+__Example__
+
+```js
+var call_order = [];
+async.nextTick(function(){
+ call_order.push('two');
+ // call_order now equals ['one','two']
+});
+call_order.push('one')
+```
+
+
+### times(n, iterator, [callback])
+
+Calls the `iterator` function `n` times, and accumulates results in the same manner
+you would use with [`map`](#map).
+
+__Arguments__
+
+* `n` - The number of times to run the function.
+* `iterator` - The function to call `n` times.
+* `callback` - see [`map`](#map)
+
+__Example__
+
+```js
+// Pretend this is some complicated async factory
+var createUser = function(id, callback) {
+ callback(null, {
+ id: 'user' + id
+ })
+}
+// generate 5 users
+async.times(5, function(n, next){
+ createUser(n, function(err, user) {
+ next(err, user)
+ })
+}, function(err, users) {
+ // we should now have 5 users
+});
+```
+
+__Related__
+
+* timesSeries(n, iterator, [callback])
+* timesLimit(n, limit, iterator, [callback])
+
+
+## Utils
+
+
+### memoize(fn, [hasher])
+
+Caches the results of an `async` function. When creating a hash to store function
+results against, the callback is omitted from the hash and an optional hash
+function can be used.
+
+If no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function.
+
+The cache of results is exposed as the `memo` property of the function returned
+by `memoize`.
+
+__Arguments__
+
+* `fn` - The function to proxy and cache results from.
+* `hasher` - An optional function for generating a custom hash for storing
+ results. It has all the arguments applied to it apart from the callback, and
+ must be synchronous.
+
+__Example__
+
+```js
+var slow_fn = function (name, callback) {
+ // do something
+ callback(null, result);
+};
+var fn = async.memoize(slow_fn);
+
+// fn can now be used as if it were slow_fn
+fn('some name', function () {
+ // callback
+});
+```
+
+
+### unmemoize(fn)
+
+Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized
+form. Handy for testing.
+
+__Arguments__
+
+* `fn` - the memoized function
+
+---------------------------------------
+
+
+### ensureAsync(fn)
+
+Wrap an async function and ensure it calls its callback on a later tick of the event loop. If the function already calls its callback on a next tick, no extra deferral is added. This is useful for preventing stack overflows (`RangeError: Maximum call stack size exceeded`) and generally keeping [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) contained.
+
+__Arguments__
+
+* `fn` - an async function, one that expects a node-style callback as its last argument
+
+Returns a wrapped function with the exact same call signature as the function passed in.
+
+__Example__
+
+```js
+function sometimesAsync(arg, callback) {
+ if (cache[arg]) {
+ return callback(null, cache[arg]); // this would be synchronous!!
+ } else {
+ doSomeIO(arg, callback); // this IO would be asynchronous
+ }
+}
+
+// this has a risk of stack overflows if many results are cached in a row
+async.mapSeries(args, sometimesAsync, done);
+
+// this will defer sometimesAsync's callback if necessary,
+// preventing stack overflows
+async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
+
+```
+
+---------------------------------------
+
+
+### constant(values...)
+
+Returns a function that when called, calls-back with the values provided. Useful as the first function in a `waterfall`, or for plugging values in to `auto`.
+
+__Example__
+
+```js
+async.waterfall([
+ async.constant(42),
+ function (value, next) {
+ // value === 42
+ },
+ //...
+], callback);
+
+async.waterfall([
+ async.constant(filename, "utf8"),
+ fs.readFile,
+ function (fileData, next) {
+ //...
+ }
+ //...
+], callback);
+
+async.auto({
+ hostname: async.constant("https://server.net/"),
+ port: findFreePort,
+ launchServer: ["hostname", "port", function (cb, options) {
+ startServer(options, cb);
+ }],
+ //...
+}, callback);
+
+```
+
+---------------------------------------
+
+
+
+### asyncify(func)
+
+__Alias:__ `wrapSync`
+
+Take a sync function and make it async, passing its return value to a callback. This is useful for plugging sync functions into a waterfall, series, or other async functions. Any arguments passed to the generated function will be passed to the wrapped function (except for the final callback argument). Errors thrown will be passed to the callback.
+
+__Example__
+
+```js
+async.waterfall([
+ async.apply(fs.readFile, filename, "utf8"),
+ async.asyncify(JSON.parse),
+ function (data, next) {
+ // data is the result of parsing the text.
+ // If there was a parsing error, it would have been caught.
+ }
+], callback)
+```
+
+If the function passed to `asyncify` returns a Promise, that promises's resolved/rejected state will be used to call the callback, rather than simply the synchronous return value. Example:
+
+```js
+async.waterfall([
+ async.apply(fs.readFile, filename, "utf8"),
+ async.asyncify(function (contents) {
+ return db.model.create(contents);
+ }),
+ function (model, next) {
+ // `model` is the instantiated model object.
+ // If there was an error, this function would be skipped.
+ }
+], callback)
+```
+
+This also means you can asyncify ES2016 `async` functions.
+
+```js
+var q = async.queue(async.asyncify(async function (file) {
+ var intermediateStep = await processFile(file);
+ return await somePromise(intermediateStep)
+}));
+
+q.push(files);
+```
+
+---------------------------------------
+
+
+### log(function, arguments)
+
+Logs the result of an `async` function to the `console`. Only works in Node.js or
+in browsers that support `console.log` and `console.error` (such as FF and Chrome).
+If multiple arguments are returned from the async function, `console.log` is
+called on each argument in order.
+
+__Arguments__
+
+* `function` - The function you want to eventually apply all arguments to.
+* `arguments...` - Any number of arguments to apply to the function.
+
+__Example__
+
+```js
+var hello = function(name, callback){
+ setTimeout(function(){
+ callback(null, 'hello ' + name);
+ }, 1000);
+};
+```
+```js
+node> async.log(hello, 'world');
+'hello world'
+```
+
+---------------------------------------
+
+
+### dir(function, arguments)
+
+Logs the result of an `async` function to the `console` using `console.dir` to
+display the properties of the resulting object. Only works in Node.js or
+in browsers that support `console.dir` and `console.error` (such as FF and Chrome).
+If multiple arguments are returned from the async function, `console.dir` is
+called on each argument in order.
+
+__Arguments__
+
+* `function` - The function you want to eventually apply all arguments to.
+* `arguments...` - Any number of arguments to apply to the function.
+
+__Example__
+
+```js
+var hello = function(name, callback){
+ setTimeout(function(){
+ callback(null, {hello: name});
+ }, 1000);
+};
+```
+```js
+node> async.dir(hello, 'world');
+{hello: 'world'}
+```
+
+---------------------------------------
+
+
+### noConflict()
+
+Changes the value of `async` back to its original value, returning a reference to the
+`async` object.
diff --git a/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/dist/async.js b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/dist/async.js
new file mode 100644
index 00000000..31e7620f
--- /dev/null
+++ b/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/async/dist/async.js
@@ -0,0 +1,1265 @@
+/*!
+ * async
+ * https://github.com/caolan/async
+ *
+ * Copyright 2010-2014 Caolan McMahon
+ * Released under the MIT license
+ */
+(function () {
+
+ var async = {};
+ function noop() {}
+ function identity(v) {
+ return v;
+ }
+ function toBool(v) {
+ return !!v;
+ }
+ function notId(v) {
+ return !v;
+ }
+
+ // global on the server, window in the browser
+ var previous_async;
+
+ // Establish the root object, `window` (`self`) in the browser, `global`
+ // on the server, or `this` in some virtual machines. We use `self`
+ // instead of `window` for `WebWorker` support.
+ var root = typeof self === 'object' && self.self === self && self ||
+ typeof global === 'object' && global.global === global && global ||
+ this;
+
+ if (root != null) {
+ previous_async = root.async;
+ }
+
+ async.noConflict = function () {
+ root.async = previous_async;
+ return async;
+ };
+
+ function only_once(fn) {
+ return function() {
+ if (fn === null) throw new Error("Callback was already called.");
+ fn.apply(this, arguments);
+ fn = null;
+ };
+ }
+
+ function _once(fn) {
+ return function() {
+ if (fn === null) return;
+ fn.apply(this, arguments);
+ fn = null;
+ };
+ }
+
+ //// cross-browser compatiblity functions ////
+
+ var _toString = Object.prototype.toString;
+
+ var _isArray = Array.isArray || function (obj) {
+ return _toString.call(obj) === '[object Array]';
+ };
+
+ // Ported from underscore.js isObject
+ var _isObject = function(obj) {
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
+ };
+
+ function _isArrayLike(arr) {
+ return _isArray(arr) || (
+ // has a positive integer length property
+ typeof arr.length === "number" &&
+ arr.length >= 0 &&
+ arr.length % 1 === 0
+ );
+ }
+
+ function _arrayEach(arr, iterator) {
+ var index = -1,
+ length = arr.length;
+
+ while (++index < length) {
+ iterator(arr[index], index, arr);
+ }
+ }
+
+ function _map(arr, iterator) {
+ var index = -1,
+ length = arr.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iterator(arr[index], index, arr);
+ }
+ return result;
+ }
+
+ function _range(count) {
+ return _map(Array(count), function (v, i) { return i; });
+ }
+
+ function _reduce(arr, iterator, memo) {
+ _arrayEach(arr, function (x, i, a) {
+ memo = iterator(memo, x, i, a);
+ });
+ return memo;
+ }
+
+ function _forEachOf(object, iterator) {
+ _arrayEach(_keys(object), function (key) {
+ iterator(object[key], key);
+ });
+ }
+
+ function _indexOf(arr, item) {
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i] === item) return i;
+ }
+ return -1;
+ }
+
+ var _keys = Object.keys || function (obj) {
+ var keys = [];
+ for (var k in obj) {
+ if (obj.hasOwnProperty(k)) {
+ keys.push(k);
+ }
+ }
+ return keys;
+ };
+
+ function _keyIterator(coll) {
+ var i = -1;
+ var len;
+ var keys;
+ if (_isArrayLike(coll)) {
+ len = coll.length;
+ return function next() {
+ i++;
+ return i < len ? i : null;
+ };
+ } else {
+ keys = _keys(coll);
+ len = keys.length;
+ return function next() {
+ i++;
+ return i < len ? keys[i] : null;
+ };
+ }
+ }
+
+ // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html)
+ // This accumulates the arguments passed into an array, after a given index.
+ // From underscore.js (https://github.com/jashkenas/underscore/pull/2140).
+ function _restParam(func, startIndex) {
+ startIndex = startIndex == null ? func.length - 1 : +startIndex;
+ return function() {
+ var length = Math.max(arguments.length - startIndex, 0);
+ var rest = Array(length);
+ for (var index = 0; index < length; index++) {
+ rest[index] = arguments[index + startIndex];
+ }
+ switch (startIndex) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, arguments[0], rest);
+ }
+ // Currently unused but handle cases outside of the switch statement:
+ // var args = Array(startIndex + 1);
+ // for (index = 0; index < startIndex; index++) {
+ // args[index] = arguments[index];
+ // }
+ // args[startIndex] = rest;
+ // return func.apply(this, args);
+ };
+ }
+
+ function _withoutIndex(iterator) {
+ return function (value, index, callback) {
+ return iterator(value, callback);
+ };
+ }
+
+ //// exported async module functions ////
+
+ //// nextTick implementation with browser-compatible fallback ////
+
+ // capture the global reference to guard against fakeTimer mocks
+ var _setImmediate = typeof setImmediate === 'function' && setImmediate;
+
+ var _delay = _setImmediate ? function(fn) {
+ // not a direct alias for IE10 compatibility
+ _setImmediate(fn);
+ } : function(fn) {
+ setTimeout(fn, 0);
+ };
+
+ if (typeof process === 'object' && typeof process.nextTick === 'function') {
+ async.nextTick = process.nextTick;
+ } else {
+ async.nextTick = _delay;
+ }
+ async.setImmediate = _setImmediate ? _delay : async.nextTick;
+
+
+ async.forEach =
+ async.each = function (arr, iterator, callback) {
+ return async.eachOf(arr, _withoutIndex(iterator), callback);
+ };
+
+ async.forEachSeries =
+ async.eachSeries = function (arr, iterator, callback) {
+ return async.eachOfSeries(arr, _withoutIndex(iterator), callback);
+ };
+
+
+ async.forEachLimit =
+ async.eachLimit = function (arr, limit, iterator, callback) {
+ return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback);
+ };
+
+ async.forEachOf =
+ async.eachOf = function (object, iterator, callback) {
+ callback = _once(callback || noop);
+ object = object || [];
+
+ var iter = _keyIterator(object);
+ var key, completed = 0;
+
+ while ((key = iter()) != null) {
+ completed += 1;
+ iterator(object[key], key, only_once(done));
+ }
+
+ if (completed === 0) callback(null);
+
+ function done(err) {
+ completed--;
+ if (err) {
+ callback(err);
+ }
+ // Check key is null in case iterator isn't exhausted
+ // and done resolved synchronously.
+ else if (key === null && completed <= 0) {
+ callback(null);
+ }
+ }
+ };
+
+ async.forEachOfSeries =
+ async.eachOfSeries = function (obj, iterator, callback) {
+ callback = _once(callback || noop);
+ obj = obj || [];
+ var nextKey = _keyIterator(obj);
+ var key = nextKey();
+ function iterate() {
+ var sync = true;
+ if (key === null) {
+ return callback(null);
+ }
+ iterator(obj[key], key, only_once(function (err) {
+ if (err) {
+ callback(err);
+ }
+ else {
+ key = nextKey();
+ if (key === null) {
+ return callback(null);
+ } else {
+ if (sync) {
+ async.setImmediate(iterate);
+ } else {
+ iterate();
+ }
+ }
+ }
+ }));
+ sync = false;
+ }
+ iterate();
+ };
+
+
+
+ async.forEachOfLimit =
+ async.eachOfLimit = function (obj, limit, iterator, callback) {
+ _eachOfLimit(limit)(obj, iterator, callback);
+ };
+
+ function _eachOfLimit(limit) {
+
+ return function (obj, iterator, callback) {
+ callback = _once(callback || noop);
+ obj = obj || [];
+ var nextKey = _keyIterator(obj);
+ if (limit <= 0) {
+ return callback(null);
+ }
+ var done = false;
+ var running = 0;
+ var errored = false;
+
+ (function replenish () {
+ if (done && running <= 0) {
+ return callback(null);
+ }
+
+ while (running < limit && !errored) {
+ var key = nextKey();
+ if (key === null) {
+ done = true;
+ if (running <= 0) {
+ callback(null);
+ }
+ return;
+ }
+ running += 1;
+ iterator(obj[key], key, only_once(function (err) {
+ running -= 1;
+ if (err) {
+ callback(err);
+ errored = true;
+ }
+ else {
+ replenish();
+ }
+ }));
+ }
+ })();
+ };
+ }
+
+
+ function doParallel(fn) {
+ return function (obj, iterator, callback) {
+ return fn(async.eachOf, obj, iterator, callback);
+ };
+ }
+ function doParallelLimit(fn) {
+ return function (obj, limit, iterator, callback) {
+ return fn(_eachOfLimit(limit), obj, iterator, callback);
+ };
+ }
+ function doSeries(fn) {
+ return function (obj, iterator, callback) {
+ return fn(async.eachOfSeries, obj, iterator, callback);
+ };
+ }
+
+ function _asyncMap(eachfn, arr, iterator, callback) {
+ callback = _once(callback || noop);
+ arr = arr || [];
+ var results = _isArrayLike(arr) ? [] : {};
+ eachfn(arr, function (value, index, callback) {
+ iterator(value, function (err, v) {
+ results[index] = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
+ }
+
+ async.map = doParallel(_asyncMap);
+ async.mapSeries = doSeries(_asyncMap);
+ async.mapLimit = doParallelLimit(_asyncMap);
+
+ // reduce only has a series version, as doing reduce in parallel won't
+ // work in many situations.
+ async.inject =
+ async.foldl =
+ async.reduce = function (arr, memo, iterator, callback) {
+ async.eachOfSeries(arr, function (x, i, callback) {
+ iterator(memo, x, function (err, v) {
+ memo = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, memo);
+ });
+ };
+
+ async.foldr =
+ async.reduceRight = function (arr, memo, iterator, callback) {
+ var reversed = _map(arr, identity).reverse();
+ async.reduce(reversed, memo, iterator, callback);
+ };
+
+ async.transform = function (arr, memo, iterator, callback) {
+ if (arguments.length === 3) {
+ callback = iterator;
+ iterator = memo;
+ memo = _isArray(arr) ? [] : {};
+ }
+
+ async.eachOf(arr, function(v, k, cb) {
+ iterator(memo, v, k, cb);
+ }, function(err) {
+ callback(err, memo);
+ });
+ };
+
+ function _filter(eachfn, arr, iterator, callback) {
+ var results = [];
+ eachfn(arr, function (x, index, callback) {
+ iterator(x, function (v) {
+ if (v) {
+ results.push({index: index, value: x});
+ }
+ callback();
+ });
+ }, function () {
+ callback(_map(results.sort(function (a, b) {
+ return a.index - b.index;
+ }), function (x) {
+ return x.value;
+ }));
+ });
+ }
+
+ async.select =
+ async.filter = doParallel(_filter);
+
+ async.selectLimit =
+ async.filterLimit = doParallelLimit(_filter);
+
+ async.selectSeries =
+ async.filterSeries = doSeries(_filter);
+
+ function _reject(eachfn, arr, iterator, callback) {
+ _filter(eachfn, arr, function(value, cb) {
+ iterator(value, function(v) {
+ cb(!v);
+ });
+ }, callback);
+ }
+ async.reject = doParallel(_reject);
+ async.rejectLimit = doParallelLimit(_reject);
+ async.rejectSeries = doSeries(_reject);
+
+ function _createTester(eachfn, check, getResult) {
+ return function(arr, limit, iterator, cb) {
+ function done() {
+ if (cb) cb(getResult(false, void 0));
+ }
+ function iteratee(x, _, callback) {
+ if (!cb) return callback();
+ iterator(x, function (v) {
+ if (cb && check(v)) {
+ cb(getResult(true, x));
+ cb = iterator = false;
+ }
+ callback();
+ });
+ }
+ if (arguments.length > 3) {
+ eachfn(arr, limit, iteratee, done);
+ } else {
+ cb = iterator;
+ iterator = limit;
+ eachfn(arr, iteratee, done);
+ }
+ };
+ }
+
+ async.any =
+ async.some = _createTester(async.eachOf, toBool, identity);
+
+ async.someLimit = _createTester(async.eachOfLimit, toBool, identity);
+
+ async.all =
+ async.every = _createTester(async.eachOf, notId, notId);
+
+ async.everyLimit = _createTester(async.eachOfLimit, notId, notId);
+
+ function _findGetResult(v, x) {
+ return x;
+ }
+ async.detect = _createTester(async.eachOf, identity, _findGetResult);
+ async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult);
+ async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult);
+
+ async.sortBy = function (arr, iterator, callback) {
+ async.map(arr, function (x, callback) {
+ iterator(x, function (err, criteria) {
+ if (err) {
+ callback(err);
+ }
+ else {
+ callback(null, {value: x, criteria: criteria});
+ }
+ });
+ }, function (err, results) {
+ if (err) {
+ return callback(err);
+ }
+ else {
+ callback(null, _map(results.sort(comparator), function (x) {
+ return x.value;
+ }));
+ }
+
+ });
+
+ function comparator(left, right) {
+ var a = left.criteria, b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ }
+ };
+
+ async.auto = function (tasks, concurrency, callback) {
+ if (typeof arguments[1] === 'function') {
+ // concurrency is optional, shift the args.
+ callback = concurrency;
+ concurrency = null;
+ }
+ callback = _once(callback || noop);
+ var keys = _keys(tasks);
+ var remainingTasks = keys.length;
+ if (!remainingTasks) {
+ return callback(null);
+ }
+ if (!concurrency) {
+ concurrency = remainingTasks;
+ }
+
+ var results = {};
+ var runningTasks = 0;
+
+ var hasError = false;
+
+ var listeners = [];
+ function addListener(fn) {
+ listeners.unshift(fn);
+ }
+ function removeListener(fn) {
+ var idx = _indexOf(listeners, fn);
+ if (idx >= 0) listeners.splice(idx, 1);
+ }
+ function taskComplete() {
+ remainingTasks--;
+ _arrayEach(listeners.slice(0), function (fn) {
+ fn();
+ });
+ }
+
+ addListener(function () {
+ if (!remainingTasks) {
+ callback(null, results);
+ }
+ });
+
+ _arrayEach(keys, function (k) {
+ if (hasError) return;
+ var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
+ var taskCallback = _restParam(function(err, args) {
+ runningTasks--;
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ if (err) {
+ var safeResults = {};
+ _forEachOf(results, function(val, rkey) {
+ safeResults[rkey] = val;
+ });
+ safeResults[k] = args;
+ hasError = true;
+
+ callback(err, safeResults);
+ }
+ else {
+ results[k] = args;
+ async.setImmediate(taskComplete);
+ }
+ });
+ var requires = task.slice(0, task.length - 1);
+ // prevent dead-locks
+ var len = requires.length;
+ var dep;
+ while (len--) {
+ if (!(dep = tasks[requires[len]])) {
+ throw new Error('Has nonexistent dependency in ' + requires.join(', '));
+ }
+ if (_isArray(dep) && _indexOf(dep, k) >= 0) {
+ throw new Error('Has cyclic dependencies');
+ }
+ }
+ function ready() {
+ return runningTasks < concurrency && _reduce(requires, function (a, x) {
+ return (a && results.hasOwnProperty(x));
+ }, true) && !results.hasOwnProperty(k);
+ }
+ if (ready()) {
+ runningTasks++;
+ task[task.length - 1](taskCallback, results);
+ }
+ else {
+ addListener(listener);
+ }
+ function listener() {
+ if (ready()) {
+ runningTasks++;
+ removeListener(listener);
+ task[task.length - 1](taskCallback, results);
+ }
+ }
+ });
+ };
+
+
+
+ async.retry = function(times, task, callback) {
+ var DEFAULT_TIMES = 5;
+ var DEFAULT_INTERVAL = 0;
+
+ var attempts = [];
+
+ var opts = {
+ times: DEFAULT_TIMES,
+ interval: DEFAULT_INTERVAL
+ };
+
+ function parseTimes(acc, t){
+ if(typeof t === 'number'){
+ acc.times = parseInt(t, 10) || DEFAULT_TIMES;
+ } else if(typeof t === 'object'){
+ acc.times = parseInt(t.times, 10) || DEFAULT_TIMES;
+ acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL;
+ } else {
+ throw new Error('Unsupported argument type for \'times\': ' + typeof t);
+ }
+ }
+
+ var length = arguments.length;
+ if (length < 1 || length > 3) {
+ throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)');
+ } else if (length <= 2 && typeof times === 'function') {
+ callback = task;
+ task = times;
+ }
+ if (typeof times !== 'function') {
+ parseTimes(opts, times);
+ }
+ opts.callback = callback;
+ opts.task = task;
+
+ function wrappedTask(wrappedCallback, wrappedResults) {
+ function retryAttempt(task, finalAttempt) {
+ return function(seriesCallback) {
+ task(function(err, result){
+ seriesCallback(!err || finalAttempt, {err: err, result: result});
+ }, wrappedResults);
+ };
+ }
+
+ function retryInterval(interval){
+ return function(seriesCallback){
+ setTimeout(function(){
+ seriesCallback(null);
+ }, interval);
+ };
+ }
+
+ while (opts.times) {
+
+ var finalAttempt = !(opts.times-=1);
+ attempts.push(retryAttempt(opts.task, finalAttempt));
+ if(!finalAttempt && opts.interval > 0){
+ attempts.push(retryInterval(opts.interval));
+ }
+ }
+
+ async.series(attempts, function(done, data){
+ data = data[data.length - 1];
+ (wrappedCallback || opts.callback)(data.err, data.result);
+ });
+ }
+
+ // If a callback is passed, run this as a controll flow
+ return opts.callback ? wrappedTask() : wrappedTask;
+ };
+
+ async.waterfall = function (tasks, callback) {
+ callback = _once(callback || noop);
+ if (!_isArray(tasks)) {
+ var err = new Error('First argument to waterfall must be an array of functions');
+ return callback(err);
+ }
+ if (!tasks.length) {
+ return callback();
+ }
+ function wrapIterator(iterator) {
+ return _restParam(function (err, args) {
+ if (err) {
+ callback.apply(null, [err].concat(args));
+ }
+ else {
+ var next = iterator.next();
+ if (next) {
+ args.push(wrapIterator(next));
+ }
+ else {
+ args.push(callback);
+ }
+ ensureAsync(iterator).apply(null, args);
+ }
+ });
+ }
+ wrapIterator(async.iterator(tasks))();
+ };
+
+ function _parallel(eachfn, tasks, callback) {
+ callback = callback || noop;
+ var results = _isArrayLike(tasks) ? [] : {};
+
+ eachfn(tasks, function (task, key, callback) {
+ task(_restParam(function (err, args) {
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ results[key] = args;
+ callback(err);
+ }));
+ }, function (err) {
+ callback(err, results);
+ });
+ }
+
+ async.parallel = function (tasks, callback) {
+ _parallel(async.eachOf, tasks, callback);
+ };
+
+ async.parallelLimit = function(tasks, limit, callback) {
+ _parallel(_eachOfLimit(limit), tasks, callback);
+ };
+
+ async.series = function(tasks, callback) {
+ _parallel(async.eachOfSeries, tasks, callback);
+ };
+
+ async.iterator = function (tasks) {
+ function makeCallback(index) {
+ function fn() {
+ if (tasks.length) {
+ tasks[index].apply(null, arguments);
+ }
+ return fn.next();
+ }
+ fn.next = function () {
+ return (index < tasks.length - 1) ? makeCallback(index + 1): null;
+ };
+ return fn;
+ }
+ return makeCallback(0);
+ };
+
+ async.apply = _restParam(function (fn, args) {
+ return _restParam(function (callArgs) {
+ return fn.apply(
+ null, args.concat(callArgs)
+ );
+ });
+ });
+
+ function _concat(eachfn, arr, fn, callback) {
+ var result = [];
+ eachfn(arr, function (x, index, cb) {
+ fn(x, function (err, y) {
+ result = result.concat(y || []);
+ cb(err);
+ });
+ }, function (err) {
+ callback(err, result);
+ });
+ }
+ async.concat = doParallel(_concat);
+ async.concatSeries = doSeries(_concat);
+
+ async.whilst = function (test, iterator, callback) {
+ callback = callback || noop;
+ if (test()) {
+ var next = _restParam(function(err, args) {
+ if (err) {
+ callback(err);
+ } else if (test.apply(this, args)) {
+ iterator(next);
+ } else {
+ callback.apply(null, [null].concat(args));
+ }
+ });
+ iterator(next);
+ } else {
+ callback(null);
+ }
+ };
+
+ async.doWhilst = function (iterator, test, callback) {
+ var calls = 0;
+ return async.whilst(function() {
+ return ++calls <= 1 || test.apply(this, arguments);
+ }, iterator, callback);
+ };
+
+ async.until = function (test, iterator, callback) {
+ return async.whilst(function() {
+ return !test.apply(this, arguments);
+ }, iterator, callback);
+ };
+
+ async.doUntil = function (iterator, test, callback) {
+ return async.doWhilst(iterator, function() {
+ return !test.apply(this, arguments);
+ }, callback);
+ };
+
+ async.during = function (test, iterator, callback) {
+ callback = callback || noop;
+
+ var next = _restParam(function(err, args) {
+ if (err) {
+ callback(err);
+ } else {
+ args.push(check);
+ test.apply(this, args);
+ }
+ });
+
+ var check = function(err, truth) {
+ if (err) {
+ callback(err);
+ } else if (truth) {
+ iterator(next);
+ } else {
+ callback(null);
+ }
+ };
+
+ test(check);
+ };
+
+ async.doDuring = function (iterator, test, callback) {
+ var calls = 0;
+ async.during(function(next) {
+ if (calls++ < 1) {
+ next(null, true);
+ } else {
+ test.apply(this, arguments);
+ }
+ }, iterator, callback);
+ };
+
+ function _queue(worker, concurrency, payload) {
+ if (concurrency == null) {
+ concurrency = 1;
+ }
+ else if(concurrency === 0) {
+ throw new Error('Concurrency must not be zero');
+ }
+ function _insert(q, data, pos, callback) {
+ if (callback != null && typeof callback !== "function") {
+ throw new Error("task callback must be a function");
+ }
+ q.started = true;
+ if (!_isArray(data)) {
+ data = [data];
+ }
+ if(data.length === 0 && q.idle()) {
+ // call drain immediately if there are no tasks
+ return async.setImmediate(function() {
+ q.drain();
+ });
+ }
+ _arrayEach(data, function(task) {
+ var item = {
+ data: task,
+ callback: callback || noop
+ };
+
+ if (pos) {
+ q.tasks.unshift(item);
+ } else {
+ q.tasks.push(item);
+ }
+
+ if (q.tasks.length === q.concurrency) {
+ q.saturated();
+ }
+ });
+ async.setImmediate(q.process);
+ }
+ function _next(q, tasks) {
+ return function(){
+ workers -= 1;
+
+ var removed = false;
+ var args = arguments;
+ _arrayEach(tasks, function (task) {
+ _arrayEach(workersList, function (worker, index) {
+ if (worker === task && !removed) {
+ workersList.splice(index, 1);
+ removed = true;
+ }
+ });
+
+ task.callback.apply(task, args);
+ });
+ if (q.tasks.length + workers === 0) {
+ q.drain();
+ }
+ q.process();
+ };
+ }
+
+ var workers = 0;
+ var workersList = [];
+ var q = {
+ tasks: [],
+ concurrency: concurrency,
+ payload: payload,
+ saturated: noop,
+ empty: noop,
+ drain: noop,
+ started: false,
+ paused: false,
+ push: function (data, callback) {
+ _insert(q, data, false, callback);
+ },
+ kill: function () {
+ q.drain = noop;
+ q.tasks = [];
+ },
+ unshift: function (data, callback) {
+ _insert(q, data, true, callback);
+ },
+ process: function () {
+ while(!q.paused && workers < q.concurrency && q.tasks.length){
+
+ var tasks = q.payload ?
+ q.tasks.splice(0, q.payload) :
+ q.tasks.splice(0, q.tasks.length);
+
+ var data = _map(tasks, function (task) {
+ return task.data;
+ });
+
+ if (q.tasks.length === 0) {
+ q.empty();
+ }
+ workers += 1;
+ workersList.push(tasks[0]);
+ var cb = only_once(_next(q, tasks));
+ worker(data, cb);
+ }
+ },
+ length: function () {
+ return q.tasks.length;
+ },
+ running: function () {
+ return workers;
+ },
+ workersList: function () {
+ return workersList;
+ },
+ idle: function() {
+ return q.tasks.length + workers === 0;
+ },
+ pause: function () {
+ q.paused = true;
+ },
+ resume: function () {
+ if (q.paused === false) { return; }
+ q.paused = false;
+ var resumeCount = Math.min(q.concurrency, q.tasks.length);
+ // Need to call q.process once per concurrent
+ // worker to preserve full concurrency after pause
+ for (var w = 1; w <= resumeCount; w++) {
+ async.setImmediate(q.process);
+ }
+ }
+ };
+ return q;
+ }
+
+ async.queue = function (worker, concurrency) {
+ var q = _queue(function (items, cb) {
+ worker(items[0], cb);
+ }, concurrency, 1);
+
+ return q;
+ };
+
+ async.priorityQueue = function (worker, concurrency) {
+
+ function _compareTasks(a, b){
+ return a.priority - b.priority;
+ }
+
+ function _binarySearch(sequence, item, compare) {
+ var beg = -1,
+ end = sequence.length - 1;
+ while (beg < end) {
+ var mid = beg + ((end - beg + 1) >>> 1);
+ if (compare(item, sequence[mid]) >= 0) {
+ beg = mid;
+ } else {
+ end = mid - 1;
+ }
+ }
+ return beg;
+ }
+
+ function _insert(q, data, priority, callback) {
+ if (callback != null && typeof callback !== "function") {
+ throw new Error("task callback must be a function");
+ }
+ q.started = true;
+ if (!_isArray(data)) {
+ data = [data];
+ }
+ if(data.length === 0) {
+ // call drain immediately if there are no tasks
+ return async.setImmediate(function() {
+ q.drain();
+ });
+ }
+ _arrayEach(data, function(task) {
+ var item = {
+ data: task,
+ priority: priority,
+ callback: typeof callback === 'function' ? callback : noop
+ };
+
+ q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);
+
+ if (q.tasks.length === q.concurrency) {
+ q.saturated();
+ }
+ async.setImmediate(q.process);
+ });
+ }
+
+ // Start with a normal queue
+ var q = async.queue(worker, concurrency);
+
+ // Override push to accept second parameter representing priority
+ q.push = function (data, priority, callback) {
+ _insert(q, data, priority, callback);
+ };
+
+ // Remove unshift function
+ delete q.unshift;
+
+ return q;
+ };
+
+ async.cargo = function (worker, payload) {
+ return _queue(worker, 1, payload);
+ };
+
+ function _console_fn(name) {
+ return _restParam(function (fn, args) {
+ fn.apply(null, args.concat([_restParam(function (err, args) {
+ if (typeof console === 'object') {
+ if (err) {
+ if (console.error) {
+ console.error(err);
+ }
+ }
+ else if (console[name]) {
+ _arrayEach(args, function (x) {
+ console[name](x);
+ });
+ }
+ }
+ })]));
+ });
+ }
+ async.log = _console_fn('log');
+ async.dir = _console_fn('dir');
+ /*async.info = _console_fn('info');
+ async.warn = _console_fn('warn');
+ async.error = _console_fn('error');*/
+
+ async.memoize = function (fn, hasher) {
+ var memo = {};
+ var queues = {};
+ var has = Object.prototype.hasOwnProperty;
+ hasher = hasher || identity;
+ var memoized = _restParam(function memoized(args) {
+ var callback = args.pop();
+ var key = hasher.apply(null, args);
+ if (has.call(memo, key)) {
+ async.setImmediate(function () {
+ callback.apply(null, memo[key]);
+ });
+ }
+ else if (has.call(queues, key)) {
+ queues[key].push(callback);
+ }
+ else {
+ queues[key] = [callback];
+ fn.apply(null, args.concat([_restParam(function (args) {
+ memo[key] = args;
+ var q = queues[key];
+ delete queues[key];
+ for (var i = 0, l = q.length; i < l; i++) {
+ q[i].apply(null, args);
+ }
+ })]));
+ }
+ });
+ memoized.memo = memo;
+ memoized.unmemoized = fn;
+ return memoized;
+ };
+
+ async.unmemoize = function (fn) {
+ return function () {
+ return (fn.unmemoized || fn).apply(null, arguments);
+ };
+ };
+
+ function _times(mapper) {
+ return function (count, iterator, callback) {
+ mapper(_range(count), iterator, callback);
+ };
+ }
+
+ async.times = _times(async.map);
+ async.timesSeries = _times(async.mapSeries);
+ async.timesLimit = function (count, limit, iterator, callback) {
+ return async.mapLimit(_range(count), limit, iterator, callback);
+ };
+
+ async.seq = function (/* functions... */) {
+ var fns = arguments;
+ return _restParam(function (args) {
+ var that = this;
+
+ var callback = args[args.length - 1];
+ if (typeof callback == 'function') {
+ args.pop();
+ } else {
+ callback = noop;
+ }
+
+ async.reduce(fns, args, function (newargs, fn, cb) {
+ fn.apply(that, newargs.concat([_restParam(function (err, nextargs) {
+ cb(err, nextargs);
+ })]));
+ },
+ function (err, results) {
+ callback.apply(that, [err].concat(results));
+ });
+ });
+ };
+
+ async.compose = function (/* functions... */) {
+ return async.seq.apply(null, Array.prototype.reverse.call(arguments));
+ };
+
+
+ function _applyEach(eachfn) {
+ return _restParam(function(fns, args) {
+ var go = _restParam(function(args) {
+ var that = this;
+ var callback = args.pop();
+ return eachfn(fns, function (fn, _, cb) {
+ fn.apply(that, args.concat([cb]));
+ },
+ callback);
+ });
+ if (args.length) {
+ return go.apply(this, args);
+ }
+ else {
+ return go;
+ }
+ });
+ }
+
+ async.applyEach = _applyEach(async.eachOf);
+ async.applyEachSeries = _applyEach(async.eachOfSeries);
+
+
+ async.forever = function (fn, callback) {
+ var done = only_once(callback || noop);
+ var task = ensureAsync(fn);
+ function next(err) {
+ if (err) {
+ return done(err);
+ }
+ task(next);
+ }
+ next();
+ };
+
+ function ensureAsync(fn) {
+ return _restParam(function (args) {
+ var callback = args.pop();
+ args.push(function () {
+ var innerArgs = arguments;
+ if (sync) {
+ async.setImmediate(function () {
+ callback.apply(null, innerArgs);
+ });
+ } else {
+ callback.apply(null, innerArgs);
+ }
+ });
+ var sync = true;
+ fn.apply(this, args);
+ sync = false;
+ });
+ }
+
+ async.ensureAsync = ensureAsync;
+
+ async.constant = _restParam(function(values) {
+ var args = [null].concat(values);
+ return function (callback) {
+ return callback.apply(this, args);
+ };
+ });
+
+ async.wrapSync =
+ async.asyncify = function asyncify(func) {
+ return _restParam(function (args) {
+ var callback = args.pop();
+ var result;
+ try {
+ result = func.apply(this, args);
+ } catch (e) {
+ return callback(e);
+ }
+ // if result is Promise object
+ if (_isObject(result) && typeof result.then === "function") {
+ result.then(function(value) {
+ callback(null, value);
+ })["catch"](function(err) {
+ callback(err.message ? err : new Error(err));
+ });
+ } else {
+ callback(null, result);
+ }
+ });
+ };
+
+ // Node.js
+ if (typeof module === 'object' && module.exports) {
+ module.exports = async;
+ }
+ // AMD / RequireJS
+ else if (typeof define === 'function' && define.amd) {
+ define([], function () {
+ return async;
+ });
+ }
+ // included directly via
+