Browse Source

nuevos ejemplos de constructores sql y encriptacion de textos

robert2206 8 years ago
parent
commit
458f6c9659
100 changed files with 17048 additions and 0 deletions
  1. 5 0
      node_modules/bcrypt/.npmignore
  2. 24 0
      node_modules/bcrypt/.travis.yml
  3. 72 0
      node_modules/bcrypt/CHANGELOG.md
  4. 16 0
      node_modules/bcrypt/ISSUE_TEMPLATE.md
  5. 19 0
      node_modules/bcrypt/LICENSE
  6. 22 0
      node_modules/bcrypt/Makefile
  7. 259 0
      node_modules/bcrypt/README.md
  8. 173 0
      node_modules/bcrypt/bcrypt.js
  9. 22 0
      node_modules/bcrypt/binding.gyp
  10. 324 0
      node_modules/bcrypt/build/Makefile
  11. 1 0
      node_modules/bcrypt/build/Release/.deps/Release/bcrypt_lib.node.d
  12. 1 0
      node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib.node.d
  13. 5 0
      node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt.o.d
  14. 52 0
      node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt_node.o.d
  15. 5 0
      node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d
  16. BIN
      node_modules/bcrypt/build/Release/bcrypt_lib.node
  17. BIN
      node_modules/bcrypt/build/Release/obj.target/bcrypt_lib.node
  18. BIN
      node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/bcrypt.o
  19. BIN
      node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/bcrypt_node.o
  20. BIN
      node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/blowfish.o
  21. 144 0
      node_modules/bcrypt/build/bcrypt_lib.target.mk
  22. 6 0
      node_modules/bcrypt/build/binding.Makefile
  23. 152 0
      node_modules/bcrypt/build/config.gypi
  24. 21 0
      node_modules/bcrypt/examples/async_compare.js
  25. 8 0
      node_modules/bcrypt/examples/forever_gen_salt.js
  26. 187 0
      node_modules/bcrypt/package.json
  27. 322 0
      node_modules/bcrypt/src/bcrypt.cc
  28. 353 0
      node_modules/bcrypt/src/bcrypt_node.cc
  29. 686 0
      node_modules/bcrypt/src/blowfish.cc
  30. 111 0
      node_modules/bcrypt/src/node_blf.h
  31. 149 0
      node_modules/bcrypt/test/async.js
  32. 118 0
      node_modules/bcrypt/test/repetitions.js
  33. 121 0
      node_modules/bcrypt/test/sync.js
  34. 10 0
      node_modules/bcrypt/werker.yml
  35. 6 0
      node_modules/bcryptjs/.npmignore
  36. 5 0
      node_modules/bcryptjs/.travis.yml
  37. 50 0
      node_modules/bcryptjs/LICENSE
  38. 240 0
      node_modules/bcryptjs/README.md
  39. 25 0
      node_modules/bcryptjs/bin/bcrypt
  40. 22 0
      node_modules/bcryptjs/bower.json
  41. 15 0
      node_modules/bcryptjs/dist/README.md
  42. 1224 0
      node_modules/bcryptjs/dist/bcrypt.js
  43. 44 0
      node_modules/bcryptjs/dist/bcrypt.min.js
  44. BIN
      node_modules/bcryptjs/dist/bcrypt.min.js.gz
  45. 4 0
      node_modules/bcryptjs/dist/bcrypt.min.map
  46. 91 0
      node_modules/bcryptjs/externs/bcrypt.js
  47. 98 0
      node_modules/bcryptjs/externs/minimal-env.js
  48. 29 0
      node_modules/bcryptjs/index.js
  49. 126 0
      node_modules/bcryptjs/package.json
  50. 37 0
      node_modules/bcryptjs/scripts/build.js
  51. 275 0
      node_modules/bcryptjs/src/bcrypt.js
  52. 566 0
      node_modules/bcryptjs/src/bcrypt/impl.js
  53. 5 0
      node_modules/bcryptjs/src/bcrypt/prng/README.md
  54. 133 0
      node_modules/bcryptjs/src/bcrypt/prng/accum.js
  55. 140 0
      node_modules/bcryptjs/src/bcrypt/prng/isaac.js
  56. 33 0
      node_modules/bcryptjs/src/bcrypt/util.js
  57. 115 0
      node_modules/bcryptjs/src/bcrypt/util/base64.js
  58. 22 0
      node_modules/bcryptjs/src/bower.json
  59. 50 0
      node_modules/bcryptjs/src/wrap.js
  60. 150 0
      node_modules/bcryptjs/tests/quickbrown.txt
  61. 170 0
      node_modules/bcryptjs/tests/suite.js
  62. 97 0
      node_modules/bindings/README.md
  63. 166 0
      node_modules/bindings/bindings.js
  64. 92 0
      node_modules/bindings/package.json
  65. 424 0
      node_modules/nan/CHANGELOG.md
  66. 13 0
      node_modules/nan/LICENSE.md
  67. 403 0
      node_modules/nan/README.md
  68. 98 0
      node_modules/nan/doc/asyncworker.md
  69. 54 0
      node_modules/nan/doc/buffers.md
  70. 52 0
      node_modules/nan/doc/callback.md
  71. 41 0
      node_modules/nan/doc/converters.md
  72. 226 0
      node_modules/nan/doc/errors.md
  73. 512 0
      node_modules/nan/doc/maybe_types.md
  74. 659 0
      node_modules/nan/doc/methods.md
  75. 147 0
      node_modules/nan/doc/new.md
  76. 63 0
      node_modules/nan/doc/node_misc.md
  77. 263 0
      node_modules/nan/doc/object_wrappers.md
  78. 295 0
      node_modules/nan/doc/persistent.md
  79. 73 0
      node_modules/nan/doc/scopes.md
  80. 38 0
      node_modules/nan/doc/script.md
  81. 62 0
      node_modules/nan/doc/string_bytes.md
  82. 199 0
      node_modules/nan/doc/v8_internals.md
  83. 85 0
      node_modules/nan/doc/v8_misc.md
  84. 1 0
      node_modules/nan/include_dirs.js
  85. 2276 0
      node_modules/nan/nan.h
  86. 88 0
      node_modules/nan/nan_callbacks.h
  87. 512 0
      node_modules/nan/nan_callbacks_12_inl.h
  88. 506 0
      node_modules/nan/nan_callbacks_pre_12_inl.h
  89. 64 0
      node_modules/nan/nan_converters.h
  90. 42 0
      node_modules/nan/nan_converters_43_inl.h
  91. 42 0
      node_modules/nan/nan_converters_pre_43_inl.h
  92. 409 0
      node_modules/nan/nan_implementation_12_inl.h
  93. 264 0
      node_modules/nan/nan_implementation_pre_12_inl.h
  94. 245 0
      node_modules/nan/nan_maybe_43_inl.h
  95. 303 0
      node_modules/nan/nan_maybe_pre_43_inl.h
  96. 340 0
      node_modules/nan/nan_new.h
  97. 155 0
      node_modules/nan/nan_object_wrap.h
  98. 129 0
      node_modules/nan/nan_persistent_12_inl.h
  99. 242 0
      node_modules/nan/nan_persistent_pre_12_inl.h
  100. 305 0
      node_modules/nan/nan_string_bytes.h

+ 5 - 0
node_modules/bcrypt/.npmignore

@@ -0,0 +1,5 @@
+.lock*
+build
+*.node
+*.sw[a-z]
+node_modules

+ 24 - 0
node_modules/bcrypt/.travis.yml

@@ -0,0 +1,24 @@
+language: node_js
+
+env:
+  - CXX=g++-4.8
+
+node_js:
+  - "0.8"
+  - "0.10"
+  - "0.12"
+  - "4"
+  - "6"
+
+addons:
+  apt:
+    sources:
+    - ubuntu-toolchain-r-test
+    packages:
+    - g++-4.8
+
+sudo: false
+
+before_install:
+  - $CXX --version
+  - if [ "$TRAVIS_NODE_VERSION" = "0.8" ]; then npm install -g npm@2.7.3; fi;

+ 72 - 0
node_modules/bcrypt/CHANGELOG.md

@@ -0,0 +1,72 @@
+# 0.8.6 (2016-04-20)
+
+  * update nan for node v6 support
+
+# 0.8.5 (2015-08-12)
+
+  * update to nan v2 (adds support for iojs 3)
+
+# 0.8.4 (2015-07-24)
+
+  * fix deprecation warning for the Encode API
+
+# 0.8.3 (2015-05-06)
+
+  * update nan to 1.8.4 for iojs 2.x support
+
+# 0.8.2 (2015-03-28)
+
+  * always use callback for generating random bytes to avoid blocking
+
+# 0.8.1 (2015-01-18)
+  * update NaN to 1.5.0 for iojs support
+
+# 0.8.0 (2014-08-03)
+  * migrate to NAN for bindings
+
+# v0.5.0
+  * Fix for issue around empty string params throwing Errors.
+  * Method deprecation.
+  * Upgrade from libeio/ev to libuv. (shtylman)
+  ** --- NOTE --- Breaks 0.4.x compatability
+  * EV_MULTIPLICITY compile flag.
+
+# v0.4.1
+  * Thread safety fix around OpenSSL (GH-32). (bnoordhuis - through node)
+  * C++ code changes using delete and new instead of malloc and free. (shtylman)
+  * Compile options for speed, zoom. (shtylman)
+  * Move much of the type and variable checking to the JS. (shtylman)
+
+# v0.4.0
+  * Added getRounds function that will tell you the number of rounds within a hash/salt
+
+# v0.3.2
+  * Fix api issue with async salt gen first param
+
+# v0.3.1
+  * Compile under node 0.5.x
+
+# v0.3.0
+  * Internal Refactoring
+  * Remove pthread dependencies and locking
+  * Fix compiler warnings and a memory bug
+
+# v0.2.4
+  * Use threadsafe functions instead of pthread mutexes
+  * salt validation to make sure the salt is of the correct size and format
+
+# v0.2.3
+  * cygwin support
+
+# v0.2.2
+  * Remove dependency on libbsd, use libssl instead
+
+# v0.2.0
+  * Added async functionality
+  * API changes
+    * hashpw -> encrypt
+    * all old sync methods now end with _sync
+  * Removed libbsd(arc4random) dependency...now uses openssl which is more widely spread
+
+# v0.1.2
+  * Security fix. Wasn't reading rounds in properly and was always only using 4 rounds

+ 16 - 0
node_modules/bcrypt/ISSUE_TEMPLATE.md

@@ -0,0 +1,16 @@
+Thanks for reporting a new issue with the node bcrypt module!
+
+To help you resolve your issue faster please make sure you have done the following:
+
+* Searched existing issues (even closed ones) for your same problem
+* Make sure you have installed the required dependencies listed on the readme
+* Read your npm error log for lines telling you what failed, usually it is a problem with not having the correct dependencies installed to build the native module
+
+Once you have done the above and are still confident that the issue is with the module, please describe it below. Some things that really help get your issue resolved faster are:
+
+* What went wrong?
+* What did you expect to happen?
+* Which version of nodejs and OS?
+* If you find a bug, please write a failing test.
+
+Thanks!

+ 19 - 0
node_modules/bcrypt/LICENSE

@@ -0,0 +1,19 @@
+Copyright (c) 2010 Nicholas Campbell
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 22 - 0
node_modules/bcrypt/Makefile

@@ -0,0 +1,22 @@
+TESTS = test/*.js
+
+all: test
+
+build: clean configure compile
+
+configure:
+	node-gyp configure
+
+compile: configure
+	node-gyp build
+	npm install .
+
+test: build
+	@./node_modules/nodeunit/bin/nodeunit \
+		$(TESTS)
+
+clean:
+	node-gyp clean
+
+
+.PHONY: clean test build

+ 259 - 0
node_modules/bcrypt/README.md

@@ -0,0 +1,259 @@
+# node.bcrypt.js
+
+[![Join the chat at https://gitter.im/ncb000gt/node.bcrypt.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ncb000gt/node.bcrypt.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+[![Build Status](https://travis-ci.org/ncb000gt/node.bcrypt.js.svg?branch=master)](https://travis-ci.org/ncb000gt/node.bcrypt.js)
+
+Lib to help you hash passwords.
+[bcrypt on wikipedia][bcryptwiki]
+
+Catalyst for this module: [How To Safely Store A Password][codahale]
+
+## If You Are Submitting Bugs/Issues
+
+First, make sure that the version of node you are using is a _stable_ version. You'll know this because it'll have an even major release number. We do not currently support unstable versions and while the module may happen to work on some unstable versions you'll find that we quickly close issues if you're not using a stable version.
+
+If you are on a stable version of node, we can't magically know what you are doing to expose an issue, it is best if you provide a snippet of code or log files if you're having an install issue. This snippet need not include your secret sauce, but it must replicate the issue you are describing. The issues that get closed without resolution tend to be the ones that don't help us help you. Thanks.
+
+
+## Version Compatibility
+
+| Node Version | Bcrypt Version |
+| ---- | ---- |
+| 0.4.x | <= 0.4.x |
+| 0.6.x | >= 0.5.x |
+| 0.8.x | >= 0.5.x |
+| 0.10.x | >= 0.5.x |
+| 0.11.x | >= 0.8.x |
+
+Windows users should make sure to have at least node 0.8.5 installed and version >= 0.7.1 of this module.
+
+`node-gyp` only works with stable/released versions of node. Since the `bcrypt` module uses `node-gyp` to build and install you'll need a stable version of node to use bcrypt. If you do not you'll likely see an error that starts with:
+
+```
+gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
+```
+
+## Security Issues/Concerns
+
+> Per bcrypt implementation, only the first 72 characters of a string are used. Any extra characters are ignored when matching passwords.
+
+As should be the case with any security tool, this library should be scrutinized by anyone using it. If you find or suspect an issue with the code- please bring it to my attention and I'll spend some time trying to make sure that this tool is as secure as possible.
+
+To make it easier for people using this tool to analyze what has been surveyed, here is a list of BCrypt related security issues/concerns as they've come up.
+
+* An [issue with passwords][jtr] was found with a version of the Blowfish algorithm developed for John the Ripper. This is not present in the OpenBSD version and is thus not a problem for this module. HT [zooko][zooko].
+
+## Dependencies
+
+* NodeJS
+* `node-gyp`
+ * Please check the dependencies for this tool at: https://github.com/nodejs/node-gyp
+  * Windows users will need the options for c# and c++ installed with their visual studio instance.
+  * Python 2.x
+* `OpenSSL` - This is only required to build the `bcrypt` project if you are using versions <= 0.7.7. Otherwise, we're using the builtin node crypto bindings for seed data (which use the same OpenSSL code paths we were, but don't have the external dependency).
+
+## Install via NPM
+```
+npm install bcrypt
+```
+
+***Note:*** OS X users using Xcode 4.3.1 or above may need to run the following command in their terminal prior to installing if errors occur regarding xcodebuild: ```sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer```
+
+## Usage
+
+### async (recommended)
+
+```javascript
+var bcrypt = require('bcrypt');
+const saltRounds = 10;
+const myPlaintextPassword = 's0/\/\P4$$w0rD';
+const someOtherPlaintextPassword = 'not_bacon';
+```
+
+#### To hash a password:
+
+Technique 1 (generate a salt and hash on separate function calls):
+
+```javascript
+bcrypt.genSalt(saltRounds, function(err, salt) {
+    bcrypt.hash(myPlaintextPassword, salt, function(err, hash) {
+        // Store hash in your password DB.
+    });
+});
+```
+
+Technique 2 (auto-gen a salt and hash):
+
+```javascript
+bcrypt.hash(myPlaintextPassword, saltRounds, function(err, hash) {
+  // Store hash in your password DB.
+});
+```
+
+Note that both techniques achieve the same end-result.
+
+#### To check a password:
+
+```javascript
+// Load hash from your password DB.
+bcrypt.compare(myPlaintextPassword, hash, function(err, res) {
+    // res == true
+});
+bcrypt.compare(someOtherPlaintextPassword, hash, function(err, res) {
+    // res == false
+});
+```
+
+
+### sync
+
+```javascript
+var bcrypt = require('bcrypt');
+const saltRounds = 10;
+const myPlaintextPassword = 's0/\/\P4$$w0rD';
+const someOtherPlaintextPassword = 'not_bacon';
+```
+
+#### To hash a password:
+
+Technique 1 (generate a salt and hash on separate function calls):
+
+```javascript
+var salt = bcrypt.genSaltSync(saltRounds);
+var hash = bcrypt.hashSync(myPlaintextPassword, salt);
+// Store hash in your password DB.
+```
+
+Technique 2 (auto-gen a salt and hash):
+
+```javascript
+var hash = bcrypt.hashSync(myPlaintextPassword, saltRounds);
+// Store hash in your password DB.
+```
+
+As with async, both techniques achieve the same end-result.
+
+#### To check a password:
+
+```javascript
+// Load hash from your password DB.
+bcrypt.compareSync(myPlaintextPassword, hash); // true
+bcrypt.compareSync(someOtherPlaintextPassword, hash); // false
+```
+
+## API
+
+`BCrypt.`
+
+  * `genSaltSync(rounds)`
+    * `rounds` - [OPTIONAL] - the cost of processing the data. (default - 10)
+  * `genSalt(rounds, cb)`
+    * `rounds` - [OPTIONAL] - the cost of processing the data. (default - 10)
+    * `cb` - [REQUIRED] - a callback to be fired once the salt has been generated. uses eio making it asynchronous.
+      * `err` - First parameter to the callback detailing any errors.
+      * `salt` - Second parameter to the callback providing the generated salt.
+  * `hashSync(data, salt)`
+    * `data` - [REQUIRED] - the data to be encrypted.
+    * `salt` - [REQUIRED] - the salt to be used to hash the password. if specified as a number then a salt will be generated with the specified number of rounds and used (see example under **Usage**).
+  * `hash(data, salt, cb)`
+    * `data` - [REQUIRED] - the data to be encrypted.
+    * `salt` - [REQUIRED] - the salt to be used to hash the password. if specified as a number then a salt will be generated with the specified number of rounds and used (see example under **Usage**).
+    * `cb` - [REQUIRED] - a callback to be fired once the data has been encrypted. uses eio making it asynchronous.
+      * `err` - First parameter to the callback detailing any errors.
+      * `encrypted` - Second parameter to the callback providing the encrypted form.
+  * `compareSync(data, encrypted)`
+    * `data` - [REQUIRED] - data to compare.
+    * `encrypted` - [REQUIRED] - data to be compared to.
+  * `compare(data, encrypted, cb)`
+    * `data` - [REQUIRED] - data to compare.
+    * `encrypted` - [REQUIRED] - data to be compared to.
+    * `cb` - [REQUIRED] - a callback to be fired once the data has been compared. uses eio making it asynchronous.
+      * `err` - First parameter to the callback detailing any errors.
+      * `same` - Second parameter to the callback providing whether the data and encrypted forms match [true | false].
+  * `getRounds(encrypted)` - return the number of rounds used to encrypt a given hash
+    * `encrypted` - [REQUIRED] - hash from which the number of rounds used should be extracted.
+
+## A Note on Rounds
+
+A note about the cost. When you are hashing your data the module will go through a series of rounds to give you a secure hash. The value you submit there is not just the number of rounds that the module will go through to hash your data. The module will use the value you enter and go through `2^rounds` iterations of processing.
+
+From @garthk, on a 2GHz core you can roughly expect:
+
+    rounds=8 : ~40 hashes/sec
+    rounds=9 : ~20 hashes/sec
+    rounds=10: ~10 hashes/sec
+    rounds=11: ~5  hashes/sec
+    rounds=12: 2-3 hashes/sec
+    rounds=13: ~1 sec/hash
+    rounds=14: ~1.5 sec/hash
+    rounds=15: ~3 sec/hash
+    rounds=25: ~1 hour/hash
+    rounds=31: 2-3 days/hash
+
+
+## Hash Info
+
+The characters that comprise the resultant hash are `./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$`.
+
+Resultant hashes will be 60 characters long.
+
+## Testing
+
+If you create a pull request, tests better pass :)
+
+```
+npm install
+npm test
+```
+
+## Credits
+
+The code for this comes from a few sources:
+
+* blowfish.cc - OpenBSD
+* bcrypt.cc - OpenBSD
+* bcrypt::gen_salt - [gen_salt inclusion to bcrypt][bcryptgs]
+* bcrypt_node.cc - me
+
+## Contributors
+
+* [Antonio Salazar Cardozo][shadowfiend] - Early MacOS X support (when we used libbsd)
+* [Ben Glow][pixelglow] - Fixes for thread safety with async calls
+* [Van Nguyen][thegoleffect] - Found a timing attack in the comparator
+* [NewITFarmer][newitfarmer] - Initial Cygwin support
+* [David Trejo][dtrejo] - packaging fixes
+* [Alfred Westerveld][alfredwesterveld] - packaging fixes
+* [Vincent Côté-Roy][vincentr] - Testing around concurrency issues
+* [Lloyd Hilaiel][lloyd] - Documentation fixes
+* [Roman Shtylman][shtylman] - Code refactoring, general rot reduction, compile options, better memory management with delete and new, and an upgrade to libuv over eio/ev.
+* [Vadim Graboys][vadimg] - Code changes to support 0.5.5+
+* [Ben Noordhuis][bnoordhuis] - Fixed a thread safety issue in nodejs that was perfectly mappable to this module.
+* [Nate Rajlich][tootallnate] - Bindings and build process.
+* [Sean McArthur][seanmonstar] - Windows Support
+* [Fanie Oosthuysen][weareu] - Windows Support
+
+## License
+Unless stated elsewhere, file headers or otherwise, the license as stated in the LICENSE file.
+
+[bcryptwiki]: https://en.wikipedia.org/wiki/Bcrypt
+[bcryptgs]: http://mail-index.netbsd.org/tech-crypto/2002/05/24/msg000204.html
+[codahale]: http://codahale.com/how-to-safely-store-a-password/
+[gh13]: https://github.com/ncb000gt/node.bcrypt.js/issues/13
+[jtr]: http://www.openwall.com/lists/oss-security/2011/06/20/2
+
+[shadowfiend]:https://github.com/Shadowfiend
+[thegoleffect]:https://github.com/thegoleffect
+[pixelglow]:https://github.com/pixelglow
+[dtrejo]:https://github.com/dtrejo
+[alfredwesterveld]:https://github.com/alfredwesterveld
+[newitfarmer]:https://github.com/newitfarmer
+[zooko]:https://twitter.com/zooko
+[vincentr]:https://twitter.com/vincentcr
+[lloyd]:https://github.com/lloyd
+[shtylman]:https://github.com/shtylman
+[vadimg]:https://github.com/vadimg
+[bnoordhuis]:https://github.com/bnoordhuis
+[tootallnate]:https://github.com/tootallnate
+[seanmonstar]:https://github.com/seanmonstar
+[weareu]:https://github.com/weareu

+ 173 - 0
node_modules/bcrypt/bcrypt.js

@@ -0,0 +1,173 @@
+'use strict';
+
+var bindings = require('bindings')('bcrypt_lib');
+var crypto = require('crypto');
+
+/// generate a salt (sync)
+/// @param {Number} [rounds] number of rounds (default 10)
+/// @return {String} salt
+module.exports.genSaltSync = function(rounds) {
+    // default 10 rounds
+    if (!rounds) {
+        rounds = 10;
+    } else if (typeof rounds !== 'number') {
+        throw new Error('rounds must be a number');
+    }
+
+    return bindings.gen_salt_sync(rounds, crypto.randomBytes(16));
+};
+
+/// generate a salt
+/// @param {Number} [rounds] number of rounds (default 10)
+/// @param {Function} cb callback(err, salt)
+module.exports.genSalt = function(rounds, ignore, cb) {
+    // if callback is first argument, then use defaults for others
+    if (typeof arguments[0] === 'function') {
+        // have to set callback first otherwise arguments are overriden
+        cb = arguments[0];
+        rounds = 10;
+    // callback is second argument
+    } else if (typeof arguments[1] === 'function') {
+        // have to set callback first otherwise arguments are overriden
+        cb = arguments[1];
+    }
+
+    // default 10 rounds
+    if (!rounds) {
+        rounds = 10;
+    } else if (typeof rounds !== 'number') {
+        // callback error asynchronously
+        return process.nextTick(function() {
+            cb(new Error('rounds must be a number'));
+        });
+    }
+
+    if (!cb) {
+        return;
+    }
+
+    crypto.randomBytes(16, function(error, randomBytes) {
+        if (error) {
+            cb(error);
+            return;
+        }
+
+        bindings.gen_salt(rounds, randomBytes, cb);
+    });
+};
+
+/// hash data using a salt
+/// @param {String} data the data to encrypt
+/// @param {String} salt the salt to use when hashing
+/// @return {String} hash
+module.exports.hashSync = function(data, salt) {
+    if (data == null || salt == null) {
+        throw new Error('data and salt arguments required');
+    }
+
+    if (typeof data !== 'string' || (typeof salt !== 'string' && typeof salt !== 'number')) {
+        throw new Error('data must be a string and salt must either be a salt string or a number of rounds');
+    }
+
+    if (typeof salt === 'number') {
+        salt = module.exports.genSaltSync(salt);
+    }
+
+    return bindings.encrypt_sync(data, salt);
+};
+
+/// hash data using a salt
+/// @param {String} data the data to encrypt
+/// @param {String} salt the salt to use when hashing
+/// @param {Function} cb callback(err, hash)
+module.exports.hash = function(data, salt, cb) {
+    if (typeof data === 'function') {
+        return process.nextTick(function() {
+            data(new Error('data must be a string and salt must either be a salt string or a number of rounds'));
+        });
+    }
+
+    if (typeof salt === 'function') {
+        return process.nextTick(function() {
+            salt(new Error('data must be a string and salt must either be a salt string or a number of rounds'));
+        });
+    }
+
+    if (data == null || salt == null) {
+        return process.nextTick(function() {
+            cb(new Error('data and salt arguments required'));
+        });
+    }
+
+    if (typeof data !== 'string' || (typeof salt !== 'string' && typeof salt !== 'number')) {
+        return process.nextTick(function() {
+            cb(new Error('data must be a string and salt must either be a salt string or a number of rounds'));
+        });
+    }
+
+    if (!cb || typeof cb !== 'function') {
+        return;
+    }
+
+    if (typeof salt === 'number') {
+        return module.exports.genSalt(salt, function(err, salt) {
+            return bindings.encrypt(data, salt, cb);
+        });
+    }
+
+    return bindings.encrypt(data, salt, cb);
+};
+
+/// compare raw data to hash
+/// @param {String} data the data to hash and compare
+/// @param {String} hash expected hash
+/// @return {bool} true if hashed data matches hash
+module.exports.compareSync = function(data, hash) {
+    if (data == null || hash == null) {
+        throw new Error('data and hash arguments required');
+    }
+
+    if (typeof data !== 'string' || typeof hash !== 'string') {
+        throw new Error('data and hash must be strings');
+    }
+
+    return bindings.compare_sync(data, hash);
+};
+
+/// compare raw data to hash
+/// @param {String} data the data to hash and compare
+/// @param {String} hash expected hash
+/// @param {Function} cb callback(err, matched) - matched is true if hashed data matches hash
+module.exports.compare = function(data, hash, cb) {
+    if (data == null || hash == null) {
+        return process.nextTick(function() {
+            cb(new Error('data and hash arguments required'));
+        });
+    }
+
+    if (typeof data !== 'string' || typeof hash !== 'string') {
+        return process.nextTick(function() {
+            cb(new Error('data and hash must be strings'));
+        });
+    }
+
+    if (!cb || typeof cb !== 'function') {
+        return;
+    }
+
+    return bindings.compare(data, hash, cb);
+};
+
+/// @param {String} hash extract rounds from this hash
+/// @return {Number} the number of rounds used to encrypt a given hash
+module.exports.getRounds = function(hash) {
+    if (hash == null) {
+        throw new Error('hash argument required');
+    }
+
+    if (typeof hash !== 'string') {
+        throw new Error('hash must be a string');
+    }
+
+    return bindings.get_rounds(hash);
+};

+ 22 - 0
node_modules/bcrypt/binding.gyp

@@ -0,0 +1,22 @@
+{
+  'targets': [
+    {
+      'target_name': 'bcrypt_lib',
+      'sources': [
+        'src/blowfish.cc',
+        'src/bcrypt.cc',
+        'src/bcrypt_node.cc'
+      ],
+      'include_dirs' : [
+          "<!(node -e \"require('nan')\")"
+      ],
+      'conditions': [
+        [ 'OS=="win"', {
+          'defines': [
+            'uint=unsigned int',
+          ],
+        }],
+      ],
+    }
+  ]
+}

+ 324 - 0
node_modules/bcrypt/build/Makefile

@@ -0,0 +1,324 @@
+# We borrow heavily from the kernel build setup, though we are simpler since
+# we don't have Kconfig tweaking settings on us.
+
+# The implicit make rules have it looking for RCS files, among other things.
+# We instead explicitly write all the rules we care about.
+# It's even quicker (saves ~200ms) to pass -r on the command line.
+MAKEFLAGS=-r
+
+# The source directory tree.
+srcdir := ..
+abs_srcdir := $(abspath $(srcdir))
+
+# The name of the builddir.
+builddir_name ?= .
+
+# The V=1 flag on command line makes us verbosely print command lines.
+ifdef V
+  quiet=
+else
+  quiet=quiet_
+endif
+
+# Specify BUILDTYPE=Release on the command line for a release build.
+BUILDTYPE ?= Release
+
+# Directory all our build output goes into.
+# Note that this must be two directories beneath src/ for unit tests to pass,
+# as they reach into the src/ directory for data with relative paths.
+builddir ?= $(builddir_name)/$(BUILDTYPE)
+abs_builddir := $(abspath $(builddir))
+depsdir := $(builddir)/.deps
+
+# Object output directory.
+obj := $(builddir)/obj
+abs_obj := $(abspath $(obj))
+
+# We build up a list of every single one of the targets so we can slurp in the
+# generated dependency rule Makefiles in one pass.
+all_deps :=
+
+
+
+CC.target ?= $(CC)
+CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS)
+CXX.target ?= $(CXX)
+CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
+LINK.target ?= $(LINK)
+LDFLAGS.target ?= $(LDFLAGS)
+AR.target ?= $(AR)
+
+# C++ apps need to be linked with g++.
+LINK ?= $(CXX.target)
+
+# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
+# to replicate this environment fallback in make as well.
+CC.host ?= gcc
+CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host)
+CXX.host ?= g++
+CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
+LINK.host ?= $(CXX.host)
+LDFLAGS.host ?=
+AR.host ?= ar
+
+# Define a dir function that can handle spaces.
+# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
+# "leading spaces cannot appear in the text of the first argument as written.
+# These characters can be put into the argument value by variable substitution."
+empty :=
+space := $(empty) $(empty)
+
+# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
+replace_spaces = $(subst $(space),?,$1)
+unreplace_spaces = $(subst ?,$(space),$1)
+dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
+
+# Flags to make gcc output dependency info.  Note that you need to be
+# careful here to use the flags that ccache and distcc can understand.
+# We write to a dep file on the side first and then rename at the end
+# so we can't end up with a broken dep file.
+depfile = $(depsdir)/$(call replace_spaces,$@).d
+DEPFLAGS = -MMD -MF $(depfile).raw
+
+# We have to fixup the deps output in a few ways.
+# (1) the file output should mention the proper .o file.
+# ccache or distcc lose the path to the target, so we convert a rule of
+# the form:
+#   foobar.o: DEP1 DEP2
+# into
+#   path/to/foobar.o: DEP1 DEP2
+# (2) we want missing files not to cause us to fail to build.
+# We want to rewrite
+#   foobar.o: DEP1 DEP2 \
+#               DEP3
+# to
+#   DEP1:
+#   DEP2:
+#   DEP3:
+# so if the files are missing, they're just considered phony rules.
+# We have to do some pretty insane escaping to get those backslashes
+# and dollar signs past make, the shell, and sed at the same time.
+# Doesn't work with spaces, but that's fine: .d files have spaces in
+# their names replaced with other characters.
+define fixup_dep
+# The depfile may not exist if the input file didn't have any #includes.
+touch $(depfile).raw
+# Fixup path as in (1).
+sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
+# Add extra rules as in (2).
+# We remove slashes and replace spaces with new lines;
+# remove blank lines;
+# delete the first line and append a colon to the remaining lines.
+sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
+  grep -v '^$$'                             |\
+  sed -e 1d -e 's|$$|:|'                     \
+    >> $(depfile)
+rm $(depfile).raw
+endef
+
+# Command definitions:
+# - cmd_foo is the actual command to run;
+# - quiet_cmd_foo is the brief-output summary of the command.
+
+quiet_cmd_cc = CC($(TOOLSET)) $@
+cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
+
+quiet_cmd_cxx = CXX($(TOOLSET)) $@
+cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
+
+quiet_cmd_touch = TOUCH $@
+cmd_touch = touch $@
+
+quiet_cmd_copy = COPY $@
+# send stderr to /dev/null to ignore messages when linking directories.
+cmd_copy = rm -rf "$@" && cp -af "$<" "$@"
+
+quiet_cmd_alink = AR($(TOOLSET)) $@
+cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
+
+quiet_cmd_alink_thin = AR($(TOOLSET)) $@
+cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+
+# Due to circular dependencies between libraries :(, we wrap the
+# special "figure out circular dependencies" flags around the entire
+# input list during linking.
+quiet_cmd_link = LINK($(TOOLSET)) $@
+cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
+
+# We support two kinds of shared objects (.so):
+# 1) shared_library, which is just bundling together many dependent libraries
+# into a link line.
+# 2) loadable_module, which is generating a module intended for dlopen().
+#
+# They differ only slightly:
+# In the former case, we want to package all dependent code into the .so.
+# In the latter case, we want to package just the API exposed by the
+# outermost module.
+# This means shared_library uses --whole-archive, while loadable_module doesn't.
+# (Note that --whole-archive is incompatible with the --start-group used in
+# normal linking.)
+
+# Other shared-object link notes:
+# - Set SONAME to the library filename so our binaries don't reference
+# the local, absolute paths used on the link command-line.
+quiet_cmd_solink = SOLINK($(TOOLSET)) $@
+cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
+
+quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
+cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
+
+
+# Define an escape_quotes function to escape single quotes.
+# This allows us to handle quotes properly as long as we always use
+# use single quotes and escape_quotes.
+escape_quotes = $(subst ','\'',$(1))
+# This comment is here just to include a ' to unconfuse syntax highlighting.
+# Define an escape_vars function to escape '$' variable syntax.
+# This allows us to read/write command lines with shell variables (e.g.
+# $LD_LIBRARY_PATH), without triggering make substitution.
+escape_vars = $(subst $$,$$$$,$(1))
+# Helper that expands to a shell command to echo a string exactly as it is in
+# make. This uses printf instead of echo because printf's behaviour with respect
+# to escape sequences is more portable than echo's across different shells
+# (e.g., dash, bash).
+exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
+
+# Helper to compare the command we're about to run against the command
+# we logged the last time we ran the command.  Produces an empty
+# string (false) when the commands match.
+# Tricky point: Make has no string-equality test function.
+# The kernel uses the following, but it seems like it would have false
+# positives, where one string reordered its arguments.
+#   arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
+#                       $(filter-out $(cmd_$@), $(cmd_$(1))))
+# We instead substitute each for the empty string into the other, and
+# say they're equal if both substitutions produce the empty string.
+# .d files contain ? instead of spaces, take that into account.
+command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
+                       $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
+
+# Helper that is non-empty when a prerequisite changes.
+# Normally make does this implicitly, but we force rules to always run
+# so we can check their command lines.
+#   $? -- new prerequisites
+#   $| -- order-only dependencies
+prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
+
+# Helper that executes all postbuilds until one fails.
+define do_postbuilds
+  @E=0;\
+  for p in $(POSTBUILDS); do\
+    eval $$p;\
+    E=$$?;\
+    if [ $$E -ne 0 ]; then\
+      break;\
+    fi;\
+  done;\
+  if [ $$E -ne 0 ]; then\
+    rm -rf "$@";\
+    exit $$E;\
+  fi
+endef
+
+# do_cmd: run a command via the above cmd_foo names, if necessary.
+# Should always run for a given target to handle command-line changes.
+# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
+# Third argument, if non-zero, makes it do POSTBUILDS processing.
+# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
+# spaces already and dirx strips the ? characters.
+define do_cmd
+$(if $(or $(command_changed),$(prereq_changed)),
+  @$(call exact_echo,  $($(quiet)cmd_$(1)))
+  @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
+  $(if $(findstring flock,$(word 1,$(cmd_$1))),
+    @$(cmd_$(1))
+    @echo "  $(quiet_cmd_$(1)): Finished",
+    @$(cmd_$(1))
+  )
+  @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
+  @$(if $(2),$(fixup_dep))
+  $(if $(and $(3), $(POSTBUILDS)),
+    $(call do_postbuilds)
+  )
+)
+endef
+
+# Declare the "all" target first so it is the default,
+# even though we don't have the deps yet.
+.PHONY: all
+all:
+
+# make looks for ways to re-generate included makefiles, but in our case, we
+# don't have a direct way. Explicitly telling make that it has nothing to do
+# for them makes it go faster.
+%.d: ;
+
+# Use FORCE_DO_CMD to force a target to run.  Should be coupled with
+# do_cmd.
+.PHONY: FORCE_DO_CMD
+FORCE_DO_CMD:
+
+TOOLSET := target
+# Suffix rules, putting all outputs into $(obj).
+$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
+	@$(call do_cmd,cc,1)
+$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
+	@$(call do_cmd,cc,1)
+$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
+	@$(call do_cmd,cc,1)
+
+# Try building from generated source, too.
+$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
+	@$(call do_cmd,cc,1)
+$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
+	@$(call do_cmd,cc,1)
+$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
+	@$(call do_cmd,cc,1)
+
+$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
+	@$(call do_cmd,cc,1)
+$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
+	@$(call do_cmd,cc,1)
+$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
+	@$(call do_cmd,cc,1)
+
+
+ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
+    $(findstring $(join ^,$(prefix)),\
+                 $(join ^,bcrypt_lib.target.mk)))),)
+  include bcrypt_lib.target.mk
+endif
+
+quiet_cmd_regen_makefile = ACTION Regenerating $@
+cmd_regen_makefile = cd $(srcdir); /home/robert/.nvm/versions/node/v6.3.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/home/robert/workspace/code-examples/node_modules/bcrypt/build/config.gypi -I/home/robert/.nvm/versions/node/v6.3.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/robert/.node-gyp/6.3.1/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/robert/.node-gyp/6.3.1" "-Dnode_gyp_dir=/home/robert/.nvm/versions/node/v6.3.1/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=node.lib" "-Dmodule_root_dir=/home/robert/workspace/code-examples/node_modules/bcrypt" binding.gyp
+Makefile: $(srcdir)/../../../../.node-gyp/6.3.1/include/node/common.gypi $(srcdir)/../../../../.nvm/versions/node/v6.3.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp
+	$(call do_cmd,regen_makefile)
+
+# "all" is a concatenation of the "all" targets from all the included
+# sub-makefiles. This is just here to clarify.
+all:
+
+# Add in dependency-tracking rules.  $(all_deps) is the list of every single
+# target in our tree. Only consider the ones with .d (dependency) info:
+d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
+ifneq ($(d_files),)
+  include $(d_files)
+endif

+ 1 - 0
node_modules/bcrypt/build/Release/.deps/Release/bcrypt_lib.node.d

@@ -0,0 +1 @@
+cmd_Release/bcrypt_lib.node := rm -rf "Release/bcrypt_lib.node" && cp -af "Release/obj.target/bcrypt_lib.node" "Release/bcrypt_lib.node"

+ 1 - 0
node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib.node.d

@@ -0,0 +1 @@
+cmd_Release/obj.target/bcrypt_lib.node := g++ -shared -pthread -rdynamic -m64  -Wl,-soname=bcrypt_lib.node -o Release/obj.target/bcrypt_lib.node -Wl,--start-group Release/obj.target/bcrypt_lib/src/blowfish.o Release/obj.target/bcrypt_lib/src/bcrypt.o Release/obj.target/bcrypt_lib/src/bcrypt_node.o -Wl,--end-group 

+ 5 - 0
node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt.o.d

@@ -0,0 +1,5 @@
+cmd_Release/obj.target/bcrypt_lib/src/bcrypt.o := g++ '-DNODE_GYP_MODULE_NAME=bcrypt_lib' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/robert/.node-gyp/6.3.1/include/node -I/home/robert/.node-gyp/6.3.1/src -I/home/robert/.node-gyp/6.3.1/deps/uv/include -I/home/robert/.node-gyp/6.3.1/deps/v8/include -I../../nan  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF ./Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt.o.d.raw   -c -o Release/obj.target/bcrypt_lib/src/bcrypt.o ../src/bcrypt.cc
+Release/obj.target/bcrypt_lib/src/bcrypt.o: ../src/bcrypt.cc \
+ ../src/node_blf.h
+../src/bcrypt.cc:
+../src/node_blf.h:

+ 52 - 0
node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt_node.o.d

@@ -0,0 +1,52 @@
+cmd_Release/obj.target/bcrypt_lib/src/bcrypt_node.o := g++ '-DNODE_GYP_MODULE_NAME=bcrypt_lib' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/robert/.node-gyp/6.3.1/include/node -I/home/robert/.node-gyp/6.3.1/src -I/home/robert/.node-gyp/6.3.1/deps/uv/include -I/home/robert/.node-gyp/6.3.1/deps/v8/include -I../../nan  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF ./Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt_node.o.d.raw   -c -o Release/obj.target/bcrypt_lib/src/bcrypt_node.o ../src/bcrypt_node.cc
+Release/obj.target/bcrypt_lib/src/bcrypt_node.o: ../src/bcrypt_node.cc \
+ ../../nan/nan.h /home/robert/.node-gyp/6.3.1/include/node/node_version.h \
+ /home/robert/.node-gyp/6.3.1/include/node/uv.h \
+ /home/robert/.node-gyp/6.3.1/include/node/uv-errno.h \
+ /home/robert/.node-gyp/6.3.1/include/node/uv-version.h \
+ /home/robert/.node-gyp/6.3.1/include/node/uv-unix.h \
+ /home/robert/.node-gyp/6.3.1/include/node/uv-threadpool.h \
+ /home/robert/.node-gyp/6.3.1/include/node/uv-linux.h \
+ /home/robert/.node-gyp/6.3.1/include/node/node.h \
+ /home/robert/.node-gyp/6.3.1/include/node/v8.h \
+ /home/robert/.node-gyp/6.3.1/include/node/v8-version.h \
+ /home/robert/.node-gyp/6.3.1/include/node/v8config.h \
+ /home/robert/.node-gyp/6.3.1/include/node/node_version.h \
+ /home/robert/.node-gyp/6.3.1/include/node/node_buffer.h \
+ /home/robert/.node-gyp/6.3.1/include/node/node.h \
+ /home/robert/.node-gyp/6.3.1/include/node/node_object_wrap.h \
+ ../../nan/nan_callbacks.h ../../nan/nan_callbacks_12_inl.h \
+ ../../nan/nan_maybe_43_inl.h ../../nan/nan_converters.h \
+ ../../nan/nan_converters_43_inl.h ../../nan/nan_new.h \
+ ../../nan/nan_implementation_12_inl.h ../../nan/nan_persistent_12_inl.h \
+ ../../nan/nan_weak.h ../../nan/nan_object_wrap.h \
+ ../../nan/nan_typedarray_contents.h ../src/node_blf.h
+../src/bcrypt_node.cc:
+../../nan/nan.h:
+/home/robert/.node-gyp/6.3.1/include/node/node_version.h:
+/home/robert/.node-gyp/6.3.1/include/node/uv.h:
+/home/robert/.node-gyp/6.3.1/include/node/uv-errno.h:
+/home/robert/.node-gyp/6.3.1/include/node/uv-version.h:
+/home/robert/.node-gyp/6.3.1/include/node/uv-unix.h:
+/home/robert/.node-gyp/6.3.1/include/node/uv-threadpool.h:
+/home/robert/.node-gyp/6.3.1/include/node/uv-linux.h:
+/home/robert/.node-gyp/6.3.1/include/node/node.h:
+/home/robert/.node-gyp/6.3.1/include/node/v8.h:
+/home/robert/.node-gyp/6.3.1/include/node/v8-version.h:
+/home/robert/.node-gyp/6.3.1/include/node/v8config.h:
+/home/robert/.node-gyp/6.3.1/include/node/node_version.h:
+/home/robert/.node-gyp/6.3.1/include/node/node_buffer.h:
+/home/robert/.node-gyp/6.3.1/include/node/node.h:
+/home/robert/.node-gyp/6.3.1/include/node/node_object_wrap.h:
+../../nan/nan_callbacks.h:
+../../nan/nan_callbacks_12_inl.h:
+../../nan/nan_maybe_43_inl.h:
+../../nan/nan_converters.h:
+../../nan/nan_converters_43_inl.h:
+../../nan/nan_new.h:
+../../nan/nan_implementation_12_inl.h:
+../../nan/nan_persistent_12_inl.h:
+../../nan/nan_weak.h:
+../../nan/nan_object_wrap.h:
+../../nan/nan_typedarray_contents.h:
+../src/node_blf.h:

+ 5 - 0
node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d

@@ -0,0 +1,5 @@
+cmd_Release/obj.target/bcrypt_lib/src/blowfish.o := g++ '-DNODE_GYP_MODULE_NAME=bcrypt_lib' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/robert/.node-gyp/6.3.1/include/node -I/home/robert/.node-gyp/6.3.1/src -I/home/robert/.node-gyp/6.3.1/deps/uv/include -I/home/robert/.node-gyp/6.3.1/deps/v8/include -I../../nan  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF ./Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d.raw   -c -o Release/obj.target/bcrypt_lib/src/blowfish.o ../src/blowfish.cc
+Release/obj.target/bcrypt_lib/src/blowfish.o: ../src/blowfish.cc \
+ ../src/node_blf.h
+../src/blowfish.cc:
+../src/node_blf.h:

BIN
node_modules/bcrypt/build/Release/bcrypt_lib.node


BIN
node_modules/bcrypt/build/Release/obj.target/bcrypt_lib.node


BIN
node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/bcrypt.o


BIN
node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/bcrypt_node.o


BIN
node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/blowfish.o


+ 144 - 0
node_modules/bcrypt/build/bcrypt_lib.target.mk

@@ -0,0 +1,144 @@
+# This file is generated by gyp; do not edit.
+
+TOOLSET := target
+TARGET := bcrypt_lib
+DEFS_Debug := \
+	'-DNODE_GYP_MODULE_NAME=bcrypt_lib' \
+	'-DUSING_UV_SHARED=1' \
+	'-DUSING_V8_SHARED=1' \
+	'-DV8_DEPRECATION_WARNINGS=1' \
+	'-D_LARGEFILE_SOURCE' \
+	'-D_FILE_OFFSET_BITS=64' \
+	'-DBUILDING_NODE_EXTENSION' \
+	'-DDEBUG' \
+	'-D_DEBUG'
+
+# Flags passed to all source files.
+CFLAGS_Debug := \
+	-fPIC \
+	-pthread \
+	-Wall \
+	-Wextra \
+	-Wno-unused-parameter \
+	-m64 \
+	-g \
+	-O0
+
+# Flags passed to only C files.
+CFLAGS_C_Debug :=
+
+# Flags passed to only C++ files.
+CFLAGS_CC_Debug := \
+	-fno-rtti \
+	-fno-exceptions \
+	-std=gnu++0x
+
+INCS_Debug := \
+	-I/home/robert/.node-gyp/6.3.1/include/node \
+	-I/home/robert/.node-gyp/6.3.1/src \
+	-I/home/robert/.node-gyp/6.3.1/deps/uv/include \
+	-I/home/robert/.node-gyp/6.3.1/deps/v8/include \
+	-I$(srcdir)/../nan
+
+DEFS_Release := \
+	'-DNODE_GYP_MODULE_NAME=bcrypt_lib' \
+	'-DUSING_UV_SHARED=1' \
+	'-DUSING_V8_SHARED=1' \
+	'-DV8_DEPRECATION_WARNINGS=1' \
+	'-D_LARGEFILE_SOURCE' \
+	'-D_FILE_OFFSET_BITS=64' \
+	'-DBUILDING_NODE_EXTENSION'
+
+# Flags passed to all source files.
+CFLAGS_Release := \
+	-fPIC \
+	-pthread \
+	-Wall \
+	-Wextra \
+	-Wno-unused-parameter \
+	-m64 \
+	-O3 \
+	-fno-omit-frame-pointer
+
+# Flags passed to only C files.
+CFLAGS_C_Release :=
+
+# Flags passed to only C++ files.
+CFLAGS_CC_Release := \
+	-fno-rtti \
+	-fno-exceptions \
+	-std=gnu++0x
+
+INCS_Release := \
+	-I/home/robert/.node-gyp/6.3.1/include/node \
+	-I/home/robert/.node-gyp/6.3.1/src \
+	-I/home/robert/.node-gyp/6.3.1/deps/uv/include \
+	-I/home/robert/.node-gyp/6.3.1/deps/v8/include \
+	-I$(srcdir)/../nan
+
+OBJS := \
+	$(obj).target/$(TARGET)/src/blowfish.o \
+	$(obj).target/$(TARGET)/src/bcrypt.o \
+	$(obj).target/$(TARGET)/src/bcrypt_node.o
+
+# Add to the list of files we specially track dependencies for.
+all_deps += $(OBJS)
+
+# CFLAGS et al overrides must be target-local.
+# See "Target-specific Variable Values" in the GNU Make manual.
+$(OBJS): TOOLSET := $(TOOLSET)
+$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE))  $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
+$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE))  $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
+
+# Suffix rules, putting all outputs into $(obj).
+
+$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+
+# Try building from generated source, too.
+
+$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+
+$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD
+	@$(call do_cmd,cxx,1)
+
+# End of this set of suffix rules
+### Rules for final target.
+LDFLAGS_Debug := \
+	-pthread \
+	-rdynamic \
+	-m64
+
+LDFLAGS_Release := \
+	-pthread \
+	-rdynamic \
+	-m64
+
+LIBS :=
+
+$(obj).target/bcrypt_lib.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
+$(obj).target/bcrypt_lib.node: LIBS := $(LIBS)
+$(obj).target/bcrypt_lib.node: TOOLSET := $(TOOLSET)
+$(obj).target/bcrypt_lib.node: $(OBJS) FORCE_DO_CMD
+	$(call do_cmd,solink_module)
+
+all_deps += $(obj).target/bcrypt_lib.node
+# Add target alias
+.PHONY: bcrypt_lib
+bcrypt_lib: $(builddir)/bcrypt_lib.node
+
+# Copy this to the executable output path.
+$(builddir)/bcrypt_lib.node: TOOLSET := $(TOOLSET)
+$(builddir)/bcrypt_lib.node: $(obj).target/bcrypt_lib.node FORCE_DO_CMD
+	$(call do_cmd,copy)
+
+all_deps += $(builddir)/bcrypt_lib.node
+# Short alias for building this executable.
+.PHONY: bcrypt_lib.node
+bcrypt_lib.node: $(obj).target/bcrypt_lib.node $(builddir)/bcrypt_lib.node
+
+# Add executable to "all" target.
+.PHONY: all
+all: $(builddir)/bcrypt_lib.node
+

+ 6 - 0
node_modules/bcrypt/build/binding.Makefile

@@ -0,0 +1,6 @@
+# This file is generated by gyp; do not edit.
+
+export builddir_name ?= ./build/.
+.PHONY: all
+all:
+	$(MAKE) bcrypt_lib

+ 152 - 0
node_modules/bcrypt/build/config.gypi

@@ -0,0 +1,152 @@
+# Do not edit. File was generated by node-gyp's "configure" step
+{
+  "target_defaults": {
+    "cflags": [],
+    "default_configuration": "Release",
+    "defines": [],
+    "include_dirs": [],
+    "libraries": []
+  },
+  "variables": {
+    "asan": 0,
+    "debug_devtools": "node",
+    "gas_version": "2.23",
+    "host_arch": "x64",
+    "icu_data_file": "icudt57l.dat",
+    "icu_data_in": "../../deps/icu-small/source/data/in/icudt57l.dat",
+    "icu_endianness": "l",
+    "icu_gyp_path": "tools/icu/icu-generic.gyp",
+    "icu_locales": "en,root",
+    "icu_path": "deps/icu-small",
+    "icu_small": "true",
+    "icu_ver_major": "57",
+    "node_byteorder": "little",
+    "node_enable_d8": "false",
+    "node_enable_v8_vtunejit": "false",
+    "node_install_npm": "true",
+    "node_module_version": 48,
+    "node_no_browser_globals": "false",
+    "node_prefix": "/",
+    "node_release_urlbase": "https://nodejs.org/download/release/",
+    "node_shared": "false",
+    "node_shared_cares": "false",
+    "node_shared_http_parser": "false",
+    "node_shared_libuv": "false",
+    "node_shared_openssl": "false",
+    "node_shared_zlib": "false",
+    "node_tag": "",
+    "node_use_bundled_v8": "true",
+    "node_use_dtrace": "false",
+    "node_use_etw": "false",
+    "node_use_lttng": "false",
+    "node_use_openssl": "true",
+    "node_use_perfctr": "false",
+    "node_use_v8_platform": "true",
+    "openssl_fips": "",
+    "openssl_no_asm": 0,
+    "target_arch": "x64",
+    "uv_parent_path": "/deps/uv/",
+    "uv_use_dtrace": "false",
+    "v8_enable_gdbjit": 0,
+    "v8_enable_i18n_support": 1,
+    "v8_inspector": "true",
+    "v8_no_strict_aliasing": 1,
+    "v8_optimized_debug": 0,
+    "v8_random_seed": 0,
+    "v8_use_snapshot": "true",
+    "want_separate_host_toolset": 0,
+    "nodedir": "/home/robert/.node-gyp/6.3.1",
+    "copy_dev_lib": "true",
+    "standalone_static_library": 1,
+    "cache_lock_stale": "60000",
+    "legacy_bundling": "",
+    "sign_git_tag": "",
+    "user_agent": "npm/3.10.6 node/v6.3.1 linux x64",
+    "always_auth": "",
+    "bin_links": "true",
+    "key": "",
+    "description": "true",
+    "fetch_retries": "2",
+    "heading": "npm",
+    "if_present": "",
+    "init_version": "1.0.0",
+    "user": "1000",
+    "force": "",
+    "only": "",
+    "cache_min": "10",
+    "init_license": "ISC",
+    "editor": "vi",
+    "rollback": "true",
+    "tag_version_prefix": "v",
+    "cache_max": "Infinity",
+    "userconfig": "/home/robert/.npmrc",
+    "engine_strict": "",
+    "init_author_name": "",
+    "init_author_url": "",
+    "tmp": "/tmp",
+    "depth": "Infinity",
+    "save_dev": "",
+    "usage": "",
+    "progress": "true",
+    "https_proxy": "",
+    "onload_script": "",
+    "rebuild_bundle": "true",
+    "save_bundle": "",
+    "shell": "/bin/bash",
+    "dry_run": "",
+    "prefix": "/home/robert/.nvm/versions/node/v6.3.1",
+    "browser": "",
+    "cache_lock_wait": "10000",
+    "registry": "https://registry.npmjs.org/",
+    "save_optional": "",
+    "scope": "",
+    "searchopts": "",
+    "versions": "",
+    "cache": "/home/robert/.npm",
+    "global_style": "",
+    "ignore_scripts": "",
+    "searchsort": "name",
+    "version": "",
+    "local_address": "",
+    "viewer": "man",
+    "color": "true",
+    "fetch_retry_mintimeout": "10000",
+    "maxsockets": "50",
+    "umask": "0022",
+    "fetch_retry_maxtimeout": "60000",
+    "message": "%s",
+    "ca": "",
+    "cert": "",
+    "global": "",
+    "link": "",
+    "save": "true",
+    "access": "",
+    "also": "",
+    "unicode": "true",
+    "long": "",
+    "production": "",
+    "unsafe_perm": "true",
+    "node_version": "6.3.1",
+    "tag": "latest",
+    "git_tag_version": "true",
+    "shrinkwrap": "true",
+    "fetch_retry_factor": "10",
+    "npat": "",
+    "proprietary_attribs": "true",
+    "save_exact": "",
+    "strict_ssl": "true",
+    "dev": "",
+    "globalconfig": "/home/robert/.nvm/versions/node/v6.3.1/etc/npmrc",
+    "init_module": "/home/robert/.npm-init.js",
+    "parseable": "",
+    "globalignorefile": "/home/robert/.nvm/versions/node/v6.3.1/etc/npmignore",
+    "cache_lock_retries": "10",
+    "save_prefix": "^",
+    "group": "1000",
+    "init_author_email": "",
+    "searchexclude": "",
+    "git": "git",
+    "optional": "true",
+    "json": ""
+  }
+}

+ 21 - 0
node_modules/bcrypt/examples/async_compare.js

@@ -0,0 +1,21 @@
+var bcrypt = require('../bcrypt');
+
+var start = Date.now();
+bcrypt.genSalt(10, function(err, salt) {
+  console.log('salt: ' + salt);
+  console.log('salt cb end: ' + (Date.now() - start) + 'ms');
+  bcrypt.hash('test', salt, function(err, crypted) {
+    console.log('crypted: ' + crypted);
+    console.log('crypted cb end: ' + (Date.now() - start) + 'ms');
+    console.log('rounds used from hash:', bcrypt.getRounds(crypted));
+    bcrypt.compare('test', crypted, function(err, res) {
+      console.log('compared true: ' + res);
+      console.log('compared true cb end: ' + (Date.now() - start) + 'ms');
+    });
+    bcrypt.compare('bacon', crypted, function(err, res) {
+      console.log('compared false: ' + res);
+      console.log('compared false cb end: ' + (Date.now() - start) + 'ms');
+    });
+  });
+})
+console.log('end: ' + (Date.now() - start) + 'ms');

+ 8 - 0
node_modules/bcrypt/examples/forever_gen_salt.js

@@ -0,0 +1,8 @@
+var bcrypt = require('../bcrypt');
+
+(function printSalt() {
+  bcrypt.genSalt(10, function(err, salt) {
+    console.log('salt: ' + salt);
+    printSalt();
+  });
+})()

+ 187 - 0
node_modules/bcrypt/package.json

@@ -0,0 +1,187 @@
+{
+  "_args": [
+    [
+      {
+        "raw": "bcrypt",
+        "scope": null,
+        "escapedName": "bcrypt",
+        "name": "bcrypt",
+        "rawSpec": "",
+        "spec": "latest",
+        "type": "tag"
+      },
+      "/home/robert/workspace/code-examples"
+    ]
+  ],
+  "_from": "bcrypt@latest",
+  "_id": "bcrypt@0.8.7",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/bcrypt",
+  "_nodeVersion": "6.2.0",
+  "_npmOperationalInternal": {
+    "host": "packages-12-west.internal.npmjs.com",
+    "tmp": "tmp/bcrypt-0.8.7.tgz_1465526713712_0.05265477881766856"
+  },
+  "_npmUser": {
+    "name": "defunctzombie",
+    "email": "shtylman@gmail.com"
+  },
+  "_npmVersion": "3.8.9",
+  "_phantomChildren": {},
+  "_requested": {
+    "raw": "bcrypt",
+    "scope": null,
+    "escapedName": "bcrypt",
+    "name": "bcrypt",
+    "rawSpec": "",
+    "spec": "latest",
+    "type": "tag"
+  },
+  "_requiredBy": [
+    "#USER",
+    "/"
+  ],
+  "_resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-0.8.7.tgz",
+  "_shasum": "bc3875a9afd0a7b2cd231a6a7f218a5ce156b093",
+  "_shrinkwrap": null,
+  "_spec": "bcrypt",
+  "_where": "/home/robert/workspace/code-examples",
+  "author": {
+    "name": "Nick Campbell",
+    "url": "https://github.com/ncb000gt"
+  },
+  "bugs": {
+    "url": "https://github.com/ncb000gt/node.bcrypt.js/issues"
+  },
+  "contributors": [
+    {
+      "name": "Antonio Salazar Cardozo",
+      "email": "savedfastcool@gmail.com",
+      "url": "https://github.com/Shadowfiend"
+    },
+    {
+      "name": "Van Nguyen",
+      "email": "the.gol.effect@gmail.com",
+      "url": "https://github.com/thegoleffect"
+    },
+    {
+      "name": "David Trejo",
+      "email": "david@dtrejo.com",
+      "url": "https://github.com/dtrejo"
+    },
+    {
+      "name": "Ben Glow",
+      "email": "glen.low@pixelglow.com",
+      "url": "https://github.com/pixelglow"
+    },
+    {
+      "name": "NewITFarmer.com",
+      "url": "https://github.com/newitfarmer"
+    },
+    {
+      "name": "Alfred Westerveld",
+      "email": "alfredwesterveld@gmail.com",
+      "url": "https://github.com/alfredwesterveld"
+    },
+    {
+      "name": "Vincent Côté-Roy",
+      "email": "vincentcr@gmail.com",
+      "url": "https://github.com/vincentcr"
+    },
+    {
+      "name": "Lloyd Hilaiel",
+      "email": "lloyd@hilaiel.com",
+      "url": "https://github.com/lloyd"
+    },
+    {
+      "name": "Roman Shtylman",
+      "email": "shtylman@gmail.com",
+      "url": "https://github.com/shtylman"
+    },
+    {
+      "name": "Vadim Graboys",
+      "email": "dimva13@gmail.com",
+      "url": "https://github.com/vadimg"
+    },
+    {
+      "name": "Ben Noorduis",
+      "url": "https://github.com/bnoordhuis"
+    },
+    {
+      "name": "Nate Rajlich",
+      "email": "nathan@tootallnate.net",
+      "url": "https://github.com/tootallnate"
+    },
+    {
+      "name": "Sean McArthur",
+      "email": "sean.monstar@gmail.com",
+      "url": "https://github.com/seanmonstar"
+    },
+    {
+      "name": "Fanie Oosthuysen",
+      "email": "fanie.oosthuysen@gmail.com",
+      "url": "https://github.com/weareu"
+    }
+  ],
+  "dependencies": {
+    "bindings": "1.2.1",
+    "nan": "2.3.5"
+  },
+  "description": "A bcrypt library for NodeJS.",
+  "devDependencies": {
+    "nodeunit": "~0.9.1"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "bc3875a9afd0a7b2cd231a6a7f218a5ce156b093",
+    "tarball": "https://registry.npmjs.org/bcrypt/-/bcrypt-0.8.7.tgz"
+  },
+  "engines": {
+    "node": ">= 0.6.0"
+  },
+  "gitHead": "0dc9b78dab6980d129b77d1df723aa44daa7deb4",
+  "gypfile": true,
+  "homepage": "https://github.com/ncb000gt/node.bcrypt.js#readme",
+  "keywords": [
+    "bcrypt",
+    "password",
+    "auth",
+    "authentication",
+    "encryption",
+    "crypt",
+    "crypto"
+  ],
+  "license": "MIT",
+  "main": "./bcrypt",
+  "maintainers": [
+    {
+      "name": "ncb000gt",
+      "email": "nicholas.j.campbell@gmail.com"
+    },
+    {
+      "name": "tootallnate",
+      "email": "nathan@tootallnate.net"
+    },
+    {
+      "name": "jfirebaugh",
+      "email": "john.firebaugh@gmail.com"
+    },
+    {
+      "name": "defunctzombie",
+      "email": "shtylman@gmail.com"
+    }
+  ],
+  "name": "bcrypt",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/ncb000gt/node.bcrypt.js.git"
+  },
+  "scripts": {
+    "install": "node-gyp rebuild",
+    "test": "node-gyp configure build && nodeunit test"
+  },
+  "version": "0.8.7"
+}

+ 322 - 0
node_modules/bcrypt/src/bcrypt.cc

@@ -0,0 +1,322 @@
+/*	$OpenBSD: bcrypt.c,v 1.24 2008/04/02 19:54:05 millert Exp $	*/
+
+/*
+ * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by Niels Provos.
+ * 4. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+/* This password hashing algorithm was designed by David Mazieres
+ * <dm@lcs.mit.edu> and works as follows:
+ *
+ * 1. state := InitState ()
+ * 2. state := ExpandKey (state, salt, password) 3.
+ * REPEAT rounds:
+ *	state := ExpandKey (state, 0, salt)
+ *      state := ExpandKey(state, 0, password)
+ * 4. ctext := "OrpheanBeholderScryDoubt"
+ * 5. REPEAT 64:
+ * 	ctext := Encrypt_ECB (state, ctext);
+ * 6. RETURN Concatenate (salt, ctext);
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <string.h>
+#include "node_blf.h"
+
+#ifdef _WIN32 
+#define snprintf _snprintf
+#endif
+
+//#if !defined(__APPLE__) && !defined(__MACH__)
+//#include "bsd/stdlib.h"
+//#endif
+
+/* This implementation is adaptable to current computing power.
+ * You can have up to 2^31 rounds which should be enough for some
+ * time to come.
+ */
+
+/*char *bcrypt(const char *, const char *);
+void encode_salt(char *, u_int8_t *, u_int16_t, u_int8_t);
+char * bcrypt_gensalt(u_int8_t log_rounds);*/
+
+static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t);
+static void decode_base64(u_int8_t *, u_int16_t, u_int8_t *);
+
+const static char* error = ":";
+
+const static u_int8_t Base64Code[] =
+"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+
+const static u_int8_t index_64[128] = {
+	255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+	255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+	255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+	255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+	255, 255, 255, 255, 255, 255, 0, 1, 54, 55,
+	56, 57, 58, 59, 60, 61, 62, 63, 255, 255,
+	255, 255, 255, 255, 255, 2, 3, 4, 5, 6,
+	7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+	17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+	255, 255, 255, 255, 255, 255, 28, 29, 30,
+	31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+	41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+	51, 52, 53, 255, 255, 255, 255, 255
+};
+#define CHAR64(c)  ( (c) > 127 ? 255 : index_64[(c)])
+
+static void
+decode_base64(u_int8_t *buffer, u_int16_t len, u_int8_t *data)
+{
+	u_int8_t *bp = buffer;
+	u_int8_t *p = data;
+	u_int8_t c1, c2, c3, c4;
+	while (bp < buffer + len) {
+		c1 = CHAR64(*p);
+		c2 = CHAR64(*(p + 1));
+
+		/* Invalid data */
+		if (c1 == 255 || c2 == 255)
+			break;
+
+		*bp++ = (c1 << 2) | ((c2 & 0x30) >> 4);
+		if (bp >= buffer + len)
+			break;
+
+		c3 = CHAR64(*(p + 2));
+		if (c3 == 255)
+			break;
+
+		*bp++ = ((c2 & 0x0f) << 4) | ((c3 & 0x3c) >> 2);
+		if (bp >= buffer + len)
+			break;
+
+		c4 = CHAR64(*(p + 3));
+		if (c4 == 255)
+			break;
+		*bp++ = ((c3 & 0x03) << 6) | c4;
+
+		p += 4;
+	}
+}
+
+void
+encode_salt(char *salt, u_int8_t *csalt, u_int16_t clen, u_int8_t logr)
+{
+	salt[0] = '$';
+	salt[1] = BCRYPT_VERSION;
+	salt[2] = 'a';
+	salt[3] = '$';
+
+	snprintf(salt + 4, 4, "%2.2u$", logr);
+
+	encode_base64((u_int8_t *) salt + 7, csalt, clen);
+}
+
+
+/* Generates a salt for this version of crypt.
+   Since versions may change. Keeping this here
+   seems sensible.
+   from: http://mail-index.netbsd.org/tech-crypto/2002/05/24/msg000204.html
+*/
+void
+bcrypt_gensalt(u_int8_t log_rounds, u_int8_t *seed, char *gsalt)
+{
+    if (log_rounds < 4)
+        log_rounds = 4;
+    else if (log_rounds > 31)
+        log_rounds = 31;
+
+    encode_salt(gsalt, seed, BCRYPT_MAXSALT, log_rounds);
+}
+
+/* We handle $Vers$log2(NumRounds)$salt+passwd$
+   i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */
+
+void
+bcrypt(const char *key, const char *salt, char *encrypted)
+{
+	blf_ctx state;
+	u_int32_t rounds, i, k;
+	u_int16_t j;
+	u_int8_t key_len, salt_len, logr, minor;
+	u_int8_t ciphertext[4 * BCRYPT_BLOCKS+1] = "OrpheanBeholderScryDoubt";
+	u_int8_t csalt[BCRYPT_MAXSALT];
+	u_int32_t cdata[BCRYPT_BLOCKS];
+	int n;
+
+	/* Discard "$" identifier */
+	salt++;
+
+	if (*salt > BCRYPT_VERSION) {
+		/* How do I handle errors ? Return ':' */
+		strcpy(encrypted, error);
+		return;
+	}
+
+	/* Check for minor versions */
+	if (salt[1] != '$') {
+		 switch (salt[1]) {
+		 case 'a':
+			 /* 'ab' should not yield the same as 'abab' */
+			 minor = salt[1];
+			 salt++;
+			 break;
+		 default:
+			 strcpy(encrypted, error);
+			 return;
+		 }
+	} else
+		 minor = 0;
+
+	/* Discard version + "$" identifier */
+	salt += 2;
+
+	if (salt[2] != '$') {
+		/* Out of sync with passwd entry */
+		strcpy(encrypted, error);
+		return;
+	}
+	
+	/* Computer power doesn't increase linear, 2^x should be fine */
+	n = atoi(salt);
+	if (n > 31 || n < 0) {
+		strcpy(encrypted, error);
+		return;
+	}
+	logr = (u_int8_t)n;
+	if ((rounds = (u_int32_t) 1 << logr) < BCRYPT_MINROUNDS) {
+		strcpy(encrypted, error);
+		return;
+	}
+
+	/* Discard num rounds + "$" identifier */
+	salt += 3;
+
+	if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT) {
+		strcpy(encrypted, error);
+		return;
+	}
+
+	/* We dont want the base64 salt but the raw data */
+	decode_base64(csalt, BCRYPT_MAXSALT, (u_int8_t *) salt);
+	salt_len = BCRYPT_MAXSALT;
+	key_len = strlen(key) + (minor >= 'a' ? 1 : 0);
+
+
+	/* Setting up S-Boxes and Subkeys */
+	Blowfish_initstate(&state);
+	Blowfish_expandstate(&state, csalt, salt_len,
+	    (u_int8_t *) key, key_len);
+	for (k = 0; k < rounds; k++) {
+		Blowfish_expand0state(&state, (u_int8_t *) key, key_len);
+		Blowfish_expand0state(&state, csalt, salt_len);
+	}
+
+ 	/* This can be precomputed later */
+	j = 0;
+	for (i = 0; i < BCRYPT_BLOCKS; i++)
+		cdata[i] = Blowfish_stream2word(ciphertext, 4 * BCRYPT_BLOCKS, &j);
+
+	/* Now do the encryption */
+	for (k = 0; k < 64; k++)
+		blf_enc(&state, cdata, BCRYPT_BLOCKS / 2);
+
+	for (i = 0; i < BCRYPT_BLOCKS; i++) {
+		ciphertext[4 * i + 3] = cdata[i] & 0xff;
+		cdata[i] = cdata[i] >> 8;
+		ciphertext[4 * i + 2] = cdata[i] & 0xff;
+		cdata[i] = cdata[i] >> 8;
+		ciphertext[4 * i + 1] = cdata[i] & 0xff;
+		cdata[i] = cdata[i] >> 8;
+		ciphertext[4 * i + 0] = cdata[i] & 0xff;
+	}
+
+	i = 0;
+	encrypted[i++] = '$';
+	encrypted[i++] = BCRYPT_VERSION;
+	if (minor)
+		encrypted[i++] = minor;
+	encrypted[i++] = '$';
+
+	snprintf(encrypted + i, 4, "%2.2u$", logr);
+
+	encode_base64((u_int8_t *) encrypted + i + 3, csalt, BCRYPT_MAXSALT);
+	encode_base64((u_int8_t *) encrypted + strlen(encrypted), ciphertext,
+	    4 * BCRYPT_BLOCKS - 1);
+	memset(&state, 0, sizeof(state));
+	memset(ciphertext, 0, sizeof(ciphertext));
+	memset(csalt, 0, sizeof(csalt));
+	memset(cdata, 0, sizeof(cdata));
+}
+
+u_int32_t bcrypt_get_rounds(const char * hash)
+{
+  /* skip past the leading "$" */
+  if (!hash || *(hash++) != '$') return 0;
+
+  /* skip past version */
+  if (0 == (*hash++)) return 0;
+  if (*hash && *hash != '$') hash++;
+  if (*hash++ != '$') return 0;
+
+  return  atoi(hash);
+}
+
+static void
+encode_base64(u_int8_t *buffer, u_int8_t *data, u_int16_t len)
+{
+	u_int8_t *bp = buffer;
+	u_int8_t *p = data;
+	u_int8_t c1, c2;
+	while (p < data + len) {
+		c1 = *p++;
+		*bp++ = Base64Code[(c1 >> 2)];
+		c1 = (c1 & 0x03) << 4;
+		if (p >= data + len) {
+			*bp++ = Base64Code[c1];
+			break;
+		}
+		c2 = *p++;
+		c1 |= (c2 >> 4) & 0x0f;
+		*bp++ = Base64Code[c1];
+		c1 = (c2 & 0x0f) << 2;
+		if (p >= data + len) {
+			*bp++ = Base64Code[c1];
+			break;
+		}
+		c2 = *p++;
+		c1 |= (c2 >> 6) & 0x03;
+		*bp++ = Base64Code[c1];
+		*bp++ = Base64Code[c2 & 0x3f];
+	}
+	*bp = '\0';
+}

+ 353 - 0
node_modules/bcrypt/src/bcrypt_node.cc

@@ -0,0 +1,353 @@
+#include <nan.h>
+
+#include <string>
+#include <cstring>
+#include <vector>
+#include <stdlib.h> // atoi
+
+#include "node_blf.h"
+
+#define NODE_LESS_THAN (!(NODE_VERSION_AT_LEAST(0, 5, 4)))
+
+using namespace v8;
+using namespace node;
+
+namespace {
+
+bool ValidateSalt(const char* salt) {
+
+    if (!salt || *salt != '$') {
+        return false;
+    }
+
+    // discard $
+    salt++;
+
+    if (*salt > BCRYPT_VERSION) {
+        return false;
+    }
+
+    if (salt[1] != '$') {
+        switch (salt[1]) {
+        case 'a':
+            salt++;
+            break;
+        default:
+            return false;
+        }
+    }
+
+    // discard version + $
+    salt += 2;
+
+    if (salt[2] != '$') {
+        return false;
+    }
+
+    int n = atoi(salt);
+    if (n > 31 || n < 0) {
+        return false;
+    }
+
+    if (((uint8_t)1 << (uint8_t)n) < BCRYPT_MINROUNDS) {
+        return false;
+    }
+
+    salt += 3;
+    if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT) {
+        return false;
+    }
+
+    return true;
+}
+
+/* SALT GENERATION */
+
+class SaltAsyncWorker : public Nan::AsyncWorker {
+public:
+    SaltAsyncWorker(Nan::Callback *callback, std::string seed, ssize_t rounds)
+        : Nan::AsyncWorker(callback), seed(seed), rounds(rounds) {
+    }
+
+    ~SaltAsyncWorker() {}
+
+    void Execute() {
+        char salt[_SALT_LEN];
+        bcrypt_gensalt(rounds, (u_int8_t *)&seed[0], salt);
+        this->salt = std::string(salt);
+    }
+
+    void HandleOKCallback() {
+        Nan::HandleScope scope;
+
+        Local<Value> argv[2];
+        argv[0] = Nan::Undefined();
+        argv[1] = Nan::Encode(salt.c_str(), salt.size(), Nan::BINARY);
+        callback->Call(2, argv);
+    }
+
+private:
+    std::string seed;
+    std::string salt;
+    ssize_t rounds;
+};
+
+NAN_METHOD(GenerateSalt) {
+    Nan::HandleScope scope;
+
+    if (info.Length() < 3) {
+        Nan::ThrowTypeError("3 arguments expected");
+        return;
+    }
+
+    if (!Buffer::HasInstance(info[1]) || Buffer::Length(info[1].As<Object>()) != 16) {
+        Nan::ThrowTypeError("Second argument must be a 16 byte Buffer");
+        return;
+    }
+
+    const int32_t rounds = Nan::To<int32_t>(info[0]).FromMaybe(0);
+    Local<Object> seed = info[1].As<Object>();
+    Local<Function> callback = Local<Function>::Cast(info[2]);
+
+    SaltAsyncWorker* saltWorker = new SaltAsyncWorker(new Nan::Callback(callback),
+        std::string(Buffer::Data(seed), 16), rounds);
+
+    Nan::AsyncQueueWorker(saltWorker);
+}
+
+NAN_METHOD(GenerateSaltSync) {
+    Nan::HandleScope scope;
+
+    if (info.Length() < 2) {
+        Nan::ThrowTypeError("2 arguments expected");
+        return;
+    }
+
+    if (!Buffer::HasInstance(info[1]) || Buffer::Length(info[1].As<Object>()) != 16) {
+        Nan::ThrowTypeError("Second argument must be a 16 byte Buffer");
+        return;
+    }
+
+    const int32_t rounds = Nan::To<int32_t>(info[0]).FromMaybe(0);
+    u_int8_t* seed = (u_int8_t*)Buffer::Data(info[1].As<Object>());
+
+    char salt[_SALT_LEN];
+    bcrypt_gensalt(rounds, seed, salt);
+
+    info.GetReturnValue().Set(Nan::Encode(salt, strlen(salt), Nan::BINARY));
+}
+
+/* ENCRYPT DATA - USED TO BE HASHPW */
+
+class EncryptAsyncWorker : public Nan::AsyncWorker {
+  public:
+    EncryptAsyncWorker(Nan::Callback *callback, std::string input, std::string salt)
+        : Nan::AsyncWorker(callback), input(input), salt(salt) {
+    }
+
+    ~EncryptAsyncWorker() {}
+
+    void Execute() {
+        if (!(ValidateSalt(salt.c_str()))) {
+            error = "Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue";
+        }
+
+        char bcrypted[_PASSWORD_LEN];
+        bcrypt(input.c_str(), salt.c_str(), bcrypted);
+        output = std::string(bcrypted);
+    }
+
+    void HandleOKCallback() {
+        Nan::HandleScope scope;
+
+        Local<Value> argv[2];
+
+        if (!error.empty()) {
+            argv[0] = Nan::Error(error.c_str());
+            argv[1] = Nan::Undefined();
+        } else {
+            argv[0] = Nan::Undefined();
+            argv[1] = Nan::Encode(output.c_str(), output.size(), Nan::BINARY);
+        }
+
+        callback->Call(2, argv);
+    }
+
+  private:
+    std::string input;
+    std::string salt;
+    std::string error;
+    std::string output;
+};
+
+NAN_METHOD(Encrypt) {
+    Nan::HandleScope scope;
+
+    if (info.Length() < 3) {
+        Nan::ThrowTypeError("3 arguments expected");
+        return;
+    }
+
+    Nan::Utf8String data(info[0]->ToString());
+    Nan::Utf8String salt(info[1]->ToString());
+    Local<Function> callback = Local<Function>::Cast(info[2]);
+
+    EncryptAsyncWorker* encryptWorker = new EncryptAsyncWorker(new Nan::Callback(callback),
+        std::string(*data), std::string(*salt));
+
+    Nan::AsyncQueueWorker(encryptWorker);
+}
+
+NAN_METHOD(EncryptSync) {
+    Nan::HandleScope scope;
+
+    if (info.Length() < 2) {
+        Nan::ThrowTypeError("2 arguments expected");
+        info.GetReturnValue().Set(Nan::Undefined());
+        return;
+    }
+
+    Nan::Utf8String data(info[0]->ToString());
+    Nan::Utf8String salt(info[1]->ToString());
+
+    if (!(ValidateSalt(*salt))) {
+        Nan::ThrowError("Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue");
+        info.GetReturnValue().Set(Nan::Undefined());
+        return;
+    }
+
+    char bcrypted[_PASSWORD_LEN];
+    bcrypt(*data, *salt, bcrypted);
+    info.GetReturnValue().Set(Nan::Encode(bcrypted, strlen(bcrypted), Nan::BINARY));
+}
+
+/* COMPARATOR */
+
+NAN_INLINE bool CompareStrings(const char* s1, const char* s2) {
+
+    bool eq = true;
+    int s1_len = strlen(s1);
+    int s2_len = strlen(s2);
+
+    if (s1_len != s2_len) {
+        eq = false;
+    }
+
+    const int max_len = (s2_len < s1_len) ? s1_len : s2_len;
+
+    // to prevent timing attacks, should check entire string
+    // don't exit after found to be false
+    for (int i = 0; i < max_len; ++i) {
+      if (s1_len >= i && s2_len >= i && s1[i] != s2[i]) {
+        eq = false;
+      }
+    }
+
+    return eq;
+}
+
+class CompareAsyncWorker : public Nan::AsyncWorker {
+  public:
+    CompareAsyncWorker(Nan::Callback *callback, std::string input, std::string encrypted)
+        : Nan::AsyncWorker(callback), input(input), encrypted(encrypted) {
+
+        result = false;
+    }
+
+    ~CompareAsyncWorker() {}
+
+    void Execute() {
+        char bcrypted[_PASSWORD_LEN];
+        if (ValidateSalt(encrypted.c_str())) {
+            bcrypt(input.c_str(), encrypted.c_str(), bcrypted);
+            result = CompareStrings(bcrypted, encrypted.c_str());
+        }
+    }
+
+    void HandleOKCallback() {
+        Nan::HandleScope scope;
+
+        Local<Value> argv[2];
+        argv[0] = Nan::Undefined();
+        argv[1] = Nan::New<Boolean>(result);
+        callback->Call(2, argv);
+    }
+
+  private:
+    std::string input;
+    std::string encrypted;
+    bool result;
+};
+
+NAN_METHOD(Compare) {
+    Nan::HandleScope scope;
+
+    if (info.Length() < 3) {
+        Nan::ThrowTypeError("3 arguments expected");
+        return;
+    }
+
+    Nan::Utf8String input(info[0]->ToString());
+    Nan::Utf8String encrypted(info[1]->ToString());
+    Local<Function> callback = Local<Function>::Cast(info[2]);
+
+    CompareAsyncWorker* compareWorker = new CompareAsyncWorker(new Nan::Callback(callback),
+        std::string(*input), std::string(*encrypted));
+
+    Nan::AsyncQueueWorker(compareWorker);
+}
+
+NAN_METHOD(CompareSync) {
+    Nan::HandleScope scope;
+
+    if (info.Length() < 2) {
+        Nan::ThrowTypeError("2 arguments expected");
+        info.GetReturnValue().Set(Nan::Undefined());
+        return;
+    }
+
+    Nan::Utf8String pw(info[0]->ToString());
+    Nan::Utf8String hash(info[1]->ToString());
+
+    char bcrypted[_PASSWORD_LEN];
+    if (ValidateSalt(*hash)) {
+        bcrypt(*pw, *hash, bcrypted);
+        info.GetReturnValue().Set(Nan::New<Boolean>(CompareStrings(bcrypted, *hash)));
+    } else {
+        info.GetReturnValue().Set(Nan::False());
+    }
+}
+
+NAN_METHOD(GetRounds) {
+    Nan::HandleScope scope;
+
+    if (info.Length() < 1) {
+        Nan::ThrowTypeError("1 argument expected");
+        info.GetReturnValue().Set(Nan::Undefined());
+        return;
+    }
+
+    Nan::Utf8String hash(info[0]->ToString());
+    u_int32_t rounds;
+    if (!(rounds = bcrypt_get_rounds(*hash))) {
+        Nan::ThrowError("invalid hash provided");
+        info.GetReturnValue().Set(Nan::Undefined());
+        return;
+    }
+
+    info.GetReturnValue().Set(Nan::New(rounds));
+}
+
+} // anonymous namespace
+
+NAN_MODULE_INIT(init) {
+    Nan::Export(target, "gen_salt_sync", GenerateSaltSync);
+    Nan::Export(target, "encrypt_sync", EncryptSync);
+    Nan::Export(target, "compare_sync", CompareSync);
+    Nan::Export(target, "get_rounds", GetRounds);
+    Nan::Export(target, "gen_salt", GenerateSalt);
+    Nan::Export(target, "encrypt", Encrypt);
+    Nan::Export(target, "compare", Compare);
+};
+
+NODE_MODULE(bcrypt_lib, init);

+ 686 - 0
node_modules/bcrypt/src/blowfish.cc

@@ -0,0 +1,686 @@
+/* $OpenBSD: blowfish.c,v 1.18 2004/11/02 17:23:26 hshoexer Exp $ */
+/*
+ * Blowfish block cipher for OpenBSD
+ * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
+ * All rights reserved.
+ *
+ * Implementation advice by David Mazieres <dm@lcs.mit.edu>.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by Niels Provos.
+ * 4. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+/*
+ * This code is derived from section 14.3 and the given source
+ * in section V of Applied Cryptography, second edition.
+ * Blowfish is an unpatented fast block cipher designed by
+ * Bruce Schneier.
+ */
+
+#if 0
+#include <stdio.h>		/* used for debugging */
+#include <string.h>
+#endif
+
+#include <sys/types.h>
+
+#include "node_blf.h"
+
+#undef inline
+#ifdef __GNUC__
+#define inline __inline
+#else				/* !__GNUC__ */
+#define inline
+#endif				/* !__GNUC__ */
+
+/* Function for Feistel Networks */
+
+#define F(s, x) ((((s)[        (((x)>>24)&0xFF)]  \
+		 + (s)[0x100 + (((x)>>16)&0xFF)]) \
+		 ^ (s)[0x200 + (((x)>> 8)&0xFF)]) \
+		 + (s)[0x300 + ( (x)     &0xFF)])
+
+#define BLFRND(s,p,i,j,n) (i ^= F(s,j) ^ (p)[n])
+
+void
+Blowfish_encipher(blf_ctx *c, u_int32_t *xl, u_int32_t *xr)
+{
+	u_int32_t Xl;
+	u_int32_t Xr;
+	u_int32_t *s = c->S[0];
+	u_int32_t *p = c->P;
+
+	Xl = *xl;
+	Xr = *xr;
+
+	Xl ^= p[0];
+	BLFRND(s, p, Xr, Xl, 1); BLFRND(s, p, Xl, Xr, 2);
+	BLFRND(s, p, Xr, Xl, 3); BLFRND(s, p, Xl, Xr, 4);
+	BLFRND(s, p, Xr, Xl, 5); BLFRND(s, p, Xl, Xr, 6);
+	BLFRND(s, p, Xr, Xl, 7); BLFRND(s, p, Xl, Xr, 8);
+	BLFRND(s, p, Xr, Xl, 9); BLFRND(s, p, Xl, Xr, 10);
+	BLFRND(s, p, Xr, Xl, 11); BLFRND(s, p, Xl, Xr, 12);
+	BLFRND(s, p, Xr, Xl, 13); BLFRND(s, p, Xl, Xr, 14);
+	BLFRND(s, p, Xr, Xl, 15); BLFRND(s, p, Xl, Xr, 16);
+
+	*xl = Xr ^ p[17];
+	*xr = Xl;
+}
+
+void
+Blowfish_decipher(blf_ctx *c, u_int32_t *xl, u_int32_t *xr)
+{
+	u_int32_t Xl;
+	u_int32_t Xr;
+	u_int32_t *s = c->S[0];
+	u_int32_t *p = c->P;
+
+	Xl = *xl;
+	Xr = *xr;
+
+	Xl ^= p[17];
+	BLFRND(s, p, Xr, Xl, 16); BLFRND(s, p, Xl, Xr, 15);
+	BLFRND(s, p, Xr, Xl, 14); BLFRND(s, p, Xl, Xr, 13);
+	BLFRND(s, p, Xr, Xl, 12); BLFRND(s, p, Xl, Xr, 11);
+	BLFRND(s, p, Xr, Xl, 10); BLFRND(s, p, Xl, Xr, 9);
+	BLFRND(s, p, Xr, Xl, 8); BLFRND(s, p, Xl, Xr, 7);
+	BLFRND(s, p, Xr, Xl, 6); BLFRND(s, p, Xl, Xr, 5);
+	BLFRND(s, p, Xr, Xl, 4); BLFRND(s, p, Xl, Xr, 3);
+	BLFRND(s, p, Xr, Xl, 2); BLFRND(s, p, Xl, Xr, 1);
+
+	*xl = Xr ^ p[0];
+	*xr = Xl;
+}
+
+void
+Blowfish_initstate(blf_ctx *c)
+{
+	/* P-box and S-box tables initialized with digits of Pi */
+
+	static const blf_ctx initstate =
+	{ {
+		{
+			0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
+			0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
+			0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,
+			0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
+			0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
+			0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
+			0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef,
+			0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e,
+			0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
+			0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
+			0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce,
+			0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
+			0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e,
+			0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677,
+			0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
+			0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032,
+			0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88,
+			0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
+			0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e,
+			0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
+			0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,
+			0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98,
+			0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88,
+			0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
+			0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
+			0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d,
+			0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
+			0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7,
+			0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba,
+			0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
+			0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f,
+			0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09,
+			0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,
+			0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb,
+			0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279,
+			0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
+			0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab,
+			0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82,
+			0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,
+			0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,
+			0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0,
+			0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,
+			0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790,
+			0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8,
+			0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
+			0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0,
+			0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7,
+			0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,
+			0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad,
+			0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,
+			0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,
+			0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9,
+			0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477,
+			0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
+			0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49,
+			0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af,
+			0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,
+			0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5,
+			0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41,
+			0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
+			0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400,
+			0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915,
+			0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,
+		0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a},
+		{
+			0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,
+			0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,
+			0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1,
+			0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e,
+			0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,
+			0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
+			0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e,
+			0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,
+			0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737,
+			0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8,
+			0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,
+			0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd,
+			0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701,
+			0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,
+			0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41,
+			0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,
+			0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,
+			0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af,
+			0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e,
+			0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,
+			0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
+			0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2,
+			0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,
+			0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd,
+			0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b,
+			0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
+			0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e,
+			0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3,
+			0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,
+			0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a,
+			0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4,
+			0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,
+			0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66,
+			0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28,
+			0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,
+			0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
+			0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510,
+			0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,
+			0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14,
+			0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e,
+			0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,
+			0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7,
+			0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8,
+			0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,
+			0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99,
+			0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,
+			0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,
+			0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73,
+			0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0,
+			0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,
+			0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
+			0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250,
+			0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,
+			0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285,
+			0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00,
+			0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,
+			0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb,
+			0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e,
+			0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,
+			0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc,
+			0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9,
+			0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,
+			0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20,
+		0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7},
+		{
+			0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,
+			0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,
+			0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af,
+			0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,
+			0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45,
+			0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504,
+			0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
+			0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb,
+			0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee,
+			0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,
+			0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42,
+			0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
+			0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,
+			0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb,
+			0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527,
+			0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,
+			0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33,
+			0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c,
+			0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,
+			0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc,
+			0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17,
+			0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,
+			0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b,
+			0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115,
+			0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,
+			0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728,
+			0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
+			0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,
+			0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37,
+			0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d,
+			0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,
+			0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,
+			0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3,
+			0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,
+			0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d,
+			0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c,
+			0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,
+			0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9,
+			0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a,
+			0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,
+			0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d,
+			0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
+			0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,
+			0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61,
+			0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2,
+			0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,
+			0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2,
+			0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c,
+			0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,
+			0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633,
+			0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10,
+			0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
+			0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52,
+			0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,
+			0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,
+			0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62,
+			0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
+			0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,
+			0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24,
+			0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc,
+			0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,
+			0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,
+			0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837,
+		0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0},
+		{
+			0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b,
+			0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe,
+			0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
+			0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4,
+			0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8,
+			0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
+			0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304,
+			0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,
+			0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,
+			0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6,
+			0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9,
+			0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,
+			0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593,
+			0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51,
+			0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,
+			0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c,
+			0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b,
+			0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
+			0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c,
+			0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd,
+			0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,
+			0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319,
+			0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb,
+			0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
+			0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991,
+			0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32,
+			0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,
+			0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,
+			0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae,
+			0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,
+			0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5,
+			0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47,
+			0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
+			0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d,
+			0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84,
+			0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,
+			0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8,
+			0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,
+			0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,
+			0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7,
+			0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38,
+			0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
+			0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c,
+			0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525,
+			0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,
+			0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442,
+			0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964,
+			0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
+			0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8,
+			0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d,
+			0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,
+			0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299,
+			0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02,
+			0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,
+			0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614,
+			0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a,
+			0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,
+			0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,
+			0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0,
+			0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
+			0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e,
+			0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9,
+			0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
+		0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6}
+	},
+	{
+		0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
+		0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
+		0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
+		0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
+		0x9216d5d9, 0x8979fb1b
+	} };
+
+	*c = initstate;
+}
+
+u_int32_t
+Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes,
+    u_int16_t *current)
+{
+	u_int8_t i;
+	u_int16_t j;
+	u_int32_t temp;
+
+	temp = 0x00000000;
+	j = *current;
+
+	for (i = 0; i < 4; i++, j++) {
+		if (j >= databytes)
+			j = 0;
+		temp = (temp << 8) | data[j];
+	}
+
+	*current = j;
+	return temp;
+}
+
+void
+Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes)
+{
+	u_int16_t i;
+	u_int16_t j;
+	u_int16_t k;
+	u_int32_t temp;
+	u_int32_t datal;
+	u_int32_t datar;
+
+	j = 0;
+	for (i = 0; i < BLF_N + 2; i++) {
+		/* Extract 4 int8 to 1 int32 from keystream */
+		temp = Blowfish_stream2word(key, keybytes, &j);
+		c->P[i] = c->P[i] ^ temp;
+	}
+
+	j = 0;
+	datal = 0x00000000;
+	datar = 0x00000000;
+	for (i = 0; i < BLF_N + 2; i += 2) {
+		Blowfish_encipher(c, &datal, &datar);
+
+		c->P[i] = datal;
+		c->P[i + 1] = datar;
+	}
+
+	for (i = 0; i < 4; i++) {
+		for (k = 0; k < 256; k += 2) {
+			Blowfish_encipher(c, &datal, &datar);
+
+			c->S[i][k] = datal;
+			c->S[i][k + 1] = datar;
+		}
+	}
+}
+
+
+void
+Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes,
+    const u_int8_t *key, u_int16_t keybytes)
+{
+	u_int16_t i;
+	u_int16_t j;
+	u_int16_t k;
+	u_int32_t temp;
+	u_int32_t datal;
+	u_int32_t datar;
+
+	j = 0;
+	for (i = 0; i < BLF_N + 2; i++) {
+		/* Extract 4 int8 to 1 int32 from keystream */
+		temp = Blowfish_stream2word(key, keybytes, &j);
+		c->P[i] = c->P[i] ^ temp;
+	}
+
+	j = 0;
+	datal = 0x00000000;
+	datar = 0x00000000;
+	for (i = 0; i < BLF_N + 2; i += 2) {
+		datal ^= Blowfish_stream2word(data, databytes, &j);
+		datar ^= Blowfish_stream2word(data, databytes, &j);
+		Blowfish_encipher(c, &datal, &datar);
+
+		c->P[i] = datal;
+		c->P[i + 1] = datar;
+	}
+
+	for (i = 0; i < 4; i++) {
+		for (k = 0; k < 256; k += 2) {
+			datal ^= Blowfish_stream2word(data, databytes, &j);
+			datar ^= Blowfish_stream2word(data, databytes, &j);
+			Blowfish_encipher(c, &datal, &datar);
+
+			c->S[i][k] = datal;
+			c->S[i][k + 1] = datar;
+		}
+	}
+
+}
+
+void
+blf_key(blf_ctx *c, const u_int8_t *k, u_int16_t len)
+{
+	/* Initialize S-boxes and subkeys with Pi */
+	Blowfish_initstate(c);
+
+	/* Transform S-boxes and subkeys with key */
+	Blowfish_expand0state(c, k, len);
+}
+
+void
+blf_enc(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
+{
+	u_int32_t *d;
+	u_int16_t i;
+
+	d = data;
+	for (i = 0; i < blocks; i++) {
+		Blowfish_encipher(c, d, d + 1);
+		d += 2;
+	}
+}
+
+void
+blf_dec(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
+{
+	u_int32_t *d;
+	u_int16_t i;
+
+	d = data;
+	for (i = 0; i < blocks; i++) {
+		Blowfish_decipher(c, d, d + 1);
+		d += 2;
+	}
+}
+
+void
+blf_ecb_encrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
+{
+	u_int32_t l, r;
+	u_int32_t i;
+
+	for (i = 0; i < len; i += 8) {
+		l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3];
+		r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7];
+		Blowfish_encipher(c, &l, &r);
+		data[0] = l >> 24 & 0xff;
+		data[1] = l >> 16 & 0xff;
+		data[2] = l >> 8 & 0xff;
+		data[3] = l & 0xff;
+		data[4] = r >> 24 & 0xff;
+		data[5] = r >> 16 & 0xff;
+		data[6] = r >> 8 & 0xff;
+		data[7] = r & 0xff;
+		data += 8;
+	}
+}
+
+void
+blf_ecb_decrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
+{
+	u_int32_t l, r;
+	u_int32_t i;
+
+	for (i = 0; i < len; i += 8) {
+		l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3];
+		r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7];
+		Blowfish_decipher(c, &l, &r);
+		data[0] = l >> 24 & 0xff;
+		data[1] = l >> 16 & 0xff;
+		data[2] = l >> 8 & 0xff;
+		data[3] = l & 0xff;
+		data[4] = r >> 24 & 0xff;
+		data[5] = r >> 16 & 0xff;
+		data[6] = r >> 8 & 0xff;
+		data[7] = r & 0xff;
+		data += 8;
+	}
+}
+
+void
+blf_cbc_encrypt(blf_ctx *c, u_int8_t *iv, u_int8_t *data, u_int32_t len)
+{
+	u_int32_t l, r;
+	u_int32_t i, j;
+
+	for (i = 0; i < len; i += 8) {
+		for (j = 0; j < 8; j++)
+			data[j] ^= iv[j];
+		l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3];
+		r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7];
+		Blowfish_encipher(c, &l, &r);
+		data[0] = l >> 24 & 0xff;
+		data[1] = l >> 16 & 0xff;
+		data[2] = l >> 8 & 0xff;
+		data[3] = l & 0xff;
+		data[4] = r >> 24 & 0xff;
+		data[5] = r >> 16 & 0xff;
+		data[6] = r >> 8 & 0xff;
+		data[7] = r & 0xff;
+		iv = data;
+		data += 8;
+	}
+}
+
+void
+blf_cbc_decrypt(blf_ctx *c, u_int8_t *iva, u_int8_t *data, u_int32_t len)
+{
+	u_int32_t l, r;
+	u_int8_t *iv;
+	u_int32_t i, j;
+
+	iv = data + len - 16;
+	data = data + len - 8;
+	for (i = len - 8; i >= 8; i -= 8) {
+		l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3];
+		r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7];
+		Blowfish_decipher(c, &l, &r);
+		data[0] = l >> 24 & 0xff;
+		data[1] = l >> 16 & 0xff;
+		data[2] = l >> 8 & 0xff;
+		data[3] = l & 0xff;
+		data[4] = r >> 24 & 0xff;
+		data[5] = r >> 16 & 0xff;
+		data[6] = r >> 8 & 0xff;
+		data[7] = r & 0xff;
+		for (j = 0; j < 8; j++)
+			data[j] ^= iv[j];
+		iv -= 8;
+		data -= 8;
+	}
+	l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3];
+	r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7];
+	Blowfish_decipher(c, &l, &r);
+	data[0] = l >> 24 & 0xff;
+	data[1] = l >> 16 & 0xff;
+	data[2] = l >> 8 & 0xff;
+	data[3] = l & 0xff;
+	data[4] = r >> 24 & 0xff;
+	data[5] = r >> 16 & 0xff;
+	data[6] = r >> 8 & 0xff;
+	data[7] = r & 0xff;
+	for (j = 0; j < 8; j++)
+		data[j] ^= iva[j];
+}
+
+#if 0
+void
+report(u_int32_t data[], u_int16_t len)
+{
+	u_int16_t i;
+	for (i = 0; i < len; i += 2)
+		printf("Block %0hd: %08lx %08lx.\n",
+		    i / 2, data[i], data[i + 1]);
+}
+void
+main(void)
+{
+
+	blf_ctx c;
+	char    key[] = "AAAAA";
+	char    key2[] = "abcdefghijklmnopqrstuvwxyz";
+
+	u_int32_t data[10];
+	u_int32_t data2[] =
+	{0x424c4f57l, 0x46495348l};
+
+	u_int16_t i;
+
+	/* First test */
+	for (i = 0; i < 10; i++)
+		data[i] = i;
+
+	blf_key(&c, (u_int8_t *) key, 5);
+	blf_enc(&c, data, 5);
+	blf_dec(&c, data, 1);
+	blf_dec(&c, data + 2, 4);
+	printf("Should read as 0 - 9.\n");
+	report(data, 10);
+
+	/* Second test */
+	blf_key(&c, (u_int8_t *) key2, strlen(key2));
+	blf_enc(&c, data2, 1);
+	printf("\nShould read as: 0x324ed0fe 0xf413a203.\n");
+	report(data2, 2);
+	blf_dec(&c, data2, 1);
+	report(data2, 2);
+}
+#endif

+ 111 - 0
node_modules/bcrypt/src/node_blf.h

@@ -0,0 +1,111 @@
+/* $OpenBSD: blf.h,v 1.7 2007/03/14 17:59:41 grunk Exp $ */
+/*
+ * Blowfish - a fast block cipher designed by Bruce Schneier
+ *
+ * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by Niels Provos.
+ * 4. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+#ifndef _NODE_BLF_H_
+#define _NODE_BLF_H_
+
+/* Solaris compatibility */
+#ifdef __sun
+#define u_int8_t uint8_t
+#define u_int16_t uint16_t
+#define u_int32_t uint32_t
+#define u_int64_t uint64_t
+#endif
+
+#ifdef _WIN32 
+#define u_int8_t unsigned __int8
+#define u_int16_t unsigned __int16
+#define u_int32_t unsigned __int32
+#define u_int64_t unsigned __int64
+#endif
+
+#define BCRYPT_VERSION '2'
+#define BCRYPT_MAXSALT 16	/* Precomputation is just so nice */
+#define BCRYPT_BLOCKS 6		/* Ciphertext blocks */
+#define BCRYPT_MINROUNDS 16	/* we have log2(rounds) in salt */
+
+/* Schneier specifies a maximum key length of 56 bytes.
+ * This ensures that every key bit affects every cipher
+ * bit.  However, the subkeys can hold up to 72 bytes.
+ * Warning: For normal blowfish encryption only 56 bytes
+ * of the key affect all cipherbits.
+ */
+
+#define BLF_N	16			/* Number of Subkeys */
+#define BLF_MAXKEYLEN ((BLF_N-2)*4)	/* 448 bits */
+#define BLF_MAXUTILIZED ((BLF_N+2)*4)	/* 576 bits */
+
+#define _PASSWORD_LEN   128             /* max length, not counting NUL */
+#define _SALT_LEN       32              /* max length */
+
+/* Blowfish context */
+typedef struct BlowfishContext {
+	u_int32_t S[4][256];	/* S-Boxes */
+	u_int32_t P[BLF_N + 2];	/* Subkeys */
+} blf_ctx;
+
+/* Raw access to customized Blowfish
+ *	blf_key is just:
+ *	Blowfish_initstate( state )
+ *	Blowfish_expand0state( state, key, keylen )
+ */
+
+void Blowfish_encipher(blf_ctx *, u_int32_t *, u_int32_t *);
+void Blowfish_decipher(blf_ctx *, u_int32_t *, u_int32_t *);
+void Blowfish_initstate(blf_ctx *);
+void Blowfish_expand0state(blf_ctx *, const u_int8_t *, u_int16_t);
+void Blowfish_expandstate
+(blf_ctx *, const u_int8_t *, u_int16_t, const u_int8_t *, u_int16_t);
+
+/* Standard Blowfish */
+
+void blf_key(blf_ctx *, const u_int8_t *, u_int16_t);
+void blf_enc(blf_ctx *, u_int32_t *, u_int16_t);
+void blf_dec(blf_ctx *, u_int32_t *, u_int16_t);
+
+void blf_ecb_encrypt(blf_ctx *, u_int8_t *, u_int32_t);
+void blf_ecb_decrypt(blf_ctx *, u_int8_t *, u_int32_t);
+
+void blf_cbc_encrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t);
+void blf_cbc_decrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t);
+
+/* Converts u_int8_t to u_int32_t */
+u_int32_t Blowfish_stream2word(const u_int8_t *, u_int16_t , u_int16_t *);
+
+/* bcrypt functions*/
+void bcrypt_gensalt(u_int8_t, u_int8_t*, char *);
+void bcrypt(const char *, const char *, char *);
+void encode_salt(char *, u_int8_t *, u_int16_t, u_int8_t);
+u_int32_t bcrypt_get_rounds(const char *);
+
+#endif

+ 149 - 0
node_modules/bcrypt/test/async.js

@@ -0,0 +1,149 @@
+var bcrypt = require('../bcrypt');
+
+module.exports = {
+    test_salt_length: function(assert) {
+        assert.expect(1);
+        bcrypt.genSalt(10, function(err, salt) {
+            assert.equals(29, salt.length, "Salt isn't the correct length.");
+            assert.done();
+        });
+    },
+    test_salt_only_cb: function(assert) {
+        assert.doesNotThrow(function() {bcrypt.genSalt(function(err, salt) {});}, "Should not throw an Error. Rounds and seed length are optional.");
+        assert.done();
+    },
+    test_salt_rounds_is_string_number: function(assert) {
+        bcrypt.genSalt('10', void 0, function (err, salt) {
+            assert.ok((err instanceof Error), "Should be an Error. genSalt requires round to be of type number.");
+            assert.done();
+        });
+    },
+    test_salt_rounds_is_string_non_number: function(assert) {
+        bcrypt.genSalt('b', function (err, salt) {
+            assert.ok((err instanceof Error), "Should throw an Error. genSalt requires rounds to of type number.");
+            assert.done();
+        });
+    },
+    test_hash: function(assert) {
+        assert.expect(1);
+        bcrypt.genSalt(10, function(err, salt) {
+            bcrypt.hash('password', salt, function(err, res) {
+                assert.ok(res, "Res should be defined.");
+                assert.done();
+            });
+        });
+    },
+    test_hash_rounds: function(assert) {
+        assert.expect(1);
+        bcrypt.hash('bacon', 8, function(err, hash) {
+          assert.equals(bcrypt.getRounds(hash), 8, "Number of rounds should be that specified in the function call.");
+          assert.done();
+        });
+    },
+    test_hash_empty_strings: function(assert) {
+        assert.expect(2);
+        bcrypt.genSalt(10, function(err, salt) {
+            bcrypt.hash('', salt, function(err, res) {
+                assert.ok(res, "Res should be defined even with an empty pw.");
+                bcrypt.hash('', '', function(err, res) {
+                  if (err) {
+                    assert.ok(err);
+                  } else {
+                    assert.fail();
+                  }
+
+                  assert.done();
+                });
+            });
+        });
+    },
+    test_hash_no_params: function(assert) {
+        bcrypt.hash(function (err, hash) {
+            assert.ok(err, "Should be an error. No params.");
+            assert.done();
+        });
+    },
+    test_hash_one_param: function(assert) {
+        bcrypt.hash('password', function (err, hash) {
+            assert.ok(err, "Should be an Error. No salt.");
+            assert.done();
+        });
+    },
+    test_hash_salt_validity: function(assert) {
+        assert.expect(3);
+        bcrypt.hash('password', '$2a$10$somesaltyvaluertsetrse', function(err, enc) {
+            assert.equal(err, undefined);
+            bcrypt.hash('password', 'some$value', function(err, enc) {
+                assert.notEqual(err, undefined);
+                assert.equal(err.message, "Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue");
+                assert.done();
+            });
+        });
+    },
+    test_verify_salt: function(assert) {
+        assert.expect(2);
+        bcrypt.genSalt(10, function(err, salt) {
+            var split_salt = salt.split('$');
+            assert.ok(split_salt[1], '2a');
+            assert.ok(split_salt[2], '10');
+            assert.done();
+        });
+    },
+    test_verify_salt_min_rounds: function(assert) {
+        assert.expect(2);
+        bcrypt.genSalt(1, function(err, salt) {
+            var split_salt = salt.split('$');
+            assert.ok(split_salt[1], '2a');
+            assert.ok(split_salt[2], '4');
+            assert.done();
+        });
+    },
+    test_verify_salt_max_rounds: function(assert) {
+        assert.expect(2);
+        bcrypt.genSalt(100, function(err, salt) {
+            var split_salt = salt.split('$');
+            assert.ok(split_salt[1], '2a');
+            assert.ok(split_salt[2], '31');
+            assert.done();
+        });
+    },
+    test_hash_compare: function(assert) {
+        assert.expect(3);
+        bcrypt.genSalt(10, function(err, salt) {
+            assert.equals(29, salt.length, "Salt isn't the correct length.");
+            bcrypt.hash("test", salt, function(err, hash) {
+                bcrypt.compare("test", hash, function(err, res) {
+                    assert.equal(res, true, "These hashes should be equal.");
+                    bcrypt.compare("blah", hash, function(err, res) {
+                        assert.equal(res, false, "These hashes should not be equal.");
+                        assert.done();
+                    });
+                });
+            });
+        });
+    },
+    test_hash_compare_empty_strings: function(assert) {
+        assert.expect(2);
+        var hash = bcrypt.hashSync("test", bcrypt.genSaltSync(10));
+
+        bcrypt.compare("", hash, function(err, res) {
+          assert.equal(res, false, "These hashes should be equal.");
+          bcrypt.compare("", "", function(err, res) {
+            assert.equal(res, false, "These hashes should be equal.");
+            assert.done();
+          });
+        });
+    },
+    test_hash_compare_invalid_strings: function(assert) {
+      var fullString = 'envy1362987212538';
+      var hash = '$2a$10$XOPbrlUPQdwdJUpSrIF6X.LbE14qsMmKGhM1A8W9iqaG3vv1BD7WC';
+      var wut = ':';
+      bcrypt.compare(fullString, hash, function(err, res) {
+        assert.ok(res);
+        bcrypt.compare(fullString, wut, function(err, res) {
+          assert.ok(!res);
+          assert.done();
+        });
+      });
+    }
+};

+ 118 - 0
node_modules/bcrypt/test/repetitions.js

@@ -0,0 +1,118 @@
+var bcrypt = require('../bcrypt');
+
+var EXPECTED = 2500; //number of times to iterate these tests...
+
+module.exports = {
+  test_salt_length: function(assert) {
+    assert.expect(EXPECTED);
+    var n = 0;
+    for (var i = 0; i < EXPECTED; i++) {
+      bcrypt.genSalt(10, function(err, salt) {
+        assert.equals(29, salt.length, "Salt ("+salt+") isn't the correct length. It is: " + salt.length);
+        n++;
+      });
+    }
+
+    function checkVal() {
+        if (n == EXPECTED) {
+          assert.done();
+        } else {
+          setTimeout(checkVal, 100);
+        }
+    }
+    setTimeout(checkVal, 100);
+  },
+  test_hash_length: function(assert) {
+    assert.expect(EXPECTED);
+    var SALT = '$2a$04$TnjywYklQbbZjdjBgBoA4e';
+    var n = 0;
+    for (var i = 0; i < EXPECTED; i++) {
+      bcrypt.hash('test', SALT, function(err, crypted) {
+        assert.equals(60, crypted.length, "Encrypted ("+crypted+") isn't the correct length. It is: " + crypted.length);
+        n++;
+      });
+    }
+
+    function checkVal() {
+      if (n == EXPECTED) {
+        assert.done();
+      } else {
+        setTimeout(checkVal, 100);
+      }
+    }
+    setTimeout(checkVal, 100);
+  },
+  test_compare: function(assert) {
+    assert.expect(EXPECTED);
+    var HASH = '$2a$04$TnjywYklQbbZjdjBgBoA4e9G7RJt9blgMgsCvUvus4Iv4TENB5nHy';
+    var n = 0;
+    for (var i = 0; i < EXPECTED; i++) {
+      bcrypt.compare('test', HASH, function(err, match) {
+        assert.equal(true, match, "No match.");
+        n++;
+      });
+    }
+
+    function checkVal() {
+      if (n == EXPECTED) {
+        assert.done();
+      } else {
+        setTimeout(checkVal, 100);
+      }
+    }
+    setTimeout(checkVal, 100);
+  },
+  test_hash_and_compare: function(assert) {
+    assert.expect((EXPECTED-1)*3);
+    var salt = bcrypt.genSaltSync(4),
+        idx = 0,
+        good_done = false,
+        bad_done = false;
+
+    function next() {
+      return test('secret' + Math.random());
+    }
+
+    function test(password) {
+      idx += 1;
+      return bcrypt.hash(password, salt, function(err, hash) {
+        if (err) throw err;
+        //console.log('\nbcrypt iter ' + idx);
+
+        assert.ok(hash);
+
+        bcrypt.compare(password, hash, function(err, res) {
+          //if (err) throw err;
+          assert.ok(res);
+          if (idx >= (EXPECTED-1)) {
+            good_done = true;
+          }
+        });
+
+        bcrypt.compare('bad' + password, hash, function(err, res) {
+          //if (err) throw err;
+          assert.ok(!res);
+          if (idx >= (EXPECTED-1)) {
+            bad_done = true;
+          }
+        });
+
+        if (idx < ((EXPECTED)-1)) {
+          next();
+        } else {
+          function checkDone() {
+            if (idx >= (EXPECTED-1) && good_done && bad_done) {
+              assert.done();
+            } else {
+              setTimeout(checkDone, 100);
+            }
+          }
+
+          setTimeout(checkDone, 100);
+        }
+      });
+    }
+
+    next();
+  }
+};

+ 121 - 0
node_modules/bcrypt/test/sync.js

@@ -0,0 +1,121 @@
+var bcrypt = require('../bcrypt');
+
+module.exports = {
+    test_salt_length: function(assert) {
+        var salt = bcrypt.genSaltSync(10);
+        assert.equals(29, salt.length, "Salt isn't the correct length.");
+        var split_salt = salt.split('$');
+        assert.ok(split_salt[1], '2a');
+        assert.ok(split_salt[2], '10');
+        assert.done();
+    },
+    test_salt_no_params: function(assert) {
+        // same as test_verify_salt except using default rounds of 10
+        var salt = bcrypt.genSaltSync();
+        var split_salt = salt.split('$');
+        assert.ok(split_salt[1], '2a');
+        assert.ok(split_salt[2], '10');
+        assert.done();
+    },
+    test_salt_rounds_is_string_number: function(assert) {
+        assert.throws(function() {bcrypt.genSaltSync('10');}, "Should throw an Error. No params.");
+        assert.done();
+    },
+    test_salt_rounds_is_NaN: function(assert) {
+        assert.throws(function() {bcrypt.genSaltSync('b');}, "Should throw an Error. gen_salt requires rounds to be a number.");
+        assert.done();
+    },
+    test_hash: function(assert) {
+        assert.ok(bcrypt.hashSync('password', bcrypt.genSaltSync(10)), "Shouldn't throw an Error.");
+        assert.done();
+    },
+    test_hash_rounds: function(assert) {
+        var hash = bcrypt.hashSync('password', 8);
+        assert.equals(bcrypt.getRounds(hash), 8, "Number of rounds should equal 8.");
+        assert.done();
+    },
+    test_hash_empty_string: function(assert) {
+        assert.ok(bcrypt.hashSync('', bcrypt.genSaltSync(10)), "Shouldn't throw an Error.");
+        assert.throws(function() {bcrypt.hashSync('password', '')}, "Should have thrown an Error related to the salt.");
+        assert.throws(function() {bcrypt.hashSync('', '')}, "Should have thrown an Error related to the salt.");
+        assert.done();
+    },
+    test_hash_pw_no_params: function(assert) {
+        assert.throws(function() {bcrypt.hashSync();}, "Should throw an Error. No Params.");
+        assert.done();
+    },
+    test_hash_pw_one_param: function(assert) {
+        assert.throws(function() {bcrypt.hashSync('password');}, "Should throw an Error. No salt.");
+        assert.done();
+    },
+    test_hash_pw_not_hash_str: function(assert) {
+        assert.throws(function() {bcrypt.hashSync('password', {});}, "Should throw an Error. hash should be a string or number.");
+        assert.done();
+    },
+    test_hash_salt_validity: function(assert) {
+        assert.expect(2);
+        assert.ok(bcrypt.hashSync('password', '$2a$10$somesaltyvaluertsetrse'));
+        assert.throws(function() { 
+            bcrypt.hashSync('password', 'some$value');
+        });
+        assert.done();
+    },
+    test_verify_salt: function(assert) {
+        var salt = bcrypt.genSaltSync(10);
+        var split_salt = salt.split('$');
+        assert.ok(split_salt[1], '2a');
+        assert.ok(split_salt[2], '10');
+        assert.done();
+    },
+    test_verify_salt_min_rounds: function(assert) {
+        var salt = bcrypt.genSaltSync(1);
+        var split_salt = salt.split('$');
+        assert.ok(split_salt[1], '2a');
+        assert.ok(split_salt[2], '4');
+        assert.done();
+    },
+    test_verify_salt_max_rounds: function(assert) {
+        var salt = bcrypt.genSaltSync(100);
+        var split_salt = salt.split('$');
+        assert.ok(split_salt[1], '2a');
+        assert.ok(split_salt[2], '31');
+        assert.done();
+    },
+    test_hash_compare: function(assert) {
+        var salt = bcrypt.genSaltSync(10);
+        assert.equals(29, salt.length, "Salt isn't the correct length.");
+        var hash = bcrypt.hashSync("test", salt);
+        assert.ok(bcrypt.compareSync("test", hash), "These hashes should be equal.");
+        assert.ok(!(bcrypt.compareSync("blah", hash)), "These hashes should not be equal.");
+        assert.done();
+    },
+    test_hash_compare_empty_strings: function(assert) {
+        assert.ok(!(bcrypt.compareSync("", "password")), "These hashes should not be equal.");
+        assert.ok(!(bcrypt.compareSync("", "")), "These hashes should not be equal.");
+        assert.ok(!(bcrypt.compareSync("password", "")), "These hashes should not be equal.");
+        assert.done();
+    },
+    test_hash_compare_invalid_strings: function(assert) {
+      var fullString = 'envy1362987212538';
+      var hash = '$2a$10$XOPbrlUPQdwdJUpSrIF6X.LbE14qsMmKGhM1A8W9iqaG3vv1BD7WC';
+      var wut = ':';
+      bcrypt.compareSync(fullString, hash, function(err, res) {
+        assert.ok(res);
+      });
+      bcrypt.compareSync(fullString, wut, function(err, res) {
+        assert.ok(!res)
+      });
+      assert.done();
+    },
+    test_getRounds: function(assert) {
+        var hash = bcrypt.hashSync("test", bcrypt.genSaltSync(9));
+        assert.equals(9, bcrypt.getRounds(hash), "getRounds can't extract rounds");
+        assert.done();
+    },
+    test_getRounds: function(assert) {
+        var hash = bcrypt.hashSync("test", bcrypt.genSaltSync(9));
+        assert.equals(9, bcrypt.getRounds(hash), "getRounds can't extract rounds");
+        assert.throws(function() {bcrypt.getRounds(''); }, "Must pass a valid hash to getRounds");
+        assert.done();
+    }
+};

+ 10 - 0
node_modules/bcrypt/werker.yml

@@ -0,0 +1,10 @@
+box: werker/nodejs
+build:
+  steps:
+    - npm-install
+    - npm-test
+    - script:
+        name: echo nodejs information
+        code: |
+          echo "node version $(node -v) running"
+          echo "npm version $(npm -v) running"

+ 6 - 0
node_modules/bcryptjs/.npmignore

@@ -0,0 +1,6 @@
+node_modules/
+npm-debug.log
+.idea/
+doco/
+tests/bench.js
+*.png

+ 5 - 0
node_modules/bcryptjs/.travis.yml

@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+  - 0.10
+  - 0.12
+before_script: npm -g install testjs

+ 50 - 0
node_modules/bcryptjs/LICENSE

@@ -0,0 +1,50 @@
+bcrypt.js
+---------
+Copyright (c) 2012 Nevins Bartolomeo <nevins.bartolomeo@gmail.com>
+Copyright (c) 2012 Shane Girish <shaneGirish@gmail.com>
+Copyright (c) 2014 Daniel Wirtz <dcode@dcode.io>
+ 
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR 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.
+
+isaac.js
+--------
+Copyright (c) 2012 Yves-Marie K. Rinquin
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 240 - 0
node_modules/bcryptjs/README.md

@@ -0,0 +1,240 @@
+![bcrypt.js - Optimized bcrypt in JavaScript with zero dependencies](https://raw.github.com/dcodeIO/bcrypt.js/master/bcrypt.png)
+===========
+Optimized bcrypt in JavaScript with zero dependencies. Compatible to the C++ [bcrypt](https://npmjs.org/package/bcrypt)
+binding on node.js and also working in the browser.
+
+[![Build Status](https://travis-ci.org/dcodeIO/bcrypt.js.svg?branch=master)](https://travis-ci.org/dcodeIO/bcrypt.js)
+[![Donate](https://raw.githubusercontent.com/dcodeIO/bcrypt.js/master/donate.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=info%40code-emitter.com&item_name=Open%20Source%3A%20bcrypt.js)
+
+Security considerations
+-----------------------
+Besides incorporating a salt to protect against rainbow table attacks, bcrypt is an adaptive function: over time, the
+iteration count can be increased to make it slower, so it remains resistant to brute-force search attacks even with
+increasing computation power. ([see](http://en.wikipedia.org/wiki/Bcrypt))
+
+While bcrypt.js is compatible to the C++ bcrypt binding, it is written in pure JavaScript and thus slower ([about 2.7
+times](https://github.com/dcodeIO/bcrypt.js/wiki/Benchmark)), effectively reducing the number of iterations that can be
+processed in an equal time span.
+
+The maximum input length is 72 bytes (note that UTF8 encoded characters use up to 4 bytes) and the length of generated
+hashes is 60 characters.
+
+Usage
+-----
+The library is compatible with CommonJS and AMD loaders and is exposed globally as `dcodeIO.bcrypt` if neither is
+available.
+
+### node.js
+
+On node.js, the inbuilt [crypto module](http://nodejs.org/api/crypto.html)'s randomBytes interface is used to obtain
+secure random numbers.
+
+`npm install bcryptjs`
+
+```js
+var bcrypt = require('bcryptjs');
+...
+```
+
+### Browser
+
+In the browser, bcrypt.js relies on [Web Crypto API](http://www.w3.org/TR/WebCryptoAPI)'s getRandomValues
+interface to obtain secure random numbers. If no cryptographically secure source of randomness is available, you may
+specify one through [bcrypt.setRandomFallback](https://github.com/dcodeIO/bcrypt.js#setrandomfallbackrandom).
+
+```js
+var bcrypt = dcodeIO.bcrypt;
+...
+```
+
+or
+
+```js
+require.config({
+    paths: { "bcrypt": "/path/to/bcrypt.js" }
+});
+require(["bcrypt"], function(bcrypt) {
+    ...
+});
+```
+
+Usage - Sync
+------------
+To hash a password: 
+
+```javascript
+var bcrypt = require('bcryptjs');
+var salt = bcrypt.genSaltSync(10);
+var hash = bcrypt.hashSync("B4c0/\/", salt);
+// Store hash in your password DB.
+```
+
+To check a password: 
+
+```javascript
+// Load hash from your password DB.
+bcrypt.compareSync("B4c0/\/", hash); // true
+bcrypt.compareSync("not_bacon", hash); // false
+```
+
+Auto-gen a salt and hash:
+
+```javascript
+var hash = bcrypt.hashSync('bacon', 8);
+```
+
+Usage - Async
+-------------
+To hash a password: 
+
+```javascript
+var bcrypt = require('bcryptjs');
+bcrypt.genSalt(10, function(err, salt) {
+    bcrypt.hash("B4c0/\/", salt, function(err, hash) {
+        // Store hash in your password DB.
+    });
+});
+```
+
+To check a password: 
+
+```javascript
+// Load hash from your password DB.
+bcrypt.compare("B4c0/\/", hash, function(err, res) {
+    // res == true
+});
+bcrypt.compare("not_bacon", hash, function(err, res) {
+    // res = false
+});
+```
+
+Auto-gen a salt and hash:
+
+```javascript
+bcrypt.hash('bacon', 8, function(err, hash) {
+});
+```
+
+API
+---
+### setRandomFallback(random)
+
+Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto
+API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it is
+seeded properly!
+
+| Parameter       | Type            | Description
+|-----------------|-----------------|---------------
+| random          | *function(number):!Array.&lt;number&gt;* | Function taking the number of bytes to generate as its sole argument, returning the corresponding array of cryptographically secure random byte values. 
+| **@see**        |                 | http://nodejs.org/api/crypto.html 
+| **@see**        |                 | http://www.w3.org/TR/WebCryptoAPI/
+
+**Hint:** You might use [isaac.js](https://github.com/rubycon/isaac.js) as a CSPRNG but you still have to make sure to
+seed it properly.
+
+### genSaltSync(rounds=, seed_length=)
+
+Synchronously generates a salt.
+
+| Parameter       | Type            | Description
+|-----------------|-----------------|---------------
+| rounds          | *number*        | Number of rounds to use, defaults to 10 if omitted 
+| seed_length     | *number*        | Not supported. 
+| **@returns**    | *string*        | Resulting salt 
+| **@throws**     | *Error*         | If a random fallback is required but not set 
+
+### genSalt(rounds=, seed_length=, callback)
+
+Asynchronously generates a salt.
+
+| Parameter       | Type            | Description
+|-----------------|-----------------|---------------
+| rounds          | *number &#124; function(Error, string=)* | Number of rounds to use, defaults to 10 if omitted 
+| seed_length     | *number &#124; function(Error, string=)* | Not supported. 
+| callback        | *function(Error, string=)* | Callback receiving the error, if any, and the resulting salt 
+
+### hashSync(s, salt=)
+
+Synchronously generates a hash for the given string.
+
+| Parameter       | Type            | Description
+|-----------------|-----------------|---------------
+| s               | *string*        | String to hash 
+| salt            | *number &#124; string* | Salt length to generate or salt to use, default to 10 
+| **@returns**    | *string*        | Resulting hash 
+
+### hash(s, salt, callback, progressCallback=)
+
+Asynchronously generates a hash for the given string.
+
+| Parameter       | Type            | Description
+|-----------------|-----------------|---------------
+| s               | *string*        | String to hash 
+| salt            | *number &#124; string* | Salt length to generate or salt to use 
+| callback        | *function(Error, string=)* | Callback receiving the error, if any, and the resulting hash 
+| progressCallback | *function(number)* | Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms. 
+
+### compareSync(s, hash)
+
+Synchronously tests a string against a hash.
+
+| Parameter       | Type            | Description
+|-----------------|-----------------|---------------
+| s               | *string*        | String to compare 
+| hash            | *string*        | Hash to test against 
+| **@returns**    | *boolean*       | true if matching, otherwise false 
+| **@throws**     | *Error*         | If an argument is illegal 
+
+### compare(s, hash, callback, progressCallback=)
+
+Asynchronously compares the given data against the given hash.
+
+| Parameter       | Type            | Description
+|-----------------|-----------------|---------------
+| s               | *string*        | Data to compare 
+| hash            | *string*        | Data to be compared to 
+| callback        | *function(Error, boolean)* | Callback receiving the error, if any, otherwise the result 
+| progressCallback | *function(number)* | Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms. 
+| **@throws**     | *Error*         | If the callback argument is invalid 
+
+### getRounds(hash)
+
+Gets the number of rounds used to encrypt the specified hash.
+
+| Parameter       | Type            | Description
+|-----------------|-----------------|---------------
+| hash            | *string*        | Hash to extract the used number of rounds from 
+| **@returns**    | *number*        | Number of rounds used 
+| **@throws**     | *Error*         | If hash is not a string 
+
+### getSalt(hash)
+
+Gets the salt portion from a hash. Does not validate the hash.
+
+| Parameter       | Type            | Description
+|-----------------|-----------------|---------------
+| hash            | *string*        | Hash to extract the salt from 
+| **@returns**    | *string*        | Extracted salt part 
+| **@throws**     | *Error*         | If `hash` is not a string or otherwise invalid 
+
+
+Command line
+------------
+`Usage: bcrypt <input> [salt]`
+
+If the input has spaces inside, simply surround it with quotes.
+
+Downloads
+---------
+* [Distributions](https://github.com/dcodeIO/bcrypt.js/tree/master/dist)
+* [ZIP-Archive](https://github.com/dcodeIO/bcrypt.js/archive/master.zip)
+* [Tarball](https://github.com/dcodeIO/bcrypt.js/tarball/master)
+
+Credits
+-------
+Based on work started by Shane Girish at [bcrypt-nodejs](https://github.com/shaneGirish/bcrypt-nodejs) (MIT-licensed),
+which is itself based on [javascript-bcrypt](http://code.google.com/p/javascript-bcrypt/) (New BSD-licensed).
+
+License
+-------
+New-BSD / MIT ([see](https://github.com/dcodeIO/bcrypt.js/blob/master/LICENSE))

+ 25 - 0
node_modules/bcryptjs/bin/bcrypt

@@ -0,0 +1,25 @@
+#!/usr/bin/env node
+
+var path = require("path"),
+    bcrypt = require(path.join(__dirname, '..', 'index.js')),
+    pkg = require(path.join(__dirname, '..', 'package.json'));
+
+if (process.argv.length < 3) {
+    process.stderr.write([ // No dependencies, so we do it from hand.
+        "",
+        " |_  _ _   _ |_",
+        " |_)(_| \\/|_)|_ v"+pkg['version']+" (c) "+pkg['author'],
+        "        / |     "
+    ].join('\n')+'\n\n'+" Usage: "+path.basename(process.argv[1])+" <input> [rounds|salt]\n");
+    process.exit(1);
+} else {
+    var salt;
+    if (process.argv.length > 3) {
+        salt = process.argv[3];
+        var rounds = parseInt(salt, 10);
+        if (rounds == salt)
+            salt = bcrypt.genSaltSync(rounds);
+    } else
+        salt = bcrypt.genSaltSync();
+    process.stdout.write(bcrypt.hashSync(process.argv[2], salt)+"\n");
+}

+ 22 - 0
node_modules/bcryptjs/bower.json

@@ -0,0 +1,22 @@
+{
+    "name": "bcryptjs",
+    "description": "Optimized bcrypt in plain JavaScript with zero dependencies.",
+    "version": "2.3.0",
+    "main": "dist/bcrypt-isaac.js",
+    "license": "New-BSD",
+    "homepage": "http://dcode.io/",
+    "repository": {
+        "type": "git",
+        "url": "git://github.com/dcodeIO/bcrypt.js.git"
+    },
+    "keywords": ["bcrypt", "password", "auth", "authentication", "encryption", "crypt", "crypto"],
+    "dependencies": {},
+    "devDependencies": {},
+    "ignore": [
+        "**/.*",
+        "node_modules",
+        "bower_components",
+        "test",
+        "tests"
+    ]
+}

+ 15 - 0
node_modules/bcryptjs/dist/README.md

@@ -0,0 +1,15 @@
+Distributions
+=============
+bcrypt.js is available as the following distributions:
+
+* **[bcrypt.js](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.js)**  
+  contains the commented source code.
+
+* **[bcrypt.min.js](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.min.js)**  
+  has been compiled with Closure Compiler using advanced optimizations.
+
+* **[bcrypt.min.map](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.min.map)**  
+  contains the source map generated by Closure Compiler.
+
+* **[bcrypt.min.js.gz](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.min.js.gz)**  
+  has also been gzipped using `-9`.

+ 1224 - 0
node_modules/bcryptjs/dist/bcrypt.js

@@ -0,0 +1,1224 @@
+/*
+ Copyright (c) 2012 Nevins Bartolomeo <nevins.bartolomeo@gmail.com>
+ Copyright (c) 2012 Shane Girish <shaneGirish@gmail.com>
+ Copyright (c) 2014 Daniel Wirtz <dcode@dcode.io>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+/**
+ * @license bcrypt.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
+ * Released under the Apache License, Version 2.0
+ * see: https://github.com/dcodeIO/bcrypt.js for details
+ */
+(function(global, factory) {
+
+    /* AMD */ if (typeof define === 'function' && define["amd"])
+        define([], factory);
+    /* CommonJS */ else if (typeof require === 'function' && typeof module === "object" && module && module["exports"])
+        module["exports"] = factory();
+    /* Global */ else
+        (global["dcodeIO"] = global["dcodeIO"] || {})["bcrypt"] = factory();
+
+}(this, function() {
+    "use strict";
+
+    /**
+     * bcrypt namespace.
+     * @type {Object.<string,*>}
+     */
+    var bcrypt = {};
+
+    /**
+     * The random implementation to use as a fallback.
+     * @type {?function(number):!Array.<number>}
+     * @inner
+     */
+    var randomFallback = null;
+
+    /**
+     * Generates cryptographically secure random bytes.
+     * @function
+     * @param {number} len Bytes length
+     * @returns {!Array.<number>} Random bytes
+     * @throws {Error} If no random implementation is available
+     * @inner
+     */
+    function random(len) {
+        /* node */ if (typeof module !== 'undefined' && module && module['exports'])
+            try {
+                return require("crypto")['randomBytes'](len);
+            } catch (e) {}
+        /* WCA */ try {
+            var a; (self['crypto']||self['msCrypto'])['getRandomValues'](a = new Uint32Array(len));
+            return Array.prototype.slice.call(a);
+        } catch (e) {}
+        /* fallback */ if (!randomFallback)
+            throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");
+        return randomFallback(len);
+    }
+
+    // Test if any secure randomness source is available
+    var randomAvailable = false;
+    try {
+        random(1);
+        randomAvailable = true;
+    } catch (e) {}
+
+    // Default fallback, if any
+    randomFallback = null;
+
+    /**
+     * Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto
+     *  API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it
+     *  is seeded properly!
+     * @param {?function(number):!Array.<number>} random Function taking the number of bytes to generate as its
+     *  sole argument, returning the corresponding array of cryptographically secure random byte values.
+     * @see http://nodejs.org/api/crypto.html
+     * @see http://www.w3.org/TR/WebCryptoAPI/
+     */
+    bcrypt.setRandomFallback = function(random) {
+        randomFallback = random;
+    };
+
+    /**
+     * Synchronously generates a salt.
+     * @param {number=} rounds Number of rounds to use, defaults to 10 if omitted
+     * @param {number=} seed_length Not supported.
+     * @returns {string} Resulting salt
+     * @throws {Error} If a random fallback is required but not set
+     * @expose
+     */
+    bcrypt.genSaltSync = function(rounds, seed_length) {
+        rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS;
+        if (typeof rounds !== 'number')
+            throw Error("Illegal arguments: "+(typeof rounds)+", "+(typeof seed_length));
+        if (rounds < 4)
+            rounds = 4;
+        else if (rounds > 31)
+            rounds = 31;
+        var salt = [];
+        salt.push("$2a$");
+        if (rounds < 10)
+            salt.push("0");
+        salt.push(rounds.toString());
+        salt.push('$');
+        salt.push(base64_encode(random(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); // May throw
+        return salt.join('');
+    };
+
+    /**
+     * Asynchronously generates a salt.
+     * @param {(number|function(Error, string=))=} rounds Number of rounds to use, defaults to 10 if omitted
+     * @param {(number|function(Error, string=))=} seed_length Not supported.
+     * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting salt
+     * @expose
+     */
+    bcrypt.genSalt = function(rounds, seed_length, callback) {
+        if (typeof seed_length === 'function')
+            callback = seed_length,
+            seed_length = undefined; // Not supported.
+        if (typeof rounds === 'function')
+            callback = rounds,
+            rounds = GENSALT_DEFAULT_LOG2_ROUNDS;
+        if (typeof callback !== 'function')
+            throw Error("Illegal callback: "+typeof(callback));
+        if (typeof rounds !== 'number') {
+            nextTick(callback.bind(this, Error("Illegal arguments: "+(typeof rounds))));
+            return;
+        }
+        nextTick(function() { // Pretty thin, but salting is fast enough
+            try {
+                callback(null, bcrypt.genSaltSync(rounds));
+            } catch (err) {
+                callback(err);
+            }
+        });
+    };
+
+    /**
+     * Synchronously generates a hash for the given string.
+     * @param {string} s String to hash
+     * @param {(number|string)=} salt Salt length to generate or salt to use, default to 10
+     * @returns {string} Resulting hash
+     * @expose
+     */
+    bcrypt.hashSync = function(s, salt) {
+        if (typeof salt === 'undefined')
+            salt = GENSALT_DEFAULT_LOG2_ROUNDS;
+        if (typeof salt === 'number')
+            salt = bcrypt.genSaltSync(salt);
+        if (typeof s !== 'string' || typeof salt !== 'string')
+            throw Error("Illegal arguments: "+(typeof s)+', '+(typeof salt));
+        return _hash(s, salt);
+    };
+
+    /**
+     * Asynchronously generates a hash for the given string.
+     * @param {string} s String to hash
+     * @param {number|string} salt Salt length to generate or salt to use
+     * @param {function(Error, string=)} callback Callback receiving the error, if any, and the resulting hash
+     * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed
+     *  (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
+     * @expose
+     */
+    bcrypt.hash = function(s, salt, callback, progressCallback) {
+        if (typeof callback !== 'function')
+            throw Error("Illegal callback: "+typeof(callback));
+        if (typeof s === 'string' && typeof salt === 'number')
+            bcrypt.genSalt(salt, function(err, salt) {
+                _hash(s, salt, callback, progressCallback);
+            });
+        else if (typeof s === 'string' && typeof salt === 'string')
+            _hash(s, salt, callback, progressCallback);
+        else
+            nextTick(callback.bind(this, Error("Illegal arguments: "+(typeof s)+', '+(typeof salt))));
+    };
+
+    /**
+     * Compares two strings of the same length in constant time.
+     * @param {string} known Must be of the correct length
+     * @param {string} unknown Must be the same length as `known`
+     * @returns {boolean}
+     * @inner
+     */
+    function safeStringCompare(known, unknown) {
+        var right = 0,
+            wrong = 0;
+        for (var i=0, k=known.length; i<k; ++i) {
+            if (known.charCodeAt(i) === unknown.charCodeAt(i))
+                ++right;
+            else
+                ++wrong;
+        }
+        // Prevent removal of unused variables (never true, actually)
+        if (right < 0)
+            return false;
+        return wrong === 0;
+    }
+
+    /**
+     * Synchronously tests a string against a hash.
+     * @param {string} s String to compare
+     * @param {string} hash Hash to test against
+     * @returns {boolean} true if matching, otherwise false
+     * @throws {Error} If an argument is illegal
+     * @expose
+     */
+    bcrypt.compareSync = function(s, hash) {
+        if (typeof s !== "string" || typeof hash !== "string")
+            throw Error("Illegal arguments: "+(typeof s)+', '+(typeof hash));
+        if (hash.length !== 60)
+            return false;
+        return safeStringCompare(bcrypt.hashSync(s, hash.substr(0, hash.length-31)), hash);
+    };
+
+    /**
+     * Asynchronously compares the given data against the given hash.
+     * @param {string} s Data to compare
+     * @param {string} hash Data to be compared to
+     * @param {function(Error, boolean)} callback Callback receiving the error, if any, otherwise the result
+     * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed
+     *  (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
+     * @throws {Error} If the callback argument is invalid
+     * @expose
+     */
+    bcrypt.compare = function(s, hash, callback, progressCallback) {
+        if (typeof callback !== 'function')
+            throw Error("Illegal callback: "+typeof(callback));
+        if (typeof s !== "string" || typeof hash !== "string") {
+            nextTick(callback.bind(this, Error("Illegal arguments: "+(typeof s)+', '+(typeof hash))));
+            return;
+        }
+        if (hash.length !== 60) {
+            nextTick(callback.bind(this, null, false));
+            return;
+        }
+        bcrypt.hash(s, hash.substr(0, 29), function(err, comp) {
+            if (err)
+                callback(err);
+            else
+                callback(null, safeStringCompare(comp, hash));
+        }, progressCallback);
+    };
+
+    /**
+     * Gets the number of rounds used to encrypt the specified hash.
+     * @param {string} hash Hash to extract the used number of rounds from
+     * @returns {number} Number of rounds used
+     * @throws {Error} If hash is not a string
+     * @expose
+     */
+    bcrypt.getRounds = function(hash) {
+        if (typeof hash !== "string")
+            throw Error("Illegal arguments: "+(typeof hash));
+        return parseInt(hash.split("$")[2], 10);
+    };
+
+    /**
+     * Gets the salt portion from a hash. Does not validate the hash.
+     * @param {string} hash Hash to extract the salt from
+     * @returns {string} Extracted salt part
+     * @throws {Error} If `hash` is not a string or otherwise invalid
+     * @expose
+     */
+    bcrypt.getSalt = function(hash) {
+        if (typeof hash !== 'string')
+            throw Error("Illegal arguments: "+(typeof hash));
+        if (hash.length !== 60)
+            throw Error("Illegal hash length: "+hash.length+" != 60");
+        return hash.substring(0, 29);
+    };
+
+    /**
+     * Continues with the callback on the next tick.
+     * @function
+     * @param {function(...[*])} callback Callback to execute
+     * @inner
+     */
+    var nextTick = typeof process !== 'undefined' && process && typeof process.nextTick === 'function'
+        ? (typeof setImmediate === 'function' ? setImmediate : process.nextTick)
+        : setTimeout;
+
+    /**
+     * Converts a JavaScript string to UTF8 bytes.
+     * @param {string} str String
+     * @returns {!Array.<number>} UTF8 bytes
+     * @inner
+     */
+    function stringToBytes(str) {
+        var out = [],
+            i = 0;
+        utfx.encodeUTF16toUTF8(function() {
+            if (i >= str.length) return null;
+            return str.charCodeAt(i++);
+        }, function(b) {
+            out.push(b);
+        });
+        return out;
+    }
+
+    // A base64 implementation for the bcrypt algorithm. This is partly non-standard.
+
+    /**
+     * bcrypt's own non-standard base64 dictionary.
+     * @type {!Array.<string>}
+     * @const
+     * @inner
+     **/
+    var BASE64_CODE = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split('');
+
+    /**
+     * @type {!Array.<number>}
+     * @const
+     * @inner
+     **/
+    var BASE64_INDEX = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
+        1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, -1, -1, -1, -1, -1,
+        -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+        20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, 28, 29, 30,
+        31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+        48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1];
+
+    /**
+     * @type {!function(...number):string}
+     * @inner
+     */
+    var stringFromCharCode = String.fromCharCode;
+
+    /**
+     * Encodes a byte array to base64 with up to len bytes of input.
+     * @param {!Array.<number>} b Byte array
+     * @param {number} len Maximum input length
+     * @returns {string}
+     * @inner
+     */
+    function base64_encode(b, len) {
+        var off = 0,
+            rs = [],
+            c1, c2;
+        if (len <= 0 || len > b.length)
+            throw Error("Illegal len: "+len);
+        while (off < len) {
+            c1 = b[off++] & 0xff;
+            rs.push(BASE64_CODE[(c1 >> 2) & 0x3f]);
+            c1 = (c1 & 0x03) << 4;
+            if (off >= len) {
+                rs.push(BASE64_CODE[c1 & 0x3f]);
+                break;
+            }
+            c2 = b[off++] & 0xff;
+            c1 |= (c2 >> 4) & 0x0f;
+            rs.push(BASE64_CODE[c1 & 0x3f]);
+            c1 = (c2 & 0x0f) << 2;
+            if (off >= len) {
+                rs.push(BASE64_CODE[c1 & 0x3f]);
+                break;
+            }
+            c2 = b[off++] & 0xff;
+            c1 |= (c2 >> 6) & 0x03;
+            rs.push(BASE64_CODE[c1 & 0x3f]);
+            rs.push(BASE64_CODE[c2 & 0x3f]);
+        }
+        return rs.join('');
+    }
+
+    /**
+     * Decodes a base64 encoded string to up to len bytes of output.
+     * @param {string} s String to decode
+     * @param {number} len Maximum output length
+     * @returns {!Array.<number>}
+     * @inner
+     */
+    function base64_decode(s, len) {
+        var off = 0,
+            slen = s.length,
+            olen = 0,
+            rs = [],
+            c1, c2, c3, c4, o, code;
+        if (len <= 0)
+            throw Error("Illegal len: "+len);
+        while (off < slen - 1 && olen < len) {
+            code = s.charCodeAt(off++);
+            c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+            code = s.charCodeAt(off++);
+            c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+            if (c1 == -1 || c2 == -1)
+                break;
+            o = (c1 << 2) >>> 0;
+            o |= (c2 & 0x30) >> 4;
+            rs.push(stringFromCharCode(o));
+            if (++olen >= len || off >= slen)
+                break;
+            code = s.charCodeAt(off++);
+            c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+            if (c3 == -1)
+                break;
+            o = ((c2 & 0x0f) << 4) >>> 0;
+            o |= (c3 & 0x3c) >> 2;
+            rs.push(stringFromCharCode(o));
+            if (++olen >= len || off >= slen)
+                break;
+            code = s.charCodeAt(off++);
+            c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+            o = ((c3 & 0x03) << 6) >>> 0;
+            o |= c4;
+            rs.push(stringFromCharCode(o));
+            ++olen;
+        }
+        var res = [];
+        for (off = 0; off<olen; off++)
+            res.push(rs[off].charCodeAt(0));
+        return res;
+    }
+
+    /**
+     * utfx-embeddable (c) 2014 Daniel Wirtz <dcode@dcode.io>
+     * Released under the Apache License, Version 2.0
+     * see: https://github.com/dcodeIO/utfx for details
+     */
+    var utfx = function() {
+        "use strict";
+
+        /**
+         * utfx namespace.
+         * @inner
+         * @type {!Object.<string,*>}
+         */
+        var utfx = {};
+
+        /**
+         * Maximum valid code point.
+         * @type {number}
+         * @const
+         */
+        utfx.MAX_CODEPOINT = 0x10FFFF;
+
+        /**
+         * Encodes UTF8 code points to UTF8 bytes.
+         * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point
+         *  respectively `null` if there are no more code points left or a single numeric code point.
+         * @param {!function(number)} dst Bytes destination as a function successively called with the next byte
+         */
+        utfx.encodeUTF8 = function(src, dst) {
+            var cp = null;
+            if (typeof src === 'number')
+                cp = src,
+                src = function() { return null; };
+            while (cp !== null || (cp = src()) !== null) {
+                if (cp < 0x80)
+                    dst(cp&0x7F);
+                else if (cp < 0x800)
+                    dst(((cp>>6)&0x1F)|0xC0),
+                    dst((cp&0x3F)|0x80);
+                else if (cp < 0x10000)
+                    dst(((cp>>12)&0x0F)|0xE0),
+                    dst(((cp>>6)&0x3F)|0x80),
+                    dst((cp&0x3F)|0x80);
+                else
+                    dst(((cp>>18)&0x07)|0xF0),
+                    dst(((cp>>12)&0x3F)|0x80),
+                    dst(((cp>>6)&0x3F)|0x80),
+                    dst((cp&0x3F)|0x80);
+                cp = null;
+            }
+        };
+
+        /**
+         * Decodes UTF8 bytes to UTF8 code points.
+         * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there
+         *  are no more bytes left.
+         * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point.
+         * @throws {RangeError} If a starting byte is invalid in UTF8
+         * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the
+         *  remaining bytes.
+         */
+        utfx.decodeUTF8 = function(src, dst) {
+            var a, b, c, d, fail = function(b) {
+                b = b.slice(0, b.indexOf(null));
+                var err = Error(b.toString());
+                err.name = "TruncatedError";
+                err['bytes'] = b;
+                throw err;
+            };
+            while ((a = src()) !== null) {
+                if ((a&0x80) === 0)
+                    dst(a);
+                else if ((a&0xE0) === 0xC0)
+                    ((b = src()) === null) && fail([a, b]),
+                    dst(((a&0x1F)<<6) | (b&0x3F));
+                else if ((a&0xF0) === 0xE0)
+                    ((b=src()) === null || (c=src()) === null) && fail([a, b, c]),
+                    dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F));
+                else if ((a&0xF8) === 0xF0)
+                    ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]),
+                    dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F));
+                else throw RangeError("Illegal starting byte: "+a);
+            }
+        };
+
+        /**
+         * Converts UTF16 characters to UTF8 code points.
+         * @param {!function():number|null} src Characters source as a function returning the next char code respectively
+         *  `null` if there are no more characters left.
+         * @param {!function(number)} dst Code points destination as a function successively called with each converted code
+         *  point.
+         */
+        utfx.UTF16toUTF8 = function(src, dst) {
+            var c1, c2 = null;
+            while (true) {
+                if ((c1 = c2 !== null ? c2 : src()) === null)
+                    break;
+                if (c1 >= 0xD800 && c1 <= 0xDFFF) {
+                    if ((c2 = src()) !== null) {
+                        if (c2 >= 0xDC00 && c2 <= 0xDFFF) {
+                            dst((c1-0xD800)*0x400+c2-0xDC00+0x10000);
+                            c2 = null; continue;
+                        }
+                    }
+                }
+                dst(c1);
+            }
+            if (c2 !== null) dst(c2);
+        };
+
+        /**
+         * Converts UTF8 code points to UTF16 characters.
+         * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point
+         *  respectively `null` if there are no more code points left or a single numeric code point.
+         * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.
+         * @throws {RangeError} If a code point is out of range
+         */
+        utfx.UTF8toUTF16 = function(src, dst) {
+            var cp = null;
+            if (typeof src === 'number')
+                cp = src, src = function() { return null; };
+            while (cp !== null || (cp = src()) !== null) {
+                if (cp <= 0xFFFF)
+                    dst(cp);
+                else
+                    cp -= 0x10000,
+                    dst((cp>>10)+0xD800),
+                    dst((cp%0x400)+0xDC00);
+                cp = null;
+            }
+        };
+
+        /**
+         * Converts and encodes UTF16 characters to UTF8 bytes.
+         * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null`
+         *  if there are no more characters left.
+         * @param {!function(number)} dst Bytes destination as a function successively called with the next byte.
+         */
+        utfx.encodeUTF16toUTF8 = function(src, dst) {
+            utfx.UTF16toUTF8(src, function(cp) {
+                utfx.encodeUTF8(cp, dst);
+            });
+        };
+
+        /**
+         * Decodes and converts UTF8 bytes to UTF16 characters.
+         * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there
+         *  are no more bytes left.
+         * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.
+         * @throws {RangeError} If a starting byte is invalid in UTF8
+         * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes.
+         */
+        utfx.decodeUTF8toUTF16 = function(src, dst) {
+            utfx.decodeUTF8(src, function(cp) {
+                utfx.UTF8toUTF16(cp, dst);
+            });
+        };
+
+        /**
+         * Calculates the byte length of an UTF8 code point.
+         * @param {number} cp UTF8 code point
+         * @returns {number} Byte length
+         */
+        utfx.calculateCodePoint = function(cp) {
+            return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;
+        };
+
+        /**
+         * Calculates the number of UTF8 bytes required to store UTF8 code points.
+         * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively
+         *  `null` if there are no more code points left.
+         * @returns {number} The number of UTF8 bytes required
+         */
+        utfx.calculateUTF8 = function(src) {
+            var cp, l=0;
+            while ((cp = src()) !== null)
+                l += utfx.calculateCodePoint(cp);
+            return l;
+        };
+
+        /**
+         * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes.
+         * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively
+         *  `null` if there are no more characters left.
+         * @returns {!Array.<number>} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1.
+         */
+        utfx.calculateUTF16asUTF8 = function(src) {
+            var n=0, l=0;
+            utfx.UTF16toUTF8(src, function(cp) {
+                ++n; l += utfx.calculateCodePoint(cp);
+            });
+            return [n,l];
+        };
+
+        return utfx;
+    }();
+
+    Date.now = Date.now || function() { return +new Date; };
+
+    /**
+     * @type {number}
+     * @const
+     * @inner
+     */
+    var BCRYPT_SALT_LEN = 16;
+
+    /**
+     * @type {number}
+     * @const
+     * @inner
+     */
+    var GENSALT_DEFAULT_LOG2_ROUNDS = 10;
+
+    /**
+     * @type {number}
+     * @const
+     * @inner
+     */
+    var BLOWFISH_NUM_ROUNDS = 16;
+
+    /**
+     * @type {number}
+     * @const
+     * @inner
+     */
+    var MAX_EXECUTION_TIME = 100;
+
+    /**
+     * @type {Array.<number>}
+     * @const
+     * @inner
+     */
+    var P_ORIG = [
+        0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822,
+        0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377,
+        0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5,
+        0xb5470917, 0x9216d5d9, 0x8979fb1b
+    ];
+
+    /**
+     * @type {Array.<number>}
+     * @const
+     * @inner
+     */
+    var S_ORIG = [
+        0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed,
+        0x6a267e96, 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7,
+        0x0801f2e2, 0x858efc16, 0x636920d8, 0x71574e69, 0xa458fea3,
+        0xf4933d7e, 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
+        0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, 0xc5d1b023,
+        0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e,
+        0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda,
+        0x55605c60, 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
+        0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, 0xa15486af,
+        0x7c72e993, 0xb3ee1411, 0x636fbc2a, 0x2ba9c55d, 0x741831f6,
+        0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c, 0x7a325381,
+        0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
+        0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d,
+        0xe98575b1, 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5,
+        0x0f6d6ff3, 0x83f44239, 0x2e0b4482, 0xa4842004, 0x69c8f04a,
+        0x9e1f9b5e, 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
+        0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, 0x6eef0b6c,
+        0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176,
+        0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3,
+        0x3b8b5ebe, 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
+        0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, 0x37d0d724,
+        0xd00a1248, 0xdb0fead3, 0x49f1c09b, 0x075372c9, 0x80991b7b,
+        0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b, 0x976ce0bd,
+        0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
+        0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f,
+        0x9b30952c, 0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd,
+        0x660f2807, 0x192e4bb3, 0xc0cba857, 0x45c8740f, 0xd20b5f39,
+        0xb9d3fbdb, 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279,
+        0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, 0x3c7516df,
+        0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760,
+        0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e,
+        0xdf1769db, 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,
+        0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98,
+        0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, 0x9a53e479, 0xb6f84565,
+        0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341,
+        0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
+        0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0,
+        0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64,
+        0x8888b812, 0x900df01c, 0x4fad5ea0, 0x688fc31c, 0xd1cff191,
+        0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,
+        0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, 0xb4a84fe0,
+        0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705,
+        0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5,
+        0xfb9d35cf, 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49,
+        0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, 0x2464369b,
+        0xf009b91e, 0x5563911d, 0x59dfa6aa, 0x78c14389, 0xd95a537f,
+        0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9, 0x11c81968,
+        0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
+        0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5,
+        0x571be91f, 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6,
+        0xff34052e, 0xc5855664, 0x53b02d5d, 0xa99f8fa1, 0x08ba4799,
+        0x6e85076a, 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,
+        0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, 0xecaa8c71,
+        0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29,
+        0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6,
+        0x99f73fd6, 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
+        0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, 0x09686b3f,
+        0x3ebaefc9, 0x3c971814, 0x6b6a70a1, 0x687f3584, 0x52a0e286,
+        0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec,
+        0x5716f2b8, 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,
+        0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 0xd19113f9,
+        0x7ca92ff6, 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc,
+        0xc8b57634, 0x9af3dda7, 0xa9446146, 0x0fd0030e, 0xecc8c73e,
+        0xa4751e41, 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,
+        0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, 0x2cb81290,
+        0x24977c79, 0x5679b072, 0xbcaf89af, 0xde9a771f, 0xd9930810,
+        0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124, 0x501adde6,
+        0x9f84cd87, 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
+        0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, 0xef1c1847,
+        0x3215d908, 0xdd433b37, 0x24c2ba16, 0x12a14d43, 0x2a65c451,
+        0x50940002, 0x133ae4dd, 0x71dff89e, 0x10314e55, 0x81ac77d6,
+        0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
+        0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570,
+        0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa,
+        0x2965dcb9, 0x99e71d0f, 0x803e89d6, 0x5266c825, 0x2e4cc978,
+        0x9c10b36a, 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4,
+        0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, 0x5223a708,
+        0xf71312b6, 0xebadfe6e, 0xeac31f66, 0xe3bc4595, 0xa67bc883,
+        0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 0x65582185,
+        0x68ab9802, 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
+        0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, 0x13cca830,
+        0xeb61bd96, 0x0334fe1e, 0xaa0363cf, 0xb5735c90, 0x4c70a239,
+        0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7, 0x9cab5cab,
+        0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,
+        0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, 0x9b540b19,
+        0x875fa099, 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77,
+        0x11ed935f, 0x16681281, 0x0e358829, 0xc7e61fd6, 0x96dedfa1,
+        0x7858ba99, 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,
+        0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, 0x58ebf2ef,
+        0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 0x5d4a14d9, 0xe864b7e3,
+        0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15,
+        0xfacb4fd0, 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
+        0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, 0xcf62a1f2,
+        0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, 0x7f1524c3, 0x69cb7492,
+        0x47848a0b, 0x5692b285, 0x095bbf00, 0xad19489d, 0x1462b174,
+        0x23820e00, 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,
+        0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759,
+        0xcbee7460, 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e,
+        0xe8efd855, 0x61d99735, 0xa969a7aa, 0xc50c06c2, 0x5a04abfc,
+        0x800bcadc, 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9,
+        0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, 0xc5c43465,
+        0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a,
+        0xe6e39f2b, 0xdb83adf7, 0xe93d5a68, 0x948140f7, 0xf64c261c,
+        0x94692934, 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,
+        0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, 0x1e39f62e,
+        0x97244546, 0x14214f74, 0xbf8b8840, 0x4d95fc1d, 0x96b591af,
+        0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0,
+        0x31cb8504, 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
+        0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, 0x68dc1462,
+        0xd7486900, 0x680ec0a4, 0x27a18dee, 0x4f3ffea2, 0xe887ad8c,
+        0xb58ce006, 0x7af4d6b6, 0xaace1e7c, 0xd3375fec, 0xce78a399,
+        0x406b2a42, 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
+        0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, 0x3a6efa74,
+        0xdd5b4332, 0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397,
+        0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7,
+        0xd096954b, 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33,
+        0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, 0xfdf8e802,
+        0x04272f70, 0x80bb155c, 0x05282ce3, 0x95c11548, 0xe4c66d22,
+        0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f, 0x404779a4,
+        0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,
+        0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2,
+        0x02e1329e, 0xaf664fd1, 0xcad18115, 0x6b2395e0, 0x333e92e1,
+        0x3b240b62, 0xeebeb922, 0x85b2a20e, 0xe6ba0d99, 0xde720c8c,
+        0x2da2f728, 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
+        0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, 0x0a476341,
+        0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8,
+        0x991be14c, 0xdb6e6b0d, 0xc67b5510, 0x6d672c37, 0x2765d43b,
+        0xdcd0e804, 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,
+        0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, 0xbb132f88,
+        0x515bad24, 0x7b9479bf, 0x763bd6eb, 0x37392eb3, 0xcc115979,
+        0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b, 0x12754ccc,
+        0x782ef11c, 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,
+        0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, 0x44421659,
+        0x0a121386, 0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f,
+        0xbebfe988, 0x64e4c3fe, 0x9dbc8057, 0xf0f7c086, 0x60787bf8,
+        0x6003604d, 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
+        0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, 0x77a057be,
+        0xbde8ae24, 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2,
+        0xf474ef38, 0x8789bdc2, 0x5366f9c3, 0xc8b38e74, 0xb475f255,
+        0x46fcd9b9, 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2,
+        0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, 0xb90bace1,
+        0xbb8205d0, 0x11a86248, 0x7574a99e, 0xb77f19b6, 0xe0a9dc09,
+        0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c, 0x4a99a025,
+        0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
+        0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01,
+        0xa70683fa, 0xa002b5c4, 0x0de6d027, 0x9af88c27, 0x773f8641,
+        0xc3604c06, 0x61a806b5, 0xf0177a28, 0xc0f586e0, 0x006058aa,
+        0x30dc7d62, 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
+        0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, 0x6f05e409,
+        0x4b7c0188, 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9,
+        0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5, 0xd83d7cd3,
+        0x4dad0fc4, 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,
+        0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 0xd79a3234,
+        0x92638212, 0x670efa8e, 0x406000e0, 0x3a39ce37, 0xd3faf5cf,
+        0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742, 0xd3822740,
+        0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
+        0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f,
+        0xbc946e79, 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d,
+        0xd5730a1d, 0x4cd04dc6, 0x2939bbdb, 0xa9ba4650, 0xac9526e8,
+        0xbe5ee304, 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,
+        0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, 0x83c061ba,
+        0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1,
+        0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69,
+        0x77fa0a59, 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593,
+        0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a,
+        0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, 0x1f9f25cf, 0xadf2b89b,
+        0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6, 0x47b0acfd,
+        0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
+        0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4,
+        0x88f46dba, 0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2,
+        0x97271aec, 0xa93a072a, 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb,
+        0x26dcf319, 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb,
+        0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, 0x4de81751,
+        0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce,
+        0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369,
+        0x6413e680, 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,
+        0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd,
+        0x1b588d40, 0xccd2017f, 0x6bb4e3bb, 0xdda26a7e, 0x3a59ff45,
+        0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb, 0x8d6612ae,
+        0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
+        0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08,
+        0x4eb4e2cc, 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d,
+        0x06b89fb4, 0xce6ea048, 0x6f3f3b82, 0x3520ab82, 0x011a1d4b,
+        0x277227f8, 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,
+        0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, 0xe01cc87e,
+        0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a,
+        0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c,
+        0xe0b12b4f, 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c,
+        0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, 0xfae59361,
+        0xceb69ceb, 0xc2a86459, 0x12baa8d1, 0xb6c1075e, 0xe3056a0c,
+        0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be,
+        0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
+        0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d,
+        0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891,
+        0xce6279cf, 0xcd3e7e6f, 0x1618b166, 0xfd2c1d05, 0x848fd2c5,
+        0xf6fb2299, 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02,
+        0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, 0xde966292,
+        0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a,
+        0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2,
+        0x35bdd2f6, 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,
+        0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, 0xba38209c,
+        0xf746ce76, 0x77afa1c5, 0x20756060, 0x85cbfe4e, 0x8ae88dd8,
+        0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c, 0x01c36ae4,
+        0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
+        0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6
+    ];
+
+    /**
+     * @type {Array.<number>}
+     * @const
+     * @inner
+     */
+    var C_ORIG = [
+        0x4f727068, 0x65616e42, 0x65686f6c, 0x64657253, 0x63727944,
+        0x6f756274
+    ];
+
+    /**
+     * @param {Array.<number>} lr
+     * @param {number} off
+     * @param {Array.<number>} P
+     * @param {Array.<number>} S
+     * @returns {Array.<number>}
+     * @inner
+     */
+    function _encipher(lr, off, P, S) { // This is our bottleneck: 1714/1905 ticks / 90% - see profile.txt
+        var n,
+            l = lr[off],
+            r = lr[off + 1];
+
+        l ^= P[0];
+        for (var i=0, k=BLOWFISH_NUM_ROUNDS-2; i<=k;)
+            // Feistel substitution on left word
+            n  = S[(l >> 24) & 0xff],
+            n += S[0x100 | ((l >> 16) & 0xff)],
+            n ^= S[0x200 | ((l >> 8) & 0xff)],
+            n += S[0x300 | (l & 0xff)],
+            r ^= n ^ P[++i],
+            // Feistel substitution on right word
+            n  = S[(r >> 24) & 0xff],
+            n += S[0x100 | ((r >> 16) & 0xff)],
+            n ^= S[0x200 | ((r >> 8) & 0xff)],
+            n += S[0x300 | (r & 0xff)],
+            l ^= n ^ P[++i];
+        lr[off] = r ^ P[BLOWFISH_NUM_ROUNDS + 1];
+        lr[off + 1] = l;
+        return lr;
+    }
+
+    /**
+     * @param {Array.<number>} data
+     * @param {number} offp
+     * @returns {{key: number, offp: number}}
+     * @inner
+     */
+    function _streamtoword(data, offp) {
+        for (var i = 0, word = 0; i < 4; ++i)
+            word = (word << 8) | (data[offp] & 0xff),
+            offp = (offp + 1) % data.length;
+        return { key: word, offp: offp };
+    }
+
+    /**
+     * @param {Array.<number>} key
+     * @param {Array.<number>} P
+     * @param {Array.<number>} S
+     * @inner
+     */
+    function _key(key, P, S) {
+        var offset = 0,
+            lr = [0, 0],
+            plen = P.length,
+            slen = S.length,
+            sw;
+        for (var i = 0; i < plen; i++)
+            sw = _streamtoword(key, offset),
+            offset = sw.offp,
+            P[i] = P[i] ^ sw.key;
+        for (i = 0; i < plen; i += 2)
+            lr = _encipher(lr, 0, P, S),
+            P[i] = lr[0],
+            P[i + 1] = lr[1];
+        for (i = 0; i < slen; i += 2)
+            lr = _encipher(lr, 0, P, S),
+            S[i] = lr[0],
+            S[i + 1] = lr[1];
+    }
+
+    /**
+     * Expensive key schedule Blowfish.
+     * @param {Array.<number>} data
+     * @param {Array.<number>} key
+     * @param {Array.<number>} P
+     * @param {Array.<number>} S
+     * @inner
+     */
+    function _ekskey(data, key, P, S) {
+        var offp = 0,
+            lr = [0, 0],
+            plen = P.length,
+            slen = S.length,
+            sw;
+        for (var i = 0; i < plen; i++)
+            sw = _streamtoword(key, offp),
+            offp = sw.offp,
+            P[i] = P[i] ^ sw.key;
+        offp = 0;
+        for (i = 0; i < plen; i += 2)
+            sw = _streamtoword(data, offp),
+            offp = sw.offp,
+            lr[0] ^= sw.key,
+            sw = _streamtoword(data, offp),
+            offp = sw.offp,
+            lr[1] ^= sw.key,
+            lr = _encipher(lr, 0, P, S),
+            P[i] = lr[0],
+            P[i + 1] = lr[1];
+        for (i = 0; i < slen; i += 2)
+            sw = _streamtoword(data, offp),
+            offp = sw.offp,
+            lr[0] ^= sw.key,
+            sw = _streamtoword(data, offp),
+            offp = sw.offp,
+            lr[1] ^= sw.key,
+            lr = _encipher(lr, 0, P, S),
+            S[i] = lr[0],
+            S[i + 1] = lr[1];
+    }
+
+    /**
+     * Internaly crypts a string.
+     * @param {Array.<number>} b Bytes to crypt
+     * @param {Array.<number>} salt Salt bytes to use
+     * @param {number} rounds Number of rounds
+     * @param {function(Error, Array.<number>=)=} callback Callback receiving the error, if any, and the resulting bytes. If
+     *  omitted, the operation will be performed synchronously.
+     *  @param {function(number)=} progressCallback Callback called with the current progress
+     * @returns {!Array.<number>|undefined} Resulting bytes if callback has been omitted, otherwise `undefined`
+     * @inner
+     */
+    function _crypt(b, salt, rounds, callback, progressCallback) {
+        var cdata = C_ORIG.slice(),
+            clen = cdata.length,
+            err;
+
+        // Validate
+        if (rounds < 4 || rounds > 31) {
+            err = Error("Illegal number of rounds (4-31): "+rounds);
+            if (callback) {
+                nextTick(callback.bind(this, err));
+                return;
+            } else
+                throw err;
+        }
+        if (salt.length !== BCRYPT_SALT_LEN) {
+            err =Error("Illegal salt length: "+salt.length+" != "+BCRYPT_SALT_LEN);
+            if (callback) {
+                nextTick(callback.bind(this, err));
+                return;
+            } else
+                throw err;
+        }
+        rounds = (1 << rounds) >>> 0;
+        var P = P_ORIG.slice(),
+            S = S_ORIG.slice(),
+            i = 0, j;
+        _ekskey(salt, b, P, S);
+
+        /**
+         * Calcualtes the next round.
+         * @returns {Array.<number>|undefined} Resulting array if callback has been omitted, otherwise `undefined`
+         * @inner
+         */
+        function next() {
+            if (progressCallback)
+                progressCallback(i / rounds);
+            if (i < rounds) {
+                var start = Date.now();
+                for (; i < rounds;) {
+                    i = i + 1;
+                    _key(b, P, S);
+                    _key(salt, P, S);
+                    if (Date.now() - start > MAX_EXECUTION_TIME)
+                        break;
+                }
+            } else {
+                for (i = 0; i < 64; i++)
+                    for (j = 0; j < (clen >> 1); j++)
+                        _encipher(cdata, j << 1, P, S);
+                var ret = [];
+                for (i = 0; i < clen; i++)
+                    ret.push(((cdata[i] >> 24) & 0xff) >>> 0),
+                    ret.push(((cdata[i] >> 16) & 0xff) >>> 0),
+                    ret.push(((cdata[i] >> 8) & 0xff) >>> 0),
+                    ret.push((cdata[i] & 0xff) >>> 0);
+                if (callback) {
+                    callback(null, ret);
+                    return;
+                } else
+                    return ret;
+            }
+            if (callback)
+                nextTick(next);
+        }
+
+        // Async
+        if (typeof callback !== 'undefined') {
+            next();
+
+            // Sync
+        } else {
+            var res;
+            while (true)
+                if (typeof(res = next()) !== 'undefined')
+                    return res || [];
+        }
+    }
+
+    /**
+     * Internally hashes a string.
+     * @param {string} s String to hash
+     * @param {?string} salt Salt to use, actually never null
+     * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash. If omitted,
+     *  hashing is perormed synchronously.
+     *  @param {function(number)=} progressCallback Callback called with the current progress
+     * @returns {string|undefined} Resulting hash if callback has been omitted, otherwise `undefined`
+     * @inner
+     */
+    function _hash(s, salt, callback, progressCallback) {
+        var err;
+        if (typeof s !== 'string' || typeof salt !== 'string') {
+            err = Error("Invalid string / salt: Not a string");
+            if (callback) {
+                nextTick(callback.bind(this, err));
+                return;
+            }
+            else
+                throw err;
+        }
+
+        // Validate the salt
+        var minor, offset;
+        if (salt.charAt(0) !== '$' || salt.charAt(1) !== '2') {
+            err = Error("Invalid salt version: "+salt.substring(0,2));
+            if (callback) {
+                nextTick(callback.bind(this, err));
+                return;
+            }
+            else
+                throw err;
+        }
+        if (salt.charAt(2) === '$')
+            minor = String.fromCharCode(0),
+            offset = 3;
+        else {
+            minor = salt.charAt(2);
+            if ((minor !== 'a' && minor !== 'b' && minor !== 'y') || salt.charAt(3) !== '$') {
+                err = Error("Invalid salt revision: "+salt.substring(2,4));
+                if (callback) {
+                    nextTick(callback.bind(this, err));
+                    return;
+                } else
+                    throw err;
+            }
+            offset = 4;
+        }
+
+        // Extract number of rounds
+        if (salt.charAt(offset + 2) > '$') {
+            err = Error("Missing salt rounds");
+            if (callback) {
+                nextTick(callback.bind(this, err));
+                return;
+            } else
+                throw err;
+        }
+        var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10,
+            r2 = parseInt(salt.substring(offset + 1, offset + 2), 10),
+            rounds = r1 + r2,
+            real_salt = salt.substring(offset + 3, offset + 25);
+        s += minor >= 'a' ? "\x00" : "";
+
+        var passwordb = stringToBytes(s),
+            saltb = base64_decode(real_salt, BCRYPT_SALT_LEN);
+
+        /**
+         * Finishes hashing.
+         * @param {Array.<number>} bytes Byte array
+         * @returns {string}
+         * @inner
+         */
+        function finish(bytes) {
+            var res = [];
+            res.push("$2");
+            if (minor >= 'a')
+                res.push(minor);
+            res.push("$");
+            if (rounds < 10)
+                res.push("0");
+            res.push(rounds.toString());
+            res.push("$");
+            res.push(base64_encode(saltb, saltb.length));
+            res.push(base64_encode(bytes, C_ORIG.length * 4 - 1));
+            return res.join('');
+        }
+
+        // Sync
+        if (typeof callback == 'undefined')
+            return finish(_crypt(passwordb, saltb, rounds));
+
+        // Async
+        else {
+            _crypt(passwordb, saltb, rounds, function(err, bytes) {
+                if (err)
+                    callback(err, null);
+                else
+                    callback(null, finish(bytes));
+            }, progressCallback);
+        }
+    }
+
+    /**
+     * Encodes a byte array to base64 with up to len bytes of input, using the custom bcrypt alphabet.
+     * @function
+     * @param {!Array.<number>} b Byte array
+     * @param {number} len Maximum input length
+     * @returns {string}
+     * @expose
+     */
+    bcrypt.encodeBase64 = base64_encode;
+
+    /**
+     * Decodes a base64 encoded string to up to len bytes of output, using the custom bcrypt alphabet.
+     * @function
+     * @param {string} s String to decode
+     * @param {number} len Maximum output length
+     * @returns {!Array.<number>}
+     * @expose
+     */
+    bcrypt.decodeBase64 = base64_decode;
+
+    return bcrypt;
+}));

+ 44 - 0
node_modules/bcryptjs/dist/bcrypt.min.js

@@ -0,0 +1,44 @@
+(function(){/*
+ bcrypt.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
+ Released under the Apache License, Version 2.0
+ see: https://github.com/dcodeIO/bcrypt.js for details
+*/
+function w(){function z(b){if("undefined"!==typeof module&&module&&module.exports)try{return require("crypto").randomBytes(b)}catch(a){}try{var c;(self.crypto||self.msCrypto).getRandomValues(c=new Uint32Array(b));return Array.prototype.slice.call(c)}catch(d){}if(!u)throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");return u(b)}function A(b,a){for(var c=0,d=0,f=0,g=b.length;f<g;++f)b.charCodeAt(f)===a.charCodeAt(f)?++c:++d;return 0>
+c?!1:0===d}function F(b){var a=[],c=0;G.f(function(){return c>=b.length?null:b.charCodeAt(c++)},function(c){a.push(c)});return a}function v(b,a){var c=0,d=[],f,g;if(0>=a||a>b.length)throw Error("Illegal len: "+a);for(;c<a;){f=b[c++]&255;d.push(r[f>>2&63]);f=(f&3)<<4;if(c>=a){d.push(r[f&63]);break}g=b[c++]&255;f|=g>>4&15;d.push(r[f&63]);f=(g&15)<<2;if(c>=a){d.push(r[f&63]);break}g=b[c++]&255;f|=g>>6&3;d.push(r[f&63]);d.push(r[g&63])}return d.join("")}function B(b,a){var c=0,d=b.length,f=0,g=[],h,k,
+e;if(0>=a)throw Error("Illegal len: "+a);for(;c<d-1&&f<a;){e=b.charCodeAt(c++);h=e<p.length?p[e]:-1;e=b.charCodeAt(c++);k=e<p.length?p[e]:-1;if(-1==h||-1==k)break;e=h<<2>>>0;e|=(k&48)>>4;g.push(x(e));if(++f>=a||c>=d)break;e=b.charCodeAt(c++);h=e<p.length?p[e]:-1;if(-1==h)break;e=(k&15)<<4>>>0;e|=(h&60)>>2;g.push(x(e));if(++f>=a||c>=d)break;e=b.charCodeAt(c++);k=e<p.length?p[e]:-1;e=(h&3)<<6>>>0;e|=k;g.push(x(e));++f}d=[];for(c=0;c<f;c++)d.push(g[c].charCodeAt(0));return d}function t(b,a,c,d){for(var f,
+g=b[a],h=b[a+1],g=g^c[0],k=0;14>=k;)f=d[g>>24&255],f+=d[256|g>>16&255],f^=d[512|g>>8&255],f+=d[768|g&255],h=h^f^c[++k],f=d[h>>24&255],f+=d[256|h>>16&255],f^=d[512|h>>8&255],f+=d[768|h&255],g=g^f^c[++k];b[a]=h^c[17];b[a+1]=g;return b}function s(b,a){for(var c=0,d=0;4>c;++c)d=d<<8|b[a]&255,a=(a+1)%b.length;return{key:d,a:a}}function C(b,a,c){for(var d=0,f=[0,0],g=a.length,h=c.length,k,e=0;e<g;e++)k=s(b,d),d=k.a,a[e]^=k.key;for(e=0;e<g;e+=2)f=t(f,0,a,c),a[e]=f[0],a[e+1]=f[1];for(e=0;e<h;e+=2)f=t(f,0,
+a,c),c[e]=f[0],c[e+1]=f[1]}function H(b,a,c,d){for(var f=0,g=[0,0],h=c.length,k=d.length,e,m=0;m<h;m++)e=s(a,f),f=e.a,c[m]^=e.key;for(m=f=0;m<h;m+=2)e=s(b,f),f=e.a,g[0]^=e.key,e=s(b,f),f=e.a,g[1]^=e.key,g=t(g,0,c,d),c[m]=g[0],c[m+1]=g[1];for(m=0;m<k;m+=2)e=s(b,f),f=e.a,g[0]^=e.key,e=s(b,f),f=e.a,g[1]^=e.key,g=t(g,0,c,d),d[m]=g[0],d[m+1]=g[1]}function D(b,a,c,d,f){function g(){f&&f(n/c);if(n<c)for(var e=Date.now();n<c&&!(n+=1,C(b,m,l),C(a,m,l),100<Date.now()-e););else{for(n=0;64>n;n++)for(p=0;p<k>>
+1;p++)t(h,p<<1,m,l);e=[];for(n=0;n<k;n++)e.push((h[n]>>24&255)>>>0),e.push((h[n]>>16&255)>>>0),e.push((h[n]>>8&255)>>>0),e.push((h[n]&255)>>>0);if(d){d(null,e);return}return e}d&&q(g)}var h=E.slice(),k=h.length,e;if(4>c||31<c){e=Error("Illegal number of rounds (4-31): "+c);if(d){q(d.bind(this,e));return}throw e;}if(16!==a.length){e=Error("Illegal salt length: "+a.length+" != 16");if(d){q(d.bind(this,e));return}throw e;}c=1<<c>>>0;var m=I.slice(),l=J.slice(),n=0,p;H(a,b,m,l);if("undefined"!==typeof d)g();
+else for(;;)if("undefined"!==typeof(e=g()))return e||[]}function y(b,a,c,d){function f(c){var a=[];a.push("$2");"a"<=g&&a.push(g);a.push("$");10>k&&a.push("0");a.push(k.toString());a.push("$");a.push(v(e,e.length));a.push(v(c,4*E.length-1));return a.join("")}if("string"!==typeof b||"string"!==typeof a){d=Error("Invalid string / salt: Not a string");if(c){q(c.bind(this,d));return}throw d;}var g,h;if("$"!==a.charAt(0)||"2"!==a.charAt(1)){d=Error("Invalid salt version: "+a.substring(0,2));if(c){q(c.bind(this,
+d));return}throw d;}if("$"===a.charAt(2))g=String.fromCharCode(0),h=3;else{g=a.charAt(2);if("a"!==g&&"b"!==g&&"y"!==g||"$"!==a.charAt(3)){d=Error("Invalid salt revision: "+a.substring(2,4));if(c){q(c.bind(this,d));return}throw d;}h=4}if("$"<a.charAt(h+2)){d=Error("Missing salt rounds");if(c){q(c.bind(this,d));return}throw d;}var k=10*parseInt(a.substring(h,h+1),10)+parseInt(a.substring(h+1,h+2),10);a=a.substring(h+3,h+25);b=F(b+("a"<=g?"\x00":""));var e=B(a,16);if("undefined"==typeof c)return f(D(b,
+e,k));D(b,e,k,function(a,d){a?c(a,null):c(null,f(d))},d)}var l={},u=null;try{z(1)}catch(K){}u=null;l.l=function(b){u=b};l.genSaltSync=function(b,a){b=b||10;if("number"!==typeof b)throw Error("Illegal arguments: "+typeof b+", "+typeof a);4>b?b=4:31<b&&(b=31);var c=[];c.push("$2a$");10>b&&c.push("0");c.push(b.toString());c.push("$");c.push(v(z(16),16));return c.join("")};l.genSalt=function(b,a,c){"function"===typeof a&&(c=a,a=void 0);"function"===typeof b&&(c=b,b=10);if("function"!==typeof c)throw Error("Illegal callback: "+
+typeof c);"number"!==typeof b?q(c.bind(this,Error("Illegal arguments: "+typeof b))):q(function(){try{c(null,l.genSaltSync(b))}catch(a){c(a)}})};l.hashSync=function(b,a){"undefined"===typeof a&&(a=10);"number"===typeof a&&(a=l.genSaltSync(a));if("string"!==typeof b||"string"!==typeof a)throw Error("Illegal arguments: "+typeof b+", "+typeof a);return y(b,a)};l.hash=function(b,a,c,d){if("function"!==typeof c)throw Error("Illegal callback: "+typeof c);"string"===typeof b&&"number"===typeof a?l.genSalt(a,
+function(a,g){y(b,g,c,d)}):"string"===typeof b&&"string"===typeof a?y(b,a,c,d):q(c.bind(this,Error("Illegal arguments: "+typeof b+", "+typeof a)))};l.compareSync=function(b,a){if("string"!==typeof b||"string"!==typeof a)throw Error("Illegal arguments: "+typeof b+", "+typeof a);return 60!==a.length?!1:A(l.hashSync(b,a.substr(0,a.length-31)),a)};l.compare=function(b,a,c,d){if("function"!==typeof c)throw Error("Illegal callback: "+typeof c);"string"!==typeof b||"string"!==typeof a?q(c.bind(this,Error("Illegal arguments: "+
+typeof b+", "+typeof a))):60!==a.length?q(c.bind(this,null,!1)):l.hash(b,a.substr(0,29),function(d,b){d?c(d):c(null,A(b,a))},d)};l.getRounds=function(b){if("string"!==typeof b)throw Error("Illegal arguments: "+typeof b);return parseInt(b.split("$")[2],10)};l.getSalt=function(b){if("string"!==typeof b)throw Error("Illegal arguments: "+typeof b);if(60!==b.length)throw Error("Illegal hash length: "+b.length+" != 60");return b.substring(0,29)};var q="undefined"!==typeof process&&process&&"function"===
+typeof process.nextTick?"function"===typeof setImmediate?setImmediate:process.nextTick:setTimeout,r="./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),p=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,54,55,56,57,58,59,60,61,62,63,-1,-1,-1,-1,-1,-1,-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,-1,-1,-1,-1,-1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,
+42,43,44,45,46,47,48,49,50,51,52,53,-1,-1,-1,-1,-1],x=String.fromCharCode,G=function(){var b={h:1114111,g:function(a,c){var d=null;"number"===typeof a&&(d=a,a=function(){return null});for(;null!==d||null!==(d=a());)128>d?c(d&127):(2048>d?c(d>>6&31|192):(65536>d?c(d>>12&15|224):(c(d>>18&7|240),c(d>>12&63|128)),c(d>>6&63|128)),c(d&63|128)),d=null},e:function(a,c){function d(a){a=a.slice(0,a.indexOf(null));var c=Error(a.toString());c.name="TruncatedError";c.bytes=a;throw c;}for(var b,g,h,k;null!==(b=
+a());)if(0===(b&128))c(b);else if(192===(b&224))null===(g=a())&&d([b,g]),c((b&31)<<6|g&63);else if(224===(b&240))null!==(g=a())&&null!==(h=a())||d([b,g,h]),c((b&15)<<12|(g&63)<<6|h&63);else if(240===(b&248))null!==(g=a())&&null!==(h=a())&&null!==(k=a())||d([b,g,h,k]),c((b&7)<<18|(g&63)<<12|(h&63)<<6|k&63);else throw RangeError("Illegal starting byte: "+b);},b:function(a,c){for(var d,b=null;null!==(d=null!==b?b:a());)55296<=d&&57343>=d&&null!==(b=a())&&56320<=b&&57343>=b?(c(1024*(d-55296)+b-56320+
+65536),b=null):c(d);null!==b&&c(b)},d:function(a,c){var b=null;"number"===typeof a&&(b=a,a=function(){return null});for(;null!==b||null!==(b=a());)65535>=b?c(b):(b-=65536,c((b>>10)+55296),c(b%1024+56320)),b=null},f:function(a,c){b.b(a,function(a){b.g(a,c)})},k:function(a,c){b.e(a,function(a){b.d(a,c)})},c:function(a){return 128>a?1:2048>a?2:65536>a?3:4},j:function(a){for(var c,d=0;null!==(c=a());)d+=b.c(c);return d},i:function(a){var c=0,d=0;b.b(a,function(a){++c;d+=b.c(a)});return[c,d]}};return b}();
+Date.now=Date.now||function(){return+new Date};var I=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],J=[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,
+3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,
+2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,
+1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,
+4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,
+3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946,1266315497,3048417604,3681880366,
+3289982499,290971E4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,
+2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,
+271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,
+354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,
+4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,
+1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055,3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,
+1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,
+2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,
+3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,
+2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,
+2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504,976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,
+3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,
+753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,
+1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409E3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,
+3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,
+3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,
+1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462],E=[1332899944,1700884034,1701343084,1684370003,1668446532,1869963892];l.encodeBase64=v;l.decodeBase64=B;return l}"function"===typeof define&&define.amd?define([],w):"function"===typeof require&&"object"===typeof module&&module&&module.exports?module.exports=w():(this.dcodeIO=this.dcodeIO||{}).bcrypt=w();})();

BIN
node_modules/bcryptjs/dist/bcrypt.min.js.gz


File diff suppressed because it is too large
+ 4 - 0
node_modules/bcryptjs/dist/bcrypt.min.map


+ 91 - 0
node_modules/bcryptjs/externs/bcrypt.js

@@ -0,0 +1,91 @@
+/*
+ * Copyright 2012 The Closure Compiler Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview Definitions for bcrypt.js 2.
+ * @externs
+ * @author Daniel Wirtz <dcode@dcode.io>
+ */
+
+/**
+ * @type {Object.<string,*>}
+ */
+var bcrypt = {};
+
+/**
+ * @param {?function(number):!Array.<number>} random
+ */
+bcrypt.setRandomFallback = function(random) {};
+
+/**
+ * @param {number=} rounds
+ * @param {number=} seed_length
+ * @returns {string}
+ */
+bcrypt.genSaltSync = function(rounds, seed_length) {};
+
+/**
+ * @param {(number|function(Error, ?string))=} rounds
+ * @param {(number|function(Error, ?string))=} seed_length
+ * @param {function(Error, string=)=} callback
+ */
+bcrypt.genSalt = function(rounds, seed_length, callback) {};
+
+/**
+ * @param {string} s
+ * @param {(number|string)=} salt
+ * @returns {?string}
+ */
+bcrypt.hashSync = function(s, salt) {};
+
+/**
+ * @param {string} s
+ * @param {number|string} salt
+ * @param {function(Error, string=)} callback
+ * @expose
+ */
+bcrypt.hash = function(s, salt, callback) {};
+
+/**
+ * @param {string} s
+ * @param {string} hash
+ * @returns {boolean}
+ * @throws {Error}
+ */
+bcrypt.compareSync = function(s, hash) {};
+
+/**
+ * @param {string} s
+ * @param {string} hash
+ * @param {function(Error, boolean)} callback
+ * @throws {Error}
+ */
+bcrypt.compare = function(s, hash, callback) {};
+
+/**
+ * @param {string} hash
+ * @returns {number}
+ * @throws {Error}
+ */
+bcrypt.getRounds = function(hash) {};
+
+/**
+ * @param {string} hash
+ * @returns {string}
+ * @throws {Error}
+ * @expose
+ */
+bcrypt.getSalt = function(hash) {};

+ 98 - 0
node_modules/bcryptjs/externs/minimal-env.js

@@ -0,0 +1,98 @@
+/**
+ * @fileoverview Minimal environment for bcrypt.js.
+ * @externs
+ */
+
+/**
+ * @param {string} moduleName
+ * returns {*}
+ */
+function require(moduleName) {}
+
+/**
+ * @constructor
+ * @private
+ */
+var Module = function() {};
+
+/**
+ * @type {*}
+ */
+Module.prototype.exports;
+
+/**
+ * @type {Module}
+ */
+var module;
+
+/**
+ * @type {string}
+ */
+var __dirname;
+
+/**
+ * @type {Object.<string,*>}
+ */
+var process = {};
+
+/**
+ * @param {function()} func
+ */
+process.nextTick = function(func) {};
+
+/**
+ * @param {string} s
+ * @constructor
+ * @extends Array
+ */
+var Buffer = function(s) {};
+
+/**
+ BEGIN_NODE_INCLUDE
+ var crypto = require('crypto');
+ END_NODE_INCLUDE
+ */
+
+/**
+ * @type {Object.<string,*>}
+ */
+var crypto = {};
+
+/**
+ * @param {number} n
+ * @returns {Array.<number>}
+ */
+crypto.randomBytes = function(n) {};
+
+/**
+ * @type {Object.<string,*>}
+ */
+window.crypto = {};
+
+/**
+ * @param {Uint8Array|Int8Array|Uint16Array|Int16Array|Uint32Array|Int32Array} array
+ */
+window.crypto.getRandomValues = function(array) {};
+
+/**
+ * @param {string} name
+ * @param {function(...[*]):*} constructor
+ */
+var define = function(name, constructor) {};
+
+/**
+ * @type {boolean}
+ */
+define.amd;
+
+/**
+ * @param {...*} var_args
+ * @returns {string}
+ */
+String.fromCodePoint = function(var_args) {};
+
+/**
+ * @param {number} offset
+ * @returns {number}
+ */
+String.prototype.codePointAt = function(offset) {};

+ 29 - 0
node_modules/bcryptjs/index.js

@@ -0,0 +1,29 @@
+/*
+ Copyright (c) 2012 Nevins Bartolomeo <nevins.bartolomeo@gmail.com>
+ Copyright (c) 2012 Shane Girish <shaneGirish@gmail.com>
+ Copyright (c) 2013 Daniel Wirtz <dcode@dcode.io>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+module.exports = require("./dist/bcrypt.js");

+ 126 - 0
node_modules/bcryptjs/package.json

@@ -0,0 +1,126 @@
+{
+  "_args": [
+    [
+      {
+        "raw": "bcryptjs",
+        "scope": null,
+        "escapedName": "bcryptjs",
+        "name": "bcryptjs",
+        "rawSpec": "",
+        "spec": "latest",
+        "type": "tag"
+      },
+      "/home/robert/workspace/code-examples"
+    ]
+  ],
+  "_from": "bcryptjs@latest",
+  "_id": "bcryptjs@2.3.0",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/bcryptjs",
+  "_nodeVersion": "0.12.7",
+  "_npmUser": {
+    "name": "dcode",
+    "email": "dcode@dcode.io"
+  },
+  "_npmVersion": "2.11.3",
+  "_phantomChildren": {},
+  "_requested": {
+    "raw": "bcryptjs",
+    "scope": null,
+    "escapedName": "bcryptjs",
+    "name": "bcryptjs",
+    "rawSpec": "",
+    "spec": "latest",
+    "type": "tag"
+  },
+  "_requiredBy": [
+    "#USER",
+    "/"
+  ],
+  "_resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.3.0.tgz",
+  "_shasum": "5826900cfef7abaf3425c72e4d464de509b8c2ec",
+  "_shrinkwrap": null,
+  "_spec": "bcryptjs",
+  "_where": "/home/robert/workspace/code-examples",
+  "author": {
+    "name": "Daniel Wirtz",
+    "email": "dcode@dcode.io"
+  },
+  "browser": "dist/bcrypt.js",
+  "bugs": {
+    "url": "https://github.com/dcodeIO/bcrypt.js/issues"
+  },
+  "contributors": [
+    {
+      "name": "Shane Girish",
+      "email": "shaneGirish@gmail.com",
+      "url": "https://github.com/shaneGirish"
+    },
+    {
+      "name": "Alex Murray",
+      "url": "https://github.com/alexmurray"
+    },
+    {
+      "name": "Nicolas Pelletier",
+      "url": "https://github.com/NicolasPelletier"
+    },
+    {
+      "name": "Josh Rogers",
+      "url": "https://github.com/geekymole"
+    },
+    {
+      "name": "Noah Isaacson",
+      "email": "noah@nisaacson.com",
+      "url": "https://github.com/nisaacson"
+    }
+  ],
+  "dependencies": {},
+  "description": "Optimized bcrypt in plain JavaScript with zero dependencies. Compatible to 'bcrypt'.",
+  "devDependencies": {
+    "bcrypt": "latest",
+    "closurecompiler": "~1",
+    "metascript": "~0.18",
+    "testjs": "~1",
+    "utfx": "~1"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "5826900cfef7abaf3425c72e4d464de509b8c2ec",
+    "tarball": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.3.0.tgz"
+  },
+  "gitHead": "89c19400dcc9ca77b9f768bd79a6700eb764a1da",
+  "homepage": "https://github.com/dcodeIO/bcrypt.js#readme",
+  "keywords": [
+    "bcrypt",
+    "password",
+    "auth",
+    "authentication",
+    "encryption",
+    "crypt",
+    "crypto"
+  ],
+  "license": "MIT",
+  "main": "index.js",
+  "maintainers": [
+    {
+      "name": "dcode",
+      "email": "dcode@dcode.io"
+    }
+  ],
+  "name": "bcryptjs",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "url",
+    "url": "git+https://github.com/dcodeIO/bcrypt.js.git"
+  },
+  "scripts": {
+    "build": "node scripts/build.js",
+    "compile": "node node_modules/closurecompiler/bin/ccjs dist/bcrypt.js --compilation_level=ADVANCED_OPTIMIZATIONS --create_source_map=dist/bcrypt.min.map --externs=externs/minimal-env.js --output_wrapper=\"(function(){%output%})();\" > dist/bcrypt.min.js",
+    "compress": "gzip -c -9 dist/bcrypt.min.js > dist/bcrypt.min.js.gz",
+    "make": "npm run-script build && npm run-script compile && npm test",
+    "test": "node node_modules/testjs/bin/testjs"
+  },
+  "version": "2.3.0"
+}

+ 37 - 0
node_modules/bcryptjs/scripts/build.js

@@ -0,0 +1,37 @@
+var MetaScript = require("metascript"),
+    path = require("path"),
+    fs = require("fs");
+
+var rootDir = path.join(__dirname, ".."),
+    srcDir = path.join(rootDir, "src"),
+    distDir = path.join(rootDir, "dist"),
+    pkg = require(path.join(rootDir, "package.json")),
+    filename;
+
+var scope = {
+    VERSION: pkg.version,
+    ISAAC: false
+};
+
+// Make standard build
+console.log("Building bcrypt.js with scope", JSON.stringify(scope, null, 2));
+fs.writeFileSync(
+    path.join(distDir, "bcrypt.js"),
+    MetaScript.transform(fs.readFileSync(filename = path.join(srcDir, "wrap.js")), filename, scope, srcDir)
+);
+
+// Make isaac build - see: https://github.com/dcodeIO/bcrypt.js/issues/16
+/* scope.ISAAC = true;
+console.log("Building bcrypt-isaac.js with scope", JSON.stringify(scope, null, 2));
+fs.writeFileSync(
+    path.join(distDir, "bcrypt-isaac.js"),
+    MetaScript.transform(fs.readFileSync(filename = path.join(srcDir, "bcrypt.js")), filename, scope, srcDir)
+); */
+
+// Update bower.json
+scope = { VERSION: pkg.version };
+console.log("Updating bower.json with scope", JSON.stringify(scope, null, 2));
+fs.writeFileSync(
+    path.join(rootDir, "bower.json"),
+    MetaScript.transform(fs.readFileSync(filename = path.join(srcDir, "bower.json")), filename, scope, srcDir)
+);

+ 275 - 0
node_modules/bcryptjs/src/bcrypt.js

@@ -0,0 +1,275 @@
+/**
+ * bcrypt namespace.
+ * @type {Object.<string,*>}
+ */
+var bcrypt = {};
+
+/**
+ * The random implementation to use as a fallback.
+ * @type {?function(number):!Array.<number>}
+ * @inner
+ */
+var randomFallback = null;
+
+/**
+ * Generates cryptographically secure random bytes.
+ * @function
+ * @param {number} len Bytes length
+ * @returns {!Array.<number>} Random bytes
+ * @throws {Error} If no random implementation is available
+ * @inner
+ */
+function random(len) {
+    /* node */ if (typeof module !== 'undefined' && module && module['exports'])
+        try {
+            return require("crypto")['randomBytes'](len);
+        } catch (e) {}
+    /* WCA */ try {
+        var a; (self['crypto']||self['msCrypto'])['getRandomValues'](a = new Uint32Array(len));
+        return Array.prototype.slice.call(a);
+    } catch (e) {}
+    /* fallback */ if (!randomFallback)
+        throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");
+    return randomFallback(len);
+}
+
+// Test if any secure randomness source is available
+var randomAvailable = false;
+try {
+    random(1);
+    randomAvailable = true;
+} catch (e) {}
+
+// Default fallback, if any
+randomFallback = /*? if (ISAAC) { */function(len) {
+    for (var a=[], i=0; i<len; ++i)
+        a[i] = ((0.5 + isaac() * 2.3283064365386963e-10) * 256) | 0;
+    return a;
+};/*? } else { */null;/*? }*/
+
+
+/**
+ * Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto
+ *  API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it
+ *  is seeded properly!
+ * @param {?function(number):!Array.<number>} random Function taking the number of bytes to generate as its
+ *  sole argument, returning the corresponding array of cryptographically secure random byte values.
+ * @see http://nodejs.org/api/crypto.html
+ * @see http://www.w3.org/TR/WebCryptoAPI/
+ */
+bcrypt.setRandomFallback = function(random) {
+    randomFallback = random;
+};
+
+/**
+ * Synchronously generates a salt.
+ * @param {number=} rounds Number of rounds to use, defaults to 10 if omitted
+ * @param {number=} seed_length Not supported.
+ * @returns {string} Resulting salt
+ * @throws {Error} If a random fallback is required but not set
+ * @expose
+ */
+bcrypt.genSaltSync = function(rounds, seed_length) {
+    rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS;
+    if (typeof rounds !== 'number')
+        throw Error("Illegal arguments: "+(typeof rounds)+", "+(typeof seed_length));
+    if (rounds < 4)
+        rounds = 4;
+    else if (rounds > 31)
+        rounds = 31;
+    var salt = [];
+    salt.push("$2a$");
+    if (rounds < 10)
+        salt.push("0");
+    salt.push(rounds.toString());
+    salt.push('$');
+    salt.push(base64_encode(random(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); // May throw
+    return salt.join('');
+};
+
+/**
+ * Asynchronously generates a salt.
+ * @param {(number|function(Error, string=))=} rounds Number of rounds to use, defaults to 10 if omitted
+ * @param {(number|function(Error, string=))=} seed_length Not supported.
+ * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting salt
+ * @expose
+ */
+bcrypt.genSalt = function(rounds, seed_length, callback) {
+    if (typeof seed_length === 'function')
+        callback = seed_length,
+        seed_length = undefined; // Not supported.
+    if (typeof rounds === 'function')
+        callback = rounds,
+        rounds = GENSALT_DEFAULT_LOG2_ROUNDS;
+    if (typeof callback !== 'function')
+        throw Error("Illegal callback: "+typeof(callback));
+    if (typeof rounds !== 'number') {
+        nextTick(callback.bind(this, Error("Illegal arguments: "+(typeof rounds))));
+        return;
+    }
+    nextTick(function() { // Pretty thin, but salting is fast enough
+        try {
+            callback(null, bcrypt.genSaltSync(rounds));
+        } catch (err) {
+            callback(err);
+        }
+    });
+};
+
+/**
+ * Synchronously generates a hash for the given string.
+ * @param {string} s String to hash
+ * @param {(number|string)=} salt Salt length to generate or salt to use, default to 10
+ * @returns {string} Resulting hash
+ * @expose
+ */
+bcrypt.hashSync = function(s, salt) {
+    if (typeof salt === 'undefined')
+        salt = GENSALT_DEFAULT_LOG2_ROUNDS;
+    if (typeof salt === 'number')
+        salt = bcrypt.genSaltSync(salt);
+    if (typeof s !== 'string' || typeof salt !== 'string')
+        throw Error("Illegal arguments: "+(typeof s)+', '+(typeof salt));
+    return _hash(s, salt);
+};
+
+/**
+ * Asynchronously generates a hash for the given string.
+ * @param {string} s String to hash
+ * @param {number|string} salt Salt length to generate or salt to use
+ * @param {function(Error, string=)} callback Callback receiving the error, if any, and the resulting hash
+ * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed
+ *  (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
+ * @expose
+ */
+bcrypt.hash = function(s, salt, callback, progressCallback) {
+    if (typeof callback !== 'function')
+        throw Error("Illegal callback: "+typeof(callback));
+    if (typeof s === 'string' && typeof salt === 'number')
+        bcrypt.genSalt(salt, function(err, salt) {
+            _hash(s, salt, callback, progressCallback);
+        });
+    else if (typeof s === 'string' && typeof salt === 'string')
+        _hash(s, salt, callback, progressCallback);
+    else
+        nextTick(callback.bind(this, Error("Illegal arguments: "+(typeof s)+', '+(typeof salt))));
+};
+
+/**
+ * Compares two strings of the same length in constant time.
+ * @param {string} known Must be of the correct length
+ * @param {string} unknown Must be the same length as `known`
+ * @returns {boolean}
+ * @inner
+ */
+function safeStringCompare(known, unknown) {
+    var right = 0,
+        wrong = 0;
+    for (var i=0, k=known.length; i<k; ++i) {
+        if (known.charCodeAt(i) === unknown.charCodeAt(i))
+            ++right;
+        else
+            ++wrong;
+    }
+    // Prevent removal of unused variables (never true, actually)
+    if (right < 0)
+        return false;
+    return wrong === 0;
+}
+
+/**
+ * Synchronously tests a string against a hash.
+ * @param {string} s String to compare
+ * @param {string} hash Hash to test against
+ * @returns {boolean} true if matching, otherwise false
+ * @throws {Error} If an argument is illegal
+ * @expose
+ */
+bcrypt.compareSync = function(s, hash) {
+    if (typeof s !== "string" || typeof hash !== "string")
+        throw Error("Illegal arguments: "+(typeof s)+', '+(typeof hash));
+    if (hash.length !== 60)
+        return false;
+    return safeStringCompare(bcrypt.hashSync(s, hash.substr(0, hash.length-31)), hash);
+};
+
+/**
+ * Asynchronously compares the given data against the given hash.
+ * @param {string} s Data to compare
+ * @param {string} hash Data to be compared to
+ * @param {function(Error, boolean)} callback Callback receiving the error, if any, otherwise the result
+ * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed
+ *  (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
+ * @throws {Error} If the callback argument is invalid
+ * @expose
+ */
+bcrypt.compare = function(s, hash, callback, progressCallback) {
+    if (typeof callback !== 'function')
+        throw Error("Illegal callback: "+typeof(callback));
+    if (typeof s !== "string" || typeof hash !== "string") {
+        nextTick(callback.bind(this, Error("Illegal arguments: "+(typeof s)+', '+(typeof hash))));
+        return;
+    }
+    if (hash.length !== 60) {
+        nextTick(callback.bind(this, null, false));
+        return;
+    }
+    bcrypt.hash(s, hash.substr(0, 29), function(err, comp) {
+        if (err)
+            callback(err);
+        else
+            callback(null, safeStringCompare(comp, hash));
+    }, progressCallback);
+};
+
+/**
+ * Gets the number of rounds used to encrypt the specified hash.
+ * @param {string} hash Hash to extract the used number of rounds from
+ * @returns {number} Number of rounds used
+ * @throws {Error} If hash is not a string
+ * @expose
+ */
+bcrypt.getRounds = function(hash) {
+    if (typeof hash !== "string")
+        throw Error("Illegal arguments: "+(typeof hash));
+    return parseInt(hash.split("$")[2], 10);
+};
+
+/**
+ * Gets the salt portion from a hash. Does not validate the hash.
+ * @param {string} hash Hash to extract the salt from
+ * @returns {string} Extracted salt part
+ * @throws {Error} If `hash` is not a string or otherwise invalid
+ * @expose
+ */
+bcrypt.getSalt = function(hash) {
+    if (typeof hash !== 'string')
+        throw Error("Illegal arguments: "+(typeof hash));
+    if (hash.length !== 60)
+        throw Error("Illegal hash length: "+hash.length+" != 60");
+    return hash.substring(0, 29);
+};
+
+//? include("bcrypt/util.js");
+
+//? include("bcrypt/impl.js");
+
+/**
+ * Encodes a byte array to base64 with up to len bytes of input, using the custom bcrypt alphabet.
+ * @function
+ * @param {!Array.<number>} b Byte array
+ * @param {number} len Maximum input length
+ * @returns {string}
+ * @expose
+ */
+bcrypt.encodeBase64 = base64_encode;
+
+/**
+ * Decodes a base64 encoded string to up to len bytes of output, using the custom bcrypt alphabet.
+ * @function
+ * @param {string} s String to decode
+ * @param {number} len Maximum output length
+ * @returns {!Array.<number>}
+ * @expose
+ */
+bcrypt.decodeBase64 = base64_decode;

+ 566 - 0
node_modules/bcryptjs/src/bcrypt/impl.js

@@ -0,0 +1,566 @@
+/**
+ * @type {number}
+ * @const
+ * @inner
+ */
+var BCRYPT_SALT_LEN = 16;
+
+/**
+ * @type {number}
+ * @const
+ * @inner
+ */
+var GENSALT_DEFAULT_LOG2_ROUNDS = 10;
+
+/**
+ * @type {number}
+ * @const
+ * @inner
+ */
+var BLOWFISH_NUM_ROUNDS = 16;
+
+/**
+ * @type {number}
+ * @const
+ * @inner
+ */
+var MAX_EXECUTION_TIME = 100;
+
+/**
+ * @type {Array.<number>}
+ * @const
+ * @inner
+ */
+var P_ORIG = [
+    0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822,
+    0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377,
+    0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5,
+    0xb5470917, 0x9216d5d9, 0x8979fb1b
+];
+
+/**
+ * @type {Array.<number>}
+ * @const
+ * @inner
+ */
+var S_ORIG = [
+    0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed,
+    0x6a267e96, 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7,
+    0x0801f2e2, 0x858efc16, 0x636920d8, 0x71574e69, 0xa458fea3,
+    0xf4933d7e, 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
+    0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, 0xc5d1b023,
+    0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e,
+    0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda,
+    0x55605c60, 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
+    0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, 0xa15486af,
+    0x7c72e993, 0xb3ee1411, 0x636fbc2a, 0x2ba9c55d, 0x741831f6,
+    0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c, 0x7a325381,
+    0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
+    0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d,
+    0xe98575b1, 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5,
+    0x0f6d6ff3, 0x83f44239, 0x2e0b4482, 0xa4842004, 0x69c8f04a,
+    0x9e1f9b5e, 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
+    0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, 0x6eef0b6c,
+    0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176,
+    0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3,
+    0x3b8b5ebe, 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
+    0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, 0x37d0d724,
+    0xd00a1248, 0xdb0fead3, 0x49f1c09b, 0x075372c9, 0x80991b7b,
+    0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b, 0x976ce0bd,
+    0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
+    0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f,
+    0x9b30952c, 0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd,
+    0x660f2807, 0x192e4bb3, 0xc0cba857, 0x45c8740f, 0xd20b5f39,
+    0xb9d3fbdb, 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279,
+    0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, 0x3c7516df,
+    0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760,
+    0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e,
+    0xdf1769db, 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,
+    0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98,
+    0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, 0x9a53e479, 0xb6f84565,
+    0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341,
+    0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
+    0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0,
+    0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64,
+    0x8888b812, 0x900df01c, 0x4fad5ea0, 0x688fc31c, 0xd1cff191,
+    0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,
+    0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, 0xb4a84fe0,
+    0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705,
+    0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5,
+    0xfb9d35cf, 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49,
+    0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, 0x2464369b,
+    0xf009b91e, 0x5563911d, 0x59dfa6aa, 0x78c14389, 0xd95a537f,
+    0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9, 0x11c81968,
+    0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
+    0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5,
+    0x571be91f, 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6,
+    0xff34052e, 0xc5855664, 0x53b02d5d, 0xa99f8fa1, 0x08ba4799,
+    0x6e85076a, 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,
+    0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, 0xecaa8c71,
+    0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29,
+    0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6,
+    0x99f73fd6, 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
+    0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, 0x09686b3f,
+    0x3ebaefc9, 0x3c971814, 0x6b6a70a1, 0x687f3584, 0x52a0e286,
+    0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec,
+    0x5716f2b8, 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,
+    0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 0xd19113f9,
+    0x7ca92ff6, 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc,
+    0xc8b57634, 0x9af3dda7, 0xa9446146, 0x0fd0030e, 0xecc8c73e,
+    0xa4751e41, 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,
+    0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, 0x2cb81290,
+    0x24977c79, 0x5679b072, 0xbcaf89af, 0xde9a771f, 0xd9930810,
+    0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124, 0x501adde6,
+    0x9f84cd87, 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
+    0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, 0xef1c1847,
+    0x3215d908, 0xdd433b37, 0x24c2ba16, 0x12a14d43, 0x2a65c451,
+    0x50940002, 0x133ae4dd, 0x71dff89e, 0x10314e55, 0x81ac77d6,
+    0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
+    0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570,
+    0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa,
+    0x2965dcb9, 0x99e71d0f, 0x803e89d6, 0x5266c825, 0x2e4cc978,
+    0x9c10b36a, 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4,
+    0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, 0x5223a708,
+    0xf71312b6, 0xebadfe6e, 0xeac31f66, 0xe3bc4595, 0xa67bc883,
+    0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 0x65582185,
+    0x68ab9802, 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
+    0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, 0x13cca830,
+    0xeb61bd96, 0x0334fe1e, 0xaa0363cf, 0xb5735c90, 0x4c70a239,
+    0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7, 0x9cab5cab,
+    0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,
+    0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, 0x9b540b19,
+    0x875fa099, 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77,
+    0x11ed935f, 0x16681281, 0x0e358829, 0xc7e61fd6, 0x96dedfa1,
+    0x7858ba99, 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,
+    0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, 0x58ebf2ef,
+    0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 0x5d4a14d9, 0xe864b7e3,
+    0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15,
+    0xfacb4fd0, 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
+    0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, 0xcf62a1f2,
+    0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, 0x7f1524c3, 0x69cb7492,
+    0x47848a0b, 0x5692b285, 0x095bbf00, 0xad19489d, 0x1462b174,
+    0x23820e00, 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,
+    0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759,
+    0xcbee7460, 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e,
+    0xe8efd855, 0x61d99735, 0xa969a7aa, 0xc50c06c2, 0x5a04abfc,
+    0x800bcadc, 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9,
+    0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, 0xc5c43465,
+    0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a,
+    0xe6e39f2b, 0xdb83adf7, 0xe93d5a68, 0x948140f7, 0xf64c261c,
+    0x94692934, 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,
+    0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, 0x1e39f62e,
+    0x97244546, 0x14214f74, 0xbf8b8840, 0x4d95fc1d, 0x96b591af,
+    0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0,
+    0x31cb8504, 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
+    0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, 0x68dc1462,
+    0xd7486900, 0x680ec0a4, 0x27a18dee, 0x4f3ffea2, 0xe887ad8c,
+    0xb58ce006, 0x7af4d6b6, 0xaace1e7c, 0xd3375fec, 0xce78a399,
+    0x406b2a42, 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
+    0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, 0x3a6efa74,
+    0xdd5b4332, 0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397,
+    0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7,
+    0xd096954b, 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33,
+    0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, 0xfdf8e802,
+    0x04272f70, 0x80bb155c, 0x05282ce3, 0x95c11548, 0xe4c66d22,
+    0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f, 0x404779a4,
+    0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,
+    0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2,
+    0x02e1329e, 0xaf664fd1, 0xcad18115, 0x6b2395e0, 0x333e92e1,
+    0x3b240b62, 0xeebeb922, 0x85b2a20e, 0xe6ba0d99, 0xde720c8c,
+    0x2da2f728, 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
+    0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, 0x0a476341,
+    0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8,
+    0x991be14c, 0xdb6e6b0d, 0xc67b5510, 0x6d672c37, 0x2765d43b,
+    0xdcd0e804, 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,
+    0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, 0xbb132f88,
+    0x515bad24, 0x7b9479bf, 0x763bd6eb, 0x37392eb3, 0xcc115979,
+    0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b, 0x12754ccc,
+    0x782ef11c, 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,
+    0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, 0x44421659,
+    0x0a121386, 0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f,
+    0xbebfe988, 0x64e4c3fe, 0x9dbc8057, 0xf0f7c086, 0x60787bf8,
+    0x6003604d, 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
+    0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, 0x77a057be,
+    0xbde8ae24, 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2,
+    0xf474ef38, 0x8789bdc2, 0x5366f9c3, 0xc8b38e74, 0xb475f255,
+    0x46fcd9b9, 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2,
+    0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, 0xb90bace1,
+    0xbb8205d0, 0x11a86248, 0x7574a99e, 0xb77f19b6, 0xe0a9dc09,
+    0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c, 0x4a99a025,
+    0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
+    0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01,
+    0xa70683fa, 0xa002b5c4, 0x0de6d027, 0x9af88c27, 0x773f8641,
+    0xc3604c06, 0x61a806b5, 0xf0177a28, 0xc0f586e0, 0x006058aa,
+    0x30dc7d62, 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
+    0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, 0x6f05e409,
+    0x4b7c0188, 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9,
+    0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5, 0xd83d7cd3,
+    0x4dad0fc4, 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,
+    0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 0xd79a3234,
+    0x92638212, 0x670efa8e, 0x406000e0, 0x3a39ce37, 0xd3faf5cf,
+    0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742, 0xd3822740,
+    0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
+    0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f,
+    0xbc946e79, 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d,
+    0xd5730a1d, 0x4cd04dc6, 0x2939bbdb, 0xa9ba4650, 0xac9526e8,
+    0xbe5ee304, 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,
+    0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, 0x83c061ba,
+    0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1,
+    0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69,
+    0x77fa0a59, 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593,
+    0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a,
+    0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, 0x1f9f25cf, 0xadf2b89b,
+    0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6, 0x47b0acfd,
+    0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
+    0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4,
+    0x88f46dba, 0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2,
+    0x97271aec, 0xa93a072a, 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb,
+    0x26dcf319, 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb,
+    0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, 0x4de81751,
+    0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce,
+    0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369,
+    0x6413e680, 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,
+    0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd,
+    0x1b588d40, 0xccd2017f, 0x6bb4e3bb, 0xdda26a7e, 0x3a59ff45,
+    0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb, 0x8d6612ae,
+    0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
+    0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08,
+    0x4eb4e2cc, 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d,
+    0x06b89fb4, 0xce6ea048, 0x6f3f3b82, 0x3520ab82, 0x011a1d4b,
+    0x277227f8, 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,
+    0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, 0xe01cc87e,
+    0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a,
+    0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c,
+    0xe0b12b4f, 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c,
+    0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, 0xfae59361,
+    0xceb69ceb, 0xc2a86459, 0x12baa8d1, 0xb6c1075e, 0xe3056a0c,
+    0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be,
+    0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
+    0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d,
+    0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891,
+    0xce6279cf, 0xcd3e7e6f, 0x1618b166, 0xfd2c1d05, 0x848fd2c5,
+    0xf6fb2299, 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02,
+    0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, 0xde966292,
+    0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a,
+    0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2,
+    0x35bdd2f6, 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,
+    0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, 0xba38209c,
+    0xf746ce76, 0x77afa1c5, 0x20756060, 0x85cbfe4e, 0x8ae88dd8,
+    0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c, 0x01c36ae4,
+    0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
+    0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6
+];
+
+/**
+ * @type {Array.<number>}
+ * @const
+ * @inner
+ */
+var C_ORIG = [
+    0x4f727068, 0x65616e42, 0x65686f6c, 0x64657253, 0x63727944,
+    0x6f756274
+];
+
+/**
+ * @param {Array.<number>} lr
+ * @param {number} off
+ * @param {Array.<number>} P
+ * @param {Array.<number>} S
+ * @returns {Array.<number>}
+ * @inner
+ */
+function _encipher(lr, off, P, S) { // This is our bottleneck: 1714/1905 ticks / 90% - see profile.txt
+    var n,
+        l = lr[off],
+        r = lr[off + 1];
+
+    l ^= P[0];
+    for (var i=0, k=BLOWFISH_NUM_ROUNDS-2; i<=k;)
+        // Feistel substitution on left word
+        n  = S[(l >> 24) & 0xff],
+        n += S[0x100 | ((l >> 16) & 0xff)],
+        n ^= S[0x200 | ((l >> 8) & 0xff)],
+        n += S[0x300 | (l & 0xff)],
+        r ^= n ^ P[++i],
+        // Feistel substitution on right word
+        n  = S[(r >> 24) & 0xff],
+        n += S[0x100 | ((r >> 16) & 0xff)],
+        n ^= S[0x200 | ((r >> 8) & 0xff)],
+        n += S[0x300 | (r & 0xff)],
+        l ^= n ^ P[++i];
+    lr[off] = r ^ P[BLOWFISH_NUM_ROUNDS + 1];
+    lr[off + 1] = l;
+    return lr;
+}
+
+/**
+ * @param {Array.<number>} data
+ * @param {number} offp
+ * @returns {{key: number, offp: number}}
+ * @inner
+ */
+function _streamtoword(data, offp) {
+    for (var i = 0, word = 0; i < 4; ++i)
+        word = (word << 8) | (data[offp] & 0xff),
+        offp = (offp + 1) % data.length;
+    return { key: word, offp: offp };
+}
+
+/**
+ * @param {Array.<number>} key
+ * @param {Array.<number>} P
+ * @param {Array.<number>} S
+ * @inner
+ */
+function _key(key, P, S) {
+    var offset = 0,
+        lr = [0, 0],
+        plen = P.length,
+        slen = S.length,
+        sw;
+    for (var i = 0; i < plen; i++)
+        sw = _streamtoword(key, offset),
+        offset = sw.offp,
+        P[i] = P[i] ^ sw.key;
+    for (i = 0; i < plen; i += 2)
+        lr = _encipher(lr, 0, P, S),
+        P[i] = lr[0],
+        P[i + 1] = lr[1];
+    for (i = 0; i < slen; i += 2)
+        lr = _encipher(lr, 0, P, S),
+        S[i] = lr[0],
+        S[i + 1] = lr[1];
+}
+
+/**
+ * Expensive key schedule Blowfish.
+ * @param {Array.<number>} data
+ * @param {Array.<number>} key
+ * @param {Array.<number>} P
+ * @param {Array.<number>} S
+ * @inner
+ */
+function _ekskey(data, key, P, S) {
+    var offp = 0,
+        lr = [0, 0],
+        plen = P.length,
+        slen = S.length,
+        sw;
+    for (var i = 0; i < plen; i++)
+        sw = _streamtoword(key, offp),
+        offp = sw.offp,
+        P[i] = P[i] ^ sw.key;
+    offp = 0;
+    for (i = 0; i < plen; i += 2)
+        sw = _streamtoword(data, offp),
+        offp = sw.offp,
+        lr[0] ^= sw.key,
+        sw = _streamtoword(data, offp),
+        offp = sw.offp,
+        lr[1] ^= sw.key,
+        lr = _encipher(lr, 0, P, S),
+        P[i] = lr[0],
+        P[i + 1] = lr[1];
+    for (i = 0; i < slen; i += 2)
+        sw = _streamtoword(data, offp),
+        offp = sw.offp,
+        lr[0] ^= sw.key,
+        sw = _streamtoword(data, offp),
+        offp = sw.offp,
+        lr[1] ^= sw.key,
+        lr = _encipher(lr, 0, P, S),
+        S[i] = lr[0],
+        S[i + 1] = lr[1];
+}
+
+/**
+ * Internaly crypts a string.
+ * @param {Array.<number>} b Bytes to crypt
+ * @param {Array.<number>} salt Salt bytes to use
+ * @param {number} rounds Number of rounds
+ * @param {function(Error, Array.<number>=)=} callback Callback receiving the error, if any, and the resulting bytes. If
+ *  omitted, the operation will be performed synchronously.
+ *  @param {function(number)=} progressCallback Callback called with the current progress
+ * @returns {!Array.<number>|undefined} Resulting bytes if callback has been omitted, otherwise `undefined`
+ * @inner
+ */
+function _crypt(b, salt, rounds, callback, progressCallback) {
+    var cdata = C_ORIG.slice(),
+        clen = cdata.length,
+        err;
+
+    // Validate
+    if (rounds < 4 || rounds > 31) {
+        err = Error("Illegal number of rounds (4-31): "+rounds);
+        if (callback) {
+            nextTick(callback.bind(this, err));
+            return;
+        } else
+            throw err;
+    }
+    if (salt.length !== BCRYPT_SALT_LEN) {
+        err =Error("Illegal salt length: "+salt.length+" != "+BCRYPT_SALT_LEN);
+        if (callback) {
+            nextTick(callback.bind(this, err));
+            return;
+        } else
+            throw err;
+    }
+    rounds = (1 << rounds) >>> 0;
+    var P = P_ORIG.slice(),
+        S = S_ORIG.slice(),
+        i = 0, j;
+    _ekskey(salt, b, P, S);
+
+    /**
+     * Calcualtes the next round.
+     * @returns {Array.<number>|undefined} Resulting array if callback has been omitted, otherwise `undefined`
+     * @inner
+     */
+    function next() {
+        if (progressCallback)
+            progressCallback(i / rounds);
+        if (i < rounds) {
+            var start = Date.now();
+            for (; i < rounds;) {
+                i = i + 1;
+                _key(b, P, S);
+                _key(salt, P, S);
+                if (Date.now() - start > MAX_EXECUTION_TIME)
+                    break;
+            }
+        } else {
+            for (i = 0; i < 64; i++)
+                for (j = 0; j < (clen >> 1); j++)
+                    _encipher(cdata, j << 1, P, S);
+            var ret = [];
+            for (i = 0; i < clen; i++)
+                ret.push(((cdata[i] >> 24) & 0xff) >>> 0),
+                ret.push(((cdata[i] >> 16) & 0xff) >>> 0),
+                ret.push(((cdata[i] >> 8) & 0xff) >>> 0),
+                ret.push((cdata[i] & 0xff) >>> 0);
+            if (callback) {
+                callback(null, ret);
+                return;
+            } else
+                return ret;
+        }
+        if (callback)
+            nextTick(next);
+    }
+
+    // Async
+    if (typeof callback !== 'undefined') {
+        next();
+
+        // Sync
+    } else {
+        var res;
+        while (true)
+            if (typeof(res = next()) !== 'undefined')
+                return res || [];
+    }
+}
+
+/**
+ * Internally hashes a string.
+ * @param {string} s String to hash
+ * @param {?string} salt Salt to use, actually never null
+ * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash. If omitted,
+ *  hashing is perormed synchronously.
+ *  @param {function(number)=} progressCallback Callback called with the current progress
+ * @returns {string|undefined} Resulting hash if callback has been omitted, otherwise `undefined`
+ * @inner
+ */
+function _hash(s, salt, callback, progressCallback) {
+    var err;
+    if (typeof s !== 'string' || typeof salt !== 'string') {
+        err = Error("Invalid string / salt: Not a string");
+        if (callback) {
+            nextTick(callback.bind(this, err));
+            return;
+        }
+        else
+            throw err;
+    }
+
+    // Validate the salt
+    var minor, offset;
+    if (salt.charAt(0) !== '$' || salt.charAt(1) !== '2') {
+        err = Error("Invalid salt version: "+salt.substring(0,2));
+        if (callback) {
+            nextTick(callback.bind(this, err));
+            return;
+        }
+        else
+            throw err;
+    }
+    if (salt.charAt(2) === '$')
+        minor = String.fromCharCode(0),
+        offset = 3;
+    else {
+        minor = salt.charAt(2);
+        if ((minor !== 'a' && minor !== 'b' && minor !== 'y') || salt.charAt(3) !== '$') {
+            err = Error("Invalid salt revision: "+salt.substring(2,4));
+            if (callback) {
+                nextTick(callback.bind(this, err));
+                return;
+            } else
+                throw err;
+        }
+        offset = 4;
+    }
+
+    // Extract number of rounds
+    if (salt.charAt(offset + 2) > '$') {
+        err = Error("Missing salt rounds");
+        if (callback) {
+            nextTick(callback.bind(this, err));
+            return;
+        } else
+            throw err;
+    }
+    var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10,
+        r2 = parseInt(salt.substring(offset + 1, offset + 2), 10),
+        rounds = r1 + r2,
+        real_salt = salt.substring(offset + 3, offset + 25);
+    s += minor >= 'a' ? "\x00" : "";
+
+    var passwordb = stringToBytes(s),
+        saltb = base64_decode(real_salt, BCRYPT_SALT_LEN);
+
+    /**
+     * Finishes hashing.
+     * @param {Array.<number>} bytes Byte array
+     * @returns {string}
+     * @inner
+     */
+    function finish(bytes) {
+        var res = [];
+        res.push("$2");
+        if (minor >= 'a')
+            res.push(minor);
+        res.push("$");
+        if (rounds < 10)
+            res.push("0");
+        res.push(rounds.toString());
+        res.push("$");
+        res.push(base64_encode(saltb, saltb.length));
+        res.push(base64_encode(bytes, C_ORIG.length * 4 - 1));
+        return res.join('');
+    }
+
+    // Sync
+    if (typeof callback == 'undefined')
+        return finish(_crypt(passwordb, saltb, rounds));
+
+    // Async
+    else {
+        _crypt(passwordb, saltb, rounds, function(err, bytes) {
+            if (err)
+                callback(err, null);
+            else
+                callback(null, finish(bytes));
+        }, progressCallback);
+    }
+}

+ 5 - 0
node_modules/bcryptjs/src/bcrypt/prng/README.md

@@ -0,0 +1,5 @@
+Because of [reasonable security doubts](https://github.com/dcodeIO/bcrypt.js/issues/16), these files, which used to be
+a part of bcrypt-isaac.js, are no longer used but are kept here for reference only.
+
+What is required instead is a proper way to collect entropy sources (using an intermediate stream cipher) which is then
+used to seed the CSPRNG. Pick one and use `bcrypt.setRandomFallback` instead.

+ 133 - 0
node_modules/bcryptjs/src/bcrypt/prng/accum.js

@@ -0,0 +1,133 @@
+/* basic entropy accumulator */
+var accum = (function() {
+
+    var pool,    // randomness pool
+        time,    // start timestamp
+        last;    // last step timestamp
+
+    /* initialize with default pool */
+    function init() {
+        pool = [];
+        time = new Date().getTime();
+        last = time;
+        // use Math.random
+        pool.push((Math.random() * 0xffffffff)|0);
+        // use current time
+        pool.push(time|0);
+    }
+
+    /* perform one step */
+    function step() {
+        if (!to)
+            return;
+        if (pool.length >= 255) { // stop at 255 values (1 more is added on fetch)
+            stop();
+            return;
+        }
+        var now = new Date().getTime();
+        // use actual time difference
+        pool.push(now-last);
+        // always compute, occasionally use Math.random
+        var rnd = (Math.random() * 0xffffffff)|0;
+        if (now % 2)
+            pool[pool.length-1] += rnd;
+        last = now;
+        to = setTimeout(step, 100+Math.random()*512); // use hypothetical time difference
+    }
+
+    var to = null;
+
+    /* starts accumulating */
+    function start() {
+        if (to) return;
+        to = setTimeout(step, 100+Math.random()*512);
+        if (console.log)
+            console.log("bcrypt-isaac: collecting entropy...");
+        // install collectors
+        if (typeof window !== 'undefined' && window && window.addEventListener)
+            window.addEventListener("load", loadCollector, false),
+            window.addEventListener("mousemove", mouseCollector, false),
+            window.addEventListener("touchmove", touchCollector, false);
+        else if (typeof document !== 'undefined' && document && document.attachEvent)
+            document.attachEvent("onload", loadCollector),
+            document.attachEvent("onmousemove", mouseCollector);
+    }
+
+    /* stops accumulating */
+    function stop() {
+        if (!to) return;
+        clearTimeout(to); to = null;
+        // uninstall collectors
+        if (typeof window !== 'undefined' && window && window.removeEventListener)
+            window.removeEventListener("load", loadCollector, false),
+            window.removeEventListener("mousemove", mouseCollector, false),
+            window.removeEventListener("touchmove", touchCollector, false);
+        else if (typeof document !== 'undefined' && document && document.detachEvent)
+            document.detachEvent("onload", loadCollector),
+            document.detachEvent("onmousemove", mouseCollector);
+    }
+
+    /* fetches the randomness pool */
+    function fetch() {
+        // add overall time difference
+        pool.push((new Date().getTime()-time)|0);
+        var res = pool;
+        init();
+        if (console.log)
+            console.log("bcrypt-isaac: using "+res.length+"/256 samples of entropy");
+        // console.log(res);
+        return res;
+    }
+
+    /* adds the current time to the top of the pool */
+    function addTime() {
+        pool[pool.length-1] += new Date().getTime() - time;
+    }
+
+    /* page load collector */
+    function loadCollector() {
+        if (!to || pool.length >= 255)
+            return;
+        pool.push(0);
+        addTime();
+    }
+
+    /* mouse events collector */
+    function mouseCollector(ev) {
+        if (!to || pool.length >= 255)
+            return;
+        try {
+            var x = ev.x || ev.clientX || ev.offsetX || 0,
+                y = ev.y || ev.clientY || ev.offsetY || 0;
+            if (x != 0 || y != 0)
+                pool[pool.length-1] += ((x-mouseCollector.last[0]) ^ (y-mouseCollector.last[1])),
+                addTime(),
+                mouseCollector.last = [x,y];
+        } catch (e) {}
+    }
+    mouseCollector.last = [0,0];
+
+    /* touch events collector */
+    function touchCollector(ev) {
+        if (!to || pool.length >= 255)
+            return;
+        try {
+            var touch = ev.touches[0] || ev.changedTouches[0];
+            var x = touch.pageX || touch.clientX || 0,
+                y = touch.pageY || touch.clientY || 0;
+            if (x != 0 || y != 0)
+                pool[pool.length-1] += (x-touchCollector.last[0]) ^ (y-touchCollector.last[1]),
+                addTime(),
+                touchCollector.last = [x,y];
+        } catch (e) {}
+    }
+    touchCollector.last = [0,0];
+
+    init();
+    return {
+        "start": start,
+        "stop": stop,
+        "fetch": fetch
+    }
+
+})();

+ 140 - 0
node_modules/bcryptjs/src/bcrypt/prng/isaac.js

@@ -0,0 +1,140 @@
+/*
+ isaac.js Copyright (c) 2012 Yves-Marie K. Rinquin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+ 
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/* isaac module pattern */
+var isaac = (function(){
+
+    /* internal states */
+    var m = Array(256), // internal memory
+        acc = 0,        // accumulator
+        brs = 0,        // last result
+        cnt = 0,        // counter
+        r = Array(256), // result array
+        gnt = 0,        // generation counter
+        isd = false;    // initially seeded
+
+
+    /* 32-bit integer safe adder */
+    function add(x, y) {
+        var lsb = (x & 0xffff) + (y & 0xffff),
+            msb = (x >>>   16) + (y >>>   16) + (lsb >>> 16);
+        return (msb << 16) | (lsb & 0xffff);
+    }
+
+    /* initialisation */
+    function reset() {
+        acc = brs = cnt = 0;
+        for (var i = 0; i < 256; ++i)
+            m[i] = r[i] = 0;
+        gnt = 0;
+    }
+
+    /* seeding function */
+    function seed(s) {
+        var a, b, c, d, e, f, g, h, i;
+
+        /* seeding the seeds of love */
+        a = b = c = d = e = f = g = h = 0x9e3779b9; /* the golden ratio */
+
+        if (s && typeof(s) === 'number')
+            s = [s];
+
+        if (s instanceof Array) {
+            reset();
+            for (i = 0; i < s.length; ++i)
+                r[i & 0xff] += typeof(s[i]) === 'number' ? s[i] : 0;
+        }
+
+        /* private: seed mixer */
+        function seed_mix() {
+            a ^= b <<  11; d = add(d, a); b = add(b, c);
+            b ^= c >>>  2; e = add(e, b); c = add(c, d);
+            c ^= d <<   8; f = add(f, c); d = add(d, e);
+            d ^= e >>> 16; g = add(g, d); e = add(e, f);
+            e ^= f <<  10; h = add(h, e); f = add(f, g);
+            f ^= g >>>  4; a = add(a, f); g = add(g, h);
+            g ^= h <<   8; b = add(b, g); h = add(h, a);
+            h ^= a >>>  9; c = add(c, h); a = add(a, b);
+        }
+
+        for (i = 0; i < 4; i++) /* scramble it */
+            seed_mix();
+
+        for (i = 0; i < 256; i += 8) {
+            if (s) /* use all the information in the seed */
+                a = add(a, r[i + 0]), b = add(b, r[i + 1]),
+                c = add(c, r[i + 2]), d = add(d, r[i + 3]),
+                e = add(e, r[i + 4]), f = add(f, r[i + 5]),
+                g = add(g, r[i + 6]), h = add(h, r[i + 7]);
+            seed_mix();
+            /* fill in m[] with messy stuff */
+            m[i + 0] = a; m[i + 1] = b; m[i + 2] = c; m[i + 3] = d;
+            m[i + 4] = e; m[i + 5] = f; m[i + 6] = g; m[i + 7] = h;
+        }
+        if (s)
+            /* do a second pass to make all of the seed affect all of m[] */
+            for (i = 0; i < 256; i += 8)
+                a = add(a, m[i + 0]), b = add(b, m[i + 1]),
+                c = add(c, m[i + 2]), d = add(d, m[i + 3]),
+                e = add(e, m[i + 4]), f = add(f, m[i + 5]),
+                g = add(g, m[i + 6]), h = add(h, m[i + 7]),
+                seed_mix(),
+                /* fill in m[] with messy stuff (again) */
+                m[i + 0] = a, m[i + 1] = b, m[i + 2] = c, m[i + 3] = d,
+                m[i + 4] = e, m[i + 5] = f, m[i + 6] = g, m[i + 7] = h;
+        prng(); /* fill in the first set of results */
+        gnt = 256;  /* prepare to use the first set of results */;
+    }
+
+    /* isaac generator, n = number of run */
+    function prng(n) {
+        var i, x, y;
+        n = n && typeof(n) === 'number' ? Math.abs(Math.floor(n)) : 1;
+        while (n--) {
+            cnt = add(cnt,   1);
+            brs = add(brs, cnt);
+            for(i = 0; i < 256; i++) {
+                switch(i & 3) {
+                    case 0: acc ^= acc <<  13; break;
+                    case 1: acc ^= acc >>>  6; break;
+                    case 2: acc ^= acc <<   2; break;
+                    case 3: acc ^= acc >>> 16; break;
+                }
+                acc        = add(m[(i +  128) & 0xff], acc); x = m[i];
+                m[i] =   y = add(m[(x >>>  2) & 0xff], add(acc, brs));
+                r[i] = brs = add(m[(y >>> 10) & 0xff], x);
+            }
+        }
+    }
+
+    /* return a random number between */
+    return function() {
+        if (!isd) // seed from accumulator
+            isd = true,
+            accum.stop(),
+            seed(accum.fetch());
+        if (!gnt--)
+            prng(), gnt = 255;
+        return r[gnt];
+    };
+})();

+ 33 - 0
node_modules/bcryptjs/src/bcrypt/util.js

@@ -0,0 +1,33 @@
+/**
+ * Continues with the callback on the next tick.
+ * @function
+ * @param {function(...[*])} callback Callback to execute
+ * @inner
+ */
+var nextTick = typeof process !== 'undefined' && process && typeof process.nextTick === 'function'
+    ? (typeof setImmediate === 'function' ? setImmediate : process.nextTick)
+    : setTimeout;
+
+/**
+ * Converts a JavaScript string to UTF8 bytes.
+ * @param {string} str String
+ * @returns {!Array.<number>} UTF8 bytes
+ * @inner
+ */
+function stringToBytes(str) {
+    var out = [],
+        i = 0;
+    utfx.encodeUTF16toUTF8(function() {
+        if (i >= str.length) return null;
+        return str.charCodeAt(i++);
+    }, function(b) {
+        out.push(b);
+    });
+    return out;
+}
+
+//? include("util/base64.js");
+
+//? include("../../node_modules/utfx/dist/utfx-embeddable.js");
+
+Date.now = Date.now || function() { return +new Date; }; 

+ 115 - 0
node_modules/bcryptjs/src/bcrypt/util/base64.js

@@ -0,0 +1,115 @@
+// A base64 implementation for the bcrypt algorithm. This is partly non-standard.
+
+/**
+ * bcrypt's own non-standard base64 dictionary.
+ * @type {!Array.<string>}
+ * @const
+ * @inner
+ **/
+var BASE64_CODE = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split('');
+
+/**
+ * @type {!Array.<number>}
+ * @const
+ * @inner
+ **/
+var BASE64_INDEX = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
+    1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, -1, -1, -1, -1, -1,
+    -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+    20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, 28, 29, 30,
+    31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+    48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1];
+
+/**
+ * @type {!function(...number):string}
+ * @inner
+ */
+var stringFromCharCode = String.fromCharCode;
+
+/**
+ * Encodes a byte array to base64 with up to len bytes of input.
+ * @param {!Array.<number>} b Byte array
+ * @param {number} len Maximum input length
+ * @returns {string}
+ * @inner
+ */
+function base64_encode(b, len) {
+    var off = 0,
+        rs = [],
+        c1, c2;
+    if (len <= 0 || len > b.length)
+        throw Error("Illegal len: "+len);
+    while (off < len) {
+        c1 = b[off++] & 0xff;
+        rs.push(BASE64_CODE[(c1 >> 2) & 0x3f]);
+        c1 = (c1 & 0x03) << 4;
+        if (off >= len) {
+            rs.push(BASE64_CODE[c1 & 0x3f]);
+            break;
+        }
+        c2 = b[off++] & 0xff;
+        c1 |= (c2 >> 4) & 0x0f;
+        rs.push(BASE64_CODE[c1 & 0x3f]);
+        c1 = (c2 & 0x0f) << 2;
+        if (off >= len) {
+            rs.push(BASE64_CODE[c1 & 0x3f]);
+            break;
+        }
+        c2 = b[off++] & 0xff;
+        c1 |= (c2 >> 6) & 0x03;
+        rs.push(BASE64_CODE[c1 & 0x3f]);
+        rs.push(BASE64_CODE[c2 & 0x3f]);
+    }
+    return rs.join('');
+}
+
+/**
+ * Decodes a base64 encoded string to up to len bytes of output.
+ * @param {string} s String to decode
+ * @param {number} len Maximum output length
+ * @returns {!Array.<number>}
+ * @inner
+ */
+function base64_decode(s, len) {
+    var off = 0,
+        slen = s.length,
+        olen = 0,
+        rs = [],
+        c1, c2, c3, c4, o, code;
+    if (len <= 0)
+        throw Error("Illegal len: "+len);
+    while (off < slen - 1 && olen < len) {
+        code = s.charCodeAt(off++);
+        c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+        code = s.charCodeAt(off++);
+        c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+        if (c1 == -1 || c2 == -1)
+            break;
+        o = (c1 << 2) >>> 0;
+        o |= (c2 & 0x30) >> 4;
+        rs.push(stringFromCharCode(o));
+        if (++olen >= len || off >= slen)
+            break;
+        code = s.charCodeAt(off++);
+        c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+        if (c3 == -1)
+            break;
+        o = ((c2 & 0x0f) << 4) >>> 0;
+        o |= (c3 & 0x3c) >> 2;
+        rs.push(stringFromCharCode(o));
+        if (++olen >= len || off >= slen)
+            break;
+        code = s.charCodeAt(off++);
+        c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+        o = ((c3 & 0x03) << 6) >>> 0;
+        o |= c4;
+        rs.push(stringFromCharCode(o));
+        ++olen;
+    }
+    var res = [];
+    for (off = 0; off<olen; off++)
+        res.push(rs[off].charCodeAt(0));
+    return res;
+}

+ 22 - 0
node_modules/bcryptjs/src/bower.json

@@ -0,0 +1,22 @@
+{
+    "name": "bcryptjs",
+    "description": "Optimized bcrypt in plain JavaScript with zero dependencies.",
+    "version": /*?== VERSION */,
+    "main": "dist/bcrypt-isaac.js",
+    "license": "New-BSD",
+    "homepage": "http://dcode.io/",
+    "repository": {
+        "type": "git",
+        "url": "git://github.com/dcodeIO/bcrypt.js.git"
+    },
+    "keywords": ["bcrypt", "password", "auth", "authentication", "encryption", "crypt", "crypto"],
+    "dependencies": {},
+    "devDependencies": {},
+    "ignore": [
+        "**/.*",
+        "node_modules",
+        "bower_components",
+        "test",
+        "tests"
+    ]
+}

+ 50 - 0
node_modules/bcryptjs/src/wrap.js

@@ -0,0 +1,50 @@
+//? if (typeof ISAAC === 'undefined') ISAAC = false;
+/*
+ Copyright (c) 2012 Nevins Bartolomeo <nevins.bartolomeo@gmail.com>
+ Copyright (c) 2012 Shane Girish <shaneGirish@gmail.com>
+ Copyright (c) 2014 Daniel Wirtz <dcode@dcode.io>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+/**
+ * @license bcrypt.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
+ * Released under the Apache License, Version 2.0
+ * see: https://github.com/dcodeIO/bcrypt.js for details
+ */
+(function(global, factory) {
+
+    /* AMD */ if (typeof define === 'function' && define["amd"])
+        define([], factory);
+    /* CommonJS */ else if (typeof require === 'function' && typeof module === "object" && module && module["exports"])
+        module["exports"] = factory();
+    /* Global */ else
+        (global["dcodeIO"] = global["dcodeIO"] || {})["bcrypt"] = factory();
+
+}(this, function() {
+    "use strict";
+
+    //? include("bcrypt.js");
+
+    return bcrypt;
+}));

+ 150 - 0
node_modules/bcryptjs/tests/quickbrown.txt

@@ -0,0 +1,150 @@
+Sentences that contain all letters commonly used in a language
+--------------------------------------------------------------
+
+Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> -- 2012-04-11
+
+This is an example of a plain-text file encoded in UTF-8.
+
+
+Danish (da)
+---------
+
+  Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen
+  Wolther spillede på xylofon.
+  (= Quiz contestants were eating strawbery with cream while Wolther
+  the circus clown played on xylophone.)
+
+German (de)
+-----------
+
+  Falsches Üben von Xylophonmusik quält jeden größeren Zwerg
+  (= Wrongful practicing of xylophone music tortures every larger dwarf)
+
+  Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich
+  (= Twelve boxing fighters hunted Eva across the dike of Sylt)
+
+  Heizölrückstoßabdämpfung
+  (= fuel oil recoil absorber)
+  (jqvwxy missing, but all non-ASCII letters in one word)
+
+Greek (el)
+----------
+
+  Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο
+  (= No more shall I see acacias or myrtles in the golden clearing)
+
+  Ξεσκεπάζω τὴν ψυχοφθόρα βδελυγμία
+  (= I uncover the soul-destroying abhorrence)
+
+English (en)
+------------
+
+  The quick brown fox jumps over the lazy dog
+
+Spanish (es)
+------------
+
+  El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y 
+  frío, añoraba a su querido cachorro.
+  (Contains every letter and every accent, but not every combination
+  of vowel + acute.)
+
+French (fr)
+-----------
+
+  Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à
+  côté de l'alcôve ovoïde, où les bûches se consument dans l'âtre, ce
+  qui lui permet de penser à la cænogenèse de l'être dont il est question
+  dans la cause ambiguë entendue à Moÿ, dans un capharnaüm qui,
+  pense-t-il, diminue çà et là la qualité de son œuvre. 
+
+  l'île exiguë
+  Où l'obèse jury mûr
+  Fête l'haï volapük,
+  Âne ex aéquo au whist,
+  Ôtez ce vœu déçu.
+
+  Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en
+  canoë au delà des îles, près du mälström où brûlent les novæ.
+
+Irish Gaelic (ga)
+-----------------
+
+  D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh
+
+Hungarian (hu)
+--------------
+
+  Árvíztűrő tükörfúrógép
+  (= flood-proof mirror-drilling machine, only all non-ASCII letters)
+
+Icelandic (is)
+--------------
+
+  Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa
+
+  Sævör grét áðan því úlpan var ónýt
+  (some ASCII letters missing)
+
+Japanese (jp)
+-------------
+
+  Hiragana: (Iroha)
+
+  いろはにほへとちりぬるを
+  わかよたれそつねならむ
+  うゐのおくやまけふこえて
+  あさきゆめみしゑひもせす
+
+  Katakana:
+
+  イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム
+  ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン
+
+Hebrew (iw)
+-----------
+
+  ? דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה
+
+Polish (pl)
+-----------
+
+  Pchnąć w tę łódź jeża lub ośm skrzyń fig
+  (= To push a hedgehog or eight bins of figs in this boat)
+
+Russian (ru)
+------------
+
+  В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!
+  (= Would a citrus live in the bushes of south? Yes, but only a fake one!)
+
+  Съешь же ещё этих мягких французских булок да выпей чаю
+  (= Eat some more of these fresh French loafs and have some tea) 
+
+Thai (th)
+---------
+
+  [--------------------------|------------------------]
+  ๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า  กว่าบรรดาฝูงสัตว์เดรัจฉาน
+  จงฝ่าฟันพัฒนาวิชาการ           อย่าล้างผลาญฤๅเข่นฆ่าบีฑาใคร
+  ไม่ถือโทษโกรธแช่งซัดฮึดฮัดด่า     หัดอภัยเหมือนกีฬาอัชฌาสัย
+  ปฏิบัติประพฤติกฎกำหนดใจ        พูดจาให้จ๊ะๆ จ๋าๆ น่าฟังเอย ฯ
+
+  [The copyright for the Thai example is owned by The Computer
+  Association of Thailand under the Royal Patronage of His Majesty the
+  King.]
+
+Turkish (tr)
+------------
+
+  Pijamalı hasta, yağız şoföre çabucak güvendi.
+  (=Patient with pajamas, trusted swarthy driver quickly)
+
+
+Special thanks to the people from all over the world who contributed
+these sentences since 1999.
+
+A much larger collection of such pangrams is now available at
+
+  http://en.wikipedia.org/wiki/List_of_pangrams
+

+ 170 - 0
node_modules/bcryptjs/tests/suite.js

@@ -0,0 +1,170 @@
+var path = require("path"),
+    fs = require("fs"),
+    binding = require("bcrypt"),
+    bcrypt = require(path.join(__dirname, '..', 'index.js'))/*,
+    isaac = eval(
+        fs.readFileSync(path.join(__dirname, "..", "src", "bcrypt", "prng", "accum.js"))+
+        fs.readFileSync(path.join(__dirname, "..", "src", "bcrypt", "prng", "isaac.js"))+
+        " accum.start();"+
+        " isaac"
+    )*/;
+    
+module.exports = {
+
+    "encodeBase64": function(test) {
+        var str = bcrypt.encodeBase64([0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10], 16);
+        test.strictEqual(str, "..CA.uOD/eaGAOmJB.yMBu");
+        test.done();
+    },
+
+    "decodeBase64": function(test) {
+        var bytes = bcrypt.decodeBase64("..CA.uOD/eaGAOmJB.yMBv.", 16);
+        test.deepEqual(bytes, [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F]);
+        test.done();
+    },
+    
+    "genSaltSync": function(test) {
+        var salt = bcrypt.genSaltSync(10);
+        test.ok(salt);
+        test.ok(typeof salt == 'string');
+        test.ok(salt.length > 0);
+        test.done();
+    },
+    
+    "genSalt": function(test) {
+        bcrypt.genSalt(10, function(err, salt) {
+            test.ok(salt);
+            test.ok(typeof salt == 'string');
+            test.ok(salt.length > 0);
+            test.done();
+        });
+    },
+    
+    "hashSync": function(test) {
+        test.doesNotThrow(function() {
+            bcrypt.hashSync("hello", 10);
+        });
+        test.notEqual(bcrypt.hashSync("hello", 10), bcrypt.hashSync("hello", 10));
+        test.done();
+    },
+    
+    "hash": function(test) {
+        bcrypt.hash("hello", 10, function(err, hash) {
+            test.notOk(err);
+            test.ok(hash);
+            test.done();
+        });
+    },
+    
+    "compareSync": function(test) {
+        var salt1 = bcrypt.genSaltSync(),
+            hash1 = bcrypt.hashSync("hello", salt1); // $2a$
+        var salt2 = bcrypt.genSaltSync().replace(/\$2a\$/, "$2y$"),
+            hash2 = bcrypt.hashSync("world", salt2);
+        var salt3 = bcrypt.genSaltSync().replace(/\$2a\$/, "$2b$"),
+            hash3 = bcrypt.hashSync("hello world", salt3);
+
+        test.strictEqual(hash1.substring(0,4), "$2a$");
+        test.ok(bcrypt.compareSync("hello", hash1));
+        test.notOk(bcrypt.compareSync("hello", hash2));
+        test.notOk(bcrypt.compareSync("hello", hash3));
+
+        test.strictEqual(hash2.substring(0,4), "$2y$");
+        test.ok(bcrypt.compareSync("world", hash2));
+        test.notOk(bcrypt.compareSync("world", hash1));
+        test.notOk(bcrypt.compareSync("world", hash3));
+
+        test.strictEqual(hash3.substring(0,4), "$2b$");
+        test.ok(bcrypt.compareSync("hello world", hash3));
+        test.notOk(bcrypt.compareSync("hello world", hash1));
+        test.notOk(bcrypt.compareSync("hello world", hash2));
+
+        test.done();
+    },
+    
+    "compare": function(test) {
+        var salt1 = bcrypt.genSaltSync(),
+            hash1 = bcrypt.hashSync("hello", salt1); // $2a$
+        var salt2 = bcrypt.genSaltSync();
+        salt2 = salt2.substring(0,2)+'y'+salt2.substring(3); // $2y$
+        var hash2 = bcrypt.hashSync("world", salt2);
+        bcrypt.compare("hello", hash1, function(err, same) {
+            test.notOk(err);
+            test.ok(same);
+            bcrypt.compare("hello", hash2, function(err, same) {
+                test.notOk(err);
+                test.notOk(same);
+                bcrypt.compare("world", hash2, function(err, same) {
+                    test.notOk(err);
+                    test.ok(same);
+                    bcrypt.compare("world", hash1, function(err, same) {
+                        test.notOk(err);
+                        test.notOk(same);
+                        test.done();
+                    });
+                });
+            });
+        });
+    },
+    
+    "getSalt": function(test) {
+        var hash1 = bcrypt.hashSync("hello", bcrypt.genSaltSync());
+        var salt = bcrypt.getSalt(hash1);
+        var hash2 = bcrypt.hashSync("hello", salt);
+        test.equal(hash1, hash2);
+        test.done();
+    },
+    
+    "getRounds": function(test) {
+        var hash1 = bcrypt.hashSync("hello", bcrypt.genSaltSync());
+        test.equal(bcrypt.getRounds(hash1), 10);
+        test.done();
+    },
+   
+    "progress": function(test) {
+        bcrypt.genSalt(12, function(err, salt) {
+            test.ok(!err);
+            var progress = [];
+            bcrypt.hash("hello world", salt, function(err, hash) {
+                test.ok(!err);
+                test.ok(typeof hash === 'string');
+                test.ok(progress.length >= 2);
+                test.strictEqual(progress[0], 0);
+                test.strictEqual(progress[progress.length-1], 1);
+                test.done();
+            }, function(n) {
+                progress.push(n);
+            });
+        });
+    },
+
+    "compat": {
+        "quickbrown": function(test) {
+            var pass = fs.readFileSync(path.join(__dirname, "quickbrown.txt"))+"",
+                salt = bcrypt.genSaltSync(),
+                hash1 = binding.hashSync(pass, salt),
+                hash2 = bcrypt.hashSync(pass, salt);
+            test.equal(hash1, hash2);
+            test.done();
+        },
+
+        "roundsOOB": function(test) {
+            var salt1 = bcrypt.genSaltSync(0), // $10$ like not set
+                salt2 = binding.genSaltSync(0);
+            test.strictEqual(salt1.substring(0, 7), "$2a$10$");
+            test.strictEqual(salt2.substring(0, 7), "$2a$10$");
+
+            salt1 = bcrypt.genSaltSync(3); // $04$ is lower cap
+            salt2 = bcrypt.genSaltSync(3);
+            test.strictEqual(salt1.substring(0, 7), "$2a$04$");
+            test.strictEqual(salt2.substring(0, 7), "$2a$04$");
+
+            salt1 = bcrypt.genSaltSync(32); // $31$ is upper cap
+            salt2 = bcrypt.genSaltSync(32);
+            test.strictEqual(salt1.substring(0, 7), "$2a$31$");
+            test.strictEqual(salt2.substring(0, 7), "$2a$31$");
+
+            test.done();
+        }
+    }
+};

+ 97 - 0
node_modules/bindings/README.md

@@ -0,0 +1,97 @@
+node-bindings
+=============
+### Helper module for loading your native module's .node file
+
+This is a helper module for authors of Node.js native addon modules.
+It is basically the "swiss army knife" of `require()`ing your native module's
+`.node` file.
+
+Throughout the course of Node's native addon history, addons have ended up being
+compiled in a variety of different places, depending on which build tool and which
+version of node was used. To make matters worse, now the _gyp_ build tool can
+produce either a _Release_ or _Debug_ build, each being built into different
+locations.
+
+This module checks _all_ the possible locations that a native addon would be built
+at, and returns the first one that loads successfully.
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install bindings
+```
+
+Or add it to the `"dependencies"` section of your _package.json_ file.
+
+
+Example
+-------
+
+`require()`ing the proper bindings file for the current node version, platform
+and architecture is as simple as:
+
+``` js
+var bindings = require('bindings')('binding.node')
+
+// Use your bindings defined in your C files
+bindings.your_c_function()
+```
+
+
+Nice Error Output
+-----------------
+
+When the `.node` file could not be loaded, `node-bindings` throws an Error with
+a nice error message telling you exactly what was tried. You can also check the
+`err.tries` Array property.
+
+```
+Error: Could not load the bindings file. Tried:
+ → /Users/nrajlich/ref/build/binding.node
+ → /Users/nrajlich/ref/build/Debug/binding.node
+ → /Users/nrajlich/ref/build/Release/binding.node
+ → /Users/nrajlich/ref/out/Debug/binding.node
+ → /Users/nrajlich/ref/Debug/binding.node
+ → /Users/nrajlich/ref/out/Release/binding.node
+ → /Users/nrajlich/ref/Release/binding.node
+ → /Users/nrajlich/ref/build/default/binding.node
+ → /Users/nrajlich/ref/compiled/0.8.2/darwin/x64/binding.node
+    at bindings (/Users/nrajlich/ref/node_modules/bindings/bindings.js:84:13)
+    at Object.<anonymous> (/Users/nrajlich/ref/lib/ref.js:5:47)
+    at Module._compile (module.js:449:26)
+    at Object.Module._extensions..js (module.js:467:10)
+    at Module.load (module.js:356:32)
+    at Function.Module._load (module.js:312:12)
+    ...
+```
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2012 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 166 - 0
node_modules/bindings/bindings.js

@@ -0,0 +1,166 @@
+
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs')
+  , path = require('path')
+  , join = path.join
+  , dirname = path.dirname
+  , exists = fs.existsSync || path.existsSync
+  , defaults = {
+        arrow: process.env.NODE_BINDINGS_ARROW || ' → '
+      , compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled'
+      , platform: process.platform
+      , arch: process.arch
+      , version: process.versions.node
+      , bindings: 'bindings.node'
+      , try: [
+          // node-gyp's linked version in the "build" dir
+          [ 'module_root', 'build', 'bindings' ]
+          // node-waf and gyp_addon (a.k.a node-gyp)
+        , [ 'module_root', 'build', 'Debug', 'bindings' ]
+        , [ 'module_root', 'build', 'Release', 'bindings' ]
+          // Debug files, for development (legacy behavior, remove for node v0.9)
+        , [ 'module_root', 'out', 'Debug', 'bindings' ]
+        , [ 'module_root', 'Debug', 'bindings' ]
+          // Release files, but manually compiled (legacy behavior, remove for node v0.9)
+        , [ 'module_root', 'out', 'Release', 'bindings' ]
+        , [ 'module_root', 'Release', 'bindings' ]
+          // Legacy from node-waf, node <= 0.4.x
+        , [ 'module_root', 'build', 'default', 'bindings' ]
+          // Production "Release" buildtype binary (meh...)
+        , [ 'module_root', 'compiled', 'version', 'platform', 'arch', 'bindings' ]
+        ]
+    }
+
+/**
+ * The main `bindings()` function loads the compiled bindings for a given module.
+ * It uses V8's Error API to determine the parent filename that this function is
+ * being invoked from, which is then used to find the root directory.
+ */
+
+function bindings (opts) {
+
+  // Argument surgery
+  if (typeof opts == 'string') {
+    opts = { bindings: opts }
+  } else if (!opts) {
+    opts = {}
+  }
+  opts.__proto__ = defaults
+
+  // Get the module root
+  if (!opts.module_root) {
+    opts.module_root = exports.getRoot(exports.getFileName())
+  }
+
+  // Ensure the given bindings name ends with .node
+  if (path.extname(opts.bindings) != '.node') {
+    opts.bindings += '.node'
+  }
+
+  var tries = []
+    , i = 0
+    , l = opts.try.length
+    , n
+    , b
+    , err
+
+  for (; i<l; i++) {
+    n = join.apply(null, opts.try[i].map(function (p) {
+      return opts[p] || p
+    }))
+    tries.push(n)
+    try {
+      b = opts.path ? require.resolve(n) : require(n)
+      if (!opts.path) {
+        b.path = n
+      }
+      return b
+    } catch (e) {
+      if (!/not find/i.test(e.message)) {
+        throw e
+      }
+    }
+  }
+
+  err = new Error('Could not locate the bindings file. Tried:\n'
+    + tries.map(function (a) { return opts.arrow + a }).join('\n'))
+  err.tries = tries
+  throw err
+}
+module.exports = exports = bindings
+
+
+/**
+ * Gets the filename of the JavaScript file that invokes this function.
+ * Used to help find the root directory of a module.
+ * Optionally accepts an filename argument to skip when searching for the invoking filename
+ */
+
+exports.getFileName = function getFileName (calling_file) {
+  var origPST = Error.prepareStackTrace
+    , origSTL = Error.stackTraceLimit
+    , dummy = {}
+    , fileName
+
+  Error.stackTraceLimit = 10
+
+  Error.prepareStackTrace = function (e, st) {
+    for (var i=0, l=st.length; i<l; i++) {
+      fileName = st[i].getFileName()
+      if (fileName !== __filename) {
+        if (calling_file) {
+            if (fileName !== calling_file) {
+              return
+            }
+        } else {
+          return
+        }
+      }
+    }
+  }
+
+  // run the 'prepareStackTrace' function above
+  Error.captureStackTrace(dummy)
+  dummy.stack
+
+  // cleanup
+  Error.prepareStackTrace = origPST
+  Error.stackTraceLimit = origSTL
+
+  return fileName
+}
+
+/**
+ * Gets the root directory of a module, given an arbitrary filename
+ * somewhere in the module tree. The "root directory" is the directory
+ * containing the `package.json` file.
+ *
+ *   In:  /home/nate/node-native-module/lib/index.js
+ *   Out: /home/nate/node-native-module
+ */
+
+exports.getRoot = function getRoot (file) {
+  var dir = dirname(file)
+    , prev
+  while (true) {
+    if (dir === '.') {
+      // Avoids an infinite loop in rare cases, like the REPL
+      dir = process.cwd()
+    }
+    if (exists(join(dir, 'package.json')) || exists(join(dir, 'node_modules'))) {
+      // Found the 'package.json' file or 'node_modules' dir; we're done
+      return dir
+    }
+    if (prev === dir) {
+      // Got to the top
+      throw new Error('Could not find module root given file: "' + file
+                    + '". Do you have a `package.json` file? ')
+    }
+    // Try the parent dir next
+    prev = dir
+    dir = join(dir, '..')
+  }
+}

+ 92 - 0
node_modules/bindings/package.json

@@ -0,0 +1,92 @@
+{
+  "_args": [
+    [
+      {
+        "raw": "bindings@1.2.1",
+        "scope": null,
+        "escapedName": "bindings",
+        "name": "bindings",
+        "rawSpec": "1.2.1",
+        "spec": "1.2.1",
+        "type": "version"
+      },
+      "/home/robert/workspace/code-examples/node_modules/bcrypt"
+    ]
+  ],
+  "_from": "bindings@1.2.1",
+  "_id": "bindings@1.2.1",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/bindings",
+  "_npmUser": {
+    "name": "tootallnate",
+    "email": "nathan@tootallnate.net"
+  },
+  "_npmVersion": "1.4.14",
+  "_phantomChildren": {},
+  "_requested": {
+    "raw": "bindings@1.2.1",
+    "scope": null,
+    "escapedName": "bindings",
+    "name": "bindings",
+    "rawSpec": "1.2.1",
+    "spec": "1.2.1",
+    "type": "version"
+  },
+  "_requiredBy": [
+    "/bcrypt"
+  ],
+  "_resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz",
+  "_shasum": "14ad6113812d2d37d72e67b4cacb4bb726505f11",
+  "_shrinkwrap": null,
+  "_spec": "bindings@1.2.1",
+  "_where": "/home/robert/workspace/code-examples/node_modules/bcrypt",
+  "author": {
+    "name": "Nathan Rajlich",
+    "email": "nathan@tootallnate.net",
+    "url": "http://tootallnate.net"
+  },
+  "bugs": {
+    "url": "https://github.com/TooTallNate/node-bindings/issues"
+  },
+  "dependencies": {},
+  "description": "Helper module for loading your native module's .node file",
+  "devDependencies": {},
+  "directories": {},
+  "dist": {
+    "shasum": "14ad6113812d2d37d72e67b4cacb4bb726505f11",
+    "tarball": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz"
+  },
+  "gitHead": "e404152ee27f8478ccbc7122ee051246e8e5ec02",
+  "homepage": "https://github.com/TooTallNate/node-bindings",
+  "keywords": [
+    "native",
+    "addon",
+    "bindings",
+    "gyp",
+    "waf",
+    "c",
+    "c++"
+  ],
+  "license": "MIT",
+  "main": "./bindings.js",
+  "maintainers": [
+    {
+      "name": "TooTallNate",
+      "email": "nathan@tootallnate.net"
+    },
+    {
+      "name": "tootallnate",
+      "email": "nathan@tootallnate.net"
+    }
+  ],
+  "name": "bindings",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/TooTallNate/node-bindings.git"
+  },
+  "scripts": {},
+  "version": "1.2.1"
+}

+ 424 - 0
node_modules/nan/CHANGELOG.md

@@ -0,0 +1,424 @@
+# NAN ChangeLog
+
+**Version 2.3.5: current Node 6.2.0, Node 12: 0.12.14, Node 10: 0.10.45, iojs: 3.3.1**
+
+### 2.3.5 May 31 2016
+
+  - Bugfix: Replace NAN_INLINE with 'inline' keyword. 71819d8725f822990f439479c9aba3b240804909
+
+### 2.3.4 May 31 2016
+
+  - Bugfix: Remove V8 deprecation warnings 0592fb0a47f3a1c7763087ebea8e1138829f24f9
+  - Bugfix: Fix new versions not to use WeakCallbackInfo::IsFirstPass 615c19d9e03d4be2049c10db0151edbc3b229246
+  - Bugfix: Make ObjectWrap::handle() const d19af99595587fe7a26bd850af6595c2a7145afc
+  - Bugfix: Fix compilation errors related to 0592fb0a47f3a1c7763087ebea8e1138829f24f9 e9191c525b94f652718325e28610a1adcf90fed8
+
+### 2.3.3 May 4 2016
+
+  - Bugfix: Refactor SetMethod() to deal with v8::Templates (#566) b9083cf6d5de6ebe6bcb49c7502fbb7c0d9ddda8
+
+### 2.3.2 Apr 27 2016
+
+  - Bugfix: Fix compilation on outdated versions due to Handle removal f8b7c875d04d425a41dfd4f3f8345bc3a11e6c52
+
+### 2.3.1 Apr 27 2016
+
+  - Bugfix: Don't use deprecated v8::Template::Set() in SetMethod a90951e9ea70fa1b3836af4b925322919159100e
+
+### 2.3.0 Apr 27 2016
+
+  - Feature: added Signal() for invoking async callbacks without sending data from AsyncProgressWorker d8adba45f20e077d00561b20199133620c990b38
+  - Bugfix: Don't use deprecated v8::Template::Set() 00dacf0a4b86027415867fa7f1059acc499dcece
+
+### 2.2.1 Mar 29 2016
+
+  - Bugfix: Use NewFromUnsigned in ReturnValue<T>::Set(uint32_t i) for pre_12 3a18f9bdce29826e0e4c217854bc476918241a58
+  - Performance: Remove unneeeded nullptr checks b715ef44887931c94f0d1605b3b1a4156eebece9
+
+### 2.2.0 Jan 9 2016
+
+  - Feature: Add Function::Call wrapper 4c157474dacf284d125c324177b45aa5dabc08c6
+  - Feature: Rename GC*logueCallback to GCCallback for > 4.0 3603435109f981606d300eb88004ca101283acec
+  - Bugfix: Fix Global::Pass for old versions 367e82a60fbaa52716232cc89db1cc3f685d77d9
+  - Bugfix: Remove weird MaybeLocal wrapping of what already is a MaybeLocal 23b4590db10c2ba66aee2338aebe9751c4cb190b
+
+### 2.1.0 Oct 8 2015
+
+  - Deprecation: Deprecate NanErrnoException in favor of ErrnoException 0af1ca4cf8b3f0f65ed31bc63a663ab3319da55c
+  - Feature: added helper class for accessing contents of typedarrays 17b51294c801e534479d5463697a73462d0ca555
+  - Feature: [Maybe types] Add MakeMaybe(...) 48d7b53d9702b0c7a060e69ea10fea8fb48d814d
+  - Feature: new: allow utf16 string with length 66ac6e65c8ab9394ef588adfc59131b3b9d8347b
+  - Feature: Introduce SetCallHandler and SetCallAsFunctionHandler 7764a9a115d60ba10dc24d86feb0fbc9b4f75537
+  - Bugfix: Enable creating Locals from Globals under Node 0.10. 9bf9b8b190821af889790fdc18ace57257e4f9ff
+  - Bugfix: Fix issue #462 where PropertyCallbackInfo data is not stored safely. 55f50adedd543098526c7b9f4fffd607d3f9861f
+
+### 2.0.9 Sep 8 2015
+
+  - Bugfix: EscapableHandleScope in Nan::NewBuffer for Node 0.8 and 0.10 b1654d7
+
+### 2.0.8 Aug 28 2015
+
+  - Work around duplicate linking bug in clang 11902da
+
+### 2.0.7 Aug 26 2015
+
+  - Build: Repackage
+
+### 2.0.6 Aug 26 2015
+
+  - Bugfix: Properly handle null callback in FunctionTemplate factory 6e99cb1
+  - Bugfix: Remove unused static std::map instances 525bddc
+  - Bugfix: Make better use of maybe versions of APIs bfba85b
+  - Bugfix: Fix shadowing issues with handle in ObjectWrap 0a9072d
+
+### 2.0.5 Aug 10 2015
+
+  - Bugfix: Reimplement weak callback in ObjectWrap 98d38c1
+  - Bugfix: Make sure callback classes are not assignable, copyable or movable 81f9b1d
+
+### 2.0.4 Aug 6 2015
+
+  - Build: Repackage
+
+### 2.0.3 Aug 6 2015
+
+  - Bugfix: Don't use clang++ / g++ syntax extension. 231450e
+
+### 2.0.2 Aug 6 2015
+
+  - Build: Repackage
+
+### 2.0.1 Aug 6 2015
+
+  - Bugfix: Add workaround for missing REPLACE_INVALID_UTF8 60d6687
+  - Bugfix: Reimplement ObjectWrap from scratch to prevent memory leaks 6484601
+  - Bugfix: Fix Persistent leak in FunctionCallbackInfo and PropertyCallbackInfo 641ef5f
+  - Bugfix: Add missing overload for Nan::NewInstance that takes argc/argv 29450ed
+
+### 2.0.0 Jul 31 2015
+
+  - Change: Renamed identifiers with leading underscores	b5932b4
+  - Change: Replaced NanObjectWrapHandle with class NanObjectWrap	464f1e1
+  - Change: Replace NanScope and NanEscpableScope macros with classes	47751c4
+  - Change: Rename NanNewBufferHandle to NanNewBuffer	6745f99
+  - Change: Rename NanBufferUse to NanNewBuffer	3e8b0a5
+  - Change: Rename NanNewBuffer to NanCopyBuffer	d6af78d
+  - Change: Remove Nan prefix from all names	72d1f67
+  - Change: Update Buffer API for new upstream changes	d5d3291
+  - Change: Rename Scope and EscapableScope to HandleScope and EscapableHandleScope	21a7a6a
+  - Change: Get rid of Handles	 e6c0daf
+  - Feature: Support io.js 3 with V8 4.4
+  - Feature: Introduce NanPersistent	7fed696
+  - Feature: Introduce NanGlobal	4408da1
+  - Feature: Added NanTryCatch	10f1ca4
+  - Feature: Update for V8 v4.3	4b6404a
+  - Feature: Introduce NanNewOneByteString	c543d32
+  - Feature: Introduce namespace Nan	67ed1b1
+  - Removal: Remove NanLocker and NanUnlocker	dd6e401
+  - Removal: Remove string converters, except NanUtf8String, which now follows the node implementation b5d00a9
+  - Removal: Remove NanReturn* macros	d90a25c
+  - Removal: Remove HasInstance	e8f84fe
+
+
+### 1.9.0 Jul 31 2015
+
+  - Feature: Added `NanFatalException` 81d4a2c
+  - Feature: Added more error types 4265f06
+  - Feature: Added dereference and function call operators to NanCallback c4b2ed0
+  - Feature: Added indexed GetFromPersistent and SaveToPersistent edd510c
+  - Feature: Added more overloads of SaveToPersistent and GetFromPersistent 8b1cef6
+  - Feature: Added NanErrnoException dd87d9e
+  - Correctness: Prevent assign, copy, and move for classes that do not support it 1f55c59, 4b808cb, c96d9b2, fba4a29, 3357130
+  - Deprecation: Deprecate `NanGetPointerSafe` and `NanSetPointerSafe` 81d4a2c
+  - Deprecation: Deprecate `NanBooleanOptionValue` and `NanUInt32OptionValue` 0ad254b
+
+### 1.8.4 Apr 26 2015
+
+  - Build: Repackage
+
+### 1.8.3 Apr 26 2015
+
+  - Bugfix: Include missing header 1af8648
+
+### 1.8.2 Apr 23 2015
+
+  - Build: Repackage
+
+### 1.8.1 Apr 23 2015
+
+  - Bugfix: NanObjectWrapHandle should take a pointer 155f1d3
+
+### 1.8.0 Apr 23 2015
+
+  - Feature: Allow primitives with NanReturnValue 2e4475e
+  - Feature: Added comparison operators to NanCallback 55b075e
+  - Feature: Backport thread local storage 15bb7fa
+  - Removal: Remove support for signatures with arguments 8a2069d
+  - Correcteness: Replaced NanObjectWrapHandle macro with function 0bc6d59
+
+### 1.7.0 Feb 28 2015
+
+  - Feature: Made NanCallback::Call accept optional target 8d54da7
+  - Feature: Support atom-shell 0.21 0b7f1bb
+
+### 1.6.2 Feb 6 2015
+
+  - Bugfix: NanEncode: fix argument type for node::Encode on io.js 2be8639
+
+### 1.6.1 Jan 23 2015
+
+  - Build: version bump
+
+### 1.5.3 Jan 23 2015
+
+  - Build: repackage
+
+### 1.6.0 Jan 23 2015
+
+ - Deprecated `NanNewContextHandle` in favor of `NanNew<Context>` 49259af
+ - Support utility functions moved in newer v8 versions (Node 0.11.15, io.js 1.0) a0aa179
+ - Added `NanEncode`, `NanDecodeBytes` and `NanDecodeWrite` 75e6fb9
+
+### 1.5.2 Jan 23 2015
+
+  - Bugfix: Fix non-inline definition build error with clang++ 21d96a1, 60fadd4
+  - Bugfix: Readded missing String constructors 18d828f
+  - Bugfix: Add overload handling NanNew<FunctionTemplate>(..) 5ef813b
+  - Bugfix: Fix uv_work_cb versioning 997e4ae
+  - Bugfix: Add function factory and test 4eca89c
+  - Bugfix: Add object template factory and test cdcb951
+  - Correctness: Lifted an io.js related typedef c9490be
+  - Correctness: Make explicit downcasts of String lengths 00074e6
+  - Windows: Limit the scope of disabled warning C4530 83d7deb
+
+### 1.5.1 Jan 15 2015
+
+  - Build: version bump
+
+### 1.4.3 Jan 15 2015
+
+  - Build: version bump
+
+### 1.4.2 Jan 15 2015
+
+  - Feature: Support io.js 0dbc5e8
+
+### 1.5.0 Jan 14 2015
+
+ - Feature: Support io.js b003843
+ - Correctness: Improved NanNew internals 9cd4f6a
+ - Feature: Implement progress to NanAsyncWorker 8d6a160
+
+### 1.4.1 Nov 8 2014
+
+ - Bugfix: Handle DEBUG definition correctly
+ - Bugfix: Accept int as Boolean
+
+### 1.4.0 Nov 1 2014
+
+ - Feature: Added NAN_GC_CALLBACK 6a5c245
+ - Performance: Removed unnecessary local handle creation 18a7243, 41fe2f8
+ - Correctness: Added constness to references in NanHasInstance 02c61cd
+ - Warnings: Fixed spurious warnings from -Wundef and -Wshadow, 541b122, 99d8cb6
+ - Windoze: Shut Visual Studio up when compiling 8d558c1
+ - License: Switch to plain MIT from custom hacked MIT license 11de983
+ - Build: Added test target to Makefile e232e46
+ - Performance: Removed superfluous scope in NanAsyncWorker f4b7821
+ - Sugar/Feature: Added NanReturnThis() and NanReturnHolder() shorthands 237a5ff, d697208
+ - Feature: Added suitable overload of NanNew for v8::Integer::NewFromUnsigned b27b450
+
+### 1.3.0 Aug 2 2014
+
+ - Added NanNew<v8::String, std::string>(std::string)
+ - Added NanNew<v8::String, std::string&>(std::string&)
+ - Added NanAsciiString helper class
+ - Added NanUtf8String helper class
+ - Added NanUcs2String helper class
+ - Deprecated NanRawString()
+ - Deprecated NanCString()
+ - Added NanGetIsolateData(v8::Isolate *isolate)
+ - Added NanMakeCallback(v8::Handle<v8::Object> target, v8::Handle<v8::Function> func, int argc, v8::Handle<v8::Value>* argv)
+ - Added NanMakeCallback(v8::Handle<v8::Object> target, v8::Handle<v8::String> symbol, int argc, v8::Handle<v8::Value>* argv)
+ - Added NanMakeCallback(v8::Handle<v8::Object> target, const char* method, int argc, v8::Handle<v8::Value>* argv)
+ - Added NanSetTemplate(v8::Handle<v8::Template> templ, v8::Handle<v8::String> name , v8::Handle<v8::Data> value, v8::PropertyAttribute attributes)
+ - Added NanSetPrototypeTemplate(v8::Local<v8::FunctionTemplate> templ, v8::Handle<v8::String> name, v8::Handle<v8::Data> value, v8::PropertyAttribute attributes)
+ - Added NanSetInstanceTemplate(v8::Local<v8::FunctionTemplate> templ, const char *name, v8::Handle<v8::Data> value)
+ - Added NanSetInstanceTemplate(v8::Local<v8::FunctionTemplate> templ, v8::Handle<v8::String> name, v8::Handle<v8::Data> value, v8::PropertyAttribute attributes)
+
+### 1.2.0 Jun 5 2014
+
+ - Add NanSetPrototypeTemplate
+ - Changed NAN_WEAK_CALLBACK internals, switched _NanWeakCallbackData to class,
+     introduced _NanWeakCallbackDispatcher
+ - Removed -Wno-unused-local-typedefs from test builds
+ - Made test builds Windows compatible ('Sleep()')
+
+### 1.1.2 May 28 2014
+
+ - Release to fix more stuff-ups in 1.1.1
+
+### 1.1.1 May 28 2014
+
+ - Release to fix version mismatch in nan.h and lack of changelog entry for 1.1.0
+
+### 1.1.0 May 25 2014
+
+ - Remove nan_isolate, use v8::Isolate::GetCurrent() internally instead
+ - Additional explicit overloads for NanNew(): (char*,int), (uint8_t*[,int]),
+     (uint16_t*[,int), double, int, unsigned int, bool, v8::String::ExternalStringResource*,
+     v8::String::ExternalAsciiStringResource*
+ - Deprecate NanSymbol()
+ - Added SetErrorMessage() and ErrorMessage() to NanAsyncWorker
+
+### 1.0.0 May 4 2014
+
+ - Heavy API changes for V8 3.25 / Node 0.11.13
+ - Use cpplint.py
+ - Removed NanInitPersistent
+ - Removed NanPersistentToLocal
+ - Removed NanFromV8String
+ - Removed NanMakeWeak
+ - Removed NanNewLocal
+ - Removed NAN_WEAK_CALLBACK_OBJECT
+ - Removed NAN_WEAK_CALLBACK_DATA
+ - Introduce NanNew, replaces NanNewLocal, NanPersistentToLocal, adds many overloaded typed versions
+ - Introduce NanUndefined, NanNull, NanTrue and NanFalse
+ - Introduce NanEscapableScope and NanEscapeScope
+ - Introduce NanMakeWeakPersistent (requires a special callback to work on both old and new node)
+ - Introduce NanMakeCallback for node::MakeCallback
+ - Introduce NanSetTemplate
+ - Introduce NanGetCurrentContext
+ - Introduce NanCompileScript and NanRunScript
+ - Introduce NanAdjustExternalMemory
+ - Introduce NanAddGCEpilogueCallback, NanAddGCPrologueCallback, NanRemoveGCEpilogueCallback, NanRemoveGCPrologueCallback
+ - Introduce NanGetHeapStatistics
+ - Rename NanAsyncWorker#SavePersistent() to SaveToPersistent()
+
+### 0.8.0 Jan 9 2014
+
+ - NanDispose -> NanDisposePersistent, deprecate NanDispose
+ - Extract _NAN_*_RETURN_TYPE, pull up NAN_*()
+
+### 0.7.1 Jan 9 2014
+
+ - Fixes to work against debug builds of Node
+ - Safer NanPersistentToLocal (avoid reinterpret_cast)
+ - Speed up common NanRawString case by only extracting flattened string when necessary
+
+### 0.7.0 Dec 17 2013
+
+ - New no-arg form of NanCallback() constructor.
+ - NanCallback#Call takes Handle rather than Local
+ - Removed deprecated NanCallback#Run method, use NanCallback#Call instead
+ - Split off _NAN_*_ARGS_TYPE from _NAN_*_ARGS
+ - Restore (unofficial) Node 0.6 compatibility at NanCallback#Call()
+ - Introduce NanRawString() for char* (or appropriate void*) from v8::String
+     (replacement for NanFromV8String)
+ - Introduce NanCString() for null-terminated char* from v8::String
+
+### 0.6.0 Nov 21 2013
+
+ - Introduce NanNewLocal<T>(v8::Handle<T> value) for use in place of
+     v8::Local<T>::New(...) since v8 started requiring isolate in Node 0.11.9
+
+### 0.5.2 Nov 16 2013
+
+ - Convert SavePersistent and GetFromPersistent in NanAsyncWorker from protected and public
+
+### 0.5.1 Nov 12 2013
+
+ - Use node::MakeCallback() instead of direct v8::Function::Call()
+
+### 0.5.0 Nov 11 2013
+
+ - Added @TooTallNate as collaborator
+ - New, much simpler, "include_dirs" for binding.gyp
+ - Added full range of NAN_INDEX_* macros to match NAN_PROPERTY_* macros
+
+### 0.4.4 Nov 2 2013
+
+ - Isolate argument from v8::Persistent::MakeWeak removed for 0.11.8+
+
+### 0.4.3 Nov 2 2013
+
+ - Include node_object_wrap.h, removed from node.h for Node 0.11.8.
+
+### 0.4.2 Nov 2 2013
+
+ - Handle deprecation of v8::Persistent::Dispose(v8::Isolate* isolate)) for
+     Node 0.11.8 release.
+
+### 0.4.1 Sep 16 2013
+
+ - Added explicit `#include <uv.h>` as it was removed from node.h for v0.11.8
+
+### 0.4.0 Sep 2 2013
+
+ - Added NAN_INLINE and NAN_DEPRECATED and made use of them
+ - Added NanError, NanTypeError and NanRangeError
+ - Cleaned up code
+
+### 0.3.2 Aug 30 2013
+
+ - Fix missing scope declaration in GetFromPersistent() and SaveToPersistent
+     in NanAsyncWorker
+
+### 0.3.1 Aug 20 2013
+
+ - fix "not all control paths return a value" compile warning on some platforms
+
+### 0.3.0 Aug 19 2013
+
+ - Made NAN work with NPM
+ - Lots of fixes to NanFromV8String, pulling in features from new Node core
+ - Changed node::encoding to Nan::Encoding in NanFromV8String to unify the API
+ - Added optional error number argument for NanThrowError()
+ - Added NanInitPersistent()
+ - Added NanReturnNull() and NanReturnEmptyString()
+ - Added NanLocker and NanUnlocker
+ - Added missing scopes
+ - Made sure to clear disposed Persistent handles
+ - Changed NanAsyncWorker to allocate error messages on the heap
+ - Changed NanThrowError(Local<Value>) to NanThrowError(Handle<Value>)
+ - Fixed leak in NanAsyncWorker when errmsg is used
+
+### 0.2.2 Aug 5 2013
+
+ - Fixed usage of undefined variable with node::BASE64 in NanFromV8String()
+
+### 0.2.1 Aug 5 2013
+
+ - Fixed 0.8 breakage, node::BUFFER encoding type not available in 0.8 for
+     NanFromV8String()
+
+### 0.2.0 Aug 5 2013
+
+ - Added NAN_PROPERTY_GETTER, NAN_PROPERTY_SETTER, NAN_PROPERTY_ENUMERATOR,
+     NAN_PROPERTY_DELETER, NAN_PROPERTY_QUERY
+ - Extracted _NAN_METHOD_ARGS, _NAN_GETTER_ARGS, _NAN_SETTER_ARGS,
+     _NAN_PROPERTY_GETTER_ARGS, _NAN_PROPERTY_SETTER_ARGS,
+     _NAN_PROPERTY_ENUMERATOR_ARGS, _NAN_PROPERTY_DELETER_ARGS,
+     _NAN_PROPERTY_QUERY_ARGS
+ - Added NanGetInternalFieldPointer, NanSetInternalFieldPointer
+ - Added NAN_WEAK_CALLBACK, NAN_WEAK_CALLBACK_OBJECT,
+     NAN_WEAK_CALLBACK_DATA, NanMakeWeak
+ - Renamed THROW_ERROR to _NAN_THROW_ERROR
+ - Added NanNewBufferHandle(char*, size_t, node::smalloc::FreeCallback, void*)
+ - Added NanBufferUse(char*, uint32_t)
+ - Added NanNewContextHandle(v8::ExtensionConfiguration*,
+       v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Value>)
+ - Fixed broken NanCallback#GetFunction()
+ - Added optional encoding and size arguments to NanFromV8String()
+ - Added NanGetPointerSafe() and NanSetPointerSafe()
+ - Added initial test suite (to be expanded)
+ - Allow NanUInt32OptionValue to convert any Number object
+
+### 0.1.0 Jul 21 2013
+
+ - Added `NAN_GETTER`, `NAN_SETTER`
+ - Added `NanThrowError` with single Local<Value> argument
+ - Added `NanNewBufferHandle` with single uint32_t argument
+ - Added `NanHasInstance(Persistent<FunctionTemplate>&, Handle<Value>)`
+ - Added `Local<Function> NanCallback#GetFunction()`
+ - Added `NanCallback#Call(int, Local<Value>[])`
+ - Deprecated `NanCallback#Run(int, Local<Value>[])` in favour of Call

+ 13 - 0
node_modules/nan/LICENSE.md

@@ -0,0 +1,13 @@
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2016 NAN contributors
+-----------------------------------
+
+*NAN contributors listed at <https://github.com/nodejs/nan#contributors>*
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 403 - 0
node_modules/nan/README.md

@@ -0,0 +1,403 @@
+Native Abstractions for Node.js
+===============================
+
+**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10, 0.12, 1, 4, 5 and 6.**
+
+***Current version: 2.3.5***
+
+*(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)*
+
+[![NPM](https://nodei.co/npm/nan.png?downloads=true&downloadRank=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6&height=3)](https://nodei.co/npm/nan/)
+
+[![Build Status](https://api.travis-ci.org/nodejs/nan.svg?branch=master)](http://travis-ci.org/nodejs/nan)
+[![Build status](https://ci.appveyor.com/api/projects/status/kh73pbm9dsju7fgh)](https://ci.appveyor.com/project/RodVagg/nan)
+
+Thanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.12 to 4.0, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect `NODE_MODULE_VERSION` and get yourself into a macro-tangle.
+
+This project also contains some helper utilities that make addon development a bit more pleasant.
+
+ * **[News & Updates](#news)**
+ * **[Usage](#usage)**
+ * **[Example](#example)**
+ * **[API](#api)**
+ * **[Tests](#tests)**
+ * **[Governance & Contributing](#governance)**
+
+<a name="news"></a>
+## News & Updates
+
+<a name="usage"></a>
+## Usage
+
+Simply add **NAN** as a dependency in the *package.json* of your Node addon:
+
+``` bash
+$ npm install --save nan
+```
+
+Pull in the path to **NAN** in your *binding.gyp* so that you can use `#include <nan.h>` in your *.cpp* files:
+
+``` python
+"include_dirs" : [
+    "<!(node -e \"require('nan')\")"
+]
+```
+
+This works like a `-I<path-to-NAN>` when compiling your addon.
+
+<a name="example"></a>
+## Example
+
+Just getting started with Nan? Take a look at the **[Node Add-on Examples](https://github.com/nodejs/node-addon-examples)**.
+
+Refer to a [quick-start **Nan** Boilerplate](https://github.com/fcanas/node-native-boilerplate) for a ready-to-go project that utilizes basic Nan functionality.
+
+For a simpler example, see the **[async pi estimation example](https://github.com/nodejs/nan/tree/master/examples/async_pi_estimate)** in the examples directory for full code and an explanation of what this Monte Carlo Pi estimation example does. Below are just some parts of the full example that illustrate the use of **NAN**.
+
+Yet another example is **[nan-example-eol](https://github.com/CodeCharmLtd/nan-example-eol)**. It shows newline detection implemented as a native addon.
+
+Also take a look at our comprehensive **[C++ test suite](https://github.com/nodejs/nan/tree/master/test/cpp)** which has a plehora of code snippets for your pasting pleasure.
+
+<a name="api"></a>
+## API
+
+Additional to the NAN documentation below, please consult:
+
+* [The V8 Getting Started Guide](https://developers.google.com/v8/get_started)
+* [The V8 Embedders Guide](https://developers.google.com/v8/embed)
+* [V8 API Documentation](http://v8docs.nodesource.com/)
+* [Node Add-on Documentation](https://nodejs.org/api/addons.html)
+
+<!-- START API -->
+
+### JavaScript-accessible methods
+
+A _template_ is a blueprint for JavaScript functions and objects in a context. You can use a template to wrap C++ functions and data structures within JavaScript objects so that they can be manipulated from JavaScript. See the V8 Embedders Guide section on [Templates](https://developers.google.com/v8/embed#templates) for further information.
+
+In order to expose functionality to JavaScript via a template, you must provide it to V8 in a form that it understands. Across the versions of V8 supported by NAN, JavaScript-accessible method signatures vary widely, NAN fully abstracts method declaration and provides you with an interface that is similar to the most recent V8 API but is backward-compatible with older versions that still use the now-deceased `v8::Argument` type.
+
+* **Method argument types**
+ - <a href="doc/methods.md#api_nan_function_callback_info"><b><code>Nan::FunctionCallbackInfo</code></b></a>
+ - <a href="doc/methods.md#api_nan_property_callback_info"><b><code>Nan::PropertyCallbackInfo</code></b></a>
+ - <a href="doc/methods.md#api_nan_return_value"><b><code>Nan::ReturnValue</code></b></a>
+* **Method declarations**
+ - <a href="doc/methods.md#api_nan_method"><b>Method declaration</b></a>
+ - <a href="doc/methods.md#api_nan_getter"><b>Getter declaration</b></a>
+ - <a href="doc/methods.md#api_nan_setter"><b>Setter declaration</b></a>
+ - <a href="doc/methods.md#api_nan_property_getter"><b>Property getter declaration</b></a>
+ - <a href="doc/methods.md#api_nan_property_setter"><b>Property setter declaration</b></a>
+ - <a href="doc/methods.md#api_nan_property_enumerator"><b>Property enumerator declaration</b></a>
+ - <a href="doc/methods.md#api_nan_property_deleter"><b>Property deleter declaration</b></a>
+ - <a href="doc/methods.md#api_nan_property_query"><b>Property query declaration</b></a>
+ - <a href="doc/methods.md#api_nan_index_getter"><b>Index getter declaration</b></a>
+ - <a href="doc/methods.md#api_nan_index_setter"><b>Index setter declaration</b></a>
+ - <a href="doc/methods.md#api_nan_index_enumerator"><b>Index enumerator declaration</b></a>
+ - <a href="doc/methods.md#api_nan_index_deleter"><b>Index deleter declaration</b></a>
+ - <a href="doc/methods.md#api_nan_index_query"><b>Index query declaration</b></a>
+* Method and template helpers
+ - <a href="doc/methods.md#api_nan_set_method"><b><code>Nan::SetMethod()</code></b></a>
+ - <a href="doc/methods.md#api_nan_set_prototype_method"><b><code>Nan::SetPrototypeMethod()</code></b></a>
+ - <a href="doc/methods.md#api_nan_set_accessor"><b><code>Nan::SetAccessor()</code></b></a>
+ - <a href="doc/methods.md#api_nan_set_named_property_handler"><b><code>Nan::SetNamedPropertyHandler()</code></b></a>
+ - <a href="doc/methods.md#api_nan_set_indexed_property_handler"><b><code>Nan::SetIndexedPropertyHandler()</code></b></a>
+ - <a href="doc/methods.md#api_nan_set_template"><b><code>Nan::SetTemplate()</code></b></a>
+ - <a href="doc/methods.md#api_nan_set_prototype_template"><b><code>Nan::SetPrototypeTemplate()</code></b></a>
+ - <a href="doc/methods.md#api_nan_set_instance_template"><b><code>Nan::SetInstanceTemplate()</code></b></a>
+ - <a href="doc/methods.md#api_nan_set_call_handler"><b><code>Nan::SetCallHandler()</code></b></a>
+ - <a href="doc/methods.md#api_nan_set_call_as_function_handler"><b><code>Nan::SetCallAsFunctionHandler()</code></b></a>
+
+### Scopes
+
+A _local handle_ is a pointer to an object. All V8 objects are accessed using handles, they are necessary because of the way the V8 garbage collector works.
+
+A handle scope can be thought of as a container for any number of handles. When you've finished with your handles, instead of deleting each one individually you can simply delete their scope.
+
+The creation of `HandleScope` objects is different across the supported versions of V8. Therefore, NAN provides its own implementations that can be used safely across these.
+
+ - <a href="doc/scopes.md#api_nan_handle_scope"><b><code>Nan::HandleScope</code></b></a>
+ - <a href="doc/scopes.md#api_nan_escapable_handle_scope"><b><code>Nan::EscapableHandleScope</code></b></a>
+
+Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles).
+
+### Persistent references
+
+An object reference that is independent of any `HandleScope` is a _persistent_ reference. Where a `Local` handle only lives as long as the `HandleScope` in which it was allocated, a `Persistent` handle remains valid until it is explicitly disposed.
+
+Due to the evolution of the V8 API, it is necessary for NAN to provide a wrapper implementation of the `Persistent` classes to supply compatibility across the V8 versions supported.
+
+ - <a href="doc/persistent.md#api_nan_persistent_base"><b><code>Nan::PersistentBase & v8::PersistentBase</code></b></a>
+ - <a href="doc/persistent.md#api_nan_non_copyable_persistent_traits"><b><code>Nan::NonCopyablePersistentTraits & v8::NonCopyablePersistentTraits</code></b></a>
+ - <a href="doc/persistent.md#api_nan_copyable_persistent_traits"><b><code>Nan::CopyablePersistentTraits & v8::CopyablePersistentTraits</code></b></a>
+ - <a href="doc/persistent.md#api_nan_persistent"><b><code>Nan::Persistent</code></b></a>
+ - <a href="doc/persistent.md#api_nan_global"><b><code>Nan::Global</code></b></a>
+ - <a href="doc/persistent.md#api_nan_weak_callback_info"><b><code>Nan::WeakCallbackInfo</code></b></a>
+ - <a href="doc/persistent.md#api_nan_weak_callback_type"><b><code>Nan::WeakCallbackType</code></b></a>
+
+Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles).
+
+### New
+
+NAN provides a `Nan::New()` helper for the creation of new JavaScript objects in a way that's compatible across the supported versions of V8.
+
+ - <a href="doc/new.md#api_nan_new"><b><code>Nan::New()</code></b></a>
+ - <a href="doc/new.md#api_nan_undefined"><b><code>Nan::Undefined()</code></b></a>
+ - <a href="doc/new.md#api_nan_null"><b><code>Nan::Null()</code></b></a>
+ - <a href="doc/new.md#api_nan_true"><b><code>Nan::True()</code></b></a>
+ - <a href="doc/new.md#api_nan_false"><b><code>Nan::False()</code></b></a>
+ - <a href="doc/new.md#api_nan_empty_string"><b><code>Nan::EmptyString()</code></b></a>
+
+
+### Converters
+
+NAN contains functions that convert `v8::Value`s to other `v8::Value` types and native types. Since type conversion is not guaranteed to succeed, they return `Nan::Maybe` types. These converters can be used in place of `value->ToX()` and `value->XValue()` (where `X` is one of the types, e.g. `Boolean`) in a way that provides a consistent interface across V8 versions. Newer versions of V8 use the new `v8::Maybe` and `v8::MaybeLocal` types for these conversions, older versions don't have this functionality so it is provided by NAN.
+
+ - <a href="doc/converters.md#api_nan_to"><b><code>Nan::To()</code></b></a>
+
+### Maybe Types
+
+The `Nan::MaybeLocal` and `Nan::Maybe` types are monads that encapsulate `v8::Local` handles that _may be empty_.
+
+* **Maybe Types**
+  - <a href="doc/maybe_types.md#api_nan_maybe_local"><b><code>Nan::MaybeLocal</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_maybe"><b><code>Nan::Maybe</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_nothing"><b><code>Nan::Nothing</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_just"><b><code>Nan::Just</code></b></a>
+* **Maybe Helpers**
+  - <a href="doc/maybe_types.md#api_nan_call"><b><code>Nan::Call()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_to_detail_string"><b><code>Nan::ToDetailString()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_to_array_index"><b><code>Nan::ToArrayIndex()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_equals"><b><code>Nan::Equals()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_new_instance"><b><code>Nan::NewInstance()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_get_function"><b><code>Nan::GetFunction()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_set"><b><code>Nan::Set()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_force_set"><b><code>Nan::ForceSet()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_get"><b><code>Nan::Get()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_get_property_attribute"><b><code>Nan::GetPropertyAttributes()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_has"><b><code>Nan::Has()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_delete"><b><code>Nan::Delete()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_get_property_names"><b><code>Nan::GetPropertyNames()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_get_own_property_names"><b><code>Nan::GetOwnPropertyNames()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_set_prototype"><b><code>Nan::SetPrototype()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_object_proto_to_string"><b><code>Nan::ObjectProtoToString()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_has_own_property"><b><code>Nan::HasOwnProperty()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_has_real_named_property"><b><code>Nan::HasRealNamedProperty()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_has_real_indexed_property"><b><code>Nan::HasRealIndexedProperty()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_has_real_named_callback_property"><b><code>Nan::HasRealNamedCallbackProperty()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_get_real_named_property_in_prototype_chain"><b><code>Nan::GetRealNamedPropertyInPrototypeChain()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_get_real_named_property"><b><code>Nan::GetRealNamedProperty()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_call_as_function"><b><code>Nan::CallAsFunction()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_call_as_constructor"><b><code>Nan::CallAsConstructor()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_get_source_line"><b><code>Nan::GetSourceLine()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_get_line_number"><b><code>Nan::GetLineNumber()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_get_start_column"><b><code>Nan::GetStartColumn()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_get_end_column"><b><code>Nan::GetEndColumn()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_clone_element_at"><b><code>Nan::CloneElementAt()</code></b></a>
+  - <a href="doc/maybe_types.md#api_nan_make_maybe"><b><code>Nan::MakeMaybe()</code></b></a>
+
+### Script
+
+NAN provides a `v8::Script` helpers as the API has changed over the supported versions of V8.
+
+ - <a href="doc/script.md#api_nan_compile_script"><b><code>Nan::CompileScript()</code></b></a>
+ - <a href="doc/script.md#api_nan_run_script"><b><code>Nan::RunScript()</code></b></a>
+
+
+### Errors
+
+NAN includes helpers for creating, throwing and catching Errors as much of this functionality varies across the supported versions of V8 and must be abstracted.
+
+Note that an Error object is simply a specialized form of `v8::Value`.
+
+Also consult the V8 Embedders Guide section on [Exceptions](https://developers.google.com/v8/embed#exceptions) for more information.
+
+ - <a href="doc/errors.md#api_nan_error"><b><code>Nan::Error()</code></b></a>
+ - <a href="doc/errors.md#api_nan_range_error"><b><code>Nan::RangeError()</code></b></a>
+ - <a href="doc/errors.md#api_nan_reference_error"><b><code>Nan::ReferenceError()</code></b></a>
+ - <a href="doc/errors.md#api_nan_syntax_error"><b><code>Nan::SyntaxError()</code></b></a>
+ - <a href="doc/errors.md#api_nan_type_error"><b><code>Nan::TypeError()</code></b></a>
+ - <a href="doc/errors.md#api_nan_throw_error"><b><code>Nan::ThrowError()</code></b></a>
+ - <a href="doc/errors.md#api_nan_throw_range_error"><b><code>Nan::ThrowRangeError()</code></b></a>
+ - <a href="doc/errors.md#api_nan_throw_reference_error"><b><code>Nan::ThrowReferenceError()</code></b></a>
+ - <a href="doc/errors.md#api_nan_throw_syntax_error"><b><code>Nan::ThrowSyntaxError()</code></b></a>
+ - <a href="doc/errors.md#api_nan_throw_type_error"><b><code>Nan::ThrowTypeError()</code></b></a>
+ - <a href="doc/errors.md#api_nan_fatal_exception"><b><code>Nan::FatalException()</code></b></a>
+ - <a href="doc/errors.md#api_nan_errno_exception"><b><code>Nan::ErrnoException()</code></b></a>
+ - <a href="doc/errors.md#api_nan_try_catch"><b><code>Nan::TryCatch</code></b></a>
+
+
+### Buffers
+
+NAN's `node::Buffer` helpers exist as the API has changed across supported Node versions. Use these methods to ensure compatibility.
+
+ - <a href="doc/buffers.md#api_nan_new_buffer"><b><code>Nan::NewBuffer()</code></b></a>
+ - <a href="doc/buffers.md#api_nan_copy_buffer"><b><code>Nan::CopyBuffer()</code></b></a>
+ - <a href="doc/buffers.md#api_nan_free_callback"><b><code>Nan::FreeCallback()</code></b></a>
+
+### Nan::Callback
+
+`Nan::Callback` makes it easier to use `v8::Function` handles as callbacks. A class that wraps a `v8::Function` handle, protecting it from garbage collection and making it particularly useful for storage and use across asynchronous execution.
+
+ - <a href="doc/callback.md#api_nan_callback"><b><code>Nan::Callback</code></b></a>
+
+### Asynchronous work helpers
+
+`Nan::AsyncWorker` and `Nan::AsyncProgressWorker` are helper classes that make working with asynchronous code easier.
+
+ - <a href="doc/asyncworker.md#api_nan_async_worker"><b><code>Nan::AsyncWorker</code></b></a>
+ - <a href="doc/asyncworker.md#api_nan_async_progress_worker"><b><code>Nan::AsyncProgressWorker</code></b></a>
+ - <a href="doc/asyncworker.md#api_nan_async_queue_worker"><b><code>Nan::AsyncQueueWorker</code></b></a>
+
+### Strings & Bytes
+
+Miscellaneous string & byte encoding and decoding functionality provided for compatibility across supported versions of V8 and Node. Implemented by NAN to ensure that all encoding types are supported, even for older versions of Node where they are missing.
+
+ - <a href="doc/string_bytes.md#api_nan_encoding"><b><code>Nan::Encoding</code></b></a>
+ - <a href="doc/string_bytes.md#api_nan_encode"><b><code>Nan::Encode()</code></b></a>
+ - <a href="doc/string_bytes.md#api_nan_decode_bytes"><b><code>Nan::DecodeBytes()</code></b></a>
+ - <a href="doc/string_bytes.md#api_nan_decode_write"><b><code>Nan::DecodeWrite()</code></b></a>
+
+
+### Object Wrappers
+
+The `ObjectWrap` class can be used to make wrapped C++ objects and a factory of wrapped objects.
+
+ - <a href="doc/object_wrappers.md#api_nan_object_wrap"><b><code>Nan::ObjectWrap</code></b></a>
+
+
+### V8 internals
+
+The hooks to access V8 internals—including GC and statistics—are different across the supported versions of V8, therefore NAN provides its own hooks that call the appropriate V8 methods.
+
+ - <a href="doc/v8_internals.md#api_nan_gc_callback"><b><code>NAN_GC_CALLBACK()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_add_gc_epilogue_callback"><b><code>Nan::AddGCEpilogueCallback()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_remove_gc_epilogue_callback"><b><code>Nan::RemoveGCEpilogueCallback()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_add_gc_prologue_callback"><b><code>Nan::AddGCPrologueCallback()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_remove_gc_prologue_callback"><b><code>Nan::RemoveGCPrologueCallback()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_get_heap_statistics"><b><code>Nan::GetHeapStatistics()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_set_counter_function"><b><code>Nan::SetCounterFunction()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_set_create_histogram_function"><b><code>Nan::SetCreateHistogramFunction()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_set_add_histogram_sample_function"><b><code>Nan::SetAddHistogramSampleFunction()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_idle_notification"><b><code>Nan::IdleNotification()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_low_memory_notification"><b><code>Nan::LowMemoryNotification()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_context_disposed_notification"><b><code>Nan::ContextDisposedNotification()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_get_internal_field_pointer"><b><code>Nan::GetInternalFieldPointer()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_set_internal_field_pointer"><b><code>Nan::SetInternalFieldPointer()</code></b></a>
+ - <a href="doc/v8_internals.md#api_nan_adjust_external_memory"><b><code>Nan::AdjustExternalMemory()</code></b></a>
+
+
+### Miscellaneous V8 Helpers
+
+ - <a href="doc/v8_misc.md#api_nan_utf8_string"><b><code>Nan::Utf8String</code></b></a>
+ - <a href="doc/v8_misc.md#api_nan_get_current_context"><b><code>Nan::GetCurrentContext()</code></b></a>
+ - <a href="doc/v8_misc.md#api_nan_set_isolate_data"><b><code>Nan::SetIsolateData()</code></b></a>
+ - <a href="doc/v8_misc.md#api_nan_get_isolate_data"><b><code>Nan::GetIsolateData()</code></b></a>
+ - <a href="doc/v8_misc.md#api_nan_typedarray_contents"><b><code>Nan::TypedArrayContents</code></b></a>
+
+
+### Miscellaneous Node Helpers
+
+ - <a href="doc/node_misc.md#api_nan_make_callback"><b><code>Nan::MakeCallback()</code></b></a>
+ - <a href="doc/node_misc.md#api_nan_module_init"><b><code>NAN_MODULE_INIT()</code></b></a>
+ - <a href="doc/node_misc.md#api_nan_export"><b><code>Nan::Export()</code></b></a>
+
+<!-- END API -->
+
+
+<a name="tests"></a>
+### Tests
+
+To run the NAN tests do:
+
+``` sh
+npm install
+npm run-script rebuild-tests
+npm test
+```
+
+Or just:
+
+``` sh
+npm install
+make test
+```
+
+<a name="governance"></a>
+## Governance & Contributing
+
+NAN is governed by the [io.js](https://iojs.org/) Addon API Working Group
+
+### Addon API Working Group (WG)
+
+The NAN project is jointly governed by a Working Group which is responsible for high-level guidance of the project.
+
+Members of the WG are also known as Collaborators, there is no distinction between the two, unlike other io.js projects.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project [README.md](./README.md#collaborators).
+
+Individuals making significant and valuable contributions are made members of the WG and given commit-access to the project. These individuals are identified by the WG and their addition to the WG is discussed via GitHub and requires unanimous consensus amongst those WG members participating in the discussion with a quorum of 50% of WG members required for acceptance of the vote.
+
+_Note:_ If you make a significant contribution and are not considered for commit-access log an issue or contact a WG member directly.
+
+For the current list of WG members / Collaborators, see the project [README.md](./README.md#collaborators).
+
+### Consensus Seeking Process
+
+The WG follows a [Consensus Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) decision making model.
+
+Modifications of the contents of the NAN repository are made on a collaborative basis. Anybody with a GitHub account may propose a modification via pull request and it will be considered by the WG. All pull requests must be reviewed and accepted by a WG member with sufficient expertise who is able to take full responsibility for the change. In the case of pull requests proposed by an existing WG member, an additional WG member is required for sign-off. Consensus should be sought if additional WG members participate and there is disagreement around a particular modification.
+
+If a change proposal cannot reach a consensus, a WG member can call for a vote amongst the members of the WG. Simple majority wins.
+
+<a id="developers-certificate-of-origin"></a>
+## Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+  have the right to submit it under the open source license
+  indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+  of my knowledge, is covered under an appropriate open source
+  license and I have the right under that license to submit that
+  work with modifications, whether created in whole or in part
+  by me, under the same open source license (unless I am
+  permitted to submit under a different license), as indicated
+  in the file; or
+
+* (c) The contribution was provided directly to me by some other
+  person who certified (a), (b) or (c) and I have not modified
+  it.
+
+* (d) I understand and agree that this project and the contribution
+  are public and that a record of the contribution (including all
+  personal information I submit with it, including my sign-off) is
+  maintained indefinitely and may be redistributed consistent with
+  this project or the open source license(s) involved.
+
+<a name="collaborators"></a>
+### WG Members / Collaborators
+
+<table><tbody>
+<tr><th align="left">Rod Vagg</th><td><a href="https://github.com/rvagg">GitHub/rvagg</a></td><td><a href="http://twitter.com/rvagg">Twitter/@rvagg</a></td></tr>
+<tr><th align="left">Benjamin Byholm</th><td><a href="https://github.com/kkoopa/">GitHub/kkoopa</a></td><td>-</td></tr>
+<tr><th align="left">Trevor Norris</th><td><a href="https://github.com/trevnorris">GitHub/trevnorris</a></td><td><a href="http://twitter.com/trevnorris">Twitter/@trevnorris</a></td></tr>
+<tr><th align="left">Nathan Rajlich</th><td><a href="https://github.com/TooTallNate">GitHub/TooTallNate</a></td><td><a href="http://twitter.com/TooTallNate">Twitter/@TooTallNate</a></td></tr>
+<tr><th align="left">Brett Lawson</th><td><a href="https://github.com/brett19">GitHub/brett19</a></td><td><a href="http://twitter.com/brett19x">Twitter/@brett19x</a></td></tr>
+<tr><th align="left">Ben Noordhuis</th><td><a href="https://github.com/bnoordhuis">GitHub/bnoordhuis</a></td><td><a href="http://twitter.com/bnoordhuis">Twitter/@bnoordhuis</a></td></tr>
+<tr><th align="left">David Siegel</th><td><a href="https://github.com/agnat">GitHub/agnat</a></td><td>-</td></tr>
+</tbody></table>
+
+## Licence &amp; copyright
+
+Copyright (c) 2016 NAN WG Members / Collaborators (listed above).
+
+Native Abstractions for Node.js is licensed under an MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.

+ 98 - 0
node_modules/nan/doc/asyncworker.md

@@ -0,0 +1,98 @@
+## Asynchronous work helpers
+
+`Nan::AsyncWorker` and `Nan::AsyncProgressWorker` are helper classes that make working with asynchronous code easier.
+
+ - <a href="#api_nan_async_worker"><b><code>Nan::AsyncWorker</code></b></a>
+ - <a href="#api_nan_async_progress_worker"><b><code>Nan::AsyncProgressWorker</code></b></a>
+ - <a href="#api_nan_async_queue_worker"><b><code>Nan::AsyncQueueWorker</code></b></a>
+
+<a name="api_nan_async_worker"></a>
+### Nan::AsyncWorker
+
+`Nan::AsyncWorker` is an _abstract_ class that you can subclass to have much of the annoying asynchronous queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the asynchronous work is in progress.
+
+Definition:
+
+```c++
+class AsyncWorker {
+ public:
+  explicit AsyncWorker(Callback *callback_);
+
+  virtual ~AsyncWorker();
+
+  virtual void WorkComplete();
+
+  void SaveToPersistent(const char *key, const v8::Local<v8::Value> &value);
+
+  void SaveToPersistent(const v8::Local<v8::String> &key,
+                        const v8::Local<v8::Value> &value);
+
+  void SaveToPersistent(uint32_t index,
+                        const v8::Local<v8::Value> &value);
+
+  v8::Local<v8::Value> GetFromPersistent(const char *key) const;
+
+  v8::Local<v8::Value> GetFromPersistent(const v8::Local<v8::String> &key) const;
+
+  v8::Local<v8::Value> GetFromPersistent(uint32_t index) const;
+
+  virtual void Execute() = 0;
+
+  uv_work_t request;
+
+  virtual void Destroy();
+
+ protected:
+  Persistent<v8::Object> persistentHandle;
+
+  Callback *callback;
+
+  virtual void HandleOKCallback();
+
+  virtual void HandleErrorCallback();
+
+  void SetErrorMessage(const char *msg);
+
+  const char* ErrorMessage();
+};
+```
+
+<a name="api_nan_async_progress_worker"></a>
+### Nan::AsyncProgressWorker
+
+`Nan::AsyncProgressWorker` is an _abstract_ class that extends `Nan::AsyncWorker` and adds additional progress reporting callbacks that can be used during the asynchronous work execution to provide progress data back to JavaScript.
+
+Definition:
+
+```c++
+class AsyncProgressWorker : public AsyncWorker {
+ public:
+  explicit AsyncProgressWorker(Callback *callback_);
+
+  virtual ~AsyncProgressWorker();
+
+  void WorkProgress();
+
+  class ExecutionProgress {
+   public:
+    void Signal() const;
+    void Send(const char* data, size_t size) const;
+  };
+
+  virtual void Execute(const ExecutionProgress& progress) = 0;
+
+  virtual void HandleProgressCallback(const char *data, size_t size) = 0;
+
+  virtual void Destroy();
+```
+
+<a name="api_nan_async_queue_worker"></a>
+### Nan::AsyncQueueWorker
+
+`Nan::AsyncQueueWorker` will run a `Nan::AsyncWorker` asynchronously via libuv. Both the `execute` and `after_work` steps are taken care of for you. Most of the logic for this is embedded in `Nan::AsyncWorker`.
+
+Definition:
+
+```c++
+void AsyncQueueWorker(AsyncWorker *);
+```

+ 54 - 0
node_modules/nan/doc/buffers.md

@@ -0,0 +1,54 @@
+## Buffers
+
+NAN's `node::Buffer` helpers exist as the API has changed across supported Node versions. Use these methods to ensure compatibility.
+
+ - <a href="#api_nan_new_buffer"><b><code>Nan::NewBuffer()</code></b></a>
+ - <a href="#api_nan_copy_buffer"><b><code>Nan::CopyBuffer()</code></b></a>
+ - <a href="#api_nan_free_callback"><b><code>Nan::FreeCallback()</code></b></a>
+
+<a name="api_nan_new_buffer"></a>
+### Nan::NewBuffer()
+
+Allocate a new `node::Buffer` object with the specified size and optional data. Calls `node::Buffer::New()`.
+
+Note that when creating a `Buffer` using `Nan::NewBuffer()` and an existing `char*`, it is assumed that the ownership of the pointer is being transferred to the new `Buffer` for management.
+When a `node::Buffer` instance is garbage collected and a `FreeCallback` has not been specified, `data` will be disposed of via a call to `free()`.
+You _must not_ free the memory space manually once you have created a `Buffer` in this way.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Object> Nan::NewBuffer(uint32_t size)
+Nan::MaybeLocal<v8::Object> Nan::NewBuffer(char* data, uint32_t size)
+Nan::MaybeLocal<v8::Object> Nan::NewBuffer(char *data,
+                                           size_t length,
+                                           Nan::FreeCallback callback,
+                                           void *hint)
+```
+
+
+<a name="api_nan_copy_buffer"></a>
+### Nan::CopyBuffer()
+
+Similar to [`Nan::NewBuffer()`](#api_nan_new_buffer) except that an implicit memcpy will occur within Node. Calls `node::Buffer::Copy()`.
+
+Management of the `char*` is left to the user, you should manually free the memory space if necessary as the new `Buffer` will have its own copy.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Object> Nan::CopyBuffer(const char *data, uint32_t size)
+```
+
+
+<a name="api_nan_free_callback"></a>
+### Nan::FreeCallback()
+
+A free callback that can be provided to [`Nan::NewBuffer()`](#api_nan_new_buffer).
+The supplied callback will be invoked when the `Buffer` undergoes garbage collection.
+
+Signature:
+
+```c++
+typedef void (*FreeCallback)(char *data, void *hint);
+```

+ 52 - 0
node_modules/nan/doc/callback.md

@@ -0,0 +1,52 @@
+## Nan::Callback
+
+`Nan::Callback` makes it easier to use `v8::Function` handles as callbacks. A class that wraps a `v8::Function` handle, protecting it from garbage collection and making it particularly useful for storage and use across asynchronous execution.
+
+ - <a href="#api_nan_callback"><b><code>Nan::Callback</code></b></a>
+
+<a name="api_nan_callback"></a>
+### Nan::Callback
+
+```c++
+class Callback {
+ public:
+  Callback();
+
+  explicit Callback(const v8::Local<v8::Function> &fn);
+
+  ~Callback();
+
+  bool operator==(const Callback &other) const;
+
+  bool operator!=(const Callback &other) const;
+
+  v8::Local<v8::Function> operator*() const;
+
+  v8::Local<v8::Value> operator()(v8::Local<v8::Object> target,
+                                  int argc = 0,
+                                  v8::Local<v8::Value> argv[] = 0) const;
+
+  v8::Local<v8::Value> operator()(int argc = 0,
+                                  v8::Local<v8::Value> argv[] = 0) const;
+
+  void SetFunction(const v8::Local<v8::Function> &fn);
+
+  v8::Local<v8::Function> GetFunction() const;
+
+  bool IsEmpty() const;
+
+  v8::Local<v8::Value> Call(v8::Local<v8::Object> target,
+                            int argc,
+                            v8::Local<v8::Value> argv[]) const;
+
+  v8::Local<v8::Value> Call(int argc, v8::Local<v8::Value> argv[]) const;
+};
+```
+
+Example usage:
+
+```c++
+v8::Local<v8::Function> function;
+Nan::Callback callback(function);
+callback.Call(0, 0);
+```

+ 41 - 0
node_modules/nan/doc/converters.md

@@ -0,0 +1,41 @@
+## Converters
+
+NAN contains functions that convert `v8::Value`s to other `v8::Value` types and native types. Since type conversion is not guaranteed to succeed, they return `Nan::Maybe` types. These converters can be used in place of `value->ToX()` and `value->XValue()` (where `X` is one of the types, e.g. `Boolean`) in a way that provides a consistent interface across V8 versions. Newer versions of V8 use the new `v8::Maybe` and `v8::MaybeLocal` types for these conversions, older versions don't have this functionality so it is provided by NAN.
+
+ - <a href="#api_nan_to"><b><code>Nan::To()</code></b></a>
+
+<a name="api_nan_to"></a>
+### Nan::To()
+
+Converts a `v8::Local<v8::Value>` to a different subtype of `v8::Value` or to a native data type. Returns a `Nan::MaybeLocal<>` or a `Nan::Maybe<>` accordingly.
+
+See [maybe_types.md](./maybe_types.md) for more information on `Nan::Maybe` types.
+
+Signatures:
+
+```c++
+// V8 types
+Nan::MaybeLocal<v8::Boolean> Nan::To<v8::Boolean>(v8::Local<v8::Value> val);
+Nan::MaybeLocal<v8::Int32> Nan::To<v8::Int32>(v8::Local<v8::Value> val);
+Nan::MaybeLocal<v8::Integer> Nan::To<v8::Integer>(v8::Local<v8::Value> val);
+Nan::MaybeLocal<v8::Object> Nan::To<v8::Object>(v8::Local<v8::Value> val);
+Nan::MaybeLocal<v8::Number> Nan::To<v8::Number>(v8::Local<v8::Value> val);
+Nan::MaybeLocal<v8::String> Nan::To<v8::String>(v8::Local<v8::Value> val);
+Nan::MaybeLocal<v8::Uint32> Nan::To<v8::Uint32>(v8::Local<v8::Value> val);
+
+// Native types
+Nan::Maybe<bool> Nan::To<bool>(v8::Local<v8::Value> val);
+Nan::Maybe<double> Nan::To<double>(v8::Local<v8::Value> val);
+Nan::Maybe<int32_t> Nan::To<int32_t>(v8::Local<v8::Value> val);
+Nan::Maybe<int64_t> Nan::To<int64_t>(v8::Local<v8::Value> val);
+Nan::Maybe<uint32_t> Nan::To<uint32_t>(v8::Local<v8::Value> val);
+```
+
+### Example
+
+```c++
+v8::Local<v8::Value> val;
+Nan::MaybeLocal<v8::String> str = Nan::To<v8::String>(val);
+Nan::Maybe<double> d = Nan::To<double>(val);
+```
+

+ 226 - 0
node_modules/nan/doc/errors.md

@@ -0,0 +1,226 @@
+## Errors
+
+NAN includes helpers for creating, throwing and catching Errors as much of this functionality varies across the supported versions of V8 and must be abstracted.
+
+Note that an Error object is simply a specialized form of `v8::Value`.
+
+Also consult the V8 Embedders Guide section on [Exceptions](https://developers.google.com/v8/embed#exceptions) for more information.
+
+ - <a href="#api_nan_error"><b><code>Nan::Error()</code></b></a>
+ - <a href="#api_nan_range_error"><b><code>Nan::RangeError()</code></b></a>
+ - <a href="#api_nan_reference_error"><b><code>Nan::ReferenceError()</code></b></a>
+ - <a href="#api_nan_syntax_error"><b><code>Nan::SyntaxError()</code></b></a>
+ - <a href="#api_nan_type_error"><b><code>Nan::TypeError()</code></b></a>
+ - <a href="#api_nan_throw_error"><b><code>Nan::ThrowError()</code></b></a>
+ - <a href="#api_nan_throw_range_error"><b><code>Nan::ThrowRangeError()</code></b></a>
+ - <a href="#api_nan_throw_reference_error"><b><code>Nan::ThrowReferenceError()</code></b></a>
+ - <a href="#api_nan_throw_syntax_error"><b><code>Nan::ThrowSyntaxError()</code></b></a>
+ - <a href="#api_nan_throw_type_error"><b><code>Nan::ThrowTypeError()</code></b></a>
+ - <a href="#api_nan_fatal_exception"><b><code>Nan::FatalException()</code></b></a>
+ - <a href="#api_nan_errno_exception"><b><code>Nan::ErrnoException()</code></b></a>
+ - <a href="#api_nan_try_catch"><b><code>Nan::TryCatch</code></b></a>
+
+
+<a name="api_nan_error"></a>
+### Nan::Error()
+
+Create a new Error object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8.
+
+Note that an Error object is simply a specialized form of `v8::Value`.
+
+Signature:
+
+```c++
+v8::Local<v8::Value> Nan::Error(const char *msg);
+v8::Local<v8::Value> Nan::Error(v8::Local<v8::String> msg);
+```
+
+
+<a name="api_nan_range_error"></a>
+### Nan::RangeError()
+
+Create a new RangeError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8.
+
+Note that an RangeError object is simply a specialized form of `v8::Value`.
+
+Signature:
+
+```c++
+v8::Local<v8::Value> Nan::RangeError(const char *msg);
+v8::Local<v8::Value> Nan::RangeError(v8::Local<v8::String> msg);
+```
+
+
+<a name="api_nan_reference_error"></a>
+### Nan::ReferenceError()
+
+Create a new ReferenceError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8.
+
+Note that an ReferenceError object is simply a specialized form of `v8::Value`.
+
+Signature:
+
+```c++
+v8::Local<v8::Value> Nan::ReferenceError(const char *msg);
+v8::Local<v8::Value> Nan::ReferenceError(v8::Local<v8::String> msg);
+```
+
+
+<a name="api_nan_syntax_error"></a>
+### Nan::SyntaxError()
+
+Create a new SyntaxError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8.
+
+Note that an SyntaxError object is simply a specialized form of `v8::Value`.
+
+Signature:
+
+```c++
+v8::Local<v8::Value> Nan::SyntaxError(const char *msg);
+v8::Local<v8::Value> Nan::SyntaxError(v8::Local<v8::String> msg);
+```
+
+
+<a name="api_nan_type_error"></a>
+### Nan::TypeError()
+
+Create a new TypeError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8.
+
+Note that an TypeError object is simply a specialized form of `v8::Value`.
+
+Signature:
+
+```c++
+v8::Local<v8::Value> Nan::TypeError(const char *msg);
+v8::Local<v8::Value> Nan::TypeError(v8::Local<v8::String> msg);
+```
+
+
+<a name="api_nan_throw_error"></a>
+### Nan::ThrowError()
+
+Throw an Error object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new Error object will be created.
+
+Signature:
+
+```c++
+void Nan::ThrowError(const char *msg);
+void Nan::ThrowError(v8::Local<v8::String> msg);
+void Nan::ThrowError(v8::Local<v8::Value> error);
+```
+
+
+<a name="api_nan_throw_range_error"></a>
+### Nan::ThrowRangeError()
+
+Throw an RangeError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new RangeError object will be created.
+
+Signature:
+
+```c++
+void Nan::ThrowRangeError(const char *msg);
+void Nan::ThrowRangeError(v8::Local<v8::String> msg);
+void Nan::ThrowRangeError(v8::Local<v8::Value> error);
+```
+
+
+<a name="api_nan_throw_reference_error"></a>
+### Nan::ThrowReferenceError()
+
+Throw an ReferenceError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new ReferenceError object will be created.
+
+Signature:
+
+```c++
+void Nan::ThrowReferenceError(const char *msg);
+void Nan::ThrowReferenceError(v8::Local<v8::String> msg);
+void Nan::ThrowReferenceError(v8::Local<v8::Value> error);
+```
+
+
+<a name="api_nan_throw_syntax_error"></a>
+### Nan::ThrowSyntaxError()
+
+Throw an SyntaxError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new SyntaxError object will be created.
+
+Signature:
+
+```c++
+void Nan::ThrowSyntaxError(const char *msg);
+void Nan::ThrowSyntaxError(v8::Local<v8::String> msg);
+void Nan::ThrowSyntaxError(v8::Local<v8::Value> error);
+```
+
+
+<a name="api_nan_throw_type_error"></a>
+### Nan::ThrowTypeError()
+
+Throw an TypeError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new TypeError object will be created.
+
+Signature:
+
+```c++
+void Nan::ThrowTypeError(const char *msg);
+void Nan::ThrowTypeError(v8::Local<v8::String> msg);
+void Nan::ThrowTypeError(v8::Local<v8::Value> error);
+```
+
+<a name="api_nan_fatal_exception"></a>
+### Nan::FatalException()
+
+Replaces `node::FatalException()` which has a different API across supported versions of Node. For use with [`Nan::TryCatch`](#api_nan_try_catch).
+
+Signature:
+
+```c++
+void Nan::FatalException(const Nan::TryCatch& try_catch);
+```
+
+<a name="api_nan_errno_exception"></a>
+### Nan::ErrnoException()
+
+Replaces `node::ErrnoException()` which has a different API across supported versions of Node. 
+
+Signature:
+
+```c++
+v8::Local<v8::Value> Nan::ErrnoException(int errorno,
+                                         const char* syscall = NULL,
+                                         const char* message = NULL,
+                                         const char* path = NULL);
+```
+
+
+<a name="api_nan_try_catch"></a>
+### Nan::TryCatch
+
+A simple wrapper around [`v8::TryCatch`](https://v8docs.nodesource.com/io.js-3.0/d4/dc6/classv8_1_1_try_catch.html) compatible with all supported versions of V8. Can be used as a direct replacement in most cases. See also [`Nan::FatalException()`](#api_nan_fatal_exception) for an internal use compatible with `node::FatalException`.
+
+Signature:
+
+```c++
+class Nan::TryCatch {
+ public:
+  Nan::TryCatch();
+
+  bool HasCaught() const;
+
+  bool CanContinue() const;
+
+  v8::Local<v8::Value> ReThrow();
+
+  v8::Local<v8::Value> Exception() const;
+
+  // Nan::MaybeLocal for older versions of V8
+  v8::MaybeLocal<v8::Value> StackTrace() const;
+
+  v8::Local<v8::Message> Message() const;
+
+  void Reset();
+
+  void SetVerbose(bool value);
+
+  void SetCaptureMessage(bool value);
+};
+```
+

+ 512 - 0
node_modules/nan/doc/maybe_types.md

@@ -0,0 +1,512 @@
+## Maybe Types
+
+The `Nan::MaybeLocal` and `Nan::Maybe` types are monads that encapsulate `v8::Local` handles that _may be empty_.
+
+* **Maybe Types**
+  - <a href="#api_nan_maybe_local"><b><code>Nan::MaybeLocal</code></b></a>
+  - <a href="#api_nan_maybe"><b><code>Nan::Maybe</code></b></a>
+  - <a href="#api_nan_nothing"><b><code>Nan::Nothing</code></b></a>
+  - <a href="#api_nan_just"><b><code>Nan::Just</code></b></a>
+* **Maybe Helpers**
+  - <a href="#api_nan_call"><b><code>Nan::Call()</code></b></a>
+  - <a href="#api_nan_to_detail_string"><b><code>Nan::ToDetailString()</code></b></a>
+  - <a href="#api_nan_to_array_index"><b><code>Nan::ToArrayIndex()</code></b></a>
+  - <a href="#api_nan_equals"><b><code>Nan::Equals()</code></b></a>
+  - <a href="#api_nan_new_instance"><b><code>Nan::NewInstance()</code></b></a>
+  - <a href="#api_nan_get_function"><b><code>Nan::GetFunction()</code></b></a>
+  - <a href="#api_nan_set"><b><code>Nan::Set()</code></b></a>
+  - <a href="#api_nan_force_set"><b><code>Nan::ForceSet()</code></b></a>
+  - <a href="#api_nan_get"><b><code>Nan::Get()</code></b></a>
+  - <a href="#api_nan_get_property_attribute"><b><code>Nan::GetPropertyAttributes()</code></b></a>
+  - <a href="#api_nan_has"><b><code>Nan::Has()</code></b></a>
+  - <a href="#api_nan_delete"><b><code>Nan::Delete()</code></b></a>
+  - <a href="#api_nan_get_property_names"><b><code>Nan::GetPropertyNames()</code></b></a>
+  - <a href="#api_nan_get_own_property_names"><b><code>Nan::GetOwnPropertyNames()</code></b></a>
+  - <a href="#api_nan_set_prototype"><b><code>Nan::SetPrototype()</code></b></a>
+  - <a href="#api_nan_object_proto_to_string"><b><code>Nan::ObjectProtoToString()</code></b></a>
+  - <a href="#api_nan_has_own_property"><b><code>Nan::HasOwnProperty()</code></b></a>
+  - <a href="#api_nan_has_real_named_property"><b><code>Nan::HasRealNamedProperty()</code></b></a>
+  - <a href="#api_nan_has_real_indexed_property"><b><code>Nan::HasRealIndexedProperty()</code></b></a>
+  - <a href="#api_nan_has_real_named_callback_property"><b><code>Nan::HasRealNamedCallbackProperty()</code></b></a>
+  - <a href="#api_nan_get_real_named_property_in_prototype_chain"><b><code>Nan::GetRealNamedPropertyInPrototypeChain()</code></b></a>
+  - <a href="#api_nan_get_real_named_property"><b><code>Nan::GetRealNamedProperty()</code></b></a>
+  - <a href="#api_nan_call_as_function"><b><code>Nan::CallAsFunction()</code></b></a>
+  - <a href="#api_nan_call_as_constructor"><b><code>Nan::CallAsConstructor()</code></b></a>
+  - <a href="#api_nan_get_source_line"><b><code>Nan::GetSourceLine()</code></b></a>
+  - <a href="#api_nan_get_line_number"><b><code>Nan::GetLineNumber()</code></b></a>
+  - <a href="#api_nan_get_start_column"><b><code>Nan::GetStartColumn()</code></b></a>
+  - <a href="#api_nan_get_end_column"><b><code>Nan::GetEndColumn()</code></b></a>
+  - <a href="#api_nan_clone_element_at"><b><code>Nan::CloneElementAt()</code></b></a>
+  - <a href="#api_nan_make_maybe"><b><code>Nan::MakeMaybe()</code></b></a>
+
+<a name="api_nan_maybe_local"></a>
+### Nan::MaybeLocal
+
+A `Nan::MaybeLocal<T>` is a wrapper around [`v8::Local<T>`](https://v8docs.nodesource.com/io.js-3.0/de/deb/classv8_1_1_local.html) that enforces a check that determines whether the `v8::Local<T>` is empty before it can be used.
+
+If an API method returns a `Nan::MaybeLocal`, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a `v8::TerminateExecution` exception was thrown. In that case, an empty `Nan::MaybeLocal` is returned.
+
+Definition:
+
+```c++
+template<typename T> class Nan::MaybeLocal {
+ public:
+  MaybeLocal();
+
+  template<typename S> MaybeLocal(v8::Local<S> that);
+
+  bool IsEmpty() const;
+
+  template<typename S> bool ToLocal(v8::Local<S> *out);
+
+  // Will crash if the MaybeLocal<> is empty.
+  v8::Local<T> ToLocalChecked();
+
+  template<typename S> v8::Local<S> FromMaybe(v8::Local<S> default_value) const;
+};
+```
+
+See the documentation for [`v8::MaybeLocal`](https://v8docs.nodesource.com/io.js-3.0/d8/d7d/classv8_1_1_maybe_local.html) for further details.
+
+<a name="api_nan_maybe"></a>
+### Nan::Maybe
+
+A simple `Nan::Maybe` type, representing an object which may or may not have a value, see https://hackage.haskell.org/package/base/docs/Data-Maybe.html.
+
+If an API method returns a `Nan::Maybe<>`, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a `v8::TerminateExecution` exception was thrown. In that case, a "Nothing" value is returned.
+
+Definition:
+
+```c++
+template<typename T> class Nan::Maybe {
+ public:
+  bool IsNothing() const;
+  bool IsJust() const;
+
+  // Will crash if the Maybe<> is nothing.
+  T FromJust();
+
+  T FromMaybe(const T& default_value);
+
+  bool operator==(const Maybe &other);
+
+  bool operator!=(const Maybe &other);
+};
+```
+
+See the documentation for [`v8::Maybe`](https://v8docs.nodesource.com/io.js-3.0/d9/d4b/classv8_1_1_maybe.html) for further details.
+
+<a name="api_nan_nothing"></a>
+### Nan::Nothing
+
+Construct an empty `Nan::Maybe` type representing _nothing_.
+
+```c++
+template<typename T> Nan::Maybe<T> Nan::Nothing();
+```
+
+<a name="api_nan_just"></a>
+### Nan::Just
+
+Construct a `Nan::Maybe` type representing _just_ a value.
+
+```c++
+template<typename T> Nan::Maybe<T> Nan::Just(const T &t);
+```
+
+<a name="api_nan_call"></a>
+### Nan::Call()
+
+A helper method for calling [`v8::Function#Call()`](https://v8docs.nodesource.com/io.js-3.0/d5/d54/classv8_1_1_function.html#a468a89f737af0612db10132799c827c0) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Value> Nan::Call(v8::Local<v8::Function> fun, v8::Local<v8::Object> recv, int argc, v8::Local<v8::Value> argv[]);
+```
+
+
+<a name="api_nan_to_detail_string"></a>
+### Nan::ToDetailString()
+
+A helper method for calling [`v8::Value#ToDetailString()`](https://v8docs.nodesource.com/io.js-3.0/dc/d0a/classv8_1_1_value.html#a2f9770296dc2c8d274bc8cc0dca243e5) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::String> Nan::ToDetailString(v8::Local<v8::Value> val);
+```
+
+
+<a name="api_nan_to_array_index"></a>
+### Nan::ToArrayIndex()
+
+A helper method for calling [`v8::Value#ToArrayIndex()`](https://v8docs.nodesource.com/io.js-3.0/dc/d0a/classv8_1_1_value.html#acc5bbef3c805ec458470c0fcd6f13493) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Uint32> Nan::ToArrayIndex(v8::Local<v8::Value> val);
+```
+
+
+<a name="api_nan_equals"></a>
+### Nan::Equals()
+
+A helper method for calling [`v8::Value#Equals()`](https://v8docs.nodesource.com/io.js-3.0/dc/d0a/classv8_1_1_value.html#a0d9616ab2de899d4e3047c30a10c9285) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<bool> Nan::Equals(v8::Local<v8::Value> a, v8::Local<v8::Value>(b));
+```
+
+
+<a name="api_nan_new_instance"></a>
+### Nan::NewInstance()
+
+A helper method for calling [`v8::Function#NewInstance()`](https://v8docs.nodesource.com/io.js-3.0/d5/d54/classv8_1_1_function.html#a691b13f7a553069732cbacf5ac8c62ec) and [`v8::ObjectTemplate#NewInstance()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#ad605a7543cfbc5dab54cdb0883d14ae4) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Object> Nan::NewInstance(v8::Local<v8::Function> h);
+Nan::MaybeLocal<v8::Object> Nan::NewInstance(v8::Local<v8::Function> h, int argc, v8::Local<v8::Value> argv[]);
+Nan::MaybeLocal<v8::Object> Nan::NewInstance(v8::Local<v8::ObjectTemplate> h);
+```
+
+
+<a name="api_nan_get_function"></a>
+### Nan::GetFunction()
+
+A helper method for calling [`v8::FunctionTemplate#GetFunction()`](https://v8docs.nodesource.com/io.js-3.0/d8/d83/classv8_1_1_function_template.html#a56d904662a86eca78da37d9bb0ed3705) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Function> Nan::GetFunction(v8::Local<v8::FunctionTemplate> t);
+```
+
+
+<a name="api_nan_set"></a>
+### Nan::Set()
+
+A helper method for calling [`v8::Object#Set()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a67604ea3734f170c66026064ea808f20) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<bool> Nan::Set(v8::Local<v8::Object> obj,
+                          v8::Local<v8::Value> key,
+                          v8::Local<v8::Value> value)
+Nan::Maybe<bool> Nan::Set(v8::Local<v8::Object> obj,
+                          uint32_t index,
+                          v8::Local<v8::Value> value);
+```
+
+
+<a name="api_nan_force_set"></a>
+### Nan::ForceSet()
+
+A helper method for calling [`v8::Object#ForceSet()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a796b7b682896fb64bf1872747734e836) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object> obj,
+                               v8::Local<v8::Value> key,
+                               v8::Local<v8::Value> value,
+                               v8::PropertyAttribute attribs = v8::None);
+```
+
+
+<a name="api_nan_get"></a>
+### Nan::Get()
+
+A helper method for calling [`v8::Object#Get()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a2565f03e736694f6b1e1cf22a0b4eac2) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Value> Nan::Get(v8::Local<v8::Object> obj,
+                                    v8::Local<v8::Value> key);
+Nan::MaybeLocal<v8::Value> Nan::Get(v8::Local<v8::Object> obj, uint32_t index);
+```
+
+
+<a name="api_nan_get_property_attribute"></a>
+### Nan::GetPropertyAttributes()
+
+A helper method for calling [`v8::Object#GetPropertyAttributes()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a9b898894da3d1db2714fd9325a54fe57) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<v8::PropertyAttribute> Nan::GetPropertyAttributes(
+    v8::Local<v8::Object> obj,
+    v8::Local<v8::Value> key);
+```
+
+
+<a name="api_nan_has"></a>
+### Nan::Has()
+
+A helper method for calling [`v8::Object#Has()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab3c3d89ea7c2f9afd08965bd7299a41d) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<bool> Nan::Has(v8::Local<v8::Object> obj, v8::Local<v8::String> key);
+Nan::Maybe<bool> Nan::Has(v8::Local<v8::Object> obj, uint32_t index);
+```
+
+
+<a name="api_nan_delete"></a>
+### Nan::Delete()
+
+A helper method for calling [`v8::Object#Delete()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a2fa0f5a592582434ed1ceceff7d891ef) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<bool> Nan::Delete(v8::Local<v8::Object> obj,
+                             v8::Local<v8::String> key);
+Nan::Maybe<bool> Nan::Delete(v8::Local<v8::Object> obj, uint32_t index);
+```
+
+
+<a name="api_nan_get_property_names"></a>
+### Nan::GetPropertyNames()
+
+A helper method for calling [`v8::Object#GetPropertyNames()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#aced885270cfd2c956367b5eedc7fbfe8) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Array> Nan::GetPropertyNames(v8::Local<v8::Object> obj);
+```
+
+
+<a name="api_nan_get_own_property_names"></a>
+### Nan::GetOwnPropertyNames()
+
+A helper method for calling [`v8::Object#GetOwnPropertyNames()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a79a6e4d66049b9aa648ed4dfdb23e6eb) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Array> Nan::GetOwnPropertyNames(v8::Local<v8::Object> obj);
+```
+
+
+<a name="api_nan_set_prototype"></a>
+### Nan::SetPrototype()
+
+A helper method for calling [`v8::Object#SetPrototype()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a442706b22fceda6e6d1f632122a9a9f4) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<bool> Nan::SetPrototype(v8::Local<v8::Object> obj,
+                                   v8::Local<v8::Value> prototype);
+```
+
+
+<a name="api_nan_object_proto_to_string"></a>
+### Nan::ObjectProtoToString()
+
+A helper method for calling [`v8::Object#ObjectProtoToString()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab7a92b4dcf822bef72f6c0ac6fea1f0b) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::String> Nan::ObjectProtoToString(v8::Local<v8::Object> obj);
+```
+
+
+<a name="api_nan_has_own_property"></a>
+### Nan::HasOwnProperty()
+
+A helper method for calling [`v8::Object#HasOwnProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab7b7245442ca6de1e1c145ea3fd653ff) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<bool> Nan::HasOwnProperty(v8::Local<v8::Object> obj,
+                                     v8::Local<v8::String> key);
+```
+
+
+<a name="api_nan_has_real_named_property"></a>
+### Nan::HasRealNamedProperty()
+
+A helper method for calling [`v8::Object#HasRealNamedProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ad8b80a59c9eb3c1e6c3cd6c84571f767) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<bool> Nan::HasRealNamedProperty(v8::Local<v8::Object> obj,
+                                           v8::Local<v8::String> key);
+```
+
+
+<a name="api_nan_has_real_indexed_property"></a>
+### Nan::HasRealIndexedProperty()
+
+A helper method for calling [`v8::Object#HasRealIndexedProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#af94fc1135a5e74a2193fb72c3a1b9855) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<bool> Nan::HasRealIndexedProperty(v8::Local<v8::Object> obj,
+                                             uint32_t index);
+```
+
+
+<a name="api_nan_has_real_named_callback_property"></a>
+### Nan::HasRealNamedCallbackProperty()
+
+A helper method for calling [`v8::Object#HasRealNamedCallbackProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#af743b7ea132b89f84d34d164d0668811) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<bool> Nan::HasRealNamedCallbackProperty(
+    v8::Local<v8::Object> obj,
+    v8::Local<v8::String> key);
+```
+
+
+<a name="api_nan_get_real_named_property_in_prototype_chain"></a>
+### Nan::GetRealNamedPropertyInPrototypeChain()
+
+A helper method for calling [`v8::Object#GetRealNamedPropertyInPrototypeChain()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a8700b1862e6b4783716964ba4d5e6172) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Value> Nan::GetRealNamedPropertyInPrototypeChain(
+    v8::Local<v8::Object> obj,
+    v8::Local<v8::String> key);
+```
+
+
+<a name="api_nan_get_real_named_property"></a>
+### Nan::GetRealNamedProperty()
+
+A helper method for calling [`v8::Object#GetRealNamedProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a84471a824576a5994fdd0ffcbf99ccc0) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Value> Nan::GetRealNamedProperty(v8::Local<v8::Object> obj,
+                                                     v8::Local<v8::String> key);
+```
+
+
+<a name="api_nan_call_as_function"></a>
+### Nan::CallAsFunction()
+
+A helper method for calling [`v8::Object#CallAsFunction()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a9ef18be634e79b4f0cdffa1667a29f58) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Value> Nan::CallAsFunction(v8::Local<v8::Object> obj,
+                                               v8::Local<v8::Object> recv,
+                                               int argc,
+                                               v8::Local<v8::Value> argv[]);
+```
+
+
+<a name="api_nan_call_as_constructor"></a>
+### Nan::CallAsConstructor()
+
+A helper method for calling [`v8::Object#CallAsConstructor()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a50d571de50d0b0dfb28795619d07a01b) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Value> Nan::CallAsConstructor(v8::Local<v8::Object> obj,
+                                                  int argc,
+                                                  v8::Local<v8::Value> argv[]);
+```
+
+
+<a name="api_nan_get_source_line"></a>
+### Nan::GetSourceLine()
+
+A helper method for calling [`v8::Message#GetSourceLine()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#a849f7a6c41549d83d8159825efccd23a) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::String> Nan::GetSourceLine(v8::Local<v8::Message> msg);
+```
+
+
+<a name="api_nan_get_line_number"></a>
+### Nan::GetLineNumber()
+
+A helper method for calling [`v8::Message#GetLineNumber()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#adbe46c10a88a6565f2732a2d2adf99b9) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<int> Nan::GetLineNumber(v8::Local<v8::Message> msg);
+```
+
+
+<a name="api_nan_get_start_column"></a>
+### Nan::GetStartColumn()
+
+A helper method for calling [`v8::Message#GetStartColumn()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#a60ede616ba3822d712e44c7a74487ba6) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<int> Nan::GetStartColumn(v8::Local<v8::Message> msg);
+```
+
+
+<a name="api_nan_get_end_column"></a>
+### Nan::GetEndColumn()
+
+A helper method for calling [`v8::Message#GetEndColumn()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#aaa004cf19e529da980bc19fcb76d93be) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::Maybe<int> Nan::GetEndColumn(v8::Local<v8::Message> msg);
+```
+
+
+<a name="api_nan_clone_element_at"></a>
+### Nan::CloneElementAt()
+
+A helper method for calling [`v8::Array#CloneElementAt()`](https://v8docs.nodesource.com/io.js-3.0/d3/d32/classv8_1_1_array.html#a1d3a878d4c1c7cae974dd50a1639245e) in a way compatible across supported versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Object> Nan::CloneElementAt(v8::Local<v8::Array> array, uint32_t index);
+```
+
+<a name="api_nan_make_maybe"></a>
+### Nan::MakeMaybe()
+
+Wraps a `v8::Local<>` in a `Nan::MaybeLocal<>`. When called with a `Nan::MaybeLocal<>` it just returns its argument. This is useful in generic template code that builds on NAN.
+
+Synopsis:
+
+```c++
+  MaybeLocal<v8::Number> someNumber = MakeMaybe(New<v8::Number>(3.141592654));
+  MaybeLocal<v8::String> someString = MakeMaybe(New<v8::String>("probably"));
+```
+
+Signature:
+
+```c++
+template <typename T, template <typename> class MaybeMaybe>
+Nan::MaybeLocal<T> Nan::MakeMaybe(MaybeMaybe<T> v);
+```

+ 659 - 0
node_modules/nan/doc/methods.md

@@ -0,0 +1,659 @@
+## JavaScript-accessible methods
+
+A _template_ is a blueprint for JavaScript functions and objects in a context. You can use a template to wrap C++ functions and data structures within JavaScript objects so that they can be manipulated from JavaScript. See the V8 Embedders Guide section on [Templates](https://developers.google.com/v8/embed#templates) for further information.
+
+In order to expose functionality to JavaScript via a template, you must provide it to V8 in a form that it understands. Across the versions of V8 supported by NAN, JavaScript-accessible method signatures vary widely, NAN fully abstracts method declaration and provides you with an interface that is similar to the most recent V8 API but is backward-compatible with older versions that still use the now-deceased `v8::Argument` type.
+
+* **Method argument types**
+ - <a href="#api_nan_function_callback_info"><b><code>Nan::FunctionCallbackInfo</code></b></a>
+ - <a href="#api_nan_property_callback_info"><b><code>Nan::PropertyCallbackInfo</code></b></a>
+ - <a href="#api_nan_return_value"><b><code>Nan::ReturnValue</code></b></a>
+* **Method declarations**
+ - <a href="#api_nan_method"><b>Method declaration</b></a>
+ - <a href="#api_nan_getter"><b>Getter declaration</b></a>
+ - <a href="#api_nan_setter"><b>Setter declaration</b></a>
+ - <a href="#api_nan_property_getter"><b>Property getter declaration</b></a>
+ - <a href="#api_nan_property_setter"><b>Property setter declaration</b></a>
+ - <a href="#api_nan_property_enumerator"><b>Property enumerator declaration</b></a>
+ - <a href="#api_nan_property_deleter"><b>Property deleter declaration</b></a>
+ - <a href="#api_nan_property_query"><b>Property query declaration</b></a>
+ - <a href="#api_nan_index_getter"><b>Index getter declaration</b></a>
+ - <a href="#api_nan_index_setter"><b>Index setter declaration</b></a>
+ - <a href="#api_nan_index_enumerator"><b>Index enumerator declaration</b></a>
+ - <a href="#api_nan_index_deleter"><b>Index deleter declaration</b></a>
+ - <a href="#api_nan_index_query"><b>Index query declaration</b></a>
+* Method and template helpers
+ - <a href="#api_nan_set_method"><b><code>Nan::SetMethod()</code></b></a>
+ - <a href="#api_nan_set_prototype_method"><b><code>Nan::SetPrototypeMethod()</code></b></a>
+ - <a href="#api_nan_set_accessor"><b><code>Nan::SetAccessor()</code></b></a>
+ - <a href="#api_nan_set_named_property_handler"><b><code>Nan::SetNamedPropertyHandler()</code></b></a>
+ - <a href="#api_nan_set_indexed_property_handler"><b><code>Nan::SetIndexedPropertyHandler()</code></b></a>
+ - <a href="#api_nan_set_template"><b><code>Nan::SetTemplate()</code></b></a>
+ - <a href="#api_nan_set_prototype_template"><b><code>Nan::SetPrototypeTemplate()</code></b></a>
+ - <a href="#api_nan_set_instance_template"><b><code>Nan::SetInstanceTemplate()</code></b></a>
+ - <a href="#api_nan_set_call_handler"><b><code>Nan::SetCallHandler()</code></b></a>
+ - <a href="#api_nan_set_call_as_function_handler"><b><code>Nan::SetCallAsFunctionHandler()</code></b></a>
+
+<a name="api_nan_function_callback_info"></a>
+### Nan::FunctionCallbackInfo
+
+`Nan::FunctionCallbackInfo` should be used in place of [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/dd/d0d/classv8_1_1_function_callback_info.html), even with older versions of Node where `v8::FunctionCallbackInfo` does not exist.
+
+Definition:
+
+```c++
+template<typename T> class FunctionCallbackInfo {
+ public:
+  ReturnValue<T> GetReturnValue() const;
+  v8::Local<v8::Function> Callee();
+  v8::Local<v8::Value> Data();
+  v8::Local<v8::Object> Holder();
+  bool IsConstructCall();
+  int Length() const;
+  v8::Local<v8::Value> operator[](int i) const;
+  v8::Local<v8::Object> This() const;
+  v8::Isolate *GetIsolate() const;
+};
+```
+
+See the [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/dd/d0d/classv8_1_1_function_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from methods.
+
+<a name="api_nan_property_callback_info"></a>
+### Nan::PropertyCallbackInfo
+
+`Nan::PropertyCallbackInfo` should be used in place of [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/d7/dc5/classv8_1_1_property_callback_info.html), even with older versions of Node where `v8::PropertyCallbackInfo` does not exist.
+
+Definition:
+
+```c++
+template<typename T> class PropertyCallbackInfo : public PropertyCallbackInfoBase<T> {
+ public:
+  ReturnValue<T> GetReturnValue() const;
+  v8::Isolate* GetIsolate() const;
+  v8::Local<v8::Value> Data() const;
+  v8::Local<v8::Object> This() const;
+  v8::Local<v8::Object> Holder() const;
+};
+```
+
+See the [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/d7/dc5/classv8_1_1_property_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from property accessor methods.
+
+<a name="api_nan_return_value"></a>
+### Nan::ReturnValue
+
+`Nan::ReturnValue` is used in place of [`v8::ReturnValue`](https://v8docs.nodesource.com/io.js-3.0/da/da7/classv8_1_1_return_value.html) on both [`Nan::FunctionCallbackInfo`](#api_nan_function_callback_info) and [`Nan::PropertyCallbackInfo`](#api_nan_property_callback_info) as the return type of `GetReturnValue()`.
+
+Example usage:
+
+```c++
+void EmptyArray(const Nan::FunctionCallbackInfo<v8::Value>& info) {
+  info.GetReturnValue().Set(Nan::New<v8::Array>());
+}
+```
+
+Definition:
+
+```c++
+template<typename T> class ReturnValue {
+ public:
+  // Handle setters
+  template <typename S> void Set(const v8::Local<S> &handle);
+  template <typename S> void Set(const Nan::Global<S> &handle);
+
+  // Fast primitive setters
+  void Set(bool value);
+  void Set(double i);
+  void Set(int32_t i);
+  void Set(uint32_t i);
+
+  // Fast JS primitive setters
+  void SetNull();
+  void SetUndefined();
+  void SetEmptyString();
+
+  // Convenience getter for isolate
+  v8::Isolate *GetIsolate() const;
+};
+```
+
+See the documentation on [`v8::ReturnValue`](https://v8docs.nodesource.com/io.js-3.0/da/da7/classv8_1_1_return_value.html) for further information on this.
+
+<a name="api_nan_method"></a>
+### Method declaration
+
+JavaScript-accessible methods should be declared with the following signature to form a `Nan::FunctionCallback`:
+
+```c++
+typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>&);
+```
+
+Example:
+
+```c++
+void MethodName(const Nan::FunctionCallbackInfo<v8::Value>& info) {
+  ...
+}
+```
+
+You do not need to declare a new `HandleScope` within a method as one is implicitly created for you.
+
+**Example usage**
+
+```c++
+// .h:
+class Foo : public Nan::ObjectWrap {
+  ...
+
+  static void Bar(const Nan::FunctionCallbackInfo<v8::Value>& info);
+  static void Baz(const Nan::FunctionCallbackInfo<v8::Value>& info);
+}
+
+
+// .cc:
+void Foo::Bar(const Nan::FunctionCallbackInfo<v8::Value>& info) {
+  ...
+}
+
+void Foo::Baz(const Nan::FunctionCallbackInfo<v8::Value>& info) {
+  ...
+}
+```
+
+A helper macro `NAN_METHOD(methodname)` exists, compatible with NAN v1 method declarations.
+
+**Example usage with `NAN_METHOD(methodname)`**
+
+```c++
+// .h:
+class Foo : public Nan::ObjectWrap {
+  ...
+
+  static NAN_METHOD(Bar);
+  static NAN_METHOD(Baz);
+}
+
+
+// .cc:
+NAN_METHOD(Foo::Bar) {
+  ...
+}
+
+NAN_METHOD(Foo::Baz) {
+  ...
+}
+```
+
+Use [`Nan::SetPrototypeMethod`](#api_nan_set_prototype_method) to attach a method to a JavaScript function prototype or [`Nan::SetMethod`](#api_nan_set_method) to attach a method directly on a JavaScript object.
+
+<a name="api_nan_getter"></a>
+### Getter declaration
+
+JavaScript-accessible getters should be declared with the following signature to form a `Nan::GetterCallback`:
+
+```c++
+typedef void(*GetterCallback)(v8::Local<v8::String>,
+                              const PropertyCallbackInfo<v8::Value>&);
+```
+
+Example:
+
+```c++
+void GetterName(v8::Local<v8::String> property,
+                const Nan::PropertyCallbackInfo<v8::Value>& info) {
+  ...
+}
+```
+
+You do not need to declare a new `HandleScope` within a getter as one is implicitly created for you.
+
+A helper macro `NAN_GETTER(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on [Accessors](https://developers.google.com/v8/embed#accesssors).
+
+<a name="api_nan_setter"></a>
+### Setter declaration
+
+JavaScript-accessible setters should be declared with the following signature to form a <b><code>Nan::SetterCallback</code></b>:
+
+```c++
+typedef void(*SetterCallback)(v8::Local<v8::String>,
+                              v8::Local<v8::Value>,
+                              const PropertyCallbackInfo<void>&);
+```
+
+Example:
+
+```c++
+void SetterName(v8::Local<v8::String> property,
+                v8::Local<v8::Value> value,
+                const Nan::PropertyCallbackInfo<void>& info) {
+  ...
+}
+```
+
+You do not need to declare a new `HandleScope` within a setter as one is implicitly created for you.
+
+A helper macro `NAN_SETTER(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on [Accessors](https://developers.google.com/v8/embed#accesssors).
+
+<a name="api_nan_property_getter"></a>
+### Property getter declaration
+
+JavaScript-accessible property getters should be declared with the following signature to form a <b><code>Nan::PropertyGetterCallback</code></b>:
+
+```c++
+typedef void(*PropertyGetterCallback)(v8::Local<v8::String>,
+                                      const PropertyCallbackInfo<v8::Value>&);
+```
+
+Example:
+
+```c++
+void PropertyGetterName(v8::Local<v8::String> property,
+                        const Nan::PropertyCallbackInfo<v8::Value>& info) {
+  ...
+}
+```
+
+You do not need to declare a new `HandleScope` within a property getter as one is implicitly created for you.
+
+A helper macro `NAN_PROPERTY_GETTER(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors).
+
+<a name="api_nan_property_setter"></a>
+### Property setter declaration
+
+JavaScript-accessible property setters should be declared with the following signature to form a <b><code>Nan::PropertySetterCallback</code></b>:
+
+```c++
+typedef void(*PropertySetterCallback)(v8::Local<v8::String>,
+                                      v8::Local<v8::Value>,
+                                      const PropertyCallbackInfo<v8::Value>&);
+```
+
+Example:
+
+```c++
+void PropertySetterName(v8::Local<v8::String> property,
+                        v8::Local<v8::Value> value,
+                        const Nan::PropertyCallbackInfo<v8::Value>& info);
+```
+
+You do not need to declare a new `HandleScope` within a property setter as one is implicitly created for you.
+
+A helper macro `NAN_PROPERTY_SETTER(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors).
+
+<a name="api_nan_property_enumerator"></a>
+### Property enumerator declaration
+
+JavaScript-accessible property enumerators should be declared with the following signature to form a <b><code>Nan::PropertyEnumeratorCallback</code></b>:
+
+```c++
+typedef void(*PropertyEnumeratorCallback)(const PropertyCallbackInfo<v8::Array>&);
+```
+
+Example:
+
+```c++
+void PropertyEnumeratorName(const Nan::PropertyCallbackInfo<v8::Array>& info);
+```
+
+You do not need to declare a new `HandleScope` within a property enumerator as one is implicitly created for you.
+
+A helper macro `NAN_PROPERTY_ENUMERATOR(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors).
+
+<a name="api_nan_property_deleter"></a>
+### Property deleter declaration
+
+JavaScript-accessible property deleters should be declared with the following signature to form a <b><code>Nan::PropertyDeleterCallback</code></b>:
+
+```c++
+typedef void(*PropertyDeleterCallback)(v8::Local<v8::String>,
+                                       const PropertyCallbackInfo<v8::Boolean>&);
+```
+
+Example:
+
+```c++
+void PropertyDeleterName(v8::Local<v8::String> property,
+                         const Nan::PropertyCallbackInfo<v8::Boolean>& info);
+```
+
+You do not need to declare a new `HandleScope` within a property deleter as one is implicitly created for you.
+
+A helper macro `NAN_PROPERTY_DELETER(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors).
+
+<a name="api_nan_property_query"></a>
+### Property query declaration
+
+JavaScript-accessible property query methods should be declared with the following signature to form a <b><code>Nan::PropertyQueryCallback</code></b>:
+
+```c++
+typedef void(*PropertyQueryCallback)(v8::Local<v8::String>,
+                                     const PropertyCallbackInfo<v8::Integer>&);
+```
+
+Example:
+
+```c++
+void PropertyQueryName(v8::Local<v8::String> property,
+                       const Nan::PropertyCallbackInfo<v8::Integer>& info);
+```
+
+You do not need to declare a new `HandleScope` within a property query method as one is implicitly created for you.
+
+A helper macro `NAN_PROPERTY_QUERY(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors).
+
+<a name="api_nan_index_getter"></a>
+### Index getter declaration
+
+JavaScript-accessible index getter methods should be declared with the following signature to form a <b><code>Nan::IndexGetterCallback</code></b>:
+
+```c++
+typedef void(*IndexGetterCallback)(uint32_t,
+                                   const PropertyCallbackInfo<v8::Value>&);
+```
+
+Example:
+
+```c++
+void IndexGetterName(uint32_t index, const PropertyCallbackInfo<v8::Value>& info);
+```
+
+You do not need to declare a new `HandleScope` within a index getter as one is implicitly created for you.
+
+A helper macro `NAN_INDEX_GETTER(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors).
+
+<a name="api_nan_index_setter"></a>
+### Index setter declaration
+
+JavaScript-accessible index setter methods should be declared with the following signature to form a <b><code>Nan::IndexSetterCallback</code></b>:
+
+```c++
+typedef void(*IndexSetterCallback)(uint32_t,
+                                   v8::Local<v8::Value>,
+                                   const PropertyCallbackInfo<v8::Value>&);
+```
+
+Example:
+
+```c++
+void IndexSetterName(uint32_t index,
+                     v8::Local<v8::Value> value,
+                     const PropertyCallbackInfo<v8::Value>& info);
+```
+
+You do not need to declare a new `HandleScope` within a index setter as one is implicitly created for you.
+
+A helper macro `NAN_INDEX_SETTER(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors).
+
+<a name="api_nan_index_enumerator"></a>
+### Index enumerator declaration
+
+JavaScript-accessible index enumerator methods should be declared with the following signature to form a <b><code>Nan::IndexEnumeratorCallback</code></b>:
+
+```c++
+typedef void(*IndexEnumeratorCallback)(const PropertyCallbackInfo<v8::Array>&);
+```
+
+Example:
+
+```c++
+void IndexEnumeratorName(const PropertyCallbackInfo<v8::Array>& info);
+```
+
+You do not need to declare a new `HandleScope` within a index enumerator as one is implicitly created for you.
+
+A helper macro `NAN_INDEX_ENUMERATOR(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors).
+
+<a name="api_nan_index_deleter"></a>
+### Index deleter declaration
+
+JavaScript-accessible index deleter methods should be declared with the following signature to form a <b><code>Nan::IndexDeleterCallback</code></b>:
+
+```c++
+typedef void(*IndexDeleterCallback)(uint32_t,
+                                    const PropertyCallbackInfo<v8::Boolean>&);
+```
+
+Example:
+
+```c++
+void IndexDeleterName(uint32_t index, const PropertyCallbackInfo<v8::Boolean>& info);
+```
+
+You do not need to declare a new `HandleScope` within a index deleter as one is implicitly created for you.
+
+A helper macro `NAN_INDEX_DELETER(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors).
+
+<a name="api_nan_index_query"></a>
+### Index query declaration
+
+JavaScript-accessible index query methods should be declared with the following signature to form a <b><code>Nan::IndexQueryCallback</code></b>:
+
+```c++
+typedef void(*IndexQueryCallback)(uint32_t,
+                                  const PropertyCallbackInfo<v8::Integer>&);
+```
+
+Example:
+
+```c++
+void IndexQueryName(uint32_t index, const PropertyCallbackInfo<v8::Integer>& info);
+```
+
+You do not need to declare a new `HandleScope` within a index query method as one is implicitly created for you.
+
+A helper macro `NAN_INDEX_QUERY(methodname)` exists, compatible with NAN v1 method declarations.
+
+Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors).
+
+<a name="api_nan_set_method"></a>
+### Nan::SetMethod()
+
+Sets a method with a given name directly on a JavaScript object where the method has the `Nan::FunctionCallback` signature (see <a href="#api_nan_method">Method declaration</a>).
+
+Signature:
+
+```c++
+void Nan::SetMethod(v8::Local<v8::Object> recv,
+                    const char *name,
+                    Nan::FunctionCallback callback)
+void Nan::SetMethod(v8::Local<v8::Template> templ,
+                    const char *name,
+                    Nan::FunctionCallback callback)
+```
+
+<a name="api_nan_set_prototype_method"></a>
+### Nan::SetPrototypeMethod()
+
+Sets a method with a given name on a `FunctionTemplate`'s prototype where the method has the `Nan::FunctionCallback` signature (see <a href="#api_nan_method">Method declaration</a>).
+
+Signature:
+
+```c++
+void Nan::SetPrototypeMethod(v8::Local<v8::FunctionTemplate> recv,
+                             const char* name,
+                             Nan::FunctionCallback callback)
+```
+
+<a name="api_nan_set_accessor"></a>
+### Nan::SetAccessor()
+
+Sets getters and setters for a property with a given name on an `ObjectTemplate` or a plain `Object`. Accepts getters with the `Nan::GetterCallback` signature (see <a href="#api_nan_getter">Getter declaration</a>) and setters with the `Nan::SetterCallback` signature (see <a href="#api_nan_setter">Setter declaration</a>).
+
+Signature:
+
+```c++
+void SetAccessor(v8::Local<v8::ObjectTemplate> tpl,
+                 v8::Local<v8::String> name,
+                 Nan::GetterCallback getter,
+                 Nan::SetterCallback setter = 0,
+                 v8::Local<v8::Value> data = v8::Local<v8::Value>(),
+                 v8::AccessControl settings = v8::DEFAULT,
+                 v8::PropertyAttribute attribute = v8::None,
+                 imp::Sig signature = imp::Sig());
+bool SetAccessor(v8::Local<v8::Object> obj,
+                 v8::Local<v8::String> name,
+                 Nan::GetterCallback getter,
+                 Nan::SetterCallback setter = 0,
+                 v8::Local<v8::Value> data = v8::Local<v8::Value>(),
+                 v8::AccessControl settings = v8::DEFAULT,
+                 v8::PropertyAttribute attribute = v8::None)
+```
+
+See the V8 [`ObjectTemplate#SetAccessor()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#aa90691622f01269c6a11391d372ca0c5) and [`Object#SetAccessor()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a3f9dee085f5ec346465f1dc924325043) for further information about how to use `Nan::SetAccessor()`.
+
+<a name="api_nan_set_named_property_handler"></a>
+### Nan::SetNamedPropertyHandler()
+
+Sets named property getters, setters, query, deleter and enumerator methods on an `ObjectTemplate`. Accepts:
+
+* Property getters with the `Nan::PropertyGetterCallback` signature (see <a href="#api_nan_property_getter">Property getter declaration</a>)
+* Property setters with the `Nan::PropertySetterCallback` signature (see <a href="#api_nan_property_setter">Property setter declaration</a>)
+* Property query methods with the `Nan::PropertyQueryCallback` signature (see <a href="#api_nan_property_query">Property query declaration</a>)
+* Property deleters with the `Nan::PropertyDeleterCallback` signature (see <a href="#api_nan_property_deleter">Property deleter declaration</a>)
+* Property enumerators with the `Nan::PropertyEnumeratorCallback` signature (see <a href="#api_nan_property_enumerator">Property enumerator declaration</a>)
+
+Signature:
+
+```c++
+void SetNamedPropertyHandler(v8::Local<v8::ObjectTemplate> tpl,
+                             Nan::PropertyGetterCallback getter,
+                             Nan::PropertySetterCallback setter = 0,
+                             Nan::PropertyQueryCallback query = 0,
+                             Nan::PropertyDeleterCallback deleter = 0,
+                             Nan::PropertyEnumeratorCallback enumerator = 0,
+                             v8::Local<v8::Value> data = v8::Local<v8::Value>())
+```
+
+See the V8 [`ObjectTemplate#SetNamedPropertyHandler()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#a34d1cc45b642cd131706663801aadd76) for further information about how to use `Nan::SetNamedPropertyHandler()`.
+
+<a name="api_nan_set_indexed_property_handler"></a>
+### Nan::SetIndexedPropertyHandler()
+
+Sets indexed property getters, setters, query, deleter and enumerator methods on an `ObjectTemplate`. Accepts:
+
+* Indexed property getters with the `Nan::IndexGetterCallback` signature (see <a href="#api_nan_index_getter">Index getter declaration</a>)
+* Indexed property setters with the `Nan::IndexSetterCallback` signature (see <a href="#api_nan_index_setter">Index setter declaration</a>)
+* Indexed property query methods with the `Nan::IndexQueryCallback` signature (see <a href="#api_nan_index_query">Index query declaration</a>)
+* Indexed property deleters with the `Nan::IndexDeleterCallback` signature (see <a href="#api_nan_index_deleter">Index deleter declaration</a>)
+* Indexed property enumerators with the `Nan::IndexEnumeratorCallback` signature (see <a href="#api_nan_index_enumerator">Index enumerator declaration</a>)
+
+Signature:
+
+```c++
+void SetIndexedPropertyHandler(v8::Local<v8::ObjectTemplate> tpl,
+                               Nan::IndexGetterCallback getter,
+                               Nan::IndexSetterCallback setter = 0,
+                               Nan::IndexQueryCallback query = 0,
+                               Nan::IndexDeleterCallback deleter = 0,
+                               Nan::IndexEnumeratorCallback enumerator = 0,
+                               v8::Local<v8::Value> data = v8::Local<v8::Value>())
+```
+
+See the V8 [`ObjectTemplate#SetIndexedPropertyHandler()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#ac0234cbede45d51778bb5f6a32a9e125) for further information about how to use `Nan::SetIndexedPropertyHandler()`.
+
+<a name="api_nan_set_template"></a>
+### Nan::SetTemplate()
+
+Adds properties on an `Object`'s or `Function`'s template.
+
+Signature:
+
+```c++
+void Nan::SetTemplate(v8::Local<v8::Template> templ,
+                      const char *name,
+                      v8::Local<v8::Data> value);
+void Nan::SetTemplate(v8::Local<v8::Template> templ,
+                      v8::Local<v8::String> name,
+                      v8::Local<v8::Data> value,
+                      v8::PropertyAttribute attributes)
+```
+
+Calls the `Template`'s [`Set()`](https://v8docs.nodesource.com/io.js-3.0/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf).
+
+<a name="api_nan_set_prototype_template"></a>
+### Nan::SetPrototypeTemplate()
+
+Adds properties on an `Object`'s or `Function`'s prototype template.
+
+Signature:
+
+```c++
+void Nan::SetPrototypeTemplate(v8::Local<v8::FunctionTemplate> templ,
+                               const char *name,
+                               v8::Local<v8::Data> value);
+void Nan::SetPrototypeTemplate(v8::Local<v8::FunctionTemplate> templ,
+                               v8::Local<v8::String> name,
+                               v8::Local<v8::Data> value,
+                               v8::PropertyAttribute attributes)
+```
+
+Calls the `FunctionTemplate`'s _PrototypeTemplate's_ [`Set()`](https://v8docs.nodesource.com/io.js-3.0/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf).
+
+<a name="api_nan_set_instance_template"></a>
+### Nan::SetInstanceTemplate()
+
+Use to add instance properties on `FunctionTemplate`'s.
+
+Signature:
+
+```c++
+void Nan::SetInstanceTemplate(v8::Local<v8::FunctionTemplate> templ,
+                              const char *name,
+                              v8::Local<v8::Data> value);
+void Nan::SetInstanceTemplate(v8::Local<v8::FunctionTemplate> templ,
+                              v8::Local<v8::String> name,
+                              v8::Local<v8::Data> value,
+                              v8::PropertyAttribute attributes)
+```
+
+Calls the `FunctionTemplate`'s _InstanceTemplate's_ [`Set()`](https://v8docs.nodesource.com/io.js-3.0/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf).
+
+<a name="api_nan_set_call_handler"></a>
+### Nan::SetCallHandler()
+
+Set the call-handler callback for a `v8::FunctionTemplate`.
+This callback is called whenever the function created from this FunctionTemplate is called.
+
+Signature:
+
+```c++
+void Nan::SetCallHandler(v8::Local<v8::FunctionTemplate> templ, Nan::FunctionCallback callback, v8::Local<v8::Value> data = v8::Local<v8::Value>())
+```
+
+Calls the `FunctionTemplate`'s [`SetCallHandler()`](https://v8docs.nodesource.com/io.js-3.0/d8/d83/classv8_1_1_function_template.html#a26cf14e36aa1a47091b98536d08ea821).
+
+<a name="api_nan_set_call_as_function_handler"></a>
+### Nan::SetCallAsFunctionHandler()
+
+Sets the callback to be used when calling instances created from the `v8::ObjectTemplate` as a function.
+If no callback is set, instances behave like normal JavaScript objects that cannot be called as a function.
+
+Signature:
+
+```c++
+void Nan::SetCallAsFunctionHandler(v8::Local<v8::ObjectTemplate> templ, Nan::FunctionCallback callback, v8::Local<v8::Value> data = v8::Local<v8::Value>())
+```
+
+Calls the `ObjectTemplate`'s [`SetCallAsFunctionHandler()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#ae0a0e72fb0c5e5f32e255fe5bcc7316a).
+

+ 147 - 0
node_modules/nan/doc/new.md

@@ -0,0 +1,147 @@
+## New
+
+NAN provides a `Nan::New()` helper for the creation of new JavaScript objects in a way that's compatible across the supported versions of V8.
+
+ - <a href="#api_nan_new"><b><code>Nan::New()</code></b></a>
+ - <a href="#api_nan_undefined"><b><code>Nan::Undefined()</code></b></a>
+ - <a href="#api_nan_null"><b><code>Nan::Null()</code></b></a>
+ - <a href="#api_nan_true"><b><code>Nan::True()</code></b></a>
+ - <a href="#api_nan_false"><b><code>Nan::False()</code></b></a>
+ - <a href="#api_nan_empty_string"><b><code>Nan::EmptyString()</code></b></a>
+
+
+<a name="api_nan_new"></a>
+### Nan::New()
+
+`Nan::New()` should be used to instantiate new JavaScript objects.
+
+Refer to the specific V8 type in the [V8 documentation](https://v8docs.nodesource.com/io.js-3.0/d1/d83/classv8_1_1_data.html) for information on the types of arguments required for instantiation.
+
+Signatures:
+
+Return types are mostly omitted from the signatures for simplicity. In most cases the type will be contained within a `v8::Local<T>`. The following types will be contained within a `Nan::MaybeLocal<T>`: `v8::String`, `v8::Date`, `v8::RegExp`, `v8::Script`, `v8::UnboundScript`.
+
+Empty objects:
+
+```c++
+Nan::New<T>();
+```
+
+Generic single and multiple-argument:
+
+```c++
+Nan::New<T>(A0 arg0);
+Nan::New<T>(A0 arg0, A1 arg1);
+Nan::New<T>(A0 arg0, A1 arg1, A2 arg2);
+Nan::New<T>(A0 arg0, A1 arg1, A2 arg2, A3 arg3);
+```
+
+For creating `v8::FunctionTemplate` and `v8::Function` objects:
+
+_The definition of `Nan::FunctionCallback` can be found in the [Method declaration](./methods.md#api_nan_method) documentation._
+
+```c++
+Nan::New<T>(Nan::FunctionCallback callback,
+            v8::Local<v8::Value> data = v8::Local<v8::Value>());
+Nan::New<T>(Nan::FunctionCallback callback,
+            v8::Local<v8::Value> data = v8::Local<v8::Value>(),
+            A2 a2 = A2());
+```
+
+Native number types:
+
+```c++
+v8::Local<v8::Boolean> Nan::New<T>(bool value);
+v8::Local<v8::Int32> Nan::New<T>(int32_t value);
+v8::Local<v8::Uint32> Nan::New<T>(uint32_t value);
+v8::Local<v8::Number> Nan::New<T>(double value);
+```
+
+String types:
+
+```c++
+Nan::MaybeLocal<v8::String> Nan::New<T>(std::string const& value);
+Nan::MaybeLocal<v8::String> Nan::New<T>(const char * value, int length);
+Nan::MaybeLocal<v8::String> Nan::New<T>(const char * value);
+Nan::MaybeLocal<v8::String> Nan::New<T>(const uint16_t * value);
+Nan::MaybeLocal<v8::String> Nan::New<T>(const uint16_t * value, int length);
+```
+
+Specialized types:
+
+```c++
+v8::Local<v8::String> Nan::New<T>(v8::String::ExternalStringResource * value);
+v8::Local<v8::String> Nan::New<T>(Nan::ExternalOneByteStringResource * value);
+v8::Local<v8::RegExp> Nan::New<T>(v8::Local<v8::String> pattern, v8::RegExp::Flags flags);
+```
+
+Note that `Nan::ExternalOneByteStringResource` maps to [`v8::String::ExternalOneByteStringResource`](https://v8docs.nodesource.com/io.js-3.0/d9/db3/classv8_1_1_string_1_1_external_one_byte_string_resource.html), and `v8::String::ExternalAsciiStringResource` in older versions of V8.
+
+
+<a name="api_nan_undefined"></a>
+### Nan::Undefined()
+
+A helper method to reference the `v8::Undefined` object in a way that is compatible across all supported versions of V8.
+
+Signature:
+
+```c++
+v8::Local<v8::Primitive> Nan::Undefined()
+```
+
+<a name="api_nan_null"></a>
+### Nan::Null()
+
+A helper method to reference the `v8::Null` object in a way that is compatible across all supported versions of V8.
+
+Signature:
+
+```c++
+v8::Local<v8::Primitive> Nan::Null()
+```
+
+<a name="api_nan_true"></a>
+### Nan::True()
+
+A helper method to reference the `v8::Boolean` object representing the `true` value in a way that is compatible across all supported versions of V8.
+
+Signature:
+
+```c++
+v8::Local<v8::Boolean> Nan::True()
+```
+
+<a name="api_nan_false"></a>
+### Nan::False()
+
+A helper method to reference the `v8::Boolean` object representing the `false` value in a way that is compatible across all supported versions of V8.
+
+Signature:
+
+```c++
+v8::Local<v8::Boolean> Nan::False()
+```
+
+<a name="api_nan_empty_string"></a>
+### Nan::EmptyString()
+
+Call [`v8::String::Empty`](https://v8docs.nodesource.com/io.js-3.0/d2/db3/classv8_1_1_string.html#a7c1bc8886115d7ee46f1d571dd6ebc6d) to reference the empty string in a way that is compatible across all supported versions of V8.
+
+Signature:
+
+```c++
+v8::Local<v8::String> Nan::EmptyString()
+```
+
+
+<a name="api_nan_new_one_byte_string"></a>
+### Nan::NewOneByteString()
+
+An implementation of [`v8::String::NewFromOneByte()`](https://v8docs.nodesource.com/io.js-3.0/d2/db3/classv8_1_1_string.html#a5264d50b96d2c896ce525a734dc10f09) provided for consistent availability and API across supported versions of V8. Allocates a new string from Latin-1 data.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::String> Nan::NewOneByteString(const uint8_t * value,
+                                                  int length = -1)
+```

+ 63 - 0
node_modules/nan/doc/node_misc.md

@@ -0,0 +1,63 @@
+## Miscellaneous Node Helpers
+
+ - <a href="#api_nan_make_callback"><b><code>Nan::MakeCallback()</code></b></a>
+ - <a href="#api_nan_module_init"><b><code>NAN_MODULE_INIT()</code></b></a>
+ - <a href="#api_nan_export"><b><code>Nan::Export()</code></b></a>
+
+
+<a name="api_nan_make_callback"></a>
+### Nan::MakeCallback()
+
+Wrappers around `node::MakeCallback()` providing a consistent API across all supported versions of Node.
+
+Use `MakeCallback()` rather than using `v8::Function#Call()` directly in order to properly process internal Node functionality including domains, async hooks, the microtask queue, and other debugging functionality.
+
+Signatures:
+
+```c++
+v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object> target,
+                                       v8::Local<v8::Function> func,
+                                       int argc,
+                                       v8::Local<v8::Value>* argv);
+v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object> target,
+                                       v8::Local<v8::String> symbol,
+                                       int argc,
+                                       v8::Local<v8::Value>* argv);
+v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object> target,
+                                       const char* method,
+                                       int argc,
+                                       v8::Local<v8::Value>* argv);
+```
+
+
+<a name="api_nan_module_init"></a>
+### NAN_MODULE_INIT()
+
+Used to define the entry point function to a Node add-on. Creates a function with a given `name` that receives a `target` object representing the equivalent of the JavaScript `exports` object.
+
+See example below.
+
+<a name="api_nan_export"></a>
+### Nan::Export()
+
+A simple helper to register a `v8::FunctionTemplate` from a JavaScript-accessible method (see [Methods](./methods.md)) as a property on an object. Can be used in a way similar to assigning properties to `module.exports` in JavaScript.
+
+Signature:
+
+```c++
+void Export(v8::Local<v8::Object> target, const char *name, Nan::FunctionCallback f)
+```
+
+Also available as the shortcut `NAN_EXPORT` macro.
+
+Example:
+
+```c++
+NAN_METHOD(Foo) {
+  ...
+}
+
+NAN_MODULE_INIT(Init) {
+  NAN_EXPORT(target, Foo);
+}
+```

+ 263 - 0
node_modules/nan/doc/object_wrappers.md

@@ -0,0 +1,263 @@
+## Object Wrappers
+
+The `ObjectWrap` class can be used to make wrapped C++ objects and a factory of wrapped objects.
+
+ - <a href="#api_nan_object_wrap"><b><code>Nan::ObjectWrap</code></b></a>
+
+
+<a name="api_nan_object_wrap"></a>
+### Nan::ObjectWrap()
+
+A reimplementation of `node::ObjectWrap` that adds some API not present in older versions of Node. Should be preferred over `node::ObjectWrap` in all cases for consistency.
+
+Definition:
+
+```c++
+class ObjectWrap {
+ public:
+  ObjectWrap();
+
+  virtual ~ObjectWrap();
+
+  template <class T>
+  static inline T* Unwrap(v8::Local<v8::Object> handle);
+
+  inline v8::Local<v8::Object> handle();
+
+  inline Nan::Persistent<v8::Object>& persistent();
+
+ protected:
+  inline void Wrap(v8::Local<v8::Object> handle);
+
+  inline void MakeWeak();
+
+  /* Ref() marks the object as being attached to an event loop.
+   * Refed objects will not be garbage collected, even if
+   * all references are lost.
+   */
+  virtual void Ref();
+
+  /* Unref() marks an object as detached from the event loop.  This is its
+   * default state.  When an object with a "weak" reference changes from
+   * attached to detached state it will be freed. Be careful not to access
+   * the object after making this call as it might be gone!
+   * (A "weak reference" means an object that only has a
+   * persistant handle.)
+   *
+   * DO NOT CALL THIS FROM DESTRUCTOR
+   */
+  virtual void Unref();
+
+  int refs_;  // ro
+};
+```
+
+See the Node documentation on [Wrapping C++ Objects](https://nodejs.org/api/addons.html#addons_wrapping_c_objects) for more details.
+
+### This vs. Holder
+
+When calling `Unwrap`, it is important that the argument is indeed some JavaScript object which got wrapped by a `Wrap` call for this class or any derived class.
+The `Signature` installed by [`Nan::SetPrototypeMethod()`](methods.md#api_nan_set_prototype_method) does ensure that `info.Holder()` is just such an instance.
+In Node 0.12 and later, `info.This()` will also be of such a type, since otherwise the invocation will get rejected.
+However, in Node 0.10 and before it was possible to invoke a method on a JavaScript object which just had the extension type in its prototype chain.
+In such a situation, calling `Unwrap` on `info.This()` will likely lead to a failed assertion causing a crash, but could lead to even more serious corruption.
+
+On the other hand, calling `Unwrap` in an [accessor](methods.md#api_nan_set_accessor) should not use `Holder()` if the accessor is defined on the prototype.
+So either define your accessors on the instance template,
+or use `This()` after verifying that it is indeed a valid object.
+
+### Examples
+
+#### Basic
+
+```c++
+class MyObject : public Nan::ObjectWrap {
+ public:
+  static NAN_MODULE_INIT(Init) {
+    v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
+    tpl->SetClassName(Nan::New("MyObject").ToLocalChecked());
+    tpl->InstanceTemplate()->SetInternalFieldCount(1);
+
+    SetPrototypeMethod(tpl, "getHandle", GetHandle);
+    SetPrototypeMethod(tpl, "getValue", GetValue);
+
+    constructor().Reset(Nan::GetFunction(tpl).ToLocalChecked());
+    Nan::Set(target, Nan::New("MyObject").ToLocalChecked(),
+      Nan::GetFunction(tpl).ToLocalChecked());
+  }
+
+ private:
+  explicit MyObject(double value = 0) : value_(value) {}
+  ~MyObject() {}
+
+  static NAN_METHOD(New) {
+    if (info.IsConstructCall()) {
+      double value = info[0]->IsUndefined() ? 0 : Nan::To<double>(info[0]).FromJust();
+      MyObject *obj = new MyObject(value);
+      obj->Wrap(info.This());
+      info.GetReturnValue().Set(info.This());
+    } else {
+      const int argc = 1;
+      v8::Local<v8::Value> argv[argc] = {info[0]};
+      v8::Local<v8::Function> cons = Nan::New(constructor());
+      info.GetReturnValue().Set(cons->NewInstance(argc, argv));
+    }
+  }
+
+  static NAN_METHOD(GetHandle) {
+    MyObject* obj = Nan::ObjectWrap::Unwrap<MyObject>(info.Holder());
+    info.GetReturnValue().Set(obj->handle());
+  }
+
+  static NAN_METHOD(GetValue) {
+    MyObject* obj = Nan::ObjectWrap::Unwrap<MyObject>(info.Holder());
+    info.GetReturnValue().Set(obj->value_);
+  }
+
+  static inline Nan::Persistent<v8::Function> & constructor() {
+    static Nan::Persistent<v8::Function> my_constructor;
+    return my_constructor;
+  }
+
+  double value_;
+};
+
+NODE_MODULE(objectwrapper, MyObject::Init)
+```
+
+To use in Javascript:
+
+```Javascript
+var objectwrapper = require('bindings')('objectwrapper');
+
+var obj = new objectwrapper.MyObject(5);
+console.log('Should be 5: ' + obj.getValue());
+```
+
+#### Factory of wrapped objects
+
+```c++
+class MyFactoryObject : public Nan::ObjectWrap {
+ public:
+  static NAN_MODULE_INIT(Init) {
+    v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
+    tpl->InstanceTemplate()->SetInternalFieldCount(1);
+
+    Nan::SetPrototypeMethod(tpl, "getValue", GetValue);
+
+    constructor().Reset(Nan::GetFunction(tpl).ToLocalChecked());
+  }
+
+  static NAN_METHOD(NewInstance) {
+    v8::Local<v8::Function> cons = Nan::New(constructor());
+    double value = info[0]->IsNumber() ? Nan::To<double>(info[0]).FromJust() : 0;
+    const int argc = 1;
+    v8::Local<v8::Value> argv[1] = {Nan::New(value)};
+    info.GetReturnValue().Set(Nan::NewInstance(cons, argc, argv).ToLocalChecked());
+  }
+
+  // Needed for the next example:
+  inline double value() const {
+    return value_;
+  }
+
+ private:
+  explicit MyFactoryObject(double value = 0) : value_(value) {}
+  ~MyFactoryObject() {}
+
+  static NAN_METHOD(New) {
+    if (info.IsConstructCall()) {
+      double value = info[0]->IsNumber() ? Nan::To<double>(info[0]).FromJust() : 0;
+      MyFactoryObject * obj = new MyFactoryObject(value);
+      obj->Wrap(info.This());
+      info.GetReturnValue().Set(info.This());
+    } else {
+      const int argc = 1;
+      v8::Local<v8::Value> argv[argc] = {info[0]};
+      v8::Local<v8::Function> cons = Nan::New(constructor());
+      info.GetReturnValue().Set(Nan::NewInstance(cons, argc, argv).ToLocalChecked());
+    }
+  }
+
+  static NAN_METHOD(GetValue) {
+    MyFactoryObject* obj = ObjectWrap::Unwrap<MyFactoryObject>(info.Holder());
+    info.GetReturnValue().Set(obj->value_);
+  }
+
+  static inline Nan::Persistent<v8::Function> & constructor() {
+    static Nan::Persistent<v8::Function> my_constructor;
+    return my_constructor;
+  }
+
+  double value_;
+};
+
+NAN_MODULE_INIT(Init) {
+  MyFactoryObject::Init(target);
+  Nan::Set(target,
+    Nan::New<v8::String>("newFactoryObjectInstance").ToLocalChecked(),
+    Nan::GetFunction(
+      Nan::New<v8::FunctionTemplate>(MyFactoryObject::NewInstance)).ToLocalChecked()
+  );
+}
+
+NODE_MODULE(wrappedobjectfactory, Init)
+```
+
+To use in Javascript:
+
+```Javascript
+var wrappedobjectfactory = require('bindings')('wrappedobjectfactory');
+
+var obj = wrappedobjectfactory.newFactoryObjectInstance(10);
+console.log('Should be 10: ' + obj.getValue());
+```
+
+#### Passing wrapped objects around
+
+Use the `MyFactoryObject` class above along with the following:
+
+```c++
+static NAN_METHOD(Sum) {
+  Nan::MaybeLocal<v8::Object> maybe1 = Nan::To<v8::Object>(info[0]);
+  Nan::MaybeLocal<v8::Object> maybe2 = Nan::To<v8::Object>(info[1]);
+
+  // Quick check:
+  if (maybe1.IsEmpty() || maybe2.IsEmpty()) {
+    // return value is undefined by default
+    return;
+  }
+
+  MyFactoryObject* obj1 =
+    Nan::ObjectWrap::Unwrap<MyFactoryObject>(maybe1.ToLocalChecked());
+  MyFactoryObject* obj2 =
+    Nan::ObjectWrap::Unwrap<MyFactoryObject>(maybe2.ToLocalChecked());
+
+  info.GetReturnValue().Set(Nan::New<v8::Number>(obj1->value() + obj2->value()));
+}
+
+NAN_MODULE_INIT(Init) {
+  MyFactoryObject::Init(target);
+  Nan::Set(target,
+    Nan::New<v8::String>("newFactoryObjectInstance").ToLocalChecked(),
+    Nan::GetFunction(
+      Nan::New<v8::FunctionTemplate>(MyFactoryObject::NewInstance)).ToLocalChecked()
+  );
+  Nan::Set(target,
+    Nan::New<v8::String>("sum").ToLocalChecked(),
+    Nan::GetFunction(Nan::New<v8::FunctionTemplate>(Sum)).ToLocalChecked()
+  );
+}
+
+NODE_MODULE(myaddon, Init)
+```
+
+To use in Javascript:
+
+```Javascript
+var myaddon = require('bindings')('myaddon');
+
+var obj1 = myaddon.newFactoryObjectInstance(5);
+var obj2 = myaddon.newFactoryObjectInstance(10);
+console.log('sum of object values: ' + myaddon.sum(obj1, obj2));
+```

+ 295 - 0
node_modules/nan/doc/persistent.md

@@ -0,0 +1,295 @@
+## Persistent references
+
+An object reference that is independent of any `HandleScope` is a _persistent_ reference. Where a `Local` handle only lives as long as the `HandleScope` in which it was allocated, a `Persistent` handle remains valid until it is explicitly disposed.
+
+Due to the evolution of the V8 API, it is necessary for NAN to provide a wrapper implementation of the `Persistent` classes to supply compatibility across the V8 versions supported.
+
+ - <a href="#api_nan_persistent_base"><b><code>Nan::PersistentBase & v8::PersistentBase</code></b></a>
+ - <a href="#api_nan_non_copyable_persistent_traits"><b><code>Nan::NonCopyablePersistentTraits & v8::NonCopyablePersistentTraits</code></b></a>
+ - <a href="#api_nan_copyable_persistent_traits"><b><code>Nan::CopyablePersistentTraits & v8::CopyablePersistentTraits</code></b></a>
+ - <a href="#api_nan_persistent"><b><code>Nan::Persistent</code></b></a>
+ - <a href="#api_nan_global"><b><code>Nan::Global</code></b></a>
+ - <a href="#api_nan_weak_callback_info"><b><code>Nan::WeakCallbackInfo</code></b></a>
+ - <a href="#api_nan_weak_callback_type"><b><code>Nan::WeakCallbackType</code></b></a>
+
+Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles).
+
+<a name="api_nan_persistent_base"></a>
+### Nan::PersistentBase & v8::PersistentBase
+
+A persistent handle contains a reference to a storage cell in V8 which holds an object value and which is updated by the garbage collector whenever the object is moved. A new storage cell can be created using the constructor or `Nan::PersistentBase::Reset()`. Existing handles can be disposed using an argument-less `Nan::PersistentBase::Reset()`.
+
+Definition:
+
+_(note: this is implemented as `Nan::PersistentBase` for older versions of V8 and the native `v8::PersistentBase` is used for newer versions of V8)_
+
+```c++
+template<typename T> class PersistentBase {
+ public:
+  /**
+   * If non-empty, destroy the underlying storage cell
+   */
+  void Reset();
+
+  /**
+   * If non-empty, destroy the underlying storage cell and create a new one with
+   * the contents of another if it is also non-empty
+   */
+  template<typename S> void Reset(const v8::Local<S> &other);
+
+  /**
+   * If non-empty, destroy the underlying storage cell and create a new one with
+   * the contents of another if it is also non-empty
+   */
+  template<typename S> void Reset(const PersistentBase<S> &other);
+
+  /**
+   * If non-empty, destroy the underlying storage cell
+   * IsEmpty() will return true after this call.
+   */
+  bool IsEmpty();
+
+  void Empty();
+
+  template<typename S> bool operator==(const PersistentBase<S> &that);
+
+  template<typename S> bool operator==(const v8::Local<S> &that);
+
+  template<typename S> bool operator!=(const PersistentBase<S> &that);
+
+  template<typename S> bool operator!=(const v8::Local<S> &that);
+
+   /**
+   *  Install a finalization callback on this object.
+   *  NOTE: There is no guarantee as to *when* or even *if* the callback is
+   *  invoked. The invocation is performed solely on a best effort basis.
+   *  As always, GC-based finalization should *not* be relied upon for any
+   *  critical form of resource management! At the moment you can either
+   *  specify a parameter for the callback or the location of two internal
+   *  fields in the dying object.
+   */
+  template<typename P>
+  void SetWeak(P *parameter,
+               typename WeakCallbackInfo<P>::Callback callback,
+               WeakCallbackType type);
+
+  void ClearWeak();
+
+  /**
+   * Marks the reference to this object independent. Garbage collector is free
+   * to ignore any object groups containing this object. Weak callback for an
+   * independent handle should not assume that it will be preceded by a global
+   * GC prologue callback or followed by a global GC epilogue callback.
+   */
+  void MarkIndependent() const;
+
+  bool IsIndependent() const;
+
+  /** Checks if the handle holds the only reference to an object. */
+  bool IsNearDeath() const;
+
+  /** Returns true if the handle's reference is weak.  */
+  bool IsWeak() const
+};
+```
+
+See the V8 documentation for [`PersistentBase`](https://v8docs.nodesource.com/io.js-3.0/d4/dca/classv8_1_1_persistent_base.html) for further information.
+
+**Tip:** To get a `v8::Local` reference to the original object back from a `PersistentBase` or `Persistent` object:
+
+```c++
+v8::Local<v8::Object> object = Nan::New(persistent);
+```
+
+<a name="api_nan_non_copyable_persistent_traits"></a>
+### Nan::NonCopyablePersistentTraits & v8::NonCopyablePersistentTraits
+
+Default traits for `Nan::Persistent`. This class does not allow use of the a copy constructor or assignment operator. At present `kResetInDestructor` is not set, but that will change in a future version.
+
+Definition:
+
+_(note: this is implemented as `Nan::NonCopyablePersistentTraits` for older versions of V8 and the native `v8::NonCopyablePersistentTraits` is used for newer versions of V8)_
+
+```c++
+template<typename T> class NonCopyablePersistentTraits {
+ public:
+  typedef Persistent<T, NonCopyablePersistentTraits<T> > NonCopyablePersistent;
+
+  static const bool kResetInDestructor = false;
+
+  template<typename S, typename M>
+  static void Copy(const Persistent<S, M> &source,
+                   NonCopyablePersistent *dest);
+
+  template<typename O> static void Uncompilable();
+};
+```
+
+See the V8 documentation for [`NonCopyablePersistentTraits`](https://v8docs.nodesource.com/io.js-3.0/de/d73/classv8_1_1_non_copyable_persistent_traits.html) for further information.
+
+<a name="api_nan_copyable_persistent_traits"></a>
+### Nan::CopyablePersistentTraits & v8::CopyablePersistentTraits
+
+A helper class of traits to allow copying and assignment of `Persistent`. This will clone the contents of storage cell, but not any of the flags, etc..
+
+Definition:
+
+_(note: this is implemented as `Nan::CopyablePersistentTraits` for older versions of V8 and the native `v8::NonCopyablePersistentTraits` is used for newer versions of V8)_
+
+```c++
+template<typename T>
+class CopyablePersistentTraits {
+ public:
+  typedef Persistent<T, CopyablePersistentTraits<T> > CopyablePersistent;
+
+  static const bool kResetInDestructor = true;
+
+  template<typename S, typename M>
+  static void Copy(const Persistent<S, M> &source,
+                   CopyablePersistent *dest);
+};
+```
+
+See the V8 documentation for [`CopyablePersistentTraits`](https://v8docs.nodesource.com/io.js-3.0/da/d5c/structv8_1_1_copyable_persistent_traits.html) for further information.
+
+<a name="api_nan_persistent"></a>
+### Nan::Persistent
+
+A type of `PersistentBase` which allows copy and assignment. Copy, assignment and destructor behavior is controlled by the traits class `M`.
+
+Definition:
+
+```c++
+template<typename T, typename M = NonCopyablePersistentTraits<T> >
+class Persistent;
+
+template<typename T, typename M> class Persistent : public PersistentBase<T> {
+ public:
+ /**
+  * A Persistent with no storage cell.
+  */
+  Persistent();
+
+  /**
+   * Construct a Persistent from a v8::Local. When the v8::Local is non-empty, a
+   * new storage cell is created pointing to the same object, and no flags are
+   * set.
+   */
+  template<typename S> Persistent(v8::Local<S> that);
+
+  /**
+   * Construct a Persistent from a Persistent. When the Persistent is non-empty,
+   * a new storage cell is created pointing to the same object, and no flags are
+   * set.
+   */
+  Persistent(const Persistent &that);
+
+  /**
+   * The copy constructors and assignment operator create a Persistent exactly
+   * as the Persistent constructor, but the Copy function from the traits class
+   * is called, allowing the setting of flags based on the copied Persistent.
+   */
+  Persistent &operator=(const Persistent &that);
+
+  template <typename S, typename M2>
+  Persistent &operator=(const Persistent<S, M2> &that);
+
+  /**
+   * The destructor will dispose the Persistent based on the kResetInDestructor
+   * flags in the traits class.  Since not calling dispose can result in a
+   * memory leak, it is recommended to always set this flag.
+   */
+  ~Persistent();
+};
+```
+
+See the V8 documentation for [`Persistent`](https://v8docs.nodesource.com/io.js-3.0/d2/d78/classv8_1_1_persistent.html) for further information.
+
+<a name="api_nan_global"></a>
+### Nan::Global
+
+A type of `PersistentBase` which has move semantics.
+
+```c++
+template<typename T> class Global : public PersistentBase<T> {
+ public:
+  /**
+   * A Global with no storage cell.
+   */
+  Global();
+
+  /**
+   * Construct a Global from a v8::Local. When the v8::Local is non-empty, a new
+   * storage cell is created pointing to the same object, and no flags are set.
+   */
+  template<typename S> Global(v8::Local<S> that);
+  /**
+   * Construct a Global from a PersistentBase. When the Persistent is non-empty,
+   * a new storage cell is created pointing to the same object, and no flags are
+   * set.
+   */
+  template<typename S> Global(const PersistentBase<S> &that);
+
+  /**
+   * Pass allows returning globals from functions, etc.
+   */
+  Global Pass();
+};
+```
+
+See the V8 documentation for [`Global`](https://v8docs.nodesource.com/io.js-3.0/d5/d40/classv8_1_1_global.html) for further information.
+
+<a name="api_nan_weak_callback_info"></a>
+### Nan::WeakCallbackInfo
+
+`Nan::WeakCallbackInfo` is used as an argument when setting a persistent reference as weak. You may need to free any external resources attached to the object. It is a mirror of `v8:WeakCallbackInfo` as found in newer versions of V8.
+
+Definition:
+
+```c++
+template<typename T> class WeakCallbackInfo {
+ public:
+  typedef void (*Callback)(const WeakCallbackInfo<T>& data);
+
+  v8::Isolate *GetIsolate() const;
+
+  /**
+   * Get the parameter that was associated with the weak handle.
+   */
+  T *GetParameter() const;
+
+  /**
+   * Get pointer from internal field, index can be 0 or 1.
+   */
+  void *GetInternalField(int index) const;
+};
+```
+
+Example usage:
+
+```c++
+void weakCallback(const WeakCallbackInfo<int> &data) {
+  int *parameter = data.GetParameter();
+  delete parameter;
+}
+
+Persistent<v8::Object> obj;
+int *data = new int(0);
+obj.SetWeak(data, callback, WeakCallbackType::kParameter);
+```
+
+See the V8 documentation for [`WeakCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/d8/d06/classv8_1_1_weak_callback_info.html) for further information.
+
+<a name="api_nan_weak_callback_type"></a>
+### Nan::WeakCallbackType
+
+Represents the type of a weak callback.
+A weak callback of type `kParameter` makes the supplied parameter to `Nan::PersistentBase::SetWeak` available through `WeakCallbackInfo::GetParameter`.
+A weak callback of type `kInternalFields` uses up to two internal fields at indices 0 and 1 on the `Nan::PersistentBase<v8::Object>` being made weak.
+Note that only `v8::Object`s and derivatives can have internal fields.
+
+Definition:
+
+```c++
+enum class WeakCallbackType { kParameter, kInternalFields };
+```

+ 73 - 0
node_modules/nan/doc/scopes.md

@@ -0,0 +1,73 @@
+## Scopes
+
+A _local handle_ is a pointer to an object. All V8 objects are accessed using handles, they are necessary because of the way the V8 garbage collector works.
+
+A handle scope can be thought of as a container for any number of handles. When you've finished with your handles, instead of deleting each one individually you can simply delete their scope.
+
+The creation of `HandleScope` objects is different across the supported versions of V8. Therefore, NAN provides its own implementations that can be used safely across these.
+
+ - <a href="#api_nan_handle_scope"><b><code>Nan::HandleScope</code></b></a>
+ - <a href="#api_nan_escapable_handle_scope"><b><code>Nan::EscapableHandleScope</code></b></a>
+
+Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles).
+
+<a name="api_nan_handle_scope"></a>
+### Nan::HandleScope
+
+A simple wrapper around [`v8::HandleScope`](https://v8docs.nodesource.com/io.js-3.0/d3/d95/classv8_1_1_handle_scope.html).
+
+Definition:
+
+```c++
+class Nan::HandleScope {
+ public:
+  Nan::HandleScope();
+  static int NumberOfHandles();
+};
+```
+
+Allocate a new `Nan::HandleScope` whenever you are creating new V8 JavaScript objects. Note that an implicit `HandleScope` is created for you on JavaScript-accessible methods so you do not need to insert one yourself.
+
+Example:
+
+```c++
+// new object is created, it needs a new scope:
+void Pointless() {
+  Nan::HandleScope scope;
+  v8::Local<v8::Object> obj = Nan::New<v8::Object>();
+}
+
+// JavaScript-accessible method already has a HandleScope
+NAN_METHOD(Pointless2) {
+  v8::Local<v8::Object> obj = Nan::New<v8::Object>();
+}
+```
+
+<a name="api_nan_escapable_handle_scope"></a>
+### Nan::EscapableHandleScope
+
+Similar to [`Nan::HandleScope`](#api_nan_handle_scope) but should be used in cases where a function needs to return a V8 JavaScript type that has been created within it.
+
+Definition:
+
+```c++
+class Nan::EscapableHandleScope {
+ public:
+  Nan::EscapableHandleScope();
+  static int NumberOfHandles();
+  template<typename T> v8::Local<T> Escape(v8::Local<T> value);
+}
+```
+
+Use `Escape(value)` to return the object.
+
+Example:
+
+```c++
+v8::Local<v8::Object> EmptyObj() {
+  Nan::EscapableHandleScope scope;
+  v8::Local<v8::Object> obj = Nan::New<v8::Object>();
+  return scope.Escape(obj);
+}
+```
+

+ 38 - 0
node_modules/nan/doc/script.md

@@ -0,0 +1,38 @@
+## Script
+
+NAN provides a `v8::Script` helpers as the API has changed over the supported versions of V8.
+
+ - <a href="#api_nan_compile_script"><b><code>Nan::CompileScript()</code></b></a>
+ - <a href="#api_nan_run_script"><b><code>Nan::RunScript()</code></b></a>
+
+
+<a name="api_nan_compile_script"></a>
+### Nan::CompileScript()
+
+A wrapper around [`v8::Script::Compile()`](https://v8docs.nodesource.com/io.js-3.0/da/da5/classv8_1_1_script_compiler.html#a93f5072a0db55d881b969e9fc98e564b).
+
+Note that `Nan::BoundScript` is an alias for `v8::Script`.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<Nan::BoundScript> Nan::CompileScript(
+    v8::Local<v8::String> s,
+    const v8::ScriptOrigin& origin);
+Nan::MaybeLocal<Nan::BoundScript> Nan::CompileScript(v8::Local<v8::String> s);
+```
+
+
+<a name="api_nan_run_script"></a>
+### Nan::RunScript()
+
+Calls `script->Run()` or `script->BindToCurrentContext()->Run(Nan::GetCurrentContext())`.
+
+Note that `Nan::BoundScript` is an alias for `v8::Script` and `Nan::UnboundScript` is an alias for `v8::UnboundScript` where available and `v8::Script` on older versions of V8.
+
+Signature:
+
+```c++
+Nan::MaybeLocal<v8::Value> Nan::RunScript(v8::Local<Nan::UnboundScript> script)
+Nan::MaybeLocal<v8::Value> Nan::RunScript(v8::Local<Nan::BoundScript> script) 
+```

+ 62 - 0
node_modules/nan/doc/string_bytes.md

@@ -0,0 +1,62 @@
+## Strings & Bytes
+
+Miscellaneous string & byte encoding and decoding functionality provided for compatibility across supported versions of V8 and Node. Implemented by NAN to ensure that all encoding types are supported, even for older versions of Node where they are missing.
+
+ - <a href="#api_nan_encoding"><b><code>Nan::Encoding</code></b></a>
+ - <a href="#api_nan_encode"><b><code>Nan::Encode()</code></b></a>
+ - <a href="#api_nan_decode_bytes"><b><code>Nan::DecodeBytes()</code></b></a>
+ - <a href="#api_nan_decode_write"><b><code>Nan::DecodeWrite()</code></b></a>
+
+
+<a name="api_nan_encoding"></a>
+### Nan::Encoding
+
+An enum representing the supported encoding types. A copy of `node::encoding` that is consistent across versions of Node.
+
+Definition:
+
+```c++
+enum Nan::Encoding { ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER }
+```
+
+
+<a name="api_nan_encode"></a>
+### Nan::Encode()
+
+A wrapper around `node::Encode()` that provides a consistent implementation across supported versions of Node.
+
+Signature:
+
+```c++
+v8::Local<v8::Value> Nan::Encode(const void *buf,
+                                 size_t len,
+                                 enum Nan::Encoding encoding = BINARY);
+```
+
+
+<a name="api_nan_decode_bytes"></a>
+### Nan::DecodeBytes()
+
+A wrapper around `node::DecodeBytes()` that provides a consistent implementation across supported versions of Node.
+
+Signature:
+
+```c++
+ssize_t Nan::DecodeBytes(v8::Local<v8::Value> val,
+                         enum Nan::Encoding encoding = BINARY);
+```
+
+
+<a name="api_nan_decode_write"></a>
+### Nan::DecodeWrite()
+
+A wrapper around `node::DecodeWrite()` that provides a consistent implementation across supported versions of Node.
+
+Signature:
+
+```c++
+ssize_t Nan::DecodeWrite(char *buf,
+                         size_t len,
+                         v8::Local<v8::Value> val,
+                         enum Nan::Encoding encoding = BINARY);
+```

+ 199 - 0
node_modules/nan/doc/v8_internals.md

@@ -0,0 +1,199 @@
+## V8 internals
+
+The hooks to access V8 internals—including GC and statistics—are different across the supported versions of V8, therefore NAN provides its own hooks that call the appropriate V8 methods.
+
+ - <a href="#api_nan_gc_callback"><b><code>NAN_GC_CALLBACK()</code></b></a>
+ - <a href="#api_nan_add_gc_epilogue_callback"><b><code>Nan::AddGCEpilogueCallback()</code></b></a>
+ - <a href="#api_nan_remove_gc_epilogue_callback"><b><code>Nan::RemoveGCEpilogueCallback()</code></b></a>
+ - <a href="#api_nan_add_gc_prologue_callback"><b><code>Nan::AddGCPrologueCallback()</code></b></a>
+ - <a href="#api_nan_remove_gc_prologue_callback"><b><code>Nan::RemoveGCPrologueCallback()</code></b></a>
+ - <a href="#api_nan_get_heap_statistics"><b><code>Nan::GetHeapStatistics()</code></b></a>
+ - <a href="#api_nan_set_counter_function"><b><code>Nan::SetCounterFunction()</code></b></a>
+ - <a href="#api_nan_set_create_histogram_function"><b><code>Nan::SetCreateHistogramFunction()</code></b></a>
+ - <a href="#api_nan_set_add_histogram_sample_function"><b><code>Nan::SetAddHistogramSampleFunction()</code></b></a>
+ - <a href="#api_nan_idle_notification"><b><code>Nan::IdleNotification()</code></b></a>
+ - <a href="#api_nan_low_memory_notification"><b><code>Nan::LowMemoryNotification()</code></b></a>
+ - <a href="#api_nan_context_disposed_notification"><b><code>Nan::ContextDisposedNotification()</code></b></a>
+ - <a href="#api_nan_get_internal_field_pointer"><b><code>Nan::GetInternalFieldPointer()</code></b></a>
+ - <a href="#api_nan_set_internal_field_pointer"><b><code>Nan::SetInternalFieldPointer()</code></b></a>
+ - <a href="#api_nan_adjust_external_memory"><b><code>Nan::AdjustExternalMemory()</code></b></a>
+
+
+<a name="api_nan_gc_callback"></a>
+### NAN_GC_CALLBACK(callbackname)
+
+Use `NAN_GC_CALLBACK` to declare your callbacks for `Nan::AddGCPrologueCallback()` and `Nan::AddGCEpilogueCallback()`. Your new method receives the arguments `v8::GCType type` and `v8::GCCallbackFlags flags`.
+
+```c++
+static Nan::Persistent<Function> callback;
+
+NAN_GC_CALLBACK(gcPrologueCallback) {
+  v8::Local<Value> argv[] = { Nan::New("prologue").ToLocalChecked() };
+  Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(callback), 1, argv);
+}
+
+NAN_METHOD(Hook) {
+  callback.Reset(args[0].As<Function>());
+  Nan::AddGCPrologueCallback(gcPrologueCallback);
+  info.GetReturnValue().Set(info.Holder());
+}
+```
+
+<a name="api_nan_add_gc_epilogue_callback"></a>
+### Nan::AddGCEpilogueCallback()
+
+Signature:
+
+```c++
+void Nan::AddGCEpilogueCallback(v8::Isolate::GCEpilogueCallback callback, v8::GCType gc_type_filter = v8::kGCTypeAll)
+```
+
+Calls V8's [`AddGCEpilogueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a90d1860babc76059c62514b422f56960).
+
+<a name="api_nan_remove_gc_epilogue_callback"></a>
+### Nan::RemoveGCEpilogueCallback()
+
+Signature:
+
+```c++
+void Nan::RemoveGCEpilogueCallback(v8::Isolate::GCEpilogueCallback callback)
+```
+
+Calls V8's [`RemoveGCEpilogueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a05c60859fd4b8e96bfcd451281ed6c7c).
+
+<a name="api_nan_add_gc_prologue_callback"></a>
+### Nan::AddGCPrologueCallback()
+
+Signature:
+
+```c++
+void Nan::AddGCPrologueCallback(v8::Isolate::GCPrologueCallback, v8::GCType gc_type_filter callback)
+```
+
+Calls V8's [`AddGCPrologueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ab4b87b8f9f8e5bf95eba4009357e001f).
+
+<a name="api_nan_remove_gc_prologue_callback"></a>
+### Nan::RemoveGCPrologueCallback()
+
+Signature:
+
+```c++
+void Nan::RemoveGCPrologueCallback(v8::Isolate::GCPrologueCallback callback)
+```
+
+Calls V8's [`RemoveGCEpilogueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a9f6c51932811593f81ff30b949124186).
+
+<a name="api_nan_get_heap_statistics"></a>
+### Nan::GetHeapStatistics()
+
+Signature:
+
+```c++
+void Nan::GetHeapStatistics(v8::HeapStatistics *heap_statistics)
+```
+
+Calls V8's [`GetHeapStatistics()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a5593ac74687b713095c38987e5950b34).
+
+<a name="api_nan_set_counter_function"></a>
+### Nan::SetCounterFunction()
+
+Signature:
+
+```c++
+void Nan::SetCounterFunction(v8::CounterLookupCallback cb)
+```
+
+Calls V8's [`SetCounterFunction()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a045d7754e62fa0ec72ae6c259b29af94).
+
+<a name="api_nan_set_create_histogram_function"></a>
+### Nan::SetCreateHistogramFunction()
+
+Signature:
+
+```c++
+void Nan::SetCreateHistogramFunction(v8::CreateHistogramCallback cb) 
+```
+
+Calls V8's [`SetCreateHistogramFunction()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a542d67e85089cb3f92aadf032f99e732).
+
+<a name="api_nan_set_add_histogram_sample_function"></a>
+### Nan::SetAddHistogramSampleFunction()
+
+Signature:
+
+```c++
+void Nan::SetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) 
+```
+
+Calls V8's [`SetAddHistogramSampleFunction()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#aeb420b690bc2c216882d6fdd00ddd3ea).
+
+<a name="api_nan_idle_notification"></a>
+### Nan::IdleNotification()
+
+Signature:
+
+```c++
+void Nan::IdleNotification(v8::HeapStatistics *heap_statistics)
+```
+
+Calls V8's [`IdleNotification()` or `IdleNotificationDeadline()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ad6a2a02657f5425ad460060652a5a118) depending on V8 version.
+
+<a name="api_nan_low_memory_notification"></a>
+### Nan::LowMemoryNotification()
+
+Signature:
+
+```c++
+void Nan::LowMemoryNotification() 
+```
+
+Calls V8's [`IdleNotification()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a24647f61d6b41f69668094bdcd6ea91f).
+
+<a name="api_nan_context_disposed_notification"></a>
+### Nan::ContextDisposedNotification()
+
+Signature:
+
+```c++
+void Nan::ContextDisposedNotification()
+```
+
+Calls V8's [`ContextDisposedNotification()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ad7f5dc559866343fe6cd8db1f134d48b).
+
+<a name="api_nan_get_internal_field_pointer"></a>
+### Nan::GetInternalFieldPointer()
+
+Gets a pointer to the internal field with at `index` from a V8 `Object` handle.
+
+Signature:
+
+```c++
+void* Nan::GetInternalFieldPointer(v8::Local<v8::Object> object, int index) 
+```
+
+Calls the Object's [`GetAlignedPointerFromInternalField()` or `GetPointerFromInternalField()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab3c57184263cf29963ef0017bec82281) depending on the version of V8.
+
+<a name="api_nan_set_internal_field_pointer"></a>
+### Nan::SetInternalFieldPointer()
+
+Sets the value of the internal field at `index` on a V8 `Object` handle.
+
+Signature:
+
+```c++
+void Nan::SetInternalFieldPointer(v8::Local<v8::Object> object, int index, void* value)
+```
+
+Calls the Object's [`SetAlignedPointerInInternalField()` or `SetPointerInInternalField()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ad7f5dc559866343fe6cd8db1f134d48b) depending on the version of V8.
+
+<a name="api_nan_adjust_external_memory"></a>
+### Nan::AdjustExternalMemory()
+
+Signature:
+
+```c++
+int Nan::AdjustExternalMemory(int bytesChange)
+```
+
+Calls V8's [`AdjustAmountOfExternalAllocatedMemory()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ae1a59cac60409d3922582c4af675473e).
+

+ 85 - 0
node_modules/nan/doc/v8_misc.md

@@ -0,0 +1,85 @@
+## Miscellaneous V8 Helpers
+
+ - <a href="#api_nan_utf8_string"><b><code>Nan::Utf8String</code></b></a>
+ - <a href="#api_nan_get_current_context"><b><code>Nan::GetCurrentContext()</code></b></a>
+ - <a href="#api_nan_set_isolate_data"><b><code>Nan::SetIsolateData()</code></b></a>
+ - <a href="#api_nan_get_isolate_data"><b><code>Nan::GetIsolateData()</code></b></a>
+ - <a href="#api_nan_typedarray_contents"><b><code>Nan::TypedArrayContents</code></b></a>
+
+
+<a name="api_nan_utf8_string"></a>
+### Nan::Utf8String
+
+Converts an object to a UTF-8-encoded character array. If conversion to a string fails (e.g. due to an exception in the toString() method of the object) then the length() method returns 0 and the * operator returns NULL. The underlying memory used for this object is managed by the object.
+
+An implementation of [`v8::String::Utf8Value`](https://v8docs.nodesource.com/io.js-3.0/d4/d1b/classv8_1_1_string_1_1_utf8_value.html) that is consistent across all supported versions of V8.
+
+Definition:
+
+```c++
+class Nan::Utf8String {
+ public:
+  Nan::Utf8String(v8::Local<v8::Value> from);
+
+  int length() const;
+
+  char* operator*();
+  const char* operator*() const;
+};
+```
+
+<a name="api_nan_get_current_context"></a>
+### Nan::GetCurrentContext()
+
+A call to [`v8::Isolate::GetCurrent()->GetCurrentContext()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a81c7a1ed7001ae2a65e89107f75fd053) that works across all supported versions of V8.
+
+Signature:
+
+```c++
+v8::Local<v8::Context> Nan::GetCurrentContext()
+```
+
+<a name="api_nan_set_isolate_data"></a>
+### Nan::SetIsolateData()
+
+A helper to provide a consistent API to [`v8::Isolate#SetData()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a7acadfe7965997e9c386a05f098fbe36).
+
+Signature:
+
+```c++
+void Nan::SetIsolateData(v8::Isolate *isolate, T *data)
+```
+
+
+<a name="api_nan_get_isolate_data"></a>
+### Nan::GetIsolateData()
+
+A helper to provide a consistent API to [`v8::Isolate#GetData()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#aabd223436bc1100a787dadaa024c6257).
+
+Signature:
+
+```c++
+T *Nan::GetIsolateData(v8::Isolate *isolate)
+```
+
+<a name="api_nan_typedarray_contents"></a>
+### Nan::TypedArrayContents<T>
+
+A helper class for accessing the contents of an ArrayBufferView (aka a typedarray) from C++.  If the input array is not a valid typedarray, then the data pointer of TypedArrayContents will default to `NULL` and the length will be 0.  If the data pointer is not compatible with the alignment requirements of type, an assertion error will fail.
+
+Note that you must store a reference to the `array` object while you are accessing its contents.
+
+Definition:
+
+```c++
+template<typename T>
+class Nan::TypedArrayContents {
+ public:
+  TypedArrayContents(v8::Local<Value> array);
+
+  size_t length() const;
+
+  T* const operator*();
+  const T* const operator*() const;
+};
+```

+ 1 - 0
node_modules/nan/include_dirs.js

@@ -0,0 +1 @@
+console.log(require('path').relative('.', __dirname));

+ 2276 - 0
node_modules/nan/nan.h

@@ -0,0 +1,2276 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors:
+ *   - Rod Vagg <https://github.com/rvagg>
+ *   - Benjamin Byholm <https://github.com/kkoopa>
+ *   - Trevor Norris <https://github.com/trevnorris>
+ *   - Nathan Rajlich <https://github.com/TooTallNate>
+ *   - Brett Lawson <https://github.com/brett19>
+ *   - Ben Noordhuis <https://github.com/bnoordhuis>
+ *   - David Siegel <https://github.com/agnat>
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ *
+ * Version 2.3.5: current Node 6.2.0, Node 12: 0.12.14, Node 10: 0.10.45, iojs: 3.3.1
+ *
+ * See https://github.com/nodejs/nan for the latest update to this file
+ **********************************************************************************/
+
+#ifndef NAN_H_
+#define NAN_H_
+
+#include <node_version.h>
+
+#define NODE_0_10_MODULE_VERSION 11
+#define NODE_0_12_MODULE_VERSION 14
+#define ATOM_0_21_MODULE_VERSION 41
+#define IOJS_1_0_MODULE_VERSION  42
+#define IOJS_1_1_MODULE_VERSION  43
+#define IOJS_2_0_MODULE_VERSION  44
+#define IOJS_3_0_MODULE_VERSION  45
+#define NODE_4_0_MODULE_VERSION  46
+#define NODE_5_0_MODULE_VERSION  47
+#define NODE_6_0_MODULE_VERSION  48
+
+#ifdef _MSC_VER
+# define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800)
+#else
+# define NAN_HAS_CPLUSPLUS_11 (__cplusplus >= 201103L)
+#endif
+
+#if NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION && !NAN_HAS_CPLUSPLUS_11
+# error This version of node/NAN/v8 requires a C++11 compiler
+#endif
+
+#include <uv.h>
+#include <node.h>
+#include <node_buffer.h>
+#include <node_object_wrap.h>
+#include <algorithm>
+#include <cstring>
+#include <climits>
+#include <cstdlib>
+#if defined(_MSC_VER)
+# pragma warning( push )
+# pragma warning( disable : 4530 )
+# include <string>
+# include <vector>
+# pragma warning( pop )
+#else
+# include <string>
+# include <vector>
+#endif
+
+// uv helpers
+#ifdef UV_VERSION_MAJOR
+# ifndef UV_VERSION_PATCH
+#  define UV_VERSION_PATCH 0
+# endif
+# define NAUV_UVVERSION ((UV_VERSION_MAJOR << 16) | \
+                         (UV_VERSION_MINOR <<  8) | \
+                         (UV_VERSION_PATCH))
+#else
+# define NAUV_UVVERSION 0x000b00
+#endif
+
+#if NAUV_UVVERSION < 0x000b0b
+# ifdef WIN32
+#  include <windows.h>
+# else
+#  include <pthread.h>
+# endif
+#endif
+
+namespace Nan {
+
+#define NAN_INLINE inline  // TODO(bnoordhuis) Remove in v3.0.0.
+
+#if defined(__GNUC__) && \
+    !(defined(V8_DISABLE_DEPRECATIONS) && V8_DISABLE_DEPRECATIONS)
+# define NAN_DEPRECATED __attribute__((deprecated))
+#elif defined(_MSC_VER) && \
+    !(defined(V8_DISABLE_DEPRECATIONS) && V8_DISABLE_DEPRECATIONS)
+# define NAN_DEPRECATED __declspec(deprecated)
+#else
+# define NAN_DEPRECATED
+#endif
+
+#if NAN_HAS_CPLUSPLUS_11
+# define NAN_DISALLOW_ASSIGN(CLASS) void operator=(const CLASS&) = delete;
+# define NAN_DISALLOW_COPY(CLASS) CLASS(const CLASS&) = delete;
+# define NAN_DISALLOW_MOVE(CLASS)                                              \
+    CLASS(CLASS&&) = delete;  /* NOLINT(build/c++11) */                        \
+    void operator=(CLASS&&) = delete;
+#else
+# define NAN_DISALLOW_ASSIGN(CLASS) void operator=(const CLASS&);
+# define NAN_DISALLOW_COPY(CLASS) CLASS(const CLASS&);
+# define NAN_DISALLOW_MOVE(CLASS)
+#endif
+
+#define NAN_DISALLOW_ASSIGN_COPY(CLASS)                                        \
+    NAN_DISALLOW_ASSIGN(CLASS)                                                 \
+    NAN_DISALLOW_COPY(CLASS)
+
+#define NAN_DISALLOW_ASSIGN_MOVE(CLASS)                                        \
+    NAN_DISALLOW_ASSIGN(CLASS)                                                 \
+    NAN_DISALLOW_MOVE(CLASS)
+
+#define NAN_DISALLOW_COPY_MOVE(CLASS)                                          \
+    NAN_DISALLOW_COPY(CLASS)                                                   \
+    NAN_DISALLOW_MOVE(CLASS)
+
+#define NAN_DISALLOW_ASSIGN_COPY_MOVE(CLASS)                                   \
+    NAN_DISALLOW_ASSIGN(CLASS)                                                 \
+    NAN_DISALLOW_COPY(CLASS)                                                   \
+    NAN_DISALLOW_MOVE(CLASS)
+
+#define TYPE_CHECK(T, S)                                                       \
+    while (false) {                                                            \
+      *(static_cast<T *volatile *>(0)) = static_cast<S*>(0);                   \
+    }
+
+//=== RegistrationFunction =====================================================
+
+#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+  typedef v8::Handle<v8::Object> ADDON_REGISTER_FUNCTION_ARGS_TYPE;
+#else
+  typedef v8::Local<v8::Object> ADDON_REGISTER_FUNCTION_ARGS_TYPE;
+#endif
+
+#define NAN_MODULE_INIT(name)                                                  \
+    void name(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target)
+
+//=== CallbackInfo =============================================================
+
+#include "nan_callbacks.h"  // NOLINT(build/include)
+
+//==============================================================================
+
+#if (NODE_MODULE_VERSION < NODE_0_12_MODULE_VERSION)
+typedef v8::Script             UnboundScript;
+typedef v8::Script             BoundScript;
+#else
+typedef v8::UnboundScript      UnboundScript;
+typedef v8::Script             BoundScript;
+#endif
+
+#if (NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION)
+typedef v8::String::ExternalAsciiStringResource
+    ExternalOneByteStringResource;
+#else
+typedef v8::String::ExternalOneByteStringResource
+    ExternalOneByteStringResource;
+#endif
+
+#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)
+template<typename T>
+class NonCopyablePersistentTraits :
+    public v8::NonCopyablePersistentTraits<T> {};
+template<typename T>
+class CopyablePersistentTraits :
+    public v8::CopyablePersistentTraits<T> {};
+
+template<typename T>
+class PersistentBase :
+    public v8::PersistentBase<T> {};
+
+template<typename T, typename M = v8::NonCopyablePersistentTraits<T> >
+class Persistent;
+#else
+template<typename T> class NonCopyablePersistentTraits;
+template<typename T> class PersistentBase;
+template<typename T, typename P> class WeakCallbackData;
+template<typename T, typename M = NonCopyablePersistentTraits<T> >
+class Persistent;
+#endif  // NODE_MODULE_VERSION
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+# include "nan_maybe_43_inl.h"  // NOLINT(build/include)
+#else
+# include "nan_maybe_pre_43_inl.h"  // NOLINT(build/include)
+#endif
+
+#include "nan_converters.h"  // NOLINT(build/include)
+#include "nan_new.h"  // NOLINT(build/include)
+
+#if NAUV_UVVERSION < 0x000b17
+#define NAUV_WORK_CB(func) \
+    void func(uv_async_t *async, int)
+#else
+#define NAUV_WORK_CB(func) \
+    void func(uv_async_t *async)
+#endif
+
+#if NAUV_UVVERSION >= 0x000b0b
+
+typedef uv_key_t nauv_key_t;
+
+inline int nauv_key_create(nauv_key_t *key) {
+  return uv_key_create(key);
+}
+
+inline void nauv_key_delete(nauv_key_t *key) {
+  uv_key_delete(key);
+}
+
+inline void* nauv_key_get(nauv_key_t *key) {
+  return uv_key_get(key);
+}
+
+inline void nauv_key_set(nauv_key_t *key, void *value) {
+  uv_key_set(key, value);
+}
+
+#else
+
+/* Implement thread local storage for older versions of libuv.
+ * This is essentially a backport of libuv commit 5d2434bf
+ * written by Ben Noordhuis, adjusted for names and inline.
+ */
+
+#ifndef WIN32
+
+typedef pthread_key_t nauv_key_t;
+
+inline int nauv_key_create(nauv_key_t* key) {
+  return -pthread_key_create(key, NULL);
+}
+
+inline void nauv_key_delete(nauv_key_t* key) {
+  if (pthread_key_delete(*key))
+    abort();
+}
+
+inline void* nauv_key_get(nauv_key_t* key) {
+  return pthread_getspecific(*key);
+}
+
+inline void nauv_key_set(nauv_key_t* key, void* value) {
+  if (pthread_setspecific(*key, value))
+    abort();
+}
+
+#else
+
+typedef struct {
+  DWORD tls_index;
+} nauv_key_t;
+
+inline int nauv_key_create(nauv_key_t* key) {
+  key->tls_index = TlsAlloc();
+  if (key->tls_index == TLS_OUT_OF_INDEXES)
+    return UV_ENOMEM;
+  return 0;
+}
+
+inline void nauv_key_delete(nauv_key_t* key) {
+  if (TlsFree(key->tls_index) == FALSE)
+    abort();
+  key->tls_index = TLS_OUT_OF_INDEXES;
+}
+
+inline void* nauv_key_get(nauv_key_t* key) {
+  void* value = TlsGetValue(key->tls_index);
+  if (value == NULL)
+    if (GetLastError() != ERROR_SUCCESS)
+      abort();
+  return value;
+}
+
+inline void nauv_key_set(nauv_key_t* key, void* value) {
+  if (TlsSetValue(key->tls_index, value) == FALSE)
+    abort();
+}
+
+#endif
+#endif
+
+#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+template<typename T>
+v8::Local<T> New(v8::Handle<T>);
+#endif
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+  typedef v8::WeakCallbackType WeakCallbackType;
+#else
+struct WeakCallbackType {
+  enum E {kParameter, kInternalFields};
+  E type;
+  WeakCallbackType(E other) : type(other) {}  // NOLINT(runtime/explicit)
+  inline bool operator==(E other) { return other == this->type; }
+  inline bool operator!=(E other) { return !operator==(other); }
+};
+#endif
+
+template<typename P> class WeakCallbackInfo;
+
+#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+# include "nan_persistent_12_inl.h"  // NOLINT(build/include)
+#else
+# include "nan_persistent_pre_12_inl.h"  // NOLINT(build/include)
+#endif
+
+namespace imp {
+  static const size_t kMaxLength = 0x3fffffff;
+  // v8::String::REPLACE_INVALID_UTF8 was introduced
+  // in node.js v0.10.29 and v0.8.27.
+#if NODE_MAJOR_VERSION > 0 || \
+    NODE_MINOR_VERSION > 10 || \
+    NODE_MINOR_VERSION == 10 && NODE_PATCH_VERSION >= 29 || \
+    NODE_MINOR_VERSION == 8 && NODE_PATCH_VERSION >= 27
+  static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
+#else
+  static const unsigned kReplaceInvalidUtf8 = 0;
+#endif
+}  // end of namespace imp
+
+//=== HandleScope ==============================================================
+
+class HandleScope {
+  v8::HandleScope scope;
+
+ public:
+#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+  inline HandleScope() : scope(v8::Isolate::GetCurrent()) {}
+  inline static int NumberOfHandles() {
+    return v8::HandleScope::NumberOfHandles(v8::Isolate::GetCurrent());
+  }
+#else
+  inline HandleScope() : scope() {}
+  inline static int NumberOfHandles() {
+    return v8::HandleScope::NumberOfHandles();
+  }
+#endif
+
+ private:
+  // Make it hard to create heap-allocated or illegal handle scopes by
+  // disallowing certain operations.
+  HandleScope(const HandleScope &);
+  void operator=(const HandleScope &);
+  void *operator new(size_t size);
+  void operator delete(void *, size_t);
+};
+
+class EscapableHandleScope {
+ public:
+#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+  inline EscapableHandleScope() : scope(v8::Isolate::GetCurrent()) {}
+
+  inline static int NumberOfHandles() {
+    return v8::EscapableHandleScope::NumberOfHandles(v8::Isolate::GetCurrent());
+  }
+
+  template<typename T>
+  inline v8::Local<T> Escape(v8::Local<T> value) {
+    return scope.Escape(value);
+  }
+
+ private:
+  v8::EscapableHandleScope scope;
+#else
+  inline EscapableHandleScope() : scope() {}
+
+  inline static int NumberOfHandles() {
+    return v8::HandleScope::NumberOfHandles();
+  }
+
+  template<typename T>
+  inline v8::Local<T> Escape(v8::Local<T> value) {
+    return scope.Close(value);
+  }
+
+ private:
+  v8::HandleScope scope;
+#endif
+
+ private:
+  // Make it hard to create heap-allocated or illegal handle scopes by
+  // disallowing certain operations.
+  EscapableHandleScope(const EscapableHandleScope &);
+  void operator=(const EscapableHandleScope &);
+  void *operator new(size_t size);
+  void operator delete(void *, size_t);
+};
+
+//=== TryCatch =================================================================
+
+class TryCatch {
+  v8::TryCatch try_catch_;
+  friend void FatalException(const TryCatch&);
+
+ public:
+#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION
+  TryCatch() : try_catch_(v8::Isolate::GetCurrent()) {}
+#endif
+
+  inline bool HasCaught() const { return try_catch_.HasCaught(); }
+
+  inline bool CanContinue() const { return try_catch_.CanContinue(); }
+
+  inline v8::Local<v8::Value> ReThrow() {
+#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+    return New(try_catch_.ReThrow());
+#else
+    return try_catch_.ReThrow();
+#endif
+  }
+
+  inline v8::Local<v8::Value> Exception() const {
+    return try_catch_.Exception();
+  }
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+  inline v8::MaybeLocal<v8::Value> StackTrace() const {
+    return try_catch_.StackTrace(GetCurrentContext());
+  }
+#else
+  inline MaybeLocal<v8::Value> StackTrace() const {
+    return MaybeLocal<v8::Value>(try_catch_.StackTrace());
+  }
+#endif
+
+  inline v8::Local<v8::Message> Message() const {
+    return try_catch_.Message();
+  }
+
+  inline void Reset() { try_catch_.Reset(); }
+
+  inline void SetVerbose(bool value) { try_catch_.SetVerbose(value); }
+
+  inline void SetCaptureMessage(bool value) {
+    try_catch_.SetCaptureMessage(value);
+  }
+};
+
+//============ =================================================================
+
+/* node 0.12  */
+#if NODE_MODULE_VERSION >= NODE_0_12_MODULE_VERSION
+  inline
+  void SetCounterFunction(v8::CounterLookupCallback cb) {
+    v8::Isolate::GetCurrent()->SetCounterFunction(cb);
+  }
+
+  inline
+  void SetCreateHistogramFunction(v8::CreateHistogramCallback cb) {
+    v8::Isolate::GetCurrent()->SetCreateHistogramFunction(cb);
+  }
+
+  inline
+  void SetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) {
+    v8::Isolate::GetCurrent()->SetAddHistogramSampleFunction(cb);
+  }
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+  inline bool IdleNotification(int idle_time_in_ms) {
+    return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
+        idle_time_in_ms * 0.001);
+  }
+# else
+  inline bool IdleNotification(int idle_time_in_ms) {
+    return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms);
+  }
+#endif
+
+  inline void LowMemoryNotification() {
+    v8::Isolate::GetCurrent()->LowMemoryNotification();
+  }
+
+  inline void ContextDisposedNotification() {
+    v8::Isolate::GetCurrent()->ContextDisposedNotification();
+  }
+#else
+  inline
+  void SetCounterFunction(v8::CounterLookupCallback cb) {
+    v8::V8::SetCounterFunction(cb);
+  }
+
+  inline
+  void SetCreateHistogramFunction(v8::CreateHistogramCallback cb) {
+    v8::V8::SetCreateHistogramFunction(cb);
+  }
+
+  inline
+  void SetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) {
+    v8::V8::SetAddHistogramSampleFunction(cb);
+  }
+
+  inline bool IdleNotification(int idle_time_in_ms) {
+    return v8::V8::IdleNotification(idle_time_in_ms);
+  }
+
+  inline void LowMemoryNotification() {
+    v8::V8::LowMemoryNotification();
+  }
+
+  inline void ContextDisposedNotification() {
+    v8::V8::ContextDisposedNotification();
+  }
+#endif
+
+#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)  // Node 0.12
+  inline v8::Local<v8::Primitive> Undefined() {
+# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+    EscapableHandleScope scope;
+    return scope.Escape(New(v8::Undefined(v8::Isolate::GetCurrent())));
+# else
+    return v8::Undefined(v8::Isolate::GetCurrent());
+# endif
+  }
+
+  inline v8::Local<v8::Primitive> Null() {
+# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+    EscapableHandleScope scope;
+    return scope.Escape(New(v8::Null(v8::Isolate::GetCurrent())));
+# else
+    return v8::Null(v8::Isolate::GetCurrent());
+# endif
+  }
+
+  inline v8::Local<v8::Boolean> True() {
+# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+    EscapableHandleScope scope;
+    return scope.Escape(New(v8::True(v8::Isolate::GetCurrent())));
+# else
+    return v8::True(v8::Isolate::GetCurrent());
+# endif
+  }
+
+  inline v8::Local<v8::Boolean> False() {
+# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+    EscapableHandleScope scope;
+    return scope.Escape(New(v8::False(v8::Isolate::GetCurrent())));
+# else
+    return v8::False(v8::Isolate::GetCurrent());
+# endif
+  }
+
+  inline v8::Local<v8::String> EmptyString() {
+    return v8::String::Empty(v8::Isolate::GetCurrent());
+  }
+
+  inline int AdjustExternalMemory(int bc) {
+    return static_cast<int>(
+        v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(bc));
+  }
+
+  inline void SetTemplate(
+      v8::Local<v8::Template> templ
+    , const char *name
+    , v8::Local<v8::Data> value) {
+    templ->Set(v8::Isolate::GetCurrent(), name, value);
+  }
+
+  inline void SetTemplate(
+      v8::Local<v8::Template> templ
+    , v8::Local<v8::String> name
+    , v8::Local<v8::Data> value
+    , v8::PropertyAttribute attributes) {
+    templ->Set(name, value, attributes);
+  }
+
+  inline v8::Local<v8::Context> GetCurrentContext() {
+    return v8::Isolate::GetCurrent()->GetCurrentContext();
+  }
+
+  inline void* GetInternalFieldPointer(
+      v8::Local<v8::Object> object
+    , int index) {
+    return object->GetAlignedPointerFromInternalField(index);
+  }
+
+  inline void SetInternalFieldPointer(
+      v8::Local<v8::Object> object
+    , int index
+    , void* value) {
+    object->SetAlignedPointerInInternalField(index, value);
+  }
+
+# define NAN_GC_CALLBACK(name)                                                 \
+    void name(v8::Isolate *isolate, v8::GCType type, v8::GCCallbackFlags flags)
+
+#if NODE_MODULE_VERSION <= NODE_4_0_MODULE_VERSION
+  typedef v8::Isolate::GCEpilogueCallback GCEpilogueCallback;
+  typedef v8::Isolate::GCPrologueCallback GCPrologueCallback;
+#else
+  typedef v8::Isolate::GCCallback GCEpilogueCallback;
+  typedef v8::Isolate::GCCallback GCPrologueCallback;
+#endif
+
+  inline void AddGCEpilogueCallback(
+      GCEpilogueCallback callback
+    , v8::GCType gc_type_filter = v8::kGCTypeAll) {
+    v8::Isolate::GetCurrent()->AddGCEpilogueCallback(callback, gc_type_filter);
+  }
+
+  inline void RemoveGCEpilogueCallback(
+      GCEpilogueCallback callback) {
+    v8::Isolate::GetCurrent()->RemoveGCEpilogueCallback(callback);
+  }
+
+  inline void AddGCPrologueCallback(
+      GCPrologueCallback callback
+    , v8::GCType gc_type_filter = v8::kGCTypeAll) {
+    v8::Isolate::GetCurrent()->AddGCPrologueCallback(callback, gc_type_filter);
+  }
+
+  inline void RemoveGCPrologueCallback(
+      GCPrologueCallback callback) {
+    v8::Isolate::GetCurrent()->RemoveGCPrologueCallback(callback);
+  }
+
+  inline void GetHeapStatistics(
+      v8::HeapStatistics *heap_statistics) {
+    v8::Isolate::GetCurrent()->GetHeapStatistics(heap_statistics);
+  }
+
+# define X(NAME)                                                               \
+    inline v8::Local<v8::Value> NAME(const char *msg) {                    \
+      EscapableHandleScope scope;                                              \
+      return scope.Escape(v8::Exception::NAME(New(msg).ToLocalChecked()));     \
+    }                                                                          \
+                                                                               \
+    inline                                                                 \
+    v8::Local<v8::Value> NAME(v8::Local<v8::String> msg) {                     \
+      return v8::Exception::NAME(msg);                                         \
+    }                                                                          \
+                                                                               \
+    inline void Throw ## NAME(const char *msg) {                           \
+      HandleScope scope;                                                       \
+      v8::Isolate::GetCurrent()->ThrowException(                               \
+          v8::Exception::NAME(New(msg).ToLocalChecked()));                     \
+    }                                                                          \
+                                                                               \
+    inline void Throw ## NAME(v8::Local<v8::String> msg) {                 \
+      HandleScope scope;                                                       \
+      v8::Isolate::GetCurrent()->ThrowException(                               \
+          v8::Exception::NAME(msg));                                           \
+    }
+
+  X(Error)
+  X(RangeError)
+  X(ReferenceError)
+  X(SyntaxError)
+  X(TypeError)
+
+# undef X
+
+  inline void ThrowError(v8::Local<v8::Value> error) {
+    v8::Isolate::GetCurrent()->ThrowException(error);
+  }
+
+  inline MaybeLocal<v8::Object> NewBuffer(
+      char *data
+    , size_t length
+#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION
+    , node::Buffer::FreeCallback callback
+#else
+    , node::smalloc::FreeCallback callback
+#endif
+    , void *hint
+  ) {
+    // arbitrary buffer lengths requires
+    // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION
+    assert(length <= imp::kMaxLength && "too large buffer");
+#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION
+    return node::Buffer::New(
+        v8::Isolate::GetCurrent(), data, length, callback, hint);
+#else
+    return MaybeLocal<v8::Object>(node::Buffer::New(
+        v8::Isolate::GetCurrent(), data, length, callback, hint));
+#endif
+  }
+
+  inline MaybeLocal<v8::Object> CopyBuffer(
+      const char *data
+    , uint32_t size
+  ) {
+    // arbitrary buffer lengths requires
+    // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION
+    assert(size <= imp::kMaxLength && "too large buffer");
+#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION
+    return node::Buffer::Copy(
+        v8::Isolate::GetCurrent(), data, size);
+#else
+    return MaybeLocal<v8::Object>(node::Buffer::New(
+        v8::Isolate::GetCurrent(), data, size));
+#endif
+  }
+
+  inline MaybeLocal<v8::Object> NewBuffer(uint32_t size) {
+    // arbitrary buffer lengths requires
+    // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION
+    assert(size <= imp::kMaxLength && "too large buffer");
+#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION
+    return node::Buffer::New(
+        v8::Isolate::GetCurrent(), size);
+#else
+    return MaybeLocal<v8::Object>(node::Buffer::New(
+        v8::Isolate::GetCurrent(), size));
+#endif
+  }
+
+  inline MaybeLocal<v8::Object> NewBuffer(
+      char* data
+    , uint32_t size
+  ) {
+    // arbitrary buffer lengths requires
+    // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION
+    assert(size <= imp::kMaxLength && "too large buffer");
+#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION
+    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
+#else
+    return MaybeLocal<v8::Object>(
+        node::Buffer::Use(v8::Isolate::GetCurrent(), data, size));
+#endif
+  }
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+  inline MaybeLocal<v8::String>
+  NewOneByteString(const uint8_t * value, int length = -1) {
+    return v8::String::NewFromOneByte(v8::Isolate::GetCurrent(), value,
+          v8::NewStringType::kNormal, length);
+  }
+
+  inline MaybeLocal<BoundScript> CompileScript(
+      v8::Local<v8::String> s
+    , const v8::ScriptOrigin& origin
+  ) {
+    v8::ScriptCompiler::Source source(s, origin);
+    return v8::ScriptCompiler::Compile(GetCurrentContext(), &source);
+  }
+
+  inline MaybeLocal<BoundScript> CompileScript(
+      v8::Local<v8::String> s
+  ) {
+    v8::ScriptCompiler::Source source(s);
+    return v8::ScriptCompiler::Compile(GetCurrentContext(), &source);
+  }
+
+  inline MaybeLocal<v8::Value> RunScript(
+      v8::Local<UnboundScript> script
+  ) {
+    return script->BindToCurrentContext()->Run(GetCurrentContext());
+  }
+
+  inline MaybeLocal<v8::Value> RunScript(
+      v8::Local<BoundScript> script
+  ) {
+    return script->Run(GetCurrentContext());
+  }
+#else
+  inline MaybeLocal<v8::String>
+  NewOneByteString(const uint8_t * value, int length = -1) {
+    return MaybeLocal<v8::String>(
+        v8::String::NewFromOneByte(
+            v8::Isolate::GetCurrent()
+          , value
+          , v8::String::kNormalString, length));
+  }
+
+  inline MaybeLocal<BoundScript> CompileScript(
+      v8::Local<v8::String> s
+    , const v8::ScriptOrigin& origin
+  ) {
+    v8::ScriptCompiler::Source source(s, origin);
+    return MaybeLocal<BoundScript>(
+        v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source));
+  }
+
+  inline MaybeLocal<BoundScript> CompileScript(
+      v8::Local<v8::String> s
+  ) {
+    v8::ScriptCompiler::Source source(s);
+    return MaybeLocal<BoundScript>(
+        v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source));
+  }
+
+  inline MaybeLocal<v8::Value> RunScript(
+      v8::Local<UnboundScript> script
+  ) {
+    return MaybeLocal<v8::Value>(script->BindToCurrentContext()->Run());
+  }
+
+  inline MaybeLocal<v8::Value> RunScript(
+      v8::Local<BoundScript> script
+  ) {
+    return MaybeLocal<v8::Value>(script->Run());
+  }
+#endif
+
+  inline v8::Local<v8::Value> MakeCallback(
+      v8::Local<v8::Object> target
+    , v8::Local<v8::Function> func
+    , int argc
+    , v8::Local<v8::Value>* argv) {
+#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+    return New(node::MakeCallback(
+        v8::Isolate::GetCurrent(), target, func, argc, argv));
+#else
+    return node::MakeCallback(
+        v8::Isolate::GetCurrent(), target, func, argc, argv);
+#endif
+  }
+
+  inline v8::Local<v8::Value> MakeCallback(
+      v8::Local<v8::Object> target
+    , v8::Local<v8::String> symbol
+    , int argc
+    , v8::Local<v8::Value>* argv) {
+#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+    return New(node::MakeCallback(
+        v8::Isolate::GetCurrent(), target, symbol, argc, argv));
+#else
+    return node::MakeCallback(
+        v8::Isolate::GetCurrent(), target, symbol, argc, argv);
+#endif
+  }
+
+  inline v8::Local<v8::Value> MakeCallback(
+      v8::Local<v8::Object> target
+    , const char* method
+    , int argc
+    , v8::Local<v8::Value>* argv) {
+#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+    return New(node::MakeCallback(
+        v8::Isolate::GetCurrent(), target, method, argc, argv));
+#else
+    return node::MakeCallback(
+        v8::Isolate::GetCurrent(), target, method, argc, argv);
+#endif
+  }
+
+  inline void FatalException(const TryCatch& try_catch) {
+    node::FatalException(v8::Isolate::GetCurrent(), try_catch.try_catch_);
+  }
+
+  inline v8::Local<v8::Value> ErrnoException(
+          int errorno
+       ,  const char* syscall = NULL
+       ,  const char* message = NULL
+       ,  const char* path = NULL) {
+    return node::ErrnoException(v8::Isolate::GetCurrent(), errorno, syscall,
+            message, path);
+  }
+
+  NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
+          int errorno
+       ,  const char* syscall = NULL
+       ,  const char* message = NULL
+       ,  const char* path = NULL) {
+    return ErrnoException(errorno, syscall, message, path);
+  }
+
+  template<typename T>
+  inline void SetIsolateData(
+      v8::Isolate *isolate
+    , T *data
+  ) {
+      isolate->SetData(0, data);
+  }
+
+  template<typename T>
+  inline T *GetIsolateData(
+      v8::Isolate *isolate
+  ) {
+      return static_cast<T*>(isolate->GetData(0));
+  }
+
+class Utf8String {
+ public:
+  inline explicit Utf8String(v8::Local<v8::Value> from) :
+      length_(0), str_(str_st_) {
+    if (!from.IsEmpty()) {
+      v8::Local<v8::String> string = from->ToString();
+      if (!string.IsEmpty()) {
+        size_t len = 3 * string->Length() + 1;
+        assert(len <= INT_MAX);
+        if (len > sizeof (str_st_)) {
+          str_ = static_cast<char*>(malloc(len));
+          assert(str_ != 0);
+        }
+        const int flags =
+            v8::String::NO_NULL_TERMINATION | imp::kReplaceInvalidUtf8;
+        length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
+        str_[length_] = '\0';
+      }
+    }
+  }
+
+  inline int length() const {
+    return length_;
+  }
+
+  inline char* operator*() { return str_; }
+  inline const char* operator*() const { return str_; }
+
+  inline ~Utf8String() {
+    if (str_ != str_st_) {
+      free(str_);
+    }
+  }
+
+ private:
+  NAN_DISALLOW_ASSIGN_COPY_MOVE(Utf8String)
+
+  int length_;
+  char *str_;
+  char str_st_[1024];
+};
+
+#else  // Node 0.8 and 0.10
+  inline v8::Local<v8::Primitive> Undefined() {
+    EscapableHandleScope scope;
+    return scope.Escape(New(v8::Undefined()));
+  }
+
+  inline v8::Local<v8::Primitive> Null() {
+    EscapableHandleScope scope;
+    return scope.Escape(New(v8::Null()));
+  }
+
+  inline v8::Local<v8::Boolean> True() {
+    EscapableHandleScope scope;
+    return scope.Escape(New(v8::True()));
+  }
+
+  inline v8::Local<v8::Boolean> False() {
+    EscapableHandleScope scope;
+    return scope.Escape(New(v8::False()));
+  }
+
+  inline v8::Local<v8::String> EmptyString() {
+    return v8::String::Empty();
+  }
+
+  inline int AdjustExternalMemory(int bc) {
+    return static_cast<int>(v8::V8::AdjustAmountOfExternalAllocatedMemory(bc));
+  }
+
+  inline void SetTemplate(
+      v8::Local<v8::Template> templ
+    , const char *name
+    , v8::Local<v8::Data> value) {
+    templ->Set(name, value);
+  }
+
+  inline void SetTemplate(
+      v8::Local<v8::Template> templ
+    , v8::Local<v8::String> name
+    , v8::Local<v8::Data> value
+    , v8::PropertyAttribute attributes) {
+    templ->Set(name, value, attributes);
+  }
+
+  inline v8::Local<v8::Context> GetCurrentContext() {
+    return v8::Context::GetCurrent();
+  }
+
+  inline void* GetInternalFieldPointer(
+      v8::Local<v8::Object> object
+    , int index) {
+    return object->GetPointerFromInternalField(index);
+  }
+
+  inline void SetInternalFieldPointer(
+      v8::Local<v8::Object> object
+    , int index
+    , void* value) {
+    object->SetPointerInInternalField(index, value);
+  }
+
+# define NAN_GC_CALLBACK(name)                                                 \
+    void name(v8::GCType type, v8::GCCallbackFlags flags)
+
+  inline void AddGCEpilogueCallback(
+    v8::GCEpilogueCallback callback
+  , v8::GCType gc_type_filter = v8::kGCTypeAll) {
+    v8::V8::AddGCEpilogueCallback(callback, gc_type_filter);
+  }
+  inline void RemoveGCEpilogueCallback(
+    v8::GCEpilogueCallback callback) {
+    v8::V8::RemoveGCEpilogueCallback(callback);
+  }
+  inline void AddGCPrologueCallback(
+    v8::GCPrologueCallback callback
+  , v8::GCType gc_type_filter = v8::kGCTypeAll) {
+    v8::V8::AddGCPrologueCallback(callback, gc_type_filter);
+  }
+  inline void RemoveGCPrologueCallback(
+    v8::GCPrologueCallback callback) {
+    v8::V8::RemoveGCPrologueCallback(callback);
+  }
+  inline void GetHeapStatistics(
+    v8::HeapStatistics *heap_statistics) {
+    v8::V8::GetHeapStatistics(heap_statistics);
+  }
+
+# define X(NAME)                                                               \
+    inline v8::Local<v8::Value> NAME(const char *msg) {                    \
+      EscapableHandleScope scope;                                              \
+      return scope.Escape(v8::Exception::NAME(New(msg).ToLocalChecked()));     \
+    }                                                                          \
+                                                                               \
+    inline                                                                 \
+    v8::Local<v8::Value> NAME(v8::Local<v8::String> msg) {                     \
+      return v8::Exception::NAME(msg);                                         \
+    }                                                                          \
+                                                                               \
+    inline void Throw ## NAME(const char *msg) {                           \
+      HandleScope scope;                                                       \
+      v8::ThrowException(v8::Exception::NAME(New(msg).ToLocalChecked()));      \
+    }                                                                          \
+                                                                               \
+    inline                                                                 \
+    void Throw ## NAME(v8::Local<v8::String> errmsg) {                         \
+      v8::ThrowException(v8::Exception::NAME(errmsg));                         \
+    }
+
+  X(Error)
+  X(RangeError)
+  X(ReferenceError)
+  X(SyntaxError)
+  X(TypeError)
+
+# undef X
+
+  inline void ThrowError(v8::Local<v8::Value> error) {
+    v8::ThrowException(error);
+  }
+
+  inline MaybeLocal<v8::Object> NewBuffer(
+      char *data
+    , size_t length
+    , node::Buffer::free_callback callback
+    , void *hint
+  ) {
+    EscapableHandleScope scope;
+    // arbitrary buffer lengths requires
+    // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION
+    assert(length <= imp::kMaxLength && "too large buffer");
+    return MaybeLocal<v8::Object>(scope.Escape(
+        New(node::Buffer::New(data, length, callback, hint)->handle_)));
+  }
+
+  inline MaybeLocal<v8::Object> CopyBuffer(
+      const char *data
+    , uint32_t size
+  ) {
+    EscapableHandleScope scope;
+    // arbitrary buffer lengths requires
+    // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION
+    assert(size <= imp::kMaxLength && "too large buffer");
+#if NODE_MODULE_VERSION >= NODE_0_10_MODULE_VERSION
+    return MaybeLocal<v8::Object>(
+        scope.Escape(New(node::Buffer::New(data, size)->handle_)));
+#else
+    return MaybeLocal<v8::Object>(scope.Escape(
+        New(node::Buffer::New(const_cast<char*>(data), size)->handle_)));
+#endif
+  }
+
+  inline MaybeLocal<v8::Object> NewBuffer(uint32_t size) {
+    // arbitrary buffer lengths requires
+    // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION
+    EscapableHandleScope scope;
+    assert(size <= imp::kMaxLength && "too large buffer");
+    return MaybeLocal<v8::Object>(
+        scope.Escape(New(node::Buffer::New(size)->handle_)));
+  }
+
+  inline void FreeData(char *data, void *hint) {
+    (void) hint;  // unused
+    delete[] data;
+  }
+
+  inline MaybeLocal<v8::Object> NewBuffer(
+      char* data
+    , uint32_t size
+  ) {
+    EscapableHandleScope scope;
+    // arbitrary buffer lengths requires
+    // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION
+    assert(size <= imp::kMaxLength && "too large buffer");
+    return MaybeLocal<v8::Object>(scope.Escape(New(
+        node::Buffer::New(data, size, FreeData, NULL)->handle_)));
+  }
+
+namespace imp {
+inline void
+widenString(std::vector<uint16_t> *ws, const uint8_t *s, int l) {
+  size_t len = static_cast<size_t>(l);
+  if (l < 0) {
+    len = strlen(reinterpret_cast<const char*>(s));
+  }
+  assert(len <= INT_MAX && "string too long");
+  ws->resize(len);
+  std::copy(s, s + len, ws->begin());  // NOLINT(build/include_what_you_use)
+}
+}  // end of namespace imp
+
+  inline MaybeLocal<v8::String>
+  NewOneByteString(const uint8_t * value, int length = -1) {
+    std::vector<uint16_t> wideString;  // NOLINT(build/include_what_you_use)
+    imp::widenString(&wideString, value, length);
+    return imp::Factory<v8::String>::return_t(v8::String::New(
+        &wideString.front(), static_cast<int>(wideString.size())));
+  }
+
+  inline MaybeLocal<BoundScript> CompileScript(
+      v8::Local<v8::String> s
+    , const v8::ScriptOrigin& origin
+  ) {
+    return MaybeLocal<BoundScript>(
+        v8::Script::Compile(s, const_cast<v8::ScriptOrigin *>(&origin)));
+  }
+
+  inline MaybeLocal<BoundScript> CompileScript(
+    v8::Local<v8::String> s
+  ) {
+    return MaybeLocal<BoundScript>(v8::Script::Compile(s));
+  }
+
+  inline
+  MaybeLocal<v8::Value> RunScript(v8::Local<v8::Script> script) {
+    return MaybeLocal<v8::Value>(script->Run());
+  }
+
+  inline v8::Local<v8::Value> MakeCallback(
+      v8::Local<v8::Object> target
+    , v8::Local<v8::Function> func
+    , int argc
+    , v8::Local<v8::Value>* argv) {
+    return New(node::MakeCallback(target, func, argc, argv));
+  }
+
+  inline v8::Local<v8::Value> MakeCallback(
+      v8::Local<v8::Object> target
+    , v8::Local<v8::String> symbol
+    , int argc
+    , v8::Local<v8::Value>* argv) {
+    return New(node::MakeCallback(target, symbol, argc, argv));
+  }
+
+  inline v8::Local<v8::Value> MakeCallback(
+      v8::Local<v8::Object> target
+    , const char* method
+    , int argc
+    , v8::Local<v8::Value>* argv) {
+    return New(node::MakeCallback(target, method, argc, argv));
+  }
+
+  inline void FatalException(const TryCatch& try_catch) {
+    node::FatalException(const_cast<v8::TryCatch &>(try_catch.try_catch_));
+  }
+
+  inline v8::Local<v8::Value> ErrnoException(
+          int errorno
+       ,  const char* syscall = NULL
+       ,  const char* message = NULL
+       ,  const char* path = NULL) {
+    return node::ErrnoException(errorno, syscall, message, path);
+  }
+
+  NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
+          int errorno
+       ,  const char* syscall = NULL
+       ,  const char* message = NULL
+       ,  const char* path = NULL) {
+    return ErrnoException(errorno, syscall, message, path);
+  }
+
+
+  template<typename T>
+  inline void SetIsolateData(
+      v8::Isolate *isolate
+    , T *data
+  ) {
+      isolate->SetData(data);
+  }
+
+  template<typename T>
+  inline T *GetIsolateData(
+      v8::Isolate *isolate
+  ) {
+      return static_cast<T*>(isolate->GetData());
+  }
+
+class Utf8String {
+ public:
+  inline explicit Utf8String(v8::Local<v8::Value> from) :
+      length_(0), str_(str_st_) {
+    if (!from.IsEmpty()) {
+      v8::Local<v8::String> string = from->ToString();
+      if (!string.IsEmpty()) {
+        size_t len = 3 * string->Length() + 1;
+        assert(len <= INT_MAX);
+        if (len > sizeof (str_st_)) {
+          str_ = static_cast<char*>(malloc(len));
+          assert(str_ != 0);
+        }
+        const int flags =
+            v8::String::NO_NULL_TERMINATION | imp::kReplaceInvalidUtf8;
+        length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
+        str_[length_] = '\0';
+      }
+    }
+  }
+
+  inline int length() const {
+    return length_;
+  }
+
+  inline char* operator*() { return str_; }
+  inline const char* operator*() const { return str_; }
+
+  inline ~Utf8String() {
+    if (str_ != str_st_) {
+      free(str_);
+    }
+  }
+
+ private:
+  NAN_DISALLOW_ASSIGN_COPY_MOVE(Utf8String)
+
+  int length_;
+  char *str_;
+  char str_st_[1024];
+};
+
+#endif  // NODE_MODULE_VERSION
+
+typedef void (*FreeCallback)(char *data, void *hint);
+
+typedef const FunctionCallbackInfo<v8::Value>& NAN_METHOD_ARGS_TYPE;
+typedef void NAN_METHOD_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<v8::Value>& NAN_GETTER_ARGS_TYPE;
+typedef void NAN_GETTER_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<void>& NAN_SETTER_ARGS_TYPE;
+typedef void NAN_SETTER_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<v8::Value>&
+    NAN_PROPERTY_GETTER_ARGS_TYPE;
+typedef void NAN_PROPERTY_GETTER_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<v8::Value>&
+    NAN_PROPERTY_SETTER_ARGS_TYPE;
+typedef void NAN_PROPERTY_SETTER_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<v8::Array>&
+    NAN_PROPERTY_ENUMERATOR_ARGS_TYPE;
+typedef void NAN_PROPERTY_ENUMERATOR_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<v8::Boolean>&
+    NAN_PROPERTY_DELETER_ARGS_TYPE;
+typedef void NAN_PROPERTY_DELETER_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<v8::Integer>&
+    NAN_PROPERTY_QUERY_ARGS_TYPE;
+typedef void NAN_PROPERTY_QUERY_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<v8::Value>& NAN_INDEX_GETTER_ARGS_TYPE;
+typedef void NAN_INDEX_GETTER_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<v8::Value>& NAN_INDEX_SETTER_ARGS_TYPE;
+typedef void NAN_INDEX_SETTER_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<v8::Array>&
+    NAN_INDEX_ENUMERATOR_ARGS_TYPE;
+typedef void NAN_INDEX_ENUMERATOR_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<v8::Boolean>&
+    NAN_INDEX_DELETER_ARGS_TYPE;
+typedef void NAN_INDEX_DELETER_RETURN_TYPE;
+
+typedef const PropertyCallbackInfo<v8::Integer>&
+    NAN_INDEX_QUERY_ARGS_TYPE;
+typedef void NAN_INDEX_QUERY_RETURN_TYPE;
+
+#define NAN_METHOD(name)                                                       \
+    Nan::NAN_METHOD_RETURN_TYPE name(Nan::NAN_METHOD_ARGS_TYPE info)
+#define NAN_GETTER(name)                                                       \
+    Nan::NAN_GETTER_RETURN_TYPE name(                                          \
+        v8::Local<v8::String> property                                         \
+      , Nan::NAN_GETTER_ARGS_TYPE info)
+#define NAN_SETTER(name)                                                       \
+    Nan::NAN_SETTER_RETURN_TYPE name(                                          \
+        v8::Local<v8::String> property                                         \
+      , v8::Local<v8::Value> value                                             \
+      , Nan::NAN_SETTER_ARGS_TYPE info)
+#define NAN_PROPERTY_GETTER(name)                                              \
+    Nan::NAN_PROPERTY_GETTER_RETURN_TYPE name(                                 \
+        v8::Local<v8::String> property                                         \
+      , Nan::NAN_PROPERTY_GETTER_ARGS_TYPE info)
+#define NAN_PROPERTY_SETTER(name)                                              \
+    Nan::NAN_PROPERTY_SETTER_RETURN_TYPE name(                                 \
+        v8::Local<v8::String> property                                         \
+      , v8::Local<v8::Value> value                                             \
+      , Nan::NAN_PROPERTY_SETTER_ARGS_TYPE info)
+#define NAN_PROPERTY_ENUMERATOR(name)                                          \
+    Nan::NAN_PROPERTY_ENUMERATOR_RETURN_TYPE name(                             \
+        Nan::NAN_PROPERTY_ENUMERATOR_ARGS_TYPE info)
+#define NAN_PROPERTY_DELETER(name)                                             \
+    Nan::NAN_PROPERTY_DELETER_RETURN_TYPE name(                                \
+        v8::Local<v8::String> property                                         \
+      , Nan::NAN_PROPERTY_DELETER_ARGS_TYPE info)
+#define NAN_PROPERTY_QUERY(name)                                               \
+    Nan::NAN_PROPERTY_QUERY_RETURN_TYPE name(                                  \
+        v8::Local<v8::String> property                                         \
+      , Nan::NAN_PROPERTY_QUERY_ARGS_TYPE info)
+# define NAN_INDEX_GETTER(name)                                                \
+    Nan::NAN_INDEX_GETTER_RETURN_TYPE name(                                    \
+        uint32_t index                                                         \
+      , Nan::NAN_INDEX_GETTER_ARGS_TYPE info)
+#define NAN_INDEX_SETTER(name)                                                 \
+    Nan::NAN_INDEX_SETTER_RETURN_TYPE name(                                    \
+        uint32_t index                                                         \
+      , v8::Local<v8::Value> value                                             \
+      , Nan::NAN_INDEX_SETTER_ARGS_TYPE info)
+#define NAN_INDEX_ENUMERATOR(name)                                             \
+    Nan::NAN_INDEX_ENUMERATOR_RETURN_TYPE                                      \
+    name(Nan::NAN_INDEX_ENUMERATOR_ARGS_TYPE info)
+#define NAN_INDEX_DELETER(name)                                                \
+    Nan::NAN_INDEX_DELETER_RETURN_TYPE name(                                   \
+        uint32_t index                                                         \
+      , Nan::NAN_INDEX_DELETER_ARGS_TYPE info)
+#define NAN_INDEX_QUERY(name)                                                  \
+    Nan::NAN_INDEX_QUERY_RETURN_TYPE name(                                     \
+        uint32_t index                                                         \
+      , Nan::NAN_INDEX_QUERY_ARGS_TYPE info)
+
+class Callback {
+ public:
+  Callback() {
+    HandleScope scope;
+    v8::Local<v8::Object> obj = New<v8::Object>();
+    handle.Reset(obj);
+  }
+
+  explicit Callback(const v8::Local<v8::Function> &fn) {
+    HandleScope scope;
+    v8::Local<v8::Object> obj = New<v8::Object>();
+    handle.Reset(obj);
+    SetFunction(fn);
+  }
+
+  ~Callback() {
+    if (handle.IsEmpty()) return;
+    handle.Reset();
+  }
+
+  bool operator==(const Callback &other) const {
+    HandleScope scope;
+    v8::Local<v8::Value> a = New(handle)->Get(kCallbackIndex);
+    v8::Local<v8::Value> b = New(other.handle)->Get(kCallbackIndex);
+    return a->StrictEquals(b);
+  }
+
+  bool operator!=(const Callback &other) const {
+    return !this->operator==(other);
+  }
+
+  inline
+  v8::Local<v8::Function> operator*() const { return this->GetFunction(); }
+
+  inline v8::Local<v8::Value> operator()(
+      v8::Local<v8::Object> target
+    , int argc = 0
+    , v8::Local<v8::Value> argv[] = 0) const {
+    return this->Call(target, argc, argv);
+  }
+
+  inline v8::Local<v8::Value> operator()(
+      int argc = 0
+    , v8::Local<v8::Value> argv[] = 0) const {
+    return this->Call(argc, argv);
+  }
+
+  inline void SetFunction(const v8::Local<v8::Function> &fn) {
+    HandleScope scope;
+    Set(New(handle), kCallbackIndex, fn);
+  }
+
+  inline v8::Local<v8::Function> GetFunction() const {
+    EscapableHandleScope scope;
+    return scope.Escape(New(handle)->Get(kCallbackIndex)
+        .As<v8::Function>());
+  }
+
+  inline bool IsEmpty() const {
+    HandleScope scope;
+    return New(handle)->Get(kCallbackIndex)->IsUndefined();
+  }
+
+  inline v8::Local<v8::Value>
+  Call(v8::Local<v8::Object> target
+     , int argc
+     , v8::Local<v8::Value> argv[]) const {
+#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)
+    v8::Isolate *isolate = v8::Isolate::GetCurrent();
+    return Call_(isolate, target, argc, argv);
+#else
+    return Call_(target, argc, argv);
+#endif
+  }
+
+  inline v8::Local<v8::Value>
+  Call(int argc, v8::Local<v8::Value> argv[]) const {
+#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)
+    v8::Isolate *isolate = v8::Isolate::GetCurrent();
+    return Call_(isolate, isolate->GetCurrentContext()->Global(), argc, argv);
+#else
+    return Call_(v8::Context::GetCurrent()->Global(), argc, argv);
+#endif
+  }
+
+ private:
+  NAN_DISALLOW_ASSIGN_COPY_MOVE(Callback)
+  Persistent<v8::Object> handle;
+  static const uint32_t kCallbackIndex = 0;
+
+#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)
+  v8::Local<v8::Value> Call_(v8::Isolate *isolate
+                           , v8::Local<v8::Object> target
+                           , int argc
+                           , v8::Local<v8::Value> argv[]) const {
+    EscapableHandleScope scope;
+
+    v8::Local<v8::Function> callback = New(handle)->
+        Get(kCallbackIndex).As<v8::Function>();
+# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+    return scope.Escape(New(node::MakeCallback(
+        isolate
+      , target
+      , callback
+      , argc
+      , argv
+    )));
+# else
+    return scope.Escape(node::MakeCallback(
+        isolate
+      , target
+      , callback
+      , argc
+      , argv
+    ));
+# endif
+  }
+#else
+  v8::Local<v8::Value> Call_(v8::Local<v8::Object> target
+                           , int argc
+                           , v8::Local<v8::Value> argv[]) const {
+    EscapableHandleScope scope;
+
+    v8::Local<v8::Function> callback = New(handle)->
+        Get(kCallbackIndex).As<v8::Function>();
+    return scope.Escape(New(node::MakeCallback(
+        target
+      , callback
+      , argc
+      , argv
+    )));
+  }
+#endif
+};
+
+/* abstract */ class AsyncWorker {
+ public:
+  explicit AsyncWorker(Callback *callback_)
+      : callback(callback_), errmsg_(NULL) {
+    request.data = this;
+
+    HandleScope scope;
+    v8::Local<v8::Object> obj = New<v8::Object>();
+    persistentHandle.Reset(obj);
+  }
+
+  virtual ~AsyncWorker() {
+    HandleScope scope;
+
+    if (!persistentHandle.IsEmpty())
+      persistentHandle.Reset();
+    delete callback;
+    delete[] errmsg_;
+  }
+
+  virtual void WorkComplete() {
+    HandleScope scope;
+
+    if (errmsg_ == NULL)
+      HandleOKCallback();
+    else
+      HandleErrorCallback();
+    delete callback;
+    callback = NULL;
+  }
+
+  inline void SaveToPersistent(
+      const char *key, const v8::Local<v8::Value> &value) {
+    HandleScope scope;
+    New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
+  }
+
+  inline void SaveToPersistent(
+      const v8::Local<v8::String> &key, const v8::Local<v8::Value> &value) {
+    HandleScope scope;
+    New(persistentHandle)->Set(key, value);
+  }
+
+  inline void SaveToPersistent(
+      uint32_t index, const v8::Local<v8::Value> &value) {
+    HandleScope scope;
+    New(persistentHandle)->Set(index, value);
+  }
+
+  inline v8::Local<v8::Value> GetFromPersistent(const char *key) const {
+    EscapableHandleScope scope;
+    return scope.Escape(
+        New(persistentHandle)->Get(New(key).ToLocalChecked()));
+  }
+
+  inline v8::Local<v8::Value>
+  GetFromPersistent(const v8::Local<v8::String> &key) const {
+    EscapableHandleScope scope;
+    return scope.Escape(New(persistentHandle)->Get(key));
+  }
+
+  inline v8::Local<v8::Value> GetFromPersistent(uint32_t index) const {
+    EscapableHandleScope scope;
+    return scope.Escape(New(persistentHandle)->Get(index));
+  }
+
+  virtual void Execute() = 0;
+
+  uv_work_t request;
+
+  virtual void Destroy() {
+      delete this;
+  }
+
+ protected:
+  Persistent<v8::Object> persistentHandle;
+  Callback *callback;
+
+  virtual void HandleOKCallback() {
+    callback->Call(0, NULL);
+  }
+
+  virtual void HandleErrorCallback() {
+    HandleScope scope;
+
+    v8::Local<v8::Value> argv[] = {
+      v8::Exception::Error(New<v8::String>(ErrorMessage()).ToLocalChecked())
+    };
+    callback->Call(1, argv);
+  }
+
+  void SetErrorMessage(const char *msg) {
+    delete[] errmsg_;
+
+    size_t size = strlen(msg) + 1;
+    errmsg_ = new char[size];
+    memcpy(errmsg_, msg, size);
+  }
+
+  const char* ErrorMessage() const {
+    return errmsg_;
+  }
+
+ private:
+  NAN_DISALLOW_ASSIGN_COPY_MOVE(AsyncWorker)
+  char *errmsg_;
+};
+
+/* abstract */ class AsyncProgressWorker : public AsyncWorker {
+ public:
+  explicit AsyncProgressWorker(Callback *callback_)
+      : AsyncWorker(callback_), asyncdata_(NULL), asyncsize_(0) {
+    async = new uv_async_t;
+    uv_async_init(
+        uv_default_loop()
+      , async
+      , AsyncProgress_
+    );
+    async->data = this;
+
+    uv_mutex_init(&async_lock);
+  }
+
+  virtual ~AsyncProgressWorker() {
+    uv_mutex_destroy(&async_lock);
+
+    delete[] asyncdata_;
+  }
+
+  void WorkProgress() {
+    uv_mutex_lock(&async_lock);
+    char *data = asyncdata_;
+    size_t size = asyncsize_;
+    asyncdata_ = NULL;
+    uv_mutex_unlock(&async_lock);
+
+    // Dont send progress events after we've already completed.
+    if (callback) {
+        HandleProgressCallback(data, size);
+    }
+    delete[] data;
+  }
+
+  class ExecutionProgress {
+    friend class AsyncProgressWorker;
+   public:
+    void Signal() const {
+        uv_async_send(that_->async);
+    }
+    // You could do fancy generics with templates here.
+    void Send(const char* data, size_t size) const {
+        that_->SendProgress_(data, size);
+    }
+
+   private:
+    explicit ExecutionProgress(AsyncProgressWorker* that) : that_(that) {}
+    NAN_DISALLOW_ASSIGN_COPY_MOVE(ExecutionProgress)
+    AsyncProgressWorker* const that_;
+  };
+
+  virtual void Execute(const ExecutionProgress& progress) = 0;
+  virtual void HandleProgressCallback(const char *data, size_t size) = 0;
+
+  virtual void Destroy() {
+      uv_close(reinterpret_cast<uv_handle_t*>(async), AsyncClose_);
+  }
+
+ private:
+  void Execute() /*final override*/ {
+      ExecutionProgress progress(this);
+      Execute(progress);
+  }
+
+  void SendProgress_(const char *data, size_t size) {
+    char *new_data = new char[size];
+    memcpy(new_data, data, size);
+
+    uv_mutex_lock(&async_lock);
+    char *old_data = asyncdata_;
+    asyncdata_ = new_data;
+    asyncsize_ = size;
+    uv_mutex_unlock(&async_lock);
+
+    delete[] old_data;
+    uv_async_send(async);
+  }
+
+  inline static NAUV_WORK_CB(AsyncProgress_) {
+    AsyncProgressWorker *worker =
+            static_cast<AsyncProgressWorker*>(async->data);
+    worker->WorkProgress();
+  }
+
+  inline static void AsyncClose_(uv_handle_t* handle) {
+    AsyncProgressWorker *worker =
+            static_cast<AsyncProgressWorker*>(handle->data);
+    delete reinterpret_cast<uv_async_t*>(handle);
+    delete worker;
+  }
+
+  uv_async_t *async;
+  uv_mutex_t async_lock;
+  char *asyncdata_;
+  size_t asyncsize_;
+};
+
+inline void AsyncExecute (uv_work_t* req) {
+  AsyncWorker *worker = static_cast<AsyncWorker*>(req->data);
+  worker->Execute();
+}
+
+inline void AsyncExecuteComplete (uv_work_t* req) {
+  AsyncWorker* worker = static_cast<AsyncWorker*>(req->data);
+  worker->WorkComplete();
+  worker->Destroy();
+}
+
+inline void AsyncQueueWorker (AsyncWorker* worker) {
+  uv_queue_work(
+      uv_default_loop()
+    , &worker->request
+    , AsyncExecute
+    , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
+  );
+}
+
+namespace imp {
+
+inline
+ExternalOneByteStringResource const*
+GetExternalResource(v8::Local<v8::String> str) {
+#if NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION
+    return str->GetExternalAsciiStringResource();
+#else
+    return str->GetExternalOneByteStringResource();
+#endif
+}
+
+inline
+bool
+IsExternal(v8::Local<v8::String> str) {
+#if NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION
+    return str->IsExternalAscii();
+#else
+    return str->IsExternalOneByte();
+#endif
+}
+
+}  // end of namespace imp
+
+enum Encoding {ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER};
+
+#if NODE_MODULE_VERSION < NODE_0_10_MODULE_VERSION
+# include "nan_string_bytes.h"  // NOLINT(build/include)
+#endif
+
+inline v8::Local<v8::Value> Encode(
+    const void *buf, size_t len, enum Encoding encoding = BINARY) {
+#if (NODE_MODULE_VERSION >= ATOM_0_21_MODULE_VERSION)
+  v8::Isolate* isolate = v8::Isolate::GetCurrent();
+  node::encoding node_enc = static_cast<node::encoding>(encoding);
+
+  if (encoding == UCS2) {
+    return node::Encode(
+        isolate
+      , reinterpret_cast<const uint16_t *>(buf)
+      , len / 2);
+  } else {
+    return node::Encode(
+        isolate
+      , reinterpret_cast<const char *>(buf)
+      , len
+      , node_enc);
+  }
+#elif (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)
+  return node::Encode(
+      v8::Isolate::GetCurrent()
+    , buf, len
+    , static_cast<node::encoding>(encoding));
+#else
+# if NODE_MODULE_VERSION >= NODE_0_10_MODULE_VERSION
+  return node::Encode(buf, len, static_cast<node::encoding>(encoding));
+# else
+  return imp::Encode(reinterpret_cast<const char*>(buf), len, encoding);
+# endif
+#endif
+}
+
+inline ssize_t DecodeBytes(
+    v8::Local<v8::Value> val, enum Encoding encoding = BINARY) {
+#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)
+  return node::DecodeBytes(
+      v8::Isolate::GetCurrent()
+    , val
+    , static_cast<node::encoding>(encoding));
+#else
+# if (NODE_MODULE_VERSION < NODE_0_10_MODULE_VERSION)
+  if (encoding == BUFFER) {
+    return node::DecodeBytes(val, node::BINARY);
+  }
+# endif
+  return node::DecodeBytes(val, static_cast<node::encoding>(encoding));
+#endif
+}
+
+inline ssize_t DecodeWrite(
+    char *buf
+  , size_t len
+  , v8::Local<v8::Value> val
+  , enum Encoding encoding = BINARY) {
+#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)
+  return node::DecodeWrite(
+      v8::Isolate::GetCurrent()
+    , buf
+    , len
+    , val
+    , static_cast<node::encoding>(encoding));
+#else
+# if (NODE_MODULE_VERSION < NODE_0_10_MODULE_VERSION)
+  if (encoding == BUFFER) {
+    return node::DecodeWrite(buf, len, val, node::BINARY);
+  }
+# endif
+  return node::DecodeWrite(
+      buf
+    , len
+    , val
+    , static_cast<node::encoding>(encoding));
+#endif
+}
+
+inline void SetPrototypeTemplate(
+    v8::Local<v8::FunctionTemplate> templ
+  , const char *name
+  , v8::Local<v8::Data> value
+) {
+  SetTemplate(templ->PrototypeTemplate(), name, value);
+}
+
+inline void SetPrototypeTemplate(
+    v8::Local<v8::FunctionTemplate> templ
+  , v8::Local<v8::String> name
+  , v8::Local<v8::Data> value
+  , v8::PropertyAttribute attributes
+) {
+  SetTemplate(templ->PrototypeTemplate(), name, value, attributes);
+}
+
+inline void SetInstanceTemplate(
+    v8::Local<v8::FunctionTemplate> templ
+  , const char *name
+  , v8::Local<v8::Data> value
+) {
+  SetTemplate(templ->InstanceTemplate(), name, value);
+}
+
+inline void SetInstanceTemplate(
+    v8::Local<v8::FunctionTemplate> templ
+  , v8::Local<v8::String> name
+  , v8::Local<v8::Data> value
+  , v8::PropertyAttribute attributes
+) {
+  SetTemplate(templ->InstanceTemplate(), name, value, attributes);
+}
+
+namespace imp {
+
+// Note(@agnat): Helper to distinguish different receiver types. The first
+// version deals with receivers derived from v8::Template. The second version
+// handles everything else. The final argument only serves as discriminator and
+// is unused.
+template <typename T>
+inline
+void
+SetMethodAux(T recv,
+             v8::Local<v8::String> name,
+             v8::Local<v8::FunctionTemplate> tpl,
+             v8::Template *) {
+  recv->Set(name, tpl);
+}
+
+template <typename T>
+inline
+void
+SetMethodAux(T recv,
+             v8::Local<v8::String> name,
+             v8::Local<v8::FunctionTemplate> tpl,
+             ...) {
+  recv->Set(name, GetFunction(tpl).ToLocalChecked());
+}
+
+}  // end of namespace imp
+
+template <typename T, template <typename> class HandleType>
+inline void SetMethod(
+    HandleType<T> recv
+  , const char *name
+  , FunctionCallback callback) {
+  HandleScope scope;
+  v8::Local<v8::FunctionTemplate> t = New<v8::FunctionTemplate>(callback);
+  v8::Local<v8::String> fn_name = New(name).ToLocalChecked();
+  t->SetClassName(fn_name);
+  // Note(@agnat): Pass an empty T* as discriminator. See note on
+  // SetMethodAux(...) above
+  imp::SetMethodAux(recv, fn_name, t, static_cast<T*>(0));
+}
+
+inline void SetPrototypeMethod(
+    v8::Local<v8::FunctionTemplate> recv
+  , const char* name, FunctionCallback callback) {
+  HandleScope scope;
+  v8::Local<v8::FunctionTemplate> t = New<v8::FunctionTemplate>(
+      callback
+    , v8::Local<v8::Value>()
+    , New<v8::Signature>(recv));
+  v8::Local<v8::String> fn_name = New(name).ToLocalChecked();
+  recv->PrototypeTemplate()->Set(fn_name, t);
+  t->SetClassName(fn_name);
+}
+
+//=== Accessors and Such =======================================================
+
+inline void SetAccessor(
+    v8::Local<v8::ObjectTemplate> tpl
+  , v8::Local<v8::String> name
+  , GetterCallback getter
+  , SetterCallback setter = 0
+  , v8::Local<v8::Value> data = v8::Local<v8::Value>()
+  , v8::AccessControl settings = v8::DEFAULT
+  , v8::PropertyAttribute attribute = v8::None
+  , imp::Sig signature = imp::Sig()) {
+  HandleScope scope;
+
+  imp::NativeGetter getter_ =
+      imp::GetterCallbackWrapper;
+  imp::NativeSetter setter_ =
+      setter ? imp::SetterCallbackWrapper : 0;
+
+  v8::Local<v8::ObjectTemplate> otpl = New<v8::ObjectTemplate>();
+  otpl->SetInternalFieldCount(imp::kAccessorFieldCount);
+  v8::Local<v8::Object> obj = NewInstance(otpl).ToLocalChecked();
+
+  obj->SetInternalField(
+      imp::kGetterIndex
+    , New<v8::External>(reinterpret_cast<void *>(getter)));
+
+  if (setter != 0) {
+    obj->SetInternalField(
+        imp::kSetterIndex
+      , New<v8::External>(reinterpret_cast<void *>(setter)));
+  }
+
+  if (!data.IsEmpty()) {
+    obj->SetInternalField(imp::kDataIndex, data);
+  }
+
+  tpl->SetAccessor(
+      name
+    , getter_
+    , setter_
+    , obj
+    , settings
+    , attribute
+    , signature);
+}
+
+inline bool SetAccessor(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::String> name
+  , GetterCallback getter
+  , SetterCallback setter = 0
+  , v8::Local<v8::Value> data = v8::Local<v8::Value>()
+  , v8::AccessControl settings = v8::DEFAULT
+  , v8::PropertyAttribute attribute = v8::None) {
+  EscapableHandleScope scope;
+
+  imp::NativeGetter getter_ =
+      imp::GetterCallbackWrapper;
+  imp::NativeSetter setter_ =
+      setter ? imp::SetterCallbackWrapper : 0;
+
+  v8::Local<v8::ObjectTemplate> otpl = New<v8::ObjectTemplate>();
+  otpl->SetInternalFieldCount(imp::kAccessorFieldCount);
+  v8::Local<v8::Object> dataobj = NewInstance(otpl).ToLocalChecked();
+
+  dataobj->SetInternalField(
+      imp::kGetterIndex
+    , New<v8::External>(reinterpret_cast<void *>(getter)));
+
+  if (!data.IsEmpty()) {
+    dataobj->SetInternalField(imp::kDataIndex, data);
+  }
+
+  if (setter) {
+    dataobj->SetInternalField(
+        imp::kSetterIndex
+      , New<v8::External>(reinterpret_cast<void *>(setter)));
+  }
+
+#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
+  return obj->SetAccessor(
+      GetCurrentContext()
+    , name
+    , getter_
+    , setter_
+    , dataobj
+    , settings
+    , attribute).FromMaybe(false);
+#else
+  return obj->SetAccessor(
+      name
+    , getter_
+    , setter_
+    , dataobj
+    , settings
+    , attribute);
+#endif
+}
+
+inline void SetNamedPropertyHandler(
+    v8::Local<v8::ObjectTemplate> tpl
+  , PropertyGetterCallback getter
+  , PropertySetterCallback setter = 0
+  , PropertyQueryCallback query = 0
+  , PropertyDeleterCallback deleter = 0
+  , PropertyEnumeratorCallback enumerator = 0
+  , v8::Local<v8::Value> data = v8::Local<v8::Value>()) {
+  HandleScope scope;
+
+  imp::NativePropertyGetter getter_ =
+      imp::PropertyGetterCallbackWrapper;
+  imp::NativePropertySetter setter_ =
+      setter ? imp::PropertySetterCallbackWrapper : 0;
+  imp::NativePropertyQuery query_ =
+      query ? imp::PropertyQueryCallbackWrapper : 0;
+  imp::NativePropertyDeleter *deleter_ =
+      deleter ? imp::PropertyDeleterCallbackWrapper : 0;
+  imp::NativePropertyEnumerator enumerator_ =
+      enumerator ? imp::PropertyEnumeratorCallbackWrapper : 0;
+
+  v8::Local<v8::ObjectTemplate> otpl = New<v8::ObjectTemplate>();
+  otpl->SetInternalFieldCount(imp::kPropertyFieldCount);
+  v8::Local<v8::Object> obj = NewInstance(otpl).ToLocalChecked();
+  obj->SetInternalField(
+      imp::kPropertyGetterIndex
+    , New<v8::External>(reinterpret_cast<void *>(getter)));
+
+  if (setter) {
+    obj->SetInternalField(
+        imp::kPropertySetterIndex
+      , New<v8::External>(reinterpret_cast<void *>(setter)));
+  }
+
+  if (query) {
+    obj->SetInternalField(
+        imp::kPropertyQueryIndex
+      , New<v8::External>(reinterpret_cast<void *>(query)));
+  }
+
+  if (deleter) {
+    obj->SetInternalField(
+        imp::kPropertyDeleterIndex
+      , New<v8::External>(reinterpret_cast<void *>(deleter)));
+  }
+
+  if (enumerator) {
+    obj->SetInternalField(
+        imp::kPropertyEnumeratorIndex
+      , New<v8::External>(reinterpret_cast<void *>(enumerator)));
+  }
+
+  if (!data.IsEmpty()) {
+    obj->SetInternalField(imp::kDataIndex, data);
+  }
+
+#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION
+  tpl->SetHandler(v8::NamedPropertyHandlerConfiguration(
+      getter_, setter_, query_, deleter_, enumerator_, obj));
+#else
+  tpl->SetNamedPropertyHandler(
+      getter_
+    , setter_
+    , query_
+    , deleter_
+    , enumerator_
+    , obj);
+#endif
+}
+
+inline void SetIndexedPropertyHandler(
+    v8::Local<v8::ObjectTemplate> tpl
+  , IndexGetterCallback getter
+  , IndexSetterCallback setter = 0
+  , IndexQueryCallback query = 0
+  , IndexDeleterCallback deleter = 0
+  , IndexEnumeratorCallback enumerator = 0
+  , v8::Local<v8::Value> data = v8::Local<v8::Value>()) {
+  HandleScope scope;
+
+  imp::NativeIndexGetter getter_ =
+      imp::IndexGetterCallbackWrapper;
+  imp::NativeIndexSetter setter_ =
+      setter ? imp::IndexSetterCallbackWrapper : 0;
+  imp::NativeIndexQuery query_ =
+      query ? imp::IndexQueryCallbackWrapper : 0;
+  imp::NativeIndexDeleter deleter_ =
+      deleter ? imp::IndexDeleterCallbackWrapper : 0;
+  imp::NativeIndexEnumerator enumerator_ =
+      enumerator ? imp::IndexEnumeratorCallbackWrapper : 0;
+
+  v8::Local<v8::ObjectTemplate> otpl = New<v8::ObjectTemplate>();
+  otpl->SetInternalFieldCount(imp::kIndexPropertyFieldCount);
+  v8::Local<v8::Object> obj = NewInstance(otpl).ToLocalChecked();
+  obj->SetInternalField(
+      imp::kIndexPropertyGetterIndex
+    , New<v8::External>(reinterpret_cast<void *>(getter)));
+
+  if (setter) {
+    obj->SetInternalField(
+        imp::kIndexPropertySetterIndex
+      , New<v8::External>(reinterpret_cast<void *>(setter)));
+  }
+
+  if (query) {
+    obj->SetInternalField(
+        imp::kIndexPropertyQueryIndex
+      , New<v8::External>(reinterpret_cast<void *>(query)));
+  }
+
+  if (deleter) {
+    obj->SetInternalField(
+        imp::kIndexPropertyDeleterIndex
+      , New<v8::External>(reinterpret_cast<void *>(deleter)));
+  }
+
+  if (enumerator) {
+    obj->SetInternalField(
+        imp::kIndexPropertyEnumeratorIndex
+      , New<v8::External>(reinterpret_cast<void *>(enumerator)));
+  }
+
+  if (!data.IsEmpty()) {
+    obj->SetInternalField(imp::kDataIndex, data);
+  }
+
+#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION
+  tpl->SetHandler(v8::IndexedPropertyHandlerConfiguration(
+      getter_, setter_, query_, deleter_, enumerator_, obj));
+#else
+  tpl->SetIndexedPropertyHandler(
+      getter_
+    , setter_
+    , query_
+    , deleter_
+    , enumerator_
+    , obj);
+#endif
+}
+
+inline void SetCallHandler(
+    v8::Local<v8::FunctionTemplate> tpl
+  , FunctionCallback callback
+  , v8::Local<v8::Value> data = v8::Local<v8::Value>()) {
+  HandleScope scope;
+
+  v8::Local<v8::ObjectTemplate> otpl = New<v8::ObjectTemplate>();
+  otpl->SetInternalFieldCount(imp::kFunctionFieldCount);
+  v8::Local<v8::Object> obj = NewInstance(otpl).ToLocalChecked();
+
+  obj->SetInternalField(
+      imp::kFunctionIndex
+    , New<v8::External>(reinterpret_cast<void *>(callback)));
+
+  if (!data.IsEmpty()) {
+    obj->SetInternalField(imp::kDataIndex, data);
+  }
+
+  tpl->SetCallHandler(imp::FunctionCallbackWrapper, obj);
+}
+
+
+inline void SetCallAsFunctionHandler(
+    v8::Local<v8::ObjectTemplate> tpl,
+    FunctionCallback callback,
+    v8::Local<v8::Value> data = v8::Local<v8::Value>()) {
+  HandleScope scope;
+
+  v8::Local<v8::ObjectTemplate> otpl = New<v8::ObjectTemplate>();
+  otpl->SetInternalFieldCount(imp::kFunctionFieldCount);
+  v8::Local<v8::Object> obj = NewInstance(otpl).ToLocalChecked();
+
+  obj->SetInternalField(
+      imp::kFunctionIndex
+    , New<v8::External>(reinterpret_cast<void *>(callback)));
+
+  if (!data.IsEmpty()) {
+    obj->SetInternalField(imp::kDataIndex, data);
+  }
+
+  tpl->SetCallAsFunctionHandler(imp::FunctionCallbackWrapper, obj);
+}
+
+//=== Weak Persistent Handling =================================================
+
+#include "nan_weak.h"  // NOLINT(build/include)
+
+//=== ObjectWrap ===============================================================
+
+#include "nan_object_wrap.h"  // NOLINT(build/include)
+
+//=== Export ==================================================================
+
+inline
+void
+Export(ADDON_REGISTER_FUNCTION_ARGS_TYPE target, const char *name,
+    FunctionCallback f) {
+  Set(target, New<v8::String>(name).ToLocalChecked(),
+      GetFunction(New<v8::FunctionTemplate>(f)).ToLocalChecked());
+}
+
+//=== Tap Reverse Binding =====================================================
+
+struct Tap {
+  explicit Tap(v8::Local<v8::Value> t) : t_() {
+    t_.Reset(To<v8::Object>(t).ToLocalChecked());
+  }
+
+  ~Tap() { t_.Reset(); }  // not sure if neccessary
+
+  inline void plan(int i) {
+    v8::Local<v8::Value> arg = New(i);
+    MakeCallback(New(t_), "plan", 1, &arg);
+  }
+
+  inline void ok(bool isOk, const char *msg = NULL) {
+    v8::Local<v8::Value> args[2];
+    args[0] = New(isOk);
+    if (msg) args[1] = New(msg).ToLocalChecked();
+    MakeCallback(New(t_), "ok", msg ? 2 : 1, args);
+  }
+
+  inline void pass(const char * msg = NULL) {
+    v8::Local<v8::Value> hmsg;
+    if (msg) hmsg = New(msg).ToLocalChecked();
+    MakeCallback(New(t_), "pass", msg ? 1 : 0, &hmsg);
+  }
+
+ private:
+  Persistent<v8::Object> t_;
+};
+
+#define NAN_STRINGIZE2(x) #x
+#define NAN_STRINGIZE(x) NAN_STRINGIZE2(x)
+#define NAN_TEST_EXPRESSION(expression) \
+  ( expression ), __FILE__ ":" NAN_STRINGIZE(__LINE__) ": " #expression
+
+#define NAN_EXPORT(target, function) Export(target, #function, function)
+
+#undef TYPE_CHECK
+
+//=== Generic Maybefication ===================================================
+
+namespace imp {
+
+template <typename T> struct Maybefier;
+
+template <typename T> struct Maybefier<v8::Local<T> > {
+  static MaybeLocal<T> convert(v8::Local<T> v) {
+    return MaybeLocal<T>(v);
+  }
+};
+
+template <typename T> struct Maybefier<MaybeLocal<T> > {
+  static MaybeLocal<T> convert(MaybeLocal<T> v) {
+    return v;
+  }
+};
+
+}  // end of namespace imp
+
+template <typename T, template <typename> class MaybeMaybe>
+MaybeLocal<T>
+MakeMaybe(MaybeMaybe<T> v) {
+  return imp::Maybefier<MaybeMaybe<T> >::convert(v);
+}
+
+//=== TypedArrayContents =======================================================
+
+#include "nan_typedarray_contents.h"  // NOLINT(build/include)
+
+}  // end of namespace Nan
+
+#endif  // NAN_H_

+ 88 - 0
node_modules/nan/nan_callbacks.h

@@ -0,0 +1,88 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_CALLBACKS_H_
+#define NAN_CALLBACKS_H_
+
+template<typename T> class FunctionCallbackInfo;
+template<typename T> class PropertyCallbackInfo;
+template<typename T> class Global;
+
+typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>&);
+typedef void(*GetterCallback)
+    (v8::Local<v8::String>, const PropertyCallbackInfo<v8::Value>&);
+typedef void(*SetterCallback)(
+    v8::Local<v8::String>,
+    v8::Local<v8::Value>,
+    const PropertyCallbackInfo<void>&);
+typedef void(*PropertyGetterCallback)(
+    v8::Local<v8::String>,
+    const PropertyCallbackInfo<v8::Value>&);
+typedef void(*PropertySetterCallback)(
+    v8::Local<v8::String>,
+    v8::Local<v8::Value>,
+    const PropertyCallbackInfo<v8::Value>&);
+typedef void(*PropertyEnumeratorCallback)
+    (const PropertyCallbackInfo<v8::Array>&);
+typedef void(*PropertyDeleterCallback)(
+    v8::Local<v8::String>,
+    const PropertyCallbackInfo<v8::Boolean>&);
+typedef void(*PropertyQueryCallback)(
+    v8::Local<v8::String>,
+    const PropertyCallbackInfo<v8::Integer>&);
+typedef void(*IndexGetterCallback)(
+    uint32_t,
+    const PropertyCallbackInfo<v8::Value>&);
+typedef void(*IndexSetterCallback)(
+    uint32_t,
+    v8::Local<v8::Value>,
+    const PropertyCallbackInfo<v8::Value>&);
+typedef void(*IndexEnumeratorCallback)
+    (const PropertyCallbackInfo<v8::Array>&);
+typedef void(*IndexDeleterCallback)(
+    uint32_t,
+    const PropertyCallbackInfo<v8::Boolean>&);
+typedef void(*IndexQueryCallback)(
+    uint32_t,
+    const PropertyCallbackInfo<v8::Integer>&);
+
+namespace imp {
+typedef v8::Local<v8::AccessorSignature> Sig;
+
+static const int kDataIndex =                    0;
+
+static const int kFunctionIndex =                1;
+static const int kFunctionFieldCount =           2;
+
+static const int kGetterIndex =                  1;
+static const int kSetterIndex =                  2;
+static const int kAccessorFieldCount =           3;
+
+static const int kPropertyGetterIndex =          1;
+static const int kPropertySetterIndex =          2;
+static const int kPropertyEnumeratorIndex =      3;
+static const int kPropertyDeleterIndex =         4;
+static const int kPropertyQueryIndex =           5;
+static const int kPropertyFieldCount =           6;
+
+static const int kIndexPropertyGetterIndex =     1;
+static const int kIndexPropertySetterIndex =     2;
+static const int kIndexPropertyEnumeratorIndex = 3;
+static const int kIndexPropertyDeleterIndex =    4;
+static const int kIndexPropertyQueryIndex =      5;
+static const int kIndexPropertyFieldCount =      6;
+
+}  // end of namespace imp
+
+#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+# include "nan_callbacks_12_inl.h"  // NOLINT(build/include)
+#else
+# include "nan_callbacks_pre_12_inl.h"  // NOLINT(build/include)
+#endif
+
+#endif  // NAN_CALLBACKS_H_

+ 512 - 0
node_modules/nan/nan_callbacks_12_inl.h

@@ -0,0 +1,512 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_CALLBACKS_12_INL_H_
+#define NAN_CALLBACKS_12_INL_H_
+
+template<typename T>
+class ReturnValue {
+  v8::ReturnValue<T> value_;
+
+ public:
+  template <class S>
+  explicit inline ReturnValue(const v8::ReturnValue<S> &value) :
+      value_(value) {}
+  template <class S>
+  explicit inline ReturnValue(const ReturnValue<S>& that)
+      : value_(that.value_) {
+    TYPE_CHECK(T, S);
+  }
+
+  // Handle setters
+  template <typename S> inline void Set(const v8::Local<S> &handle) {
+    TYPE_CHECK(T, S);
+    value_.Set(handle);
+  }
+
+  template <typename S> inline void Set(const Global<S> &handle) {
+    TYPE_CHECK(T, S);
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) &&                       \
+  (V8_MINOR_VERSION > 5 || (V8_MINOR_VERSION == 5 &&                           \
+  defined(V8_BUILD_NUMBER) && V8_BUILD_NUMBER >= 8))))
+    value_.Set(handle);
+#else
+    value_.Set(*reinterpret_cast<const v8::Persistent<S>*>(&handle));
+    const_cast<Global<S> &>(handle).Reset();
+#endif
+  }
+
+  // Fast primitive setters
+  inline void Set(bool value) {
+    TYPE_CHECK(T, v8::Boolean);
+    value_.Set(value);
+  }
+
+  inline void Set(double i) {
+    TYPE_CHECK(T, v8::Number);
+    value_.Set(i);
+  }
+
+  inline void Set(int32_t i) {
+    TYPE_CHECK(T, v8::Integer);
+    value_.Set(i);
+  }
+
+  inline void Set(uint32_t i) {
+    TYPE_CHECK(T, v8::Integer);
+    value_.Set(i);
+  }
+
+  // Fast JS primitive setters
+  inline void SetNull() {
+    TYPE_CHECK(T, v8::Primitive);
+    value_.SetNull();
+  }
+
+  inline void SetUndefined() {
+    TYPE_CHECK(T, v8::Primitive);
+    value_.SetUndefined();
+  }
+
+  inline void SetEmptyString() {
+    TYPE_CHECK(T, v8::String);
+    value_.SetEmptyString();
+  }
+
+  // Convenience getter for isolate
+  inline v8::Isolate *GetIsolate() const {
+    return value_.GetIsolate();
+  }
+
+  // Pointer setter: Uncompilable to prevent inadvertent misuse.
+  template<typename S>
+  inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); }
+};
+
+template<typename T>
+class FunctionCallbackInfo {
+  const v8::FunctionCallbackInfo<T> &info_;
+  const v8::Local<v8::Value> data_;
+
+ public:
+  explicit inline FunctionCallbackInfo(
+      const v8::FunctionCallbackInfo<T> &info
+    , v8::Local<v8::Value> data) :
+          info_(info)
+        , data_(data) {}
+
+  inline ReturnValue<T> GetReturnValue() const {
+    return ReturnValue<T>(info_.GetReturnValue());
+  }
+
+  inline v8::Local<v8::Function> Callee() const { return info_.Callee(); }
+  inline v8::Local<v8::Value> Data() const { return data_; }
+  inline v8::Local<v8::Object> Holder() const { return info_.Holder(); }
+  inline bool IsConstructCall() const { return info_.IsConstructCall(); }
+  inline int Length() const { return info_.Length(); }
+  inline v8::Local<v8::Value> operator[](int i) const { return info_[i]; }
+  inline v8::Local<v8::Object> This() const { return info_.This(); }
+  inline v8::Isolate *GetIsolate() const { return info_.GetIsolate(); }
+
+
+ protected:
+  static const int kHolderIndex = 0;
+  static const int kIsolateIndex = 1;
+  static const int kReturnValueDefaultValueIndex = 2;
+  static const int kReturnValueIndex = 3;
+  static const int kDataIndex = 4;
+  static const int kCalleeIndex = 5;
+  static const int kContextSaveIndex = 6;
+  static const int kArgsLength = 7;
+
+ private:
+  NAN_DISALLOW_ASSIGN_COPY_MOVE(FunctionCallbackInfo)
+};
+
+template<typename T>
+class PropertyCallbackInfo {
+  const v8::PropertyCallbackInfo<T> &info_;
+  const v8::Local<v8::Value> data_;
+
+ public:
+  explicit inline PropertyCallbackInfo(
+      const v8::PropertyCallbackInfo<T> &info
+    , const v8::Local<v8::Value> data) :
+          info_(info)
+        , data_(data) {}
+
+  inline v8::Isolate* GetIsolate() const { return info_.GetIsolate(); }
+  inline v8::Local<v8::Value> Data() const { return data_; }
+  inline v8::Local<v8::Object> This() const { return info_.This(); }
+  inline v8::Local<v8::Object> Holder() const { return info_.Holder(); }
+  inline ReturnValue<T> GetReturnValue() const {
+    return ReturnValue<T>(info_.GetReturnValue());
+  }
+
+ protected:
+  static const int kHolderIndex = 0;
+  static const int kIsolateIndex = 1;
+  static const int kReturnValueDefaultValueIndex = 2;
+  static const int kReturnValueIndex = 3;
+  static const int kDataIndex = 4;
+  static const int kThisIndex = 5;
+  static const int kArgsLength = 6;
+
+ private:
+  NAN_DISALLOW_ASSIGN_COPY_MOVE(PropertyCallbackInfo)
+};
+
+namespace imp {
+static
+void FunctionCallbackWrapper(const v8::FunctionCallbackInfo<v8::Value> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  FunctionCallback callback = reinterpret_cast<FunctionCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kFunctionIndex).As<v8::External>()->Value()));
+  FunctionCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  callback(cbinfo);
+}
+
+typedef void (*NativeFunction)(const v8::FunctionCallbackInfo<v8::Value> &);
+
+#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION
+static
+void GetterCallbackWrapper(
+    v8::Local<v8::Name> property
+  , const v8::PropertyCallbackInfo<v8::Value> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  GetterCallback callback = reinterpret_cast<GetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kGetterIndex).As<v8::External>()->Value()));
+  callback(property.As<v8::String>(), cbinfo);
+}
+
+typedef void (*NativeGetter)
+    (v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &);
+
+static
+void SetterCallbackWrapper(
+    v8::Local<v8::Name> property
+  , v8::Local<v8::Value> value
+  , const v8::PropertyCallbackInfo<void> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<void>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  SetterCallback callback = reinterpret_cast<SetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kSetterIndex).As<v8::External>()->Value()));
+  callback(property.As<v8::String>(), value, cbinfo);
+}
+
+typedef void (*NativeSetter)(
+    v8::Local<v8::Name>
+  , v8::Local<v8::Value>
+  , const v8::PropertyCallbackInfo<void> &);
+#else
+static
+void GetterCallbackWrapper(
+    v8::Local<v8::String> property
+  , const v8::PropertyCallbackInfo<v8::Value> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  GetterCallback callback = reinterpret_cast<GetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kGetterIndex).As<v8::External>()->Value()));
+  callback(property, cbinfo);
+}
+
+typedef void (*NativeGetter)
+    (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &);
+
+static
+void SetterCallbackWrapper(
+    v8::Local<v8::String> property
+  , v8::Local<v8::Value> value
+  , const v8::PropertyCallbackInfo<void> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<void>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  SetterCallback callback = reinterpret_cast<SetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kSetterIndex).As<v8::External>()->Value()));
+  callback(property, value, cbinfo);
+}
+
+typedef void (*NativeSetter)(
+    v8::Local<v8::String>
+  , v8::Local<v8::Value>
+  , const v8::PropertyCallbackInfo<void> &);
+#endif
+
+#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION
+static
+void PropertyGetterCallbackWrapper(
+    v8::Local<v8::Name> property
+  , const v8::PropertyCallbackInfo<v8::Value> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyGetterIndex)
+              .As<v8::External>()->Value()));
+  callback(property.As<v8::String>(), cbinfo);
+}
+
+typedef void (*NativePropertyGetter)
+    (v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &);
+
+static
+void PropertySetterCallbackWrapper(
+    v8::Local<v8::Name> property
+  , v8::Local<v8::Value> value
+  , const v8::PropertyCallbackInfo<v8::Value> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertySetterIndex)
+              .As<v8::External>()->Value()));
+  callback(property.As<v8::String>(), value, cbinfo);
+}
+
+typedef void (*NativePropertySetter)(
+    v8::Local<v8::Name>
+  , v8::Local<v8::Value>
+  , const v8::PropertyCallbackInfo<v8::Value> &);
+
+static
+void PropertyEnumeratorCallbackWrapper(
+    const v8::PropertyCallbackInfo<v8::Array> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Array>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyEnumeratorCallback callback =
+      reinterpret_cast<PropertyEnumeratorCallback>(reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyEnumeratorIndex)
+              .As<v8::External>()->Value()));
+  callback(cbinfo);
+}
+
+typedef void (*NativePropertyEnumerator)
+    (const v8::PropertyCallbackInfo<v8::Array> &);
+
+static
+void PropertyDeleterCallbackWrapper(
+    v8::Local<v8::Name> property
+  , const v8::PropertyCallbackInfo<v8::Boolean> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Boolean>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyDeleterIndex)
+              .As<v8::External>()->Value()));
+  callback(property.As<v8::String>(), cbinfo);
+}
+
+typedef void (NativePropertyDeleter)
+    (v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Boolean> &);
+
+static
+void PropertyQueryCallbackWrapper(
+    v8::Local<v8::Name> property
+  , const v8::PropertyCallbackInfo<v8::Integer> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Integer>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyQueryIndex)
+              .As<v8::External>()->Value()));
+  callback(property.As<v8::String>(), cbinfo);
+}
+
+typedef void (*NativePropertyQuery)
+    (v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Integer> &);
+#else
+static
+void PropertyGetterCallbackWrapper(
+    v8::Local<v8::String> property
+  , const v8::PropertyCallbackInfo<v8::Value> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyGetterIndex)
+              .As<v8::External>()->Value()));
+  callback(property, cbinfo);
+}
+
+typedef void (*NativePropertyGetter)
+    (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &);
+
+static
+void PropertySetterCallbackWrapper(
+    v8::Local<v8::String> property
+  , v8::Local<v8::Value> value
+  , const v8::PropertyCallbackInfo<v8::Value> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertySetterIndex)
+              .As<v8::External>()->Value()));
+  callback(property, value, cbinfo);
+}
+
+typedef void (*NativePropertySetter)(
+    v8::Local<v8::String>
+  , v8::Local<v8::Value>
+  , const v8::PropertyCallbackInfo<v8::Value> &);
+
+static
+void PropertyEnumeratorCallbackWrapper(
+    const v8::PropertyCallbackInfo<v8::Array> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Array>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyEnumeratorCallback callback =
+      reinterpret_cast<PropertyEnumeratorCallback>(reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyEnumeratorIndex)
+              .As<v8::External>()->Value()));
+  callback(cbinfo);
+}
+
+typedef void (*NativePropertyEnumerator)
+    (const v8::PropertyCallbackInfo<v8::Array> &);
+
+static
+void PropertyDeleterCallbackWrapper(
+    v8::Local<v8::String> property
+  , const v8::PropertyCallbackInfo<v8::Boolean> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Boolean>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyDeleterIndex)
+              .As<v8::External>()->Value()));
+  callback(property, cbinfo);
+}
+
+typedef void (NativePropertyDeleter)
+    (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Boolean> &);
+
+static
+void PropertyQueryCallbackWrapper(
+    v8::Local<v8::String> property
+  , const v8::PropertyCallbackInfo<v8::Integer> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Integer>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyQueryIndex)
+              .As<v8::External>()->Value()));
+  callback(property, cbinfo);
+}
+
+typedef void (*NativePropertyQuery)
+    (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Integer> &);
+#endif
+
+static
+void IndexGetterCallbackWrapper(
+    uint32_t index, const v8::PropertyCallbackInfo<v8::Value> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  IndexGetterCallback callback = reinterpret_cast<IndexGetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kIndexPropertyGetterIndex)
+              .As<v8::External>()->Value()));
+  callback(index, cbinfo);
+}
+
+typedef void (*NativeIndexGetter)
+    (uint32_t, const v8::PropertyCallbackInfo<v8::Value> &);
+
+static
+void IndexSetterCallbackWrapper(
+    uint32_t index
+  , v8::Local<v8::Value> value
+  , const v8::PropertyCallbackInfo<v8::Value> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  IndexSetterCallback callback = reinterpret_cast<IndexSetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kIndexPropertySetterIndex)
+              .As<v8::External>()->Value()));
+  callback(index, value, cbinfo);
+}
+
+typedef void (*NativeIndexSetter)(
+    uint32_t
+  , v8::Local<v8::Value>
+  , const v8::PropertyCallbackInfo<v8::Value> &);
+
+static
+void IndexEnumeratorCallbackWrapper(
+    const v8::PropertyCallbackInfo<v8::Array> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Array>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  IndexEnumeratorCallback callback = reinterpret_cast<IndexEnumeratorCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(
+              kIndexPropertyEnumeratorIndex).As<v8::External>()->Value()));
+  callback(cbinfo);
+}
+
+typedef void (*NativeIndexEnumerator)
+    (const v8::PropertyCallbackInfo<v8::Array> &);
+
+static
+void IndexDeleterCallbackWrapper(
+    uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Boolean>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  IndexDeleterCallback callback = reinterpret_cast<IndexDeleterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kIndexPropertyDeleterIndex)
+              .As<v8::External>()->Value()));
+  callback(index, cbinfo);
+}
+
+typedef void (*NativeIndexDeleter)
+    (uint32_t, const v8::PropertyCallbackInfo<v8::Boolean> &);
+
+static
+void IndexQueryCallbackWrapper(
+    uint32_t index, const v8::PropertyCallbackInfo<v8::Integer> &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Integer>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  IndexQueryCallback callback = reinterpret_cast<IndexQueryCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kIndexPropertyQueryIndex)
+              .As<v8::External>()->Value()));
+  callback(index, cbinfo);
+}
+
+typedef void (*NativeIndexQuery)
+    (uint32_t, const v8::PropertyCallbackInfo<v8::Integer> &);
+}  // end of namespace imp
+
+#endif  // NAN_CALLBACKS_12_INL_H_

+ 506 - 0
node_modules/nan/nan_callbacks_pre_12_inl.h

@@ -0,0 +1,506 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_CALLBACKS_PRE_12_INL_H_
+#define NAN_CALLBACKS_PRE_12_INL_H_
+
+namespace imp {
+template<typename T> class ReturnValueImp;
+}  // end of namespace imp
+
+template<typename T>
+class ReturnValue {
+  v8::Isolate *isolate_;
+  v8::Persistent<T> *value_;
+  friend class imp::ReturnValueImp<T>;
+
+ public:
+  template <class S>
+  explicit inline ReturnValue(v8::Isolate *isolate, v8::Persistent<S> *p) :
+      isolate_(isolate), value_(p) {}
+  template <class S>
+  explicit inline ReturnValue(const ReturnValue<S>& that)
+      : isolate_(that.isolate_), value_(that.value_) {
+    TYPE_CHECK(T, S);
+  }
+
+  // Handle setters
+  template <typename S> inline void Set(const v8::Local<S> &handle) {
+    TYPE_CHECK(T, S);
+    value_->Dispose();
+    *value_ = v8::Persistent<T>::New(handle);
+  }
+
+  template <typename S> inline void Set(const Global<S> &handle) {
+    TYPE_CHECK(T, S);
+    value_->Dispose();
+    *value_ = v8::Persistent<T>::New(handle.persistent);
+    const_cast<Global<S> &>(handle).Reset();
+  }
+
+  // Fast primitive setters
+  inline void Set(bool value) {
+    TYPE_CHECK(T, v8::Boolean);
+    value_->Dispose();
+    *value_ = v8::Persistent<T>::New(v8::Boolean::New(value));
+  }
+
+  inline void Set(double i) {
+    TYPE_CHECK(T, v8::Number);
+    value_->Dispose();
+    *value_ = v8::Persistent<T>::New(v8::Number::New(i));
+  }
+
+  inline void Set(int32_t i) {
+    TYPE_CHECK(T, v8::Integer);
+    value_->Dispose();
+    *value_ = v8::Persistent<T>::New(v8::Int32::New(i));
+  }
+
+  inline void Set(uint32_t i) {
+    TYPE_CHECK(T, v8::Integer);
+    value_->Dispose();
+    *value_ = v8::Persistent<T>::New(v8::Uint32::NewFromUnsigned(i));
+  }
+
+  // Fast JS primitive setters
+  inline void SetNull() {
+    TYPE_CHECK(T, v8::Primitive);
+    value_->Dispose();
+    *value_ = v8::Persistent<T>::New(v8::Null());
+  }
+
+  inline void SetUndefined() {
+    TYPE_CHECK(T, v8::Primitive);
+    value_->Dispose();
+    *value_ = v8::Persistent<T>::New(v8::Undefined());
+  }
+
+  inline void SetEmptyString() {
+    TYPE_CHECK(T, v8::String);
+    value_->Dispose();
+    *value_ = v8::Persistent<T>::New(v8::String::Empty());
+  }
+
+  // Convenience getter for isolate
+  inline v8::Isolate *GetIsolate() const {
+    return isolate_;
+  }
+
+  // Pointer setter: Uncompilable to prevent inadvertent misuse.
+  template<typename S>
+  inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); }
+};
+
+template<typename T>
+class FunctionCallbackInfo {
+  const v8::Arguments &args_;
+  v8::Local<v8::Value> data_;
+  ReturnValue<T> return_value_;
+  v8::Persistent<T> retval_;
+
+ public:
+  explicit inline FunctionCallbackInfo(
+      const v8::Arguments &args
+    , v8::Local<v8::Value> data) :
+          args_(args)
+        , data_(data)
+        , return_value_(args.GetIsolate(), &retval_)
+        , retval_(v8::Persistent<T>::New(v8::Undefined())) {}
+
+  inline ~FunctionCallbackInfo() {
+    retval_.Dispose();
+    retval_.Clear();
+  }
+
+  inline ReturnValue<T> GetReturnValue() const {
+    return ReturnValue<T>(return_value_);
+  }
+
+  inline v8::Local<v8::Function> Callee() const { return args_.Callee(); }
+  inline v8::Local<v8::Value> Data() const { return data_; }
+  inline v8::Local<v8::Object> Holder() const { return args_.Holder(); }
+  inline bool IsConstructCall() const { return args_.IsConstructCall(); }
+  inline int Length() const { return args_.Length(); }
+  inline v8::Local<v8::Value> operator[](int i) const { return args_[i]; }
+  inline v8::Local<v8::Object> This() const { return args_.This(); }
+  inline v8::Isolate *GetIsolate() const { return args_.GetIsolate(); }
+
+
+ protected:
+  static const int kHolderIndex = 0;
+  static const int kIsolateIndex = 1;
+  static const int kReturnValueDefaultValueIndex = 2;
+  static const int kReturnValueIndex = 3;
+  static const int kDataIndex = 4;
+  static const int kCalleeIndex = 5;
+  static const int kContextSaveIndex = 6;
+  static const int kArgsLength = 7;
+
+ private:
+  NAN_DISALLOW_ASSIGN_COPY_MOVE(FunctionCallbackInfo)
+};
+
+template<typename T>
+class PropertyCallbackInfoBase {
+  const v8::AccessorInfo &info_;
+  const v8::Local<v8::Value> data_;
+
+ public:
+  explicit inline PropertyCallbackInfoBase(
+      const v8::AccessorInfo &info
+    , const v8::Local<v8::Value> data) :
+          info_(info)
+        , data_(data) {}
+
+  inline v8::Isolate* GetIsolate() const { return info_.GetIsolate(); }
+  inline v8::Local<v8::Value> Data() const { return data_; }
+  inline v8::Local<v8::Object> This() const { return info_.This(); }
+  inline v8::Local<v8::Object> Holder() const { return info_.Holder(); }
+
+ protected:
+  static const int kHolderIndex = 0;
+  static const int kIsolateIndex = 1;
+  static const int kReturnValueDefaultValueIndex = 2;
+  static const int kReturnValueIndex = 3;
+  static const int kDataIndex = 4;
+  static const int kThisIndex = 5;
+  static const int kArgsLength = 6;
+
+ private:
+  NAN_DISALLOW_ASSIGN_COPY_MOVE(PropertyCallbackInfoBase)
+};
+
+template<typename T>
+class PropertyCallbackInfo : public PropertyCallbackInfoBase<T> {
+  ReturnValue<T> return_value_;
+  v8::Persistent<T> retval_;
+
+ public:
+  explicit inline PropertyCallbackInfo(
+      const v8::AccessorInfo &info
+    , const v8::Local<v8::Value> data) :
+          PropertyCallbackInfoBase<T>(info, data)
+        , return_value_(info.GetIsolate(), &retval_)
+        , retval_(v8::Persistent<T>::New(v8::Undefined())) {}
+
+  inline ~PropertyCallbackInfo() {
+    retval_.Dispose();
+    retval_.Clear();
+  }
+
+  inline ReturnValue<T> GetReturnValue() const { return return_value_; }
+};
+
+template<>
+class PropertyCallbackInfo<v8::Array> :
+    public PropertyCallbackInfoBase<v8::Array> {
+  ReturnValue<v8::Array> return_value_;
+  v8::Persistent<v8::Array> retval_;
+
+ public:
+  explicit inline PropertyCallbackInfo(
+      const v8::AccessorInfo &info
+    , const v8::Local<v8::Value> data) :
+          PropertyCallbackInfoBase<v8::Array>(info, data)
+        , return_value_(info.GetIsolate(), &retval_)
+        , retval_(v8::Persistent<v8::Array>::New(v8::Local<v8::Array>())) {}
+
+  inline ~PropertyCallbackInfo() {
+    retval_.Dispose();
+    retval_.Clear();
+  }
+
+  inline ReturnValue<v8::Array> GetReturnValue() const {
+    return return_value_;
+  }
+};
+
+template<>
+class PropertyCallbackInfo<v8::Boolean> :
+    public PropertyCallbackInfoBase<v8::Boolean> {
+  ReturnValue<v8::Boolean> return_value_;
+  v8::Persistent<v8::Boolean> retval_;
+
+ public:
+  explicit inline PropertyCallbackInfo(
+      const v8::AccessorInfo &info
+    , const v8::Local<v8::Value> data) :
+          PropertyCallbackInfoBase<v8::Boolean>(info, data)
+        , return_value_(info.GetIsolate(), &retval_)
+        , retval_(v8::Persistent<v8::Boolean>::New(v8::Local<v8::Boolean>())) {}
+
+  inline ~PropertyCallbackInfo() {
+    retval_.Dispose();
+    retval_.Clear();
+  }
+
+  inline ReturnValue<v8::Boolean> GetReturnValue() const {
+    return return_value_;
+  }
+};
+
+template<>
+class PropertyCallbackInfo<v8::Integer> :
+    public PropertyCallbackInfoBase<v8::Integer> {
+  ReturnValue<v8::Integer> return_value_;
+  v8::Persistent<v8::Integer> retval_;
+
+ public:
+  explicit inline PropertyCallbackInfo(
+      const v8::AccessorInfo &info
+    , const v8::Local<v8::Value> data) :
+          PropertyCallbackInfoBase<v8::Integer>(info, data)
+        , return_value_(info.GetIsolate(), &retval_)
+        , retval_(v8::Persistent<v8::Integer>::New(v8::Local<v8::Integer>())) {}
+
+  inline ~PropertyCallbackInfo() {
+    retval_.Dispose();
+    retval_.Clear();
+  }
+
+  inline ReturnValue<v8::Integer> GetReturnValue() const {
+    return return_value_;
+  }
+};
+
+namespace imp {
+template<typename T>
+class ReturnValueImp : public ReturnValue<T> {
+ public:
+  explicit ReturnValueImp(ReturnValue<T> that) :
+      ReturnValue<T>(that) {}
+  inline v8::Handle<T> Value() {
+      return *ReturnValue<T>::value_;
+  }
+};
+
+static
+v8::Handle<v8::Value> FunctionCallbackWrapper(const v8::Arguments &args) {
+  v8::Local<v8::Object> obj = args.Data().As<v8::Object>();
+  FunctionCallback callback = reinterpret_cast<FunctionCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kFunctionIndex).As<v8::External>()->Value()));
+  FunctionCallbackInfo<v8::Value>
+      cbinfo(args, obj->GetInternalField(kDataIndex));
+  callback(cbinfo);
+  return ReturnValueImp<v8::Value>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Value> (*NativeFunction)(const v8::Arguments &);
+
+static
+v8::Handle<v8::Value> GetterCallbackWrapper(
+    v8::Local<v8::String> property, const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  GetterCallback callback = reinterpret_cast<GetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kGetterIndex).As<v8::External>()->Value()));
+  callback(property, cbinfo);
+  return ReturnValueImp<v8::Value>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Value> (*NativeGetter)
+    (v8::Local<v8::String>, const v8::AccessorInfo &);
+
+static
+void SetterCallbackWrapper(
+    v8::Local<v8::String> property
+  , v8::Local<v8::Value> value
+  , const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<void>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  SetterCallback callback = reinterpret_cast<SetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kSetterIndex).As<v8::External>()->Value()));
+  callback(property, value, cbinfo);
+}
+
+typedef void (*NativeSetter)
+    (v8::Local<v8::String>, v8::Local<v8::Value>, const v8::AccessorInfo &);
+
+static
+v8::Handle<v8::Value> PropertyGetterCallbackWrapper(
+    v8::Local<v8::String> property, const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyGetterIndex)
+              .As<v8::External>()->Value()));
+  callback(property, cbinfo);
+  return ReturnValueImp<v8::Value>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Value> (*NativePropertyGetter)
+    (v8::Local<v8::String>, const v8::AccessorInfo &);
+
+static
+v8::Handle<v8::Value> PropertySetterCallbackWrapper(
+    v8::Local<v8::String> property
+  , v8::Local<v8::Value> value
+  , const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertySetterIndex)
+              .As<v8::External>()->Value()));
+  callback(property, value, cbinfo);
+  return ReturnValueImp<v8::Value>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Value> (*NativePropertySetter)
+    (v8::Local<v8::String>, v8::Local<v8::Value>, const v8::AccessorInfo &);
+
+static
+v8::Handle<v8::Array> PropertyEnumeratorCallbackWrapper(
+    const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Array>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyEnumeratorCallback callback =
+      reinterpret_cast<PropertyEnumeratorCallback>(reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyEnumeratorIndex)
+              .As<v8::External>()->Value()));
+  callback(cbinfo);
+  return ReturnValueImp<v8::Array>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Array> (*NativePropertyEnumerator)
+    (const v8::AccessorInfo &);
+
+static
+v8::Handle<v8::Boolean> PropertyDeleterCallbackWrapper(
+    v8::Local<v8::String> property
+  , const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Boolean>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyDeleterIndex)
+              .As<v8::External>()->Value()));
+  callback(property, cbinfo);
+  return ReturnValueImp<v8::Boolean>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Boolean> (NativePropertyDeleter)
+    (v8::Local<v8::String>, const v8::AccessorInfo &);
+
+static
+v8::Handle<v8::Integer> PropertyQueryCallbackWrapper(
+    v8::Local<v8::String> property, const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Integer>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kPropertyQueryIndex)
+              .As<v8::External>()->Value()));
+  callback(property, cbinfo);
+  return ReturnValueImp<v8::Integer>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Integer> (*NativePropertyQuery)
+    (v8::Local<v8::String>, const v8::AccessorInfo &);
+
+static
+v8::Handle<v8::Value> IndexGetterCallbackWrapper(
+    uint32_t index, const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  IndexGetterCallback callback = reinterpret_cast<IndexGetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kIndexPropertyGetterIndex)
+              .As<v8::External>()->Value()));
+  callback(index, cbinfo);
+  return ReturnValueImp<v8::Value>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Value> (*NativeIndexGetter)
+    (uint32_t, const v8::AccessorInfo &);
+
+static
+v8::Handle<v8::Value> IndexSetterCallbackWrapper(
+    uint32_t index
+  , v8::Local<v8::Value> value
+  , const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Value>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  IndexSetterCallback callback = reinterpret_cast<IndexSetterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kIndexPropertySetterIndex)
+              .As<v8::External>()->Value()));
+  callback(index, value, cbinfo);
+  return ReturnValueImp<v8::Value>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Value> (*NativeIndexSetter)
+    (uint32_t, v8::Local<v8::Value>, const v8::AccessorInfo &);
+
+static
+v8::Handle<v8::Array> IndexEnumeratorCallbackWrapper(
+    const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Array>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  IndexEnumeratorCallback callback = reinterpret_cast<IndexEnumeratorCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kIndexPropertyEnumeratorIndex)
+              .As<v8::External>()->Value()));
+  callback(cbinfo);
+  return ReturnValueImp<v8::Array>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Array> (*NativeIndexEnumerator)
+    (const v8::AccessorInfo &);
+
+static
+v8::Handle<v8::Boolean> IndexDeleterCallbackWrapper(
+    uint32_t index, const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Boolean>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  IndexDeleterCallback callback = reinterpret_cast<IndexDeleterCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kIndexPropertyDeleterIndex)
+              .As<v8::External>()->Value()));
+  callback(index, cbinfo);
+  return ReturnValueImp<v8::Boolean>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Boolean> (*NativeIndexDeleter)
+    (uint32_t, const v8::AccessorInfo &);
+
+static
+v8::Handle<v8::Integer> IndexQueryCallbackWrapper(
+    uint32_t index, const v8::AccessorInfo &info) {
+  v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+  PropertyCallbackInfo<v8::Integer>
+      cbinfo(info, obj->GetInternalField(kDataIndex));
+  IndexQueryCallback callback = reinterpret_cast<IndexQueryCallback>(
+      reinterpret_cast<intptr_t>(
+          obj->GetInternalField(kIndexPropertyQueryIndex)
+              .As<v8::External>()->Value()));
+  callback(index, cbinfo);
+  return ReturnValueImp<v8::Integer>(cbinfo.GetReturnValue()).Value();
+}
+
+typedef v8::Handle<v8::Integer> (*NativeIndexQuery)
+    (uint32_t, const v8::AccessorInfo &);
+}  // end of namespace imp
+
+#endif  // NAN_CALLBACKS_PRE_12_INL_H_

+ 64 - 0
node_modules/nan/nan_converters.h

@@ -0,0 +1,64 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_CONVERTERS_H_
+#define NAN_CONVERTERS_H_
+
+namespace imp {
+template<typename T> struct ToFactoryBase {
+  typedef MaybeLocal<T> return_t;
+};
+template<typename T> struct ValueFactoryBase { typedef Maybe<T> return_t; };
+
+template<typename T> struct ToFactory;
+
+#define X(TYPE)                                                                \
+    template<>                                                                 \
+    struct ToFactory<v8::TYPE> : ToFactoryBase<v8::TYPE> {                     \
+      static inline return_t convert(v8::Local<v8::Value> val);                \
+    };
+
+X(Boolean)
+X(Number)
+X(String)
+X(Object)
+X(Integer)
+X(Uint32)
+X(Int32)
+
+#undef X
+
+#define X(TYPE)                                                                \
+    template<>                                                                 \
+    struct ToFactory<TYPE> : ValueFactoryBase<TYPE> {                          \
+      static inline return_t convert(v8::Local<v8::Value> val);                \
+    };
+
+X(bool)
+X(double)
+X(int64_t)
+X(uint32_t)
+X(int32_t)
+
+#undef X
+}  // end of namespace imp
+
+template<typename T>
+inline
+typename imp::ToFactory<T>::return_t To(v8::Local<v8::Value> val) {
+  return imp::ToFactory<T>::convert(val);
+}
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+# include "nan_converters_43_inl.h"
+#else
+# include "nan_converters_pre_43_inl.h"
+#endif
+
+#endif  // NAN_CONVERTERS_H_

+ 42 - 0
node_modules/nan/nan_converters_43_inl.h

@@ -0,0 +1,42 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_CONVERTERS_43_INL_H_
+#define NAN_CONVERTERS_43_INL_H_
+
+#define X(TYPE)                                                                \
+imp::ToFactory<v8::TYPE>::return_t                                             \
+imp::ToFactory<v8::TYPE>::convert(v8::Local<v8::Value> val) {                  \
+  return val->To ## TYPE(GetCurrentContext());                                 \
+}
+
+X(Boolean)
+X(Number)
+X(String)
+X(Object)
+X(Integer)
+X(Uint32)
+X(Int32)
+
+#undef X
+
+#define X(TYPE, NAME)                                                          \
+imp::ToFactory<TYPE>::return_t                                                 \
+imp::ToFactory<TYPE>::convert(v8::Local<v8::Value> val) {                      \
+  return val->NAME ## Value(GetCurrentContext());                              \
+}
+
+X(bool, Boolean)
+X(double, Number)
+X(int64_t, Integer)
+X(uint32_t, Uint32)
+X(int32_t, Int32)
+
+#undef X
+
+#endif  // NAN_CONVERTERS_43_INL_H_

+ 42 - 0
node_modules/nan/nan_converters_pre_43_inl.h

@@ -0,0 +1,42 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_CONVERTERS_PRE_43_INL_H_
+#define NAN_CONVERTERS_PRE_43_INL_H_
+
+#define X(TYPE)                                                                \
+imp::ToFactory<v8::TYPE>::return_t                                             \
+imp::ToFactory<v8::TYPE>::convert(v8::Local<v8::Value> val) {                  \
+  return MaybeLocal<v8::TYPE>(val->To ## TYPE());                              \
+}
+
+X(Boolean)
+X(Number)
+X(String)
+X(Object)
+X(Integer)
+X(Uint32)
+X(Int32)
+
+#undef X
+
+#define X(TYPE, NAME)                                                          \
+imp::ToFactory<TYPE>::return_t                                                 \
+imp::ToFactory<TYPE>::convert(v8::Local<v8::Value> val) {                      \
+  return Just<TYPE>(val->NAME ##Value());                                      \
+}
+
+X(bool, Boolean)
+X(double, Number)
+X(int64_t, Integer)
+X(uint32_t, Uint32)
+X(int32_t, Int32)
+
+#undef X
+
+#endif  // NAN_CONVERTERS_PRE_43_INL_H_

+ 409 - 0
node_modules/nan/nan_implementation_12_inl.h

@@ -0,0 +1,409 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_IMPLEMENTATION_12_INL_H_
+#define NAN_IMPLEMENTATION_12_INL_H_
+//==============================================================================
+// node v0.11 implementation
+//==============================================================================
+
+namespace imp {
+
+//=== Array ====================================================================
+
+Factory<v8::Array>::return_t
+Factory<v8::Array>::New() {
+  return v8::Array::New(v8::Isolate::GetCurrent());
+}
+
+Factory<v8::Array>::return_t
+Factory<v8::Array>::New(int length) {
+  return v8::Array::New(v8::Isolate::GetCurrent(), length);
+}
+
+//=== Boolean ==================================================================
+
+Factory<v8::Boolean>::return_t
+Factory<v8::Boolean>::New(bool value) {
+  return v8::Boolean::New(v8::Isolate::GetCurrent(), value);
+}
+
+//=== Boolean Object ===========================================================
+
+Factory<v8::BooleanObject>::return_t
+Factory<v8::BooleanObject>::New(bool value) {
+#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
+  return v8::BooleanObject::New(
+    v8::Isolate::GetCurrent(), value).As<v8::BooleanObject>();
+#else
+  return v8::BooleanObject::New(value).As<v8::BooleanObject>();
+#endif
+}
+
+//=== Context ==================================================================
+
+Factory<v8::Context>::return_t
+Factory<v8::Context>::New( v8::ExtensionConfiguration* extensions
+                         , v8::Local<v8::ObjectTemplate> tmpl
+                         , v8::Local<v8::Value> obj) {
+  return v8::Context::New(v8::Isolate::GetCurrent(), extensions, tmpl, obj);
+}
+
+//=== Date =====================================================================
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+Factory<v8::Date>::return_t
+Factory<v8::Date>::New(double value) {
+  v8::Local<v8::Date> ret;
+  if (v8::Date::New(GetCurrentContext(), value).
+      ToLocal(reinterpret_cast<v8::Local<v8::Value>*>(&ret))) {
+    return v8::MaybeLocal<v8::Date>(ret);
+  } else {
+    return v8::MaybeLocal<v8::Date>(ret);
+  }
+}
+#else
+Factory<v8::Date>::return_t
+Factory<v8::Date>::New(double value) {
+  return Factory<v8::Date>::return_t(
+      v8::Date::New(v8::Isolate::GetCurrent(), value).As<v8::Date>());
+}
+#endif
+
+//=== External =================================================================
+
+Factory<v8::External>::return_t
+Factory<v8::External>::New(void * value) {
+  return v8::External::New(v8::Isolate::GetCurrent(), value);
+}
+
+//=== Function =================================================================
+
+Factory<v8::Function>::return_t
+Factory<v8::Function>::New( FunctionCallback callback
+                          , v8::Local<v8::Value> data) {
+  v8::Isolate *isolate = v8::Isolate::GetCurrent();
+  v8::EscapableHandleScope scope(isolate);
+  v8::Local<v8::ObjectTemplate> tpl = v8::ObjectTemplate::New(isolate);
+  tpl->SetInternalFieldCount(imp::kFunctionFieldCount);
+  v8::Local<v8::Object> obj = NewInstance(tpl).ToLocalChecked();
+
+  obj->SetInternalField(
+      imp::kFunctionIndex
+    , v8::External::New(isolate, reinterpret_cast<void *>(callback)));
+
+  v8::Local<v8::Value> val = v8::Local<v8::Value>::New(isolate, data);
+
+  if (!val.IsEmpty()) {
+    obj->SetInternalField(imp::kDataIndex, val);
+  }
+
+  return scope.Escape(v8::Function::New( isolate
+                          , imp::FunctionCallbackWrapper
+                          , obj));
+}
+
+//=== Function Template ========================================================
+
+Factory<v8::FunctionTemplate>::return_t
+Factory<v8::FunctionTemplate>::New( FunctionCallback callback
+                                  , v8::Local<v8::Value> data
+                                  , v8::Local<v8::Signature> signature) {
+  v8::Isolate *isolate = v8::Isolate::GetCurrent();
+  if (callback) {
+    v8::EscapableHandleScope scope(isolate);
+    v8::Local<v8::ObjectTemplate> tpl = v8::ObjectTemplate::New(isolate);
+    tpl->SetInternalFieldCount(imp::kFunctionFieldCount);
+    v8::Local<v8::Object> obj = NewInstance(tpl).ToLocalChecked();
+
+    obj->SetInternalField(
+        imp::kFunctionIndex
+      , v8::External::New(isolate, reinterpret_cast<void *>(callback)));
+    v8::Local<v8::Value> val = v8::Local<v8::Value>::New(isolate, data);
+
+    if (!val.IsEmpty()) {
+      obj->SetInternalField(imp::kDataIndex, val);
+    }
+
+    return scope.Escape(v8::FunctionTemplate::New( isolate
+                                    , imp::FunctionCallbackWrapper
+                                    , obj
+                                    , signature));
+  } else {
+    return v8::FunctionTemplate::New(isolate, 0, data, signature);
+  }
+}
+
+//=== Number ===================================================================
+
+Factory<v8::Number>::return_t
+Factory<v8::Number>::New(double value) {
+  return v8::Number::New(v8::Isolate::GetCurrent(), value);
+}
+
+//=== Number Object ============================================================
+
+Factory<v8::NumberObject>::return_t
+Factory<v8::NumberObject>::New(double value) {
+  return v8::NumberObject::New( v8::Isolate::GetCurrent()
+                              , value).As<v8::NumberObject>();
+}
+
+//=== Integer, Int32 and Uint32 ================================================
+
+template <typename T>
+typename IntegerFactory<T>::return_t
+IntegerFactory<T>::New(int32_t value) {
+  return To<T>(T::New(v8::Isolate::GetCurrent(), value));
+}
+
+template <typename T>
+typename IntegerFactory<T>::return_t
+IntegerFactory<T>::New(uint32_t value) {
+  return To<T>(T::NewFromUnsigned(v8::Isolate::GetCurrent(), value));
+}
+
+Factory<v8::Uint32>::return_t
+Factory<v8::Uint32>::New(int32_t value) {
+  return To<v8::Uint32>(
+      v8::Uint32::NewFromUnsigned(v8::Isolate::GetCurrent(), value));
+}
+
+Factory<v8::Uint32>::return_t
+Factory<v8::Uint32>::New(uint32_t value) {
+  return To<v8::Uint32>(
+      v8::Uint32::NewFromUnsigned(v8::Isolate::GetCurrent(), value));
+}
+
+//=== Object ===================================================================
+
+Factory<v8::Object>::return_t
+Factory<v8::Object>::New() {
+  return v8::Object::New(v8::Isolate::GetCurrent());
+}
+
+//=== Object Template ==========================================================
+
+Factory<v8::ObjectTemplate>::return_t
+Factory<v8::ObjectTemplate>::New() {
+  return v8::ObjectTemplate::New(v8::Isolate::GetCurrent());
+}
+
+//=== RegExp ===================================================================
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+Factory<v8::RegExp>::return_t
+Factory<v8::RegExp>::New(
+    v8::Local<v8::String> pattern
+  , v8::RegExp::Flags flags) {
+  return v8::RegExp::New(GetCurrentContext(), pattern, flags);
+}
+#else
+Factory<v8::RegExp>::return_t
+Factory<v8::RegExp>::New(
+    v8::Local<v8::String> pattern
+  , v8::RegExp::Flags flags) {
+  return Factory<v8::RegExp>::return_t(v8::RegExp::New(pattern, flags));
+}
+#endif
+
+//=== Script ===================================================================
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+Factory<v8::Script>::return_t
+Factory<v8::Script>::New( v8::Local<v8::String> source) {
+  v8::ScriptCompiler::Source src(source);
+  return v8::ScriptCompiler::Compile(GetCurrentContext(), &src);
+}
+
+Factory<v8::Script>::return_t
+Factory<v8::Script>::New( v8::Local<v8::String> source
+                        , v8::ScriptOrigin const& origin) {
+  v8::ScriptCompiler::Source src(source, origin);
+  return v8::ScriptCompiler::Compile(GetCurrentContext(), &src);
+}
+#else
+Factory<v8::Script>::return_t
+Factory<v8::Script>::New( v8::Local<v8::String> source) {
+  v8::ScriptCompiler::Source src(source);
+  return Factory<v8::Script>::return_t(
+      v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src));
+}
+
+Factory<v8::Script>::return_t
+Factory<v8::Script>::New( v8::Local<v8::String> source
+                        , v8::ScriptOrigin const& origin) {
+  v8::ScriptCompiler::Source src(source, origin);
+  return Factory<v8::Script>::return_t(
+      v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src));
+}
+#endif
+
+//=== Signature ================================================================
+
+Factory<v8::Signature>::return_t
+Factory<v8::Signature>::New(Factory<v8::Signature>::FTH receiver) {
+  return v8::Signature::New(v8::Isolate::GetCurrent(), receiver);
+}
+
+//=== String ===================================================================
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New() {
+  return Factory<v8::String>::return_t(
+      v8::String::Empty(v8::Isolate::GetCurrent()));
+}
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+Factory<v8::String>::return_t
+Factory<v8::String>::New(const char * value, int length) {
+  return v8::String::NewFromUtf8(
+      v8::Isolate::GetCurrent(), value, v8::NewStringType::kNormal, length);
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(std::string const& value) {
+  assert(value.size() <= INT_MAX && "string too long");
+  return v8::String::NewFromUtf8(v8::Isolate::GetCurrent(),
+      value.data(), v8::NewStringType::kNormal, static_cast<int>(value.size()));
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(const uint16_t * value, int length) {
+  return v8::String::NewFromTwoByte(v8::Isolate::GetCurrent(), value,
+        v8::NewStringType::kNormal, length);
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(v8::String::ExternalStringResource * value) {
+  return v8::String::NewExternalTwoByte(v8::Isolate::GetCurrent(), value);
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(ExternalOneByteStringResource * value) {
+  return v8::String::NewExternalOneByte(v8::Isolate::GetCurrent(), value);
+}
+#else
+Factory<v8::String>::return_t
+Factory<v8::String>::New(const char * value, int length) {
+  return Factory<v8::String>::return_t(
+      v8::String::NewFromUtf8(
+          v8::Isolate::GetCurrent()
+        , value
+        , v8::String::kNormalString
+        , length));
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(
+    std::string const& value) /* NOLINT(build/include_what_you_use) */ {
+  assert(value.size() <= INT_MAX && "string too long");
+  return Factory<v8::String>::return_t(
+      v8::String::NewFromUtf8(
+          v8::Isolate::GetCurrent()
+        , value.data()
+        , v8::String::kNormalString
+        , static_cast<int>(value.size())));
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(const uint16_t * value, int length) {
+  return Factory<v8::String>::return_t(
+      v8::String::NewFromTwoByte(
+          v8::Isolate::GetCurrent()
+        , value
+        , v8::String::kNormalString
+        , length));
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(v8::String::ExternalStringResource * value) {
+  return Factory<v8::String>::return_t(
+      v8::String::NewExternal(v8::Isolate::GetCurrent(), value));
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(ExternalOneByteStringResource * value) {
+  return Factory<v8::String>::return_t(
+      v8::String::NewExternal(v8::Isolate::GetCurrent(), value));
+}
+#endif
+
+//=== String Object ============================================================
+
+Factory<v8::StringObject>::return_t
+Factory<v8::StringObject>::New(v8::Local<v8::String> value) {
+  return v8::StringObject::New(value).As<v8::StringObject>();
+}
+
+//=== Unbound Script ===========================================================
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+Factory<v8::UnboundScript>::return_t
+Factory<v8::UnboundScript>::New(v8::Local<v8::String> source) {
+  v8::ScriptCompiler::Source src(source);
+  return v8::ScriptCompiler::CompileUnboundScript(
+      v8::Isolate::GetCurrent(), &src);
+}
+
+Factory<v8::UnboundScript>::return_t
+Factory<v8::UnboundScript>::New( v8::Local<v8::String> source
+                               , v8::ScriptOrigin const& origin) {
+  v8::ScriptCompiler::Source src(source, origin);
+  return v8::ScriptCompiler::CompileUnboundScript(
+      v8::Isolate::GetCurrent(), &src);
+}
+#else
+Factory<v8::UnboundScript>::return_t
+Factory<v8::UnboundScript>::New(v8::Local<v8::String> source) {
+  v8::ScriptCompiler::Source src(source);
+  return Factory<v8::UnboundScript>::return_t(
+      v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src));
+}
+
+Factory<v8::UnboundScript>::return_t
+Factory<v8::UnboundScript>::New( v8::Local<v8::String> source
+                               , v8::ScriptOrigin const& origin) {
+  v8::ScriptCompiler::Source src(source, origin);
+  return Factory<v8::UnboundScript>::return_t(
+      v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src));
+}
+#endif
+
+}  // end of namespace imp
+
+//=== Presistents and Handles ==================================================
+
+#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+template <typename T>
+inline v8::Local<T> New(v8::Handle<T> h) {
+  return v8::Local<T>::New(v8::Isolate::GetCurrent(), h);
+}
+#endif
+
+template <typename T, typename M>
+inline v8::Local<T> New(v8::Persistent<T, M> const& p) {
+  return v8::Local<T>::New(v8::Isolate::GetCurrent(), p);
+}
+
+template <typename T, typename M>
+inline v8::Local<T> New(Persistent<T, M> const& p) {
+  return v8::Local<T>::New(v8::Isolate::GetCurrent(), p);
+}
+
+template <typename T>
+inline v8::Local<T> New(Global<T> const& p) {
+  return v8::Local<T>::New(v8::Isolate::GetCurrent(), p);
+}
+
+#endif  // NAN_IMPLEMENTATION_12_INL_H_

+ 264 - 0
node_modules/nan/nan_implementation_pre_12_inl.h

@@ -0,0 +1,264 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_IMPLEMENTATION_PRE_12_INL_H_
+#define NAN_IMPLEMENTATION_PRE_12_INL_H_
+
+//==============================================================================
+// node v0.10 implementation
+//==============================================================================
+
+namespace imp {
+
+//=== Array ====================================================================
+
+Factory<v8::Array>::return_t
+Factory<v8::Array>::New() {
+  return v8::Array::New();
+}
+
+Factory<v8::Array>::return_t
+Factory<v8::Array>::New(int length) {
+  return v8::Array::New(length);
+}
+
+//=== Boolean ==================================================================
+
+Factory<v8::Boolean>::return_t
+Factory<v8::Boolean>::New(bool value) {
+  return v8::Boolean::New(value)->ToBoolean();
+}
+
+//=== Boolean Object ===========================================================
+
+Factory<v8::BooleanObject>::return_t
+Factory<v8::BooleanObject>::New(bool value) {
+  return v8::BooleanObject::New(value).As<v8::BooleanObject>();
+}
+
+//=== Context ==================================================================
+
+Factory<v8::Context>::return_t
+Factory<v8::Context>::New( v8::ExtensionConfiguration* extensions
+                         , v8::Local<v8::ObjectTemplate> tmpl
+                         , v8::Local<v8::Value> obj) {
+  v8::Persistent<v8::Context> ctx = v8::Context::New(extensions, tmpl, obj);
+  v8::Local<v8::Context> lctx = v8::Local<v8::Context>::New(ctx);
+  ctx.Dispose();
+  return lctx;
+}
+
+//=== Date =====================================================================
+
+Factory<v8::Date>::return_t
+Factory<v8::Date>::New(double value) {
+  return Factory<v8::Date>::return_t(v8::Date::New(value).As<v8::Date>());
+}
+
+//=== External =================================================================
+
+Factory<v8::External>::return_t
+Factory<v8::External>::New(void * value) {
+  return v8::External::New(value);
+}
+
+//=== Function =================================================================
+
+Factory<v8::Function>::return_t
+Factory<v8::Function>::New( FunctionCallback callback
+                          , v8::Local<v8::Value> data) {
+  return Factory<v8::FunctionTemplate>::New( callback
+                                           , data
+                                           , v8::Local<v8::Signature>()
+                                           )->GetFunction();
+}
+
+
+//=== FunctionTemplate =========================================================
+
+Factory<v8::FunctionTemplate>::return_t
+Factory<v8::FunctionTemplate>::New( FunctionCallback callback
+                                  , v8::Local<v8::Value> data
+                                  , v8::Local<v8::Signature> signature) {
+  if (callback) {
+    v8::HandleScope scope;
+
+    v8::Local<v8::ObjectTemplate> tpl = v8::ObjectTemplate::New();
+    tpl->SetInternalFieldCount(imp::kFunctionFieldCount);
+    v8::Local<v8::Object> obj = tpl->NewInstance();
+
+    obj->SetInternalField(
+        imp::kFunctionIndex
+      , v8::External::New(reinterpret_cast<void *>(callback)));
+
+    v8::Local<v8::Value> val = v8::Local<v8::Value>::New(data);
+
+    if (!val.IsEmpty()) {
+      obj->SetInternalField(imp::kDataIndex, val);
+    }
+
+    // Note(agnat): Emulate length argument here. Unfortunately, I couldn't find
+    // a way. Have at it though...
+    return scope.Close(
+        v8::FunctionTemplate::New(imp::FunctionCallbackWrapper
+                                 , obj
+                                 , signature));
+  } else {
+    return v8::FunctionTemplate::New(0, data, signature);
+  }
+}
+
+//=== Number ===================================================================
+
+Factory<v8::Number>::return_t
+Factory<v8::Number>::New(double value) {
+  return v8::Number::New(value);
+}
+
+//=== Number Object ============================================================
+
+Factory<v8::NumberObject>::return_t
+Factory<v8::NumberObject>::New(double value) {
+  return v8::NumberObject::New(value).As<v8::NumberObject>();
+}
+
+//=== Integer, Int32 and Uint32 ================================================
+
+template <typename T>
+typename IntegerFactory<T>::return_t
+IntegerFactory<T>::New(int32_t value) {
+  return To<T>(T::New(value));
+}
+
+template <typename T>
+typename IntegerFactory<T>::return_t
+IntegerFactory<T>::New(uint32_t value) {
+  return To<T>(T::NewFromUnsigned(value));
+}
+
+Factory<v8::Uint32>::return_t
+Factory<v8::Uint32>::New(int32_t value) {
+  return To<v8::Uint32>(v8::Uint32::NewFromUnsigned(value));
+}
+
+Factory<v8::Uint32>::return_t
+Factory<v8::Uint32>::New(uint32_t value) {
+  return To<v8::Uint32>(v8::Uint32::NewFromUnsigned(value));
+}
+
+
+//=== Object ===================================================================
+
+Factory<v8::Object>::return_t
+Factory<v8::Object>::New() {
+  return v8::Object::New();
+}
+
+//=== Object Template ==========================================================
+
+Factory<v8::ObjectTemplate>::return_t
+Factory<v8::ObjectTemplate>::New() {
+  return v8::ObjectTemplate::New();
+}
+
+//=== RegExp ===================================================================
+
+Factory<v8::RegExp>::return_t
+Factory<v8::RegExp>::New(
+    v8::Local<v8::String> pattern
+  , v8::RegExp::Flags flags) {
+  return Factory<v8::RegExp>::return_t(v8::RegExp::New(pattern, flags));
+}
+
+//=== Script ===================================================================
+
+Factory<v8::Script>::return_t
+Factory<v8::Script>::New( v8::Local<v8::String> source) {
+  return Factory<v8::Script>::return_t(v8::Script::New(source));
+}
+Factory<v8::Script>::return_t
+Factory<v8::Script>::New( v8::Local<v8::String> source
+                        , v8::ScriptOrigin const& origin) {
+  return Factory<v8::Script>::return_t(
+      v8::Script::New(source, const_cast<v8::ScriptOrigin*>(&origin)));
+}
+
+//=== Signature ================================================================
+
+Factory<v8::Signature>::return_t
+Factory<v8::Signature>::New(Factory<v8::Signature>::FTH receiver) {
+  return v8::Signature::New(receiver);
+}
+
+//=== String ===================================================================
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New() {
+  return Factory<v8::String>::return_t(v8::String::Empty());
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(const char * value, int length) {
+  return Factory<v8::String>::return_t(v8::String::New(value, length));
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(
+    std::string const& value) /* NOLINT(build/include_what_you_use) */ {
+  assert(value.size() <= INT_MAX && "string too long");
+  return Factory<v8::String>::return_t(
+      v8::String::New( value.data(), static_cast<int>(value.size())));
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(const uint16_t * value, int length) {
+  return Factory<v8::String>::return_t(v8::String::New(value, length));
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(v8::String::ExternalStringResource * value) {
+  return Factory<v8::String>::return_t(v8::String::NewExternal(value));
+}
+
+Factory<v8::String>::return_t
+Factory<v8::String>::New(v8::String::ExternalAsciiStringResource * value) {
+  return Factory<v8::String>::return_t(v8::String::NewExternal(value));
+}
+
+//=== String Object ============================================================
+
+Factory<v8::StringObject>::return_t
+Factory<v8::StringObject>::New(v8::Local<v8::String> value) {
+  return v8::StringObject::New(value).As<v8::StringObject>();
+}
+
+}  // end of namespace imp
+
+//=== Presistents and Handles ==================================================
+
+template <typename T>
+inline v8::Local<T> New(v8::Handle<T> h) {
+  return v8::Local<T>::New(h);
+}
+
+template <typename T>
+inline v8::Local<T> New(v8::Persistent<T> const& p) {
+  return v8::Local<T>::New(p);
+}
+
+template <typename T, typename M>
+inline v8::Local<T> New(Persistent<T, M> const& p) {
+  return v8::Local<T>::New(p.persistent);
+}
+
+template <typename T>
+inline v8::Local<T> New(Global<T> const& p) {
+  return v8::Local<T>::New(p.persistent);
+}
+
+#endif  // NAN_IMPLEMENTATION_PRE_12_INL_H_

+ 245 - 0
node_modules/nan/nan_maybe_43_inl.h

@@ -0,0 +1,245 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_MAYBE_43_INL_H_
+#define NAN_MAYBE_43_INL_H_
+
+template<typename T>
+using MaybeLocal = v8::MaybeLocal<T>;
+
+template<typename T>
+using Maybe = v8::Maybe<T>;
+
+template<typename T>
+inline Maybe<T> Nothing() {
+  return v8::Nothing<T>();
+}
+
+template<typename T>
+inline Maybe<T> Just(const T& t) {
+  return v8::Just<T>(t);
+}
+
+v8::Local<v8::Context> GetCurrentContext();
+
+inline
+MaybeLocal<v8::String> ToDetailString(v8::Local<v8::Value> val) {
+  return val->ToDetailString(GetCurrentContext());
+}
+
+inline
+MaybeLocal<v8::Uint32> ToArrayIndex(v8::Local<v8::Value> val) {
+  return val->ToArrayIndex(GetCurrentContext());
+}
+
+inline
+Maybe<bool> Equals(v8::Local<v8::Value> a, v8::Local<v8::Value>(b)) {
+  return a->Equals(GetCurrentContext(), b);
+}
+
+inline
+MaybeLocal<v8::Object> NewInstance(v8::Local<v8::Function> h) {
+  return h->NewInstance(GetCurrentContext());
+}
+
+inline
+MaybeLocal<v8::Object> NewInstance(
+      v8::Local<v8::Function> h
+    , int argc
+    , v8::Local<v8::Value> argv[]) {
+  return h->NewInstance(GetCurrentContext(), argc, argv);
+}
+
+inline
+MaybeLocal<v8::Object> NewInstance(v8::Local<v8::ObjectTemplate> h) {
+  return h->NewInstance(GetCurrentContext());
+}
+
+
+inline MaybeLocal<v8::Function> GetFunction(
+    v8::Local<v8::FunctionTemplate> t) {
+  return t->GetFunction(GetCurrentContext());
+}
+
+inline Maybe<bool> Set(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::Value> key
+  , v8::Local<v8::Value> value) {
+  return obj->Set(GetCurrentContext(), key, value);
+}
+
+inline Maybe<bool> Set(
+    v8::Local<v8::Object> obj
+  , uint32_t index
+  , v8::Local<v8::Value> value) {
+  return obj->Set(GetCurrentContext(), index, value);
+}
+
+inline Maybe<bool> ForceSet(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::Value> key
+  , v8::Local<v8::Value> value
+  , v8::PropertyAttribute attribs = v8::None) {
+  return obj->ForceSet(GetCurrentContext(), key, value, attribs);
+}
+
+inline MaybeLocal<v8::Value> Get(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::Value> key) {
+  return obj->Get(GetCurrentContext(), key);
+}
+
+inline
+MaybeLocal<v8::Value> Get(v8::Local<v8::Object> obj, uint32_t index) {
+  return obj->Get(GetCurrentContext(), index);
+}
+
+inline v8::PropertyAttribute GetPropertyAttributes(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::Value> key) {
+  return obj->GetPropertyAttributes(GetCurrentContext(), key).FromJust();
+}
+
+inline Maybe<bool> Has(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::String> key) {
+  return obj->Has(GetCurrentContext(), key);
+}
+
+inline Maybe<bool> Has(v8::Local<v8::Object> obj, uint32_t index) {
+  return obj->Has(GetCurrentContext(), index);
+}
+
+inline Maybe<bool> Delete(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::String> key) {
+  return obj->Delete(GetCurrentContext(), key);
+}
+
+inline
+Maybe<bool> Delete(v8::Local<v8::Object> obj, uint32_t index) {
+  return obj->Delete(GetCurrentContext(), index);
+}
+
+inline
+MaybeLocal<v8::Array> GetPropertyNames(v8::Local<v8::Object> obj) {
+  return obj->GetPropertyNames(GetCurrentContext());
+}
+
+inline
+MaybeLocal<v8::Array> GetOwnPropertyNames(v8::Local<v8::Object> obj) {
+  return obj->GetOwnPropertyNames(GetCurrentContext());
+}
+
+inline Maybe<bool> SetPrototype(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::Value> prototype) {
+  return obj->SetPrototype(GetCurrentContext(), prototype);
+}
+
+inline MaybeLocal<v8::String> ObjectProtoToString(
+    v8::Local<v8::Object> obj) {
+  return obj->ObjectProtoToString(GetCurrentContext());
+}
+
+inline Maybe<bool> HasOwnProperty(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::String> key) {
+  return obj->HasOwnProperty(GetCurrentContext(), key);
+}
+
+inline Maybe<bool> HasRealNamedProperty(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::String> key) {
+  return obj->HasRealNamedProperty(GetCurrentContext(), key);
+}
+
+inline Maybe<bool> HasRealIndexedProperty(
+    v8::Local<v8::Object> obj
+  , uint32_t index) {
+  return obj->HasRealIndexedProperty(GetCurrentContext(), index);
+}
+
+inline Maybe<bool> HasRealNamedCallbackProperty(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::String> key) {
+  return obj->HasRealNamedCallbackProperty(GetCurrentContext(), key);
+}
+
+inline MaybeLocal<v8::Value> GetRealNamedPropertyInPrototypeChain(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::String> key) {
+  return obj->GetRealNamedPropertyInPrototypeChain(GetCurrentContext(), key);
+}
+
+inline MaybeLocal<v8::Value> GetRealNamedProperty(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::String> key) {
+  return obj->GetRealNamedProperty(GetCurrentContext(), key);
+}
+
+inline MaybeLocal<v8::Value> CallAsFunction(
+    v8::Local<v8::Object> obj
+  , v8::Local<v8::Object> recv
+  , int argc
+  , v8::Local<v8::Value> argv[]) {
+  return obj->CallAsFunction(GetCurrentContext(), recv, argc, argv);
+}
+
+inline MaybeLocal<v8::Value> CallAsConstructor(
+    v8::Local<v8::Object> obj
+  , int argc, v8::Local<v8::Value> argv[]) {
+  return obj->CallAsConstructor(GetCurrentContext(), argc, argv);
+}
+
+inline
+MaybeLocal<v8::String> GetSourceLine(v8::Local<v8::Message> msg) {
+  return msg->GetSourceLine(GetCurrentContext());
+}
+
+inline Maybe<int> GetLineNumber(v8::Local<v8::Message> msg) {
+  return msg->GetLineNumber(GetCurrentContext());
+}
+
+inline Maybe<int> GetStartColumn(v8::Local<v8::Message> msg) {
+  return msg->GetStartColumn(GetCurrentContext());
+}
+
+inline Maybe<int> GetEndColumn(v8::Local<v8::Message> msg) {
+  return msg->GetEndColumn(GetCurrentContext());
+}
+
+inline MaybeLocal<v8::Object> CloneElementAt(
+    v8::Local<v8::Array> array
+  , uint32_t index) {
+#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
+  v8::EscapableHandleScope handle_scope(v8::Isolate::GetCurrent());
+  v8::Local<v8::Context> context = GetCurrentContext();
+  v8::Local<v8::Value> elem;
+  if (!array->Get(context, index).ToLocal(&elem)) {
+    return MaybeLocal<v8::Object>();
+  }
+  v8::Local<v8::Object> obj;
+  if (!elem->ToObject(context).ToLocal(&obj)) {
+    return MaybeLocal<v8::Object>();
+  }
+  return MaybeLocal<v8::Object>(handle_scope.Escape(obj->Clone()));
+#else
+  return array->CloneElementAt(GetCurrentContext(), index);
+#endif
+}
+
+inline MaybeLocal<v8::Value> Call(
+    v8::Local<v8::Function> fun
+  , v8::Local<v8::Object> recv
+  , int argc
+  , v8::Local<v8::Value> argv[]) {
+  return fun->Call(GetCurrentContext(), recv, argc, argv);
+}
+
+#endif  // NAN_MAYBE_43_INL_H_

+ 303 - 0
node_modules/nan/nan_maybe_pre_43_inl.h

@@ -0,0 +1,303 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_MAYBE_PRE_43_INL_H_
+#define NAN_MAYBE_PRE_43_INL_H_
+
+template<typename T>
+class MaybeLocal {
+ public:
+  inline MaybeLocal() : val_(v8::Local<T>()) {}
+
+  template<typename S>
+# if NODE_MODULE_VERSION >= NODE_0_12_MODULE_VERSION
+  inline MaybeLocal(v8::Local<S> that) : val_(that) {}
+# else
+  inline MaybeLocal(v8::Local<S> that) :
+      val_(*reinterpret_cast<v8::Local<T>*>(&that)) {}
+# endif
+
+  inline bool IsEmpty() const { return val_.IsEmpty(); }
+
+  template<typename S>
+  inline bool ToLocal(v8::Local<S> *out) const {
+    *out = val_;
+    return !IsEmpty();
+  }
+
+  inline v8::Local<T> ToLocalChecked() const {
+#if defined(V8_ENABLE_CHECKS)
+    assert(!IsEmpty() && "ToLocalChecked is Empty");
+#endif  // V8_ENABLE_CHECKS
+    return val_;
+  }
+
+  template<typename S>
+  inline v8::Local<S> FromMaybe(v8::Local<S> default_value) const {
+    return IsEmpty() ? default_value : val_;
+  }
+
+ private:
+  v8::Local<T> val_;
+};
+
+template<typename T>
+class Maybe {
+ public:
+  inline bool IsNothing() const { return !has_value_; }
+  inline bool IsJust() const { return has_value_; }
+
+  inline T FromJust() const {
+#if defined(V8_ENABLE_CHECKS)
+    assert(IsJust() && "FromJust is Nothing");
+#endif  // V8_ENABLE_CHECKS
+    return value_;
+  }
+
+  inline T FromMaybe(const T& default_value) const {
+    return has_value_ ? value_ : default_value;
+  }
+
+  inline bool operator==(const Maybe &other) const {
+    return (IsJust() == other.IsJust()) &&
+        (!IsJust() || FromJust() == other.FromJust());
+  }
+
+  inline bool operator!=(const Maybe &other) const {
+    return !operator==(other);
+  }
+
+ private:
+  Maybe() : has_value_(false) {}
+  explicit Maybe(const T& t) : has_value_(true), value_(t) {}
+  bool has_value_;
+  T value_;
+
+  template<typename U>
+  friend Maybe<U> Nothing();
+  template<typename U>
+  friend Maybe<U> Just(const U& u);
+};
+
+template<typename T>
+inline Maybe<T> Nothing() {
+  return Maybe<T>();
+}
+
+template<typename T>
+inline Maybe<T> Just(const T& t) {
+  return Maybe<T>(t);
+}
+
+inline
+MaybeLocal<v8::String> ToDetailString(v8::Handle<v8::Value> val) {
+  return MaybeLocal<v8::String>(val->ToDetailString());
+}
+
+inline
+MaybeLocal<v8::Uint32> ToArrayIndex(v8::Handle<v8::Value> val) {
+  return MaybeLocal<v8::Uint32>(val->ToArrayIndex());
+}
+
+inline
+Maybe<bool> Equals(v8::Handle<v8::Value> a, v8::Handle<v8::Value>(b)) {
+  return Just<bool>(a->Equals(b));
+}
+
+inline
+MaybeLocal<v8::Object> NewInstance(v8::Handle<v8::Function> h) {
+  return MaybeLocal<v8::Object>(h->NewInstance());
+}
+
+inline
+MaybeLocal<v8::Object> NewInstance(
+      v8::Local<v8::Function> h
+    , int argc
+    , v8::Local<v8::Value> argv[]) {
+  return MaybeLocal<v8::Object>(h->NewInstance(argc, argv));
+}
+
+inline
+MaybeLocal<v8::Object> NewInstance(v8::Handle<v8::ObjectTemplate> h) {
+  return MaybeLocal<v8::Object>(h->NewInstance());
+}
+
+inline
+MaybeLocal<v8::Function> GetFunction(v8::Handle<v8::FunctionTemplate> t) {
+  return MaybeLocal<v8::Function>(t->GetFunction());
+}
+
+inline Maybe<bool> Set(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::Value> key
+  , v8::Handle<v8::Value> value) {
+  return Just<bool>(obj->Set(key, value));
+}
+
+inline Maybe<bool> Set(
+    v8::Handle<v8::Object> obj
+  , uint32_t index
+  , v8::Handle<v8::Value> value) {
+  return Just<bool>(obj->Set(index, value));
+}
+
+inline Maybe<bool> ForceSet(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::Value> key
+  , v8::Handle<v8::Value> value
+  , v8::PropertyAttribute attribs = v8::None) {
+  return Just<bool>(obj->ForceSet(key, value, attribs));
+}
+
+inline MaybeLocal<v8::Value> Get(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::Value> key) {
+  return MaybeLocal<v8::Value>(obj->Get(key));
+}
+
+inline MaybeLocal<v8::Value> Get(
+    v8::Handle<v8::Object> obj
+  , uint32_t index) {
+  return MaybeLocal<v8::Value>(obj->Get(index));
+}
+
+inline Maybe<v8::PropertyAttribute> GetPropertyAttributes(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::Value> key) {
+  return Just<v8::PropertyAttribute>(obj->GetPropertyAttributes(key));
+}
+
+inline Maybe<bool> Has(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::String> key) {
+  return Just<bool>(obj->Has(key));
+}
+
+inline Maybe<bool> Has(
+    v8::Handle<v8::Object> obj
+  , uint32_t index) {
+  return Just<bool>(obj->Has(index));
+}
+
+inline Maybe<bool> Delete(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::String> key) {
+  return Just<bool>(obj->Delete(key));
+}
+
+inline Maybe<bool> Delete(
+    v8::Handle<v8::Object> obj
+  , uint32_t index) {
+  return Just<bool>(obj->Delete(index));
+}
+
+inline
+MaybeLocal<v8::Array> GetPropertyNames(v8::Handle<v8::Object> obj) {
+  return MaybeLocal<v8::Array>(obj->GetPropertyNames());
+}
+
+inline
+MaybeLocal<v8::Array> GetOwnPropertyNames(v8::Handle<v8::Object> obj) {
+  return MaybeLocal<v8::Array>(obj->GetOwnPropertyNames());
+}
+
+inline Maybe<bool> SetPrototype(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::Value> prototype) {
+  return Just<bool>(obj->SetPrototype(prototype));
+}
+
+inline MaybeLocal<v8::String> ObjectProtoToString(
+    v8::Handle<v8::Object> obj) {
+  return MaybeLocal<v8::String>(obj->ObjectProtoToString());
+}
+
+inline Maybe<bool> HasOwnProperty(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::String> key) {
+  return Just<bool>(obj->HasOwnProperty(key));
+}
+
+inline Maybe<bool> HasRealNamedProperty(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::String> key) {
+  return Just<bool>(obj->HasRealNamedProperty(key));
+}
+
+inline Maybe<bool> HasRealIndexedProperty(
+    v8::Handle<v8::Object> obj
+  , uint32_t index) {
+  return Just<bool>(obj->HasRealIndexedProperty(index));
+}
+
+inline Maybe<bool> HasRealNamedCallbackProperty(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::String> key) {
+  return Just<bool>(obj->HasRealNamedCallbackProperty(key));
+}
+
+inline MaybeLocal<v8::Value> GetRealNamedPropertyInPrototypeChain(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::String> key) {
+  return MaybeLocal<v8::Value>(
+      obj->GetRealNamedPropertyInPrototypeChain(key));
+}
+
+inline MaybeLocal<v8::Value> GetRealNamedProperty(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::String> key) {
+  return MaybeLocal<v8::Value>(obj->GetRealNamedProperty(key));
+}
+
+inline MaybeLocal<v8::Value> CallAsFunction(
+    v8::Handle<v8::Object> obj
+  , v8::Handle<v8::Object> recv
+  , int argc
+  , v8::Handle<v8::Value> argv[]) {
+  return MaybeLocal<v8::Value>(obj->CallAsFunction(recv, argc, argv));
+}
+
+inline MaybeLocal<v8::Value> CallAsConstructor(
+    v8::Handle<v8::Object> obj
+  , int argc
+  , v8::Local<v8::Value> argv[]) {
+  return MaybeLocal<v8::Value>(obj->CallAsConstructor(argc, argv));
+}
+
+inline
+MaybeLocal<v8::String> GetSourceLine(v8::Handle<v8::Message> msg) {
+  return MaybeLocal<v8::String>(msg->GetSourceLine());
+}
+
+inline Maybe<int> GetLineNumber(v8::Handle<v8::Message> msg) {
+  return Just<int>(msg->GetLineNumber());
+}
+
+inline Maybe<int> GetStartColumn(v8::Handle<v8::Message> msg) {
+  return Just<int>(msg->GetStartColumn());
+}
+
+inline Maybe<int> GetEndColumn(v8::Handle<v8::Message> msg) {
+  return Just<int>(msg->GetEndColumn());
+}
+
+inline MaybeLocal<v8::Object> CloneElementAt(
+    v8::Handle<v8::Array> array
+  , uint32_t index) {
+  return MaybeLocal<v8::Object>(array->CloneElementAt(index));
+}
+
+inline MaybeLocal<v8::Value> Call(
+    v8::Local<v8::Function> fun
+  , v8::Local<v8::Object> recv
+  , int argc
+  , v8::Local<v8::Value> argv[]) {
+  return MaybeLocal<v8::Value>(fun->Call(recv, argc, argv));
+}
+
+#endif  // NAN_MAYBE_PRE_43_INL_H_

+ 340 - 0
node_modules/nan/nan_new.h

@@ -0,0 +1,340 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_NEW_H_
+#define NAN_NEW_H_
+
+namespace imp {  // scnr
+
+// TODO(agnat): Generalize
+template <typename T> v8::Local<T> To(v8::Local<v8::Integer> i);
+
+template <>
+inline
+v8::Local<v8::Integer>
+To<v8::Integer>(v8::Local<v8::Integer> i) {
+  return Nan::To<v8::Integer>(i).ToLocalChecked();
+}
+
+template <>
+inline
+v8::Local<v8::Int32>
+To<v8::Int32>(v8::Local<v8::Integer> i) {
+  return Nan::To<v8::Int32>(i).ToLocalChecked();
+}
+
+template <>
+inline
+v8::Local<v8::Uint32>
+To<v8::Uint32>(v8::Local<v8::Integer> i) {
+  return Nan::To<v8::Uint32>(i).ToLocalChecked();
+}
+
+template <typename T> struct FactoryBase {
+  typedef v8::Local<T> return_t;
+};
+
+template <typename T> struct MaybeFactoryBase {
+  typedef MaybeLocal<T> return_t;
+};
+
+template <typename T> struct Factory;
+
+template <>
+struct Factory<v8::Array> : FactoryBase<v8::Array> {
+  static inline return_t New();
+  static inline return_t New(int length);
+};
+
+template <>
+struct Factory<v8::Boolean> : FactoryBase<v8::Boolean> {
+  static inline return_t New(bool value);
+};
+
+template <>
+struct Factory<v8::BooleanObject> : FactoryBase<v8::BooleanObject> {
+  static inline return_t New(bool value);
+};
+
+template <>
+struct Factory<v8::Context> : FactoryBase<v8::Context> {
+  static inline
+  return_t
+  New( v8::ExtensionConfiguration* extensions = NULL
+     , v8::Local<v8::ObjectTemplate> tmpl = v8::Local<v8::ObjectTemplate>()
+     , v8::Local<v8::Value> obj = v8::Local<v8::Value>());
+};
+
+template <>
+struct Factory<v8::Date> : MaybeFactoryBase<v8::Date> {
+  static inline return_t New(double value);
+};
+
+template <>
+struct Factory<v8::External> : FactoryBase<v8::External> {
+  static inline return_t New(void *value);
+};
+
+template <>
+struct Factory<v8::Function> : FactoryBase<v8::Function> {
+  static inline
+  return_t
+  New( FunctionCallback callback
+     , v8::Local<v8::Value> data = v8::Local<v8::Value>());
+};
+
+template <>
+struct Factory<v8::FunctionTemplate> : FactoryBase<v8::FunctionTemplate> {
+  static inline
+  return_t
+  New( FunctionCallback callback = NULL
+     , v8::Local<v8::Value> data = v8::Local<v8::Value>()
+     , v8::Local<v8::Signature> signature = v8::Local<v8::Signature>());
+};
+
+template <>
+struct Factory<v8::Number> : FactoryBase<v8::Number> {
+  static inline return_t New(double value);
+};
+
+template <>
+struct Factory<v8::NumberObject> : FactoryBase<v8::NumberObject> {
+  static inline return_t New(double value);
+};
+
+template <typename T>
+struct IntegerFactory : FactoryBase<T> {
+  typedef typename FactoryBase<T>::return_t return_t;
+  static inline return_t New(int32_t value);
+  static inline return_t New(uint32_t value);
+};
+
+template <>
+struct Factory<v8::Integer> : IntegerFactory<v8::Integer> {};
+
+template <>
+struct Factory<v8::Int32> : IntegerFactory<v8::Int32> {};
+
+template <>
+struct Factory<v8::Uint32> : FactoryBase<v8::Uint32> {
+  static inline return_t New(int32_t value);
+  static inline return_t New(uint32_t value);
+};
+
+template <>
+struct Factory<v8::Object> : FactoryBase<v8::Object> {
+  static inline return_t New();
+};
+
+template <>
+struct Factory<v8::ObjectTemplate> : FactoryBase<v8::ObjectTemplate> {
+  static inline return_t New();
+};
+
+template <>
+struct Factory<v8::RegExp> : MaybeFactoryBase<v8::RegExp> {
+  static inline return_t New(
+      v8::Local<v8::String> pattern, v8::RegExp::Flags flags);
+};
+
+template <>
+struct Factory<v8::Script> : MaybeFactoryBase<v8::Script> {
+  static inline return_t New( v8::Local<v8::String> source);
+  static inline return_t New( v8::Local<v8::String> source
+                            , v8::ScriptOrigin const& origin);
+};
+
+template <>
+struct Factory<v8::Signature> : FactoryBase<v8::Signature> {
+  typedef v8::Local<v8::FunctionTemplate> FTH;
+  static inline return_t New(FTH receiver = FTH());
+};
+
+template <>
+struct Factory<v8::String> : MaybeFactoryBase<v8::String> {
+  static inline return_t New();
+  static inline return_t New(const char *value, int length = -1);
+  static inline return_t New(const uint16_t *value, int length = -1);
+  static inline return_t New(std::string const& value);
+
+  static inline return_t New(v8::String::ExternalStringResource * value);
+  static inline return_t New(ExternalOneByteStringResource * value);
+};
+
+template <>
+struct Factory<v8::StringObject> : FactoryBase<v8::StringObject> {
+  static inline return_t New(v8::Local<v8::String> value);
+};
+
+}  // end of namespace imp
+
+#if (NODE_MODULE_VERSION >= 12)
+
+namespace imp {
+
+template <>
+struct Factory<v8::UnboundScript> : MaybeFactoryBase<v8::UnboundScript> {
+  static inline return_t New( v8::Local<v8::String> source);
+  static inline return_t New( v8::Local<v8::String> source
+                            , v8::ScriptOrigin const& origin);
+};
+
+}  // end of namespace imp
+
+# include "nan_implementation_12_inl.h"
+
+#else  // NODE_MODULE_VERSION >= 12
+
+# include "nan_implementation_pre_12_inl.h"
+
+#endif
+
+//=== API ======================================================================
+
+template <typename T>
+typename imp::Factory<T>::return_t
+New() {
+  return imp::Factory<T>::New();
+}
+
+template <typename T, typename A0>
+typename imp::Factory<T>::return_t
+New(A0 arg0) {
+  return imp::Factory<T>::New(arg0);
+}
+
+template <typename T, typename A0, typename A1>
+typename imp::Factory<T>::return_t
+New(A0 arg0, A1 arg1) {
+  return imp::Factory<T>::New(arg0, arg1);
+}
+
+template <typename T, typename A0, typename A1, typename A2>
+typename imp::Factory<T>::return_t
+New(A0 arg0, A1 arg1, A2 arg2) {
+  return imp::Factory<T>::New(arg0, arg1, arg2);
+}
+
+template <typename T, typename A0, typename A1, typename A2, typename A3>
+typename imp::Factory<T>::return_t
+New(A0 arg0, A1 arg1, A2 arg2, A3 arg3) {
+  return imp::Factory<T>::New(arg0, arg1, arg2, arg3);
+}
+
+// Note(agnat): When passing overloaded function pointers to template functions
+// as generic arguments the compiler needs help in picking the right overload.
+// These two functions handle New<Function> and New<FunctionTemplate> with
+// all argument variations.
+
+// v8::Function and v8::FunctionTemplate with one or two arguments
+template <typename T>
+typename imp::Factory<T>::return_t
+New( FunctionCallback callback
+      , v8::Local<v8::Value> data = v8::Local<v8::Value>()) {
+    return imp::Factory<T>::New(callback, data);
+}
+
+// v8::Function and v8::FunctionTemplate with three arguments
+template <typename T, typename A2>
+typename imp::Factory<T>::return_t
+New( FunctionCallback callback
+      , v8::Local<v8::Value> data = v8::Local<v8::Value>()
+      , A2 a2 = A2()) {
+    return imp::Factory<T>::New(callback, data, a2);
+}
+
+// Convenience
+
+#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION
+template <typename T> inline v8::Local<T> New(v8::Handle<T> h);
+#endif
+
+#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+template <typename T, typename M>
+    inline v8::Local<T> New(v8::Persistent<T, M> const& p);
+#else
+template <typename T> inline v8::Local<T> New(v8::Persistent<T> const& p);
+#endif
+template <typename T, typename M>
+inline v8::Local<T> New(Persistent<T, M> const& p);
+template <typename T>
+inline v8::Local<T> New(Global<T> const& p);
+
+inline
+imp::Factory<v8::Boolean>::return_t
+New(bool value) {
+  return New<v8::Boolean>(value);
+}
+
+inline
+imp::Factory<v8::Int32>::return_t
+New(int32_t value) {
+  return New<v8::Int32>(value);
+}
+
+inline
+imp::Factory<v8::Uint32>::return_t
+New(uint32_t value) {
+  return New<v8::Uint32>(value);
+}
+
+inline
+imp::Factory<v8::Number>::return_t
+New(double value) {
+  return New<v8::Number>(value);
+}
+
+inline
+imp::Factory<v8::String>::return_t
+New(std::string const& value) {  // NOLINT(build/include_what_you_use)
+  return New<v8::String>(value);
+}
+
+inline
+imp::Factory<v8::String>::return_t
+New(const char * value, int length) {
+  return New<v8::String>(value, length);
+}
+
+inline
+imp::Factory<v8::String>::return_t
+New(const uint16_t * value, int length) {
+  return New<v8::String>(value, length);
+}
+
+inline
+imp::Factory<v8::String>::return_t
+New(const char * value) {
+  return New<v8::String>(value);
+}
+
+inline
+imp::Factory<v8::String>::return_t
+New(const uint16_t * value) {
+  return New<v8::String>(value);
+}
+
+inline
+imp::Factory<v8::String>::return_t
+New(v8::String::ExternalStringResource * value) {
+  return New<v8::String>(value);
+}
+
+inline
+imp::Factory<v8::String>::return_t
+New(ExternalOneByteStringResource * value) {
+  return New<v8::String>(value);
+}
+
+inline
+imp::Factory<v8::RegExp>::return_t
+New(v8::Local<v8::String> pattern, v8::RegExp::Flags flags) {
+  return New<v8::RegExp>(pattern, flags);
+}
+
+#endif  // NAN_NEW_H_

+ 155 - 0
node_modules/nan/nan_object_wrap.h

@@ -0,0 +1,155 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_OBJECT_WRAP_H_
+#define NAN_OBJECT_WRAP_H_
+
+class ObjectWrap {
+ public:
+  ObjectWrap() {
+    refs_ = 0;
+  }
+
+
+  virtual ~ObjectWrap() {
+    if (persistent().IsEmpty()) {
+      return;
+    }
+
+    assert(persistent().IsNearDeath());
+    persistent().ClearWeak();
+    persistent().Reset();
+  }
+
+
+  template <class T>
+  static inline T* Unwrap(v8::Local<v8::Object> object) {
+    assert(!object.IsEmpty());
+    assert(object->InternalFieldCount() > 0);
+    // Cast to ObjectWrap before casting to T.  A direct cast from void
+    // to T won't work right when T has more than one base class.
+    void* ptr = GetInternalFieldPointer(object, 0);
+    ObjectWrap* wrap = static_cast<ObjectWrap*>(ptr);
+    return static_cast<T*>(wrap);
+  }
+
+
+  inline v8::Local<v8::Object> handle() const {
+    return New(handle_);
+  }
+
+
+  inline Persistent<v8::Object>& persistent() {
+    return handle_;
+  }
+
+
+ protected:
+  inline void Wrap(v8::Local<v8::Object> object) {
+    assert(persistent().IsEmpty());
+    assert(object->InternalFieldCount() > 0);
+    SetInternalFieldPointer(object, 0, this);
+    persistent().Reset(object);
+    MakeWeak();
+  }
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+
+  inline void MakeWeak() {
+    persistent().v8::PersistentBase<v8::Object>::SetWeak(
+        this, WeakCallback, v8::WeakCallbackType::kParameter);
+    persistent().MarkIndependent();
+  }
+
+#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+
+  inline void MakeWeak() {
+    persistent().v8::PersistentBase<v8::Object>::SetWeak(this, WeakCallback);
+    persistent().MarkIndependent();
+  }
+
+#else
+
+  inline void MakeWeak() {
+    persistent().persistent.MakeWeak(this, WeakCallback);
+    persistent().MarkIndependent();
+  }
+
+#endif
+
+  /* Ref() marks the object as being attached to an event loop.
+   * Refed objects will not be garbage collected, even if
+   * all references are lost.
+   */
+  virtual void Ref() {
+    assert(!persistent().IsEmpty());
+    persistent().ClearWeak();
+    refs_++;
+  }
+
+  /* Unref() marks an object as detached from the event loop.  This is its
+   * default state.  When an object with a "weak" reference changes from
+   * attached to detached state it will be freed. Be careful not to access
+   * the object after making this call as it might be gone!
+   * (A "weak reference" means an object that only has a
+   * persistant handle.)
+   *
+   * DO NOT CALL THIS FROM DESTRUCTOR
+   */
+  virtual void Unref() {
+    assert(!persistent().IsEmpty());
+    assert(!persistent().IsWeak());
+    assert(refs_ > 0);
+    if (--refs_ == 0)
+      MakeWeak();
+  }
+
+  int refs_;  // ro
+
+ private:
+  NAN_DISALLOW_ASSIGN_COPY_MOVE(ObjectWrap)
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+
+  static void
+  WeakCallback(v8::WeakCallbackInfo<ObjectWrap> const& info) {
+    ObjectWrap* wrap = info.GetParameter();
+    assert(wrap->refs_ == 0);
+    assert(wrap->handle_.IsNearDeath());
+    wrap->handle_.Reset();
+    delete wrap;
+  }
+
+#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+
+  static void
+  WeakCallback(v8::WeakCallbackData<v8::Object, ObjectWrap> const& data) {
+    ObjectWrap* wrap = data.GetParameter();
+    assert(wrap->refs_ == 0);
+    assert(wrap->handle_.IsNearDeath());
+    wrap->handle_.Reset();
+    delete wrap;
+  }
+
+#else
+
+  static void WeakCallback(v8::Persistent<v8::Value> value, void *data) {
+    ObjectWrap *wrap = static_cast<ObjectWrap*>(data);
+    assert(wrap->refs_ == 0);
+    assert(wrap->handle_.IsNearDeath());
+    wrap->handle_.Reset();
+    delete wrap;
+  }
+
+#endif
+  Persistent<v8::Object> handle_;
+};
+
+
+#endif  // NAN_OBJECT_WRAP_H_

+ 129 - 0
node_modules/nan/nan_persistent_12_inl.h

@@ -0,0 +1,129 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_PERSISTENT_12_INL_H_
+#define NAN_PERSISTENT_12_INL_H_
+
+template<typename T, typename M> class Persistent :
+    public v8::Persistent<T, M> {
+ public:
+  inline Persistent() : v8::Persistent<T, M>() {}
+
+  template<typename S> inline Persistent(v8::Local<S> that) :
+      v8::Persistent<T, M>(v8::Isolate::GetCurrent(), that) {}
+
+  template<typename S, typename M2>
+  inline Persistent(const v8::Persistent<S, M2> &that) :
+      v8::Persistent<T, M2>(v8::Isolate::GetCurrent(), that) {}
+
+  inline void Reset() { v8::PersistentBase<T>::Reset(); }
+
+  template <typename S>
+  inline void Reset(const v8::Local<S> &other) {
+    v8::PersistentBase<T>::Reset(v8::Isolate::GetCurrent(), other);
+  }
+
+  template <typename S>
+  inline void Reset(const v8::PersistentBase<S> &other) {
+    v8::PersistentBase<T>::Reset(v8::Isolate::GetCurrent(), other);
+  }
+
+  template<typename P>
+  inline void SetWeak(
+    P *parameter
+    , typename WeakCallbackInfo<P>::Callback callback
+    , WeakCallbackType type);
+
+ private:
+  inline T *operator*() const { return *PersistentBase<T>::persistent; }
+
+  template<typename S, typename M2>
+  inline void Copy(const Persistent<S, M2> &that) {
+    TYPE_CHECK(T, S);
+
+    this->Reset();
+
+    if (!that.IsEmpty()) {
+      this->Reset(that);
+      M::Copy(that, this);
+    }
+  }
+};
+
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 ||                      \
+  (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
+template<typename T>
+class Global : public v8::Global<T> {
+ public:
+  inline Global() : v8::Global<T>() {}
+
+  template<typename S> inline Global(v8::Local<S> that) :
+    v8::Global<T>(v8::Isolate::GetCurrent(), that) {}
+
+  template<typename S>
+  inline Global(const v8::PersistentBase<S> &that) :
+      v8::Global<S>(v8::Isolate::GetCurrent(), that) {}
+
+  inline void Reset() { v8::PersistentBase<T>::Reset(); }
+
+  template <typename S>
+  inline void Reset(const v8::Local<S> &other) {
+    v8::PersistentBase<T>::Reset(v8::Isolate::GetCurrent(), other);
+  }
+
+  template <typename S>
+  inline void Reset(const v8::PersistentBase<S> &other) {
+    v8::PersistentBase<T>::Reset(v8::Isolate::GetCurrent(), other);
+  }
+
+  template<typename P>
+  inline void SetWeak(
+    P *parameter
+    , typename WeakCallbackInfo<P>::Callback callback
+    , WeakCallbackType type) {
+    reinterpret_cast<Persistent<T>*>(this)->SetWeak(
+        parameter, callback, type);
+  }
+};
+#else
+template<typename T>
+class Global : public v8::UniquePersistent<T> {
+ public:
+  inline Global() : v8::UniquePersistent<T>() {}
+
+  template<typename S> inline Global(v8::Local<S> that) :
+    v8::UniquePersistent<T>(v8::Isolate::GetCurrent(), that) {}
+
+  template<typename S>
+  inline Global(const v8::PersistentBase<S> &that) :
+      v8::UniquePersistent<S>(v8::Isolate::GetCurrent(), that) {}
+
+  inline void Reset() { v8::PersistentBase<T>::Reset(); }
+
+  template <typename S>
+  inline void Reset(const v8::Local<S> &other) {
+    v8::PersistentBase<T>::Reset(v8::Isolate::GetCurrent(), other);
+  }
+
+  template <typename S>
+  inline void Reset(const v8::PersistentBase<S> &other) {
+    v8::PersistentBase<T>::Reset(v8::Isolate::GetCurrent(), other);
+  }
+
+  template<typename P>
+  inline void SetWeak(
+    P *parameter
+    , typename WeakCallbackInfo<P>::Callback callback
+    , WeakCallbackType type) {
+    reinterpret_cast<Persistent<T>*>(this)->SetWeak(
+        parameter, callback, type);
+  }
+};
+#endif
+
+#endif  // NAN_PERSISTENT_12_INL_H_

+ 242 - 0
node_modules/nan/nan_persistent_pre_12_inl.h

@@ -0,0 +1,242 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2016 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_PERSISTENT_PRE_12_INL_H_
+#define NAN_PERSISTENT_PRE_12_INL_H_
+
+template<typename T>
+class PersistentBase {
+  v8::Persistent<T> persistent;
+  template<typename U>
+  friend v8::Local<U> New(const PersistentBase<U> &p);
+  template<typename U, typename M>
+  friend v8::Local<U> New(const Persistent<U, M> &p);
+  template<typename U>
+  friend v8::Local<U> New(const Global<U> &p);
+  template<typename S> friend class ReturnValue;
+
+ public:
+  inline PersistentBase() :
+      persistent() {}
+
+  inline void Reset() {
+    persistent.Dispose();
+    persistent.Clear();
+  }
+
+  template<typename S>
+  inline void Reset(const v8::Local<S> &other) {
+    TYPE_CHECK(T, S);
+
+    if (!persistent.IsEmpty()) {
+      persistent.Dispose();
+    }
+
+    if (other.IsEmpty()) {
+      persistent.Clear();
+    } else {
+      persistent = v8::Persistent<T>::New(other);
+    }
+  }
+
+  template<typename S>
+  inline void Reset(const PersistentBase<S> &other) {
+    TYPE_CHECK(T, S);
+
+    if (!persistent.IsEmpty()) {
+      persistent.Dispose();
+    }
+
+    if (other.IsEmpty()) {
+      persistent.Clear();
+    } else {
+      persistent = v8::Persistent<T>::New(other.persistent);
+    }
+  }
+
+  inline bool IsEmpty() const { return persistent.IsEmpty(); }
+
+  inline void Empty() { persistent.Clear(); }
+
+  template<typename S>
+  inline bool operator==(const PersistentBase<S> &that) {
+    return this->persistent == that.persistent;
+  }
+
+  template<typename S>
+  inline bool operator==(const v8::Local<S> &that) {
+    return this->persistent == that;
+  }
+
+  template<typename S>
+  inline bool operator!=(const PersistentBase<S> &that) {
+    return !operator==(that);
+  }
+
+  template<typename S>
+  inline bool operator!=(const v8::Local<S> &that) {
+    return !operator==(that);
+  }
+
+  template<typename P>
+  inline void SetWeak(
+    P *parameter
+    , typename WeakCallbackInfo<P>::Callback callback
+    , WeakCallbackType type);
+
+  inline void ClearWeak() { persistent.ClearWeak(); }
+
+  inline void MarkIndependent() { persistent.MarkIndependent(); }
+
+  inline bool IsIndependent() const { return persistent.IsIndependent(); }
+
+  inline bool IsNearDeath() const { return persistent.IsNearDeath(); }
+
+  inline bool IsWeak() const { return persistent.IsWeak(); }
+
+ private:
+  inline explicit PersistentBase(v8::Persistent<T> that) :
+      persistent(that) { }
+  inline explicit PersistentBase(T *val) : persistent(val) {}
+  template<typename S, typename M> friend class Persistent;
+  template<typename S> friend class Global;
+  friend class ObjectWrap;
+};
+
+template<typename T>
+class NonCopyablePersistentTraits {
+ public:
+  typedef Persistent<T, NonCopyablePersistentTraits<T> >
+      NonCopyablePersistent;
+  static const bool kResetInDestructor = false;
+  template<typename S, typename M>
+  inline static void Copy(const Persistent<S, M> &source,
+                             NonCopyablePersistent *dest) {
+    Uncompilable<v8::Object>();
+  }
+
+  template<typename O> inline static void Uncompilable() {
+    TYPE_CHECK(O, v8::Primitive);
+  }
+};
+
+template<typename T>
+struct CopyablePersistentTraits {
+  typedef Persistent<T, CopyablePersistentTraits<T> > CopyablePersistent;
+  static const bool kResetInDestructor = true;
+  template<typename S, typename M>
+  static inline void Copy(const Persistent<S, M> &source,
+                             CopyablePersistent *dest) {}
+};
+
+template<typename T, typename M> class Persistent :
+    public PersistentBase<T> {
+ public:
+  inline Persistent() {}
+
+  template<typename S> inline Persistent(v8::Handle<S> that)
+      : PersistentBase<T>(v8::Persistent<T>::New(that)) {
+    TYPE_CHECK(T, S);
+  }
+
+  inline Persistent(const Persistent &that) : PersistentBase<T>() {
+    Copy(that);
+  }
+
+  template<typename S, typename M2>
+  inline Persistent(const Persistent<S, M2> &that) :
+      PersistentBase<T>() {
+    Copy(that);
+  }
+
+  inline Persistent &operator=(const Persistent &that) {
+    Copy(that);
+    return *this;
+  }
+
+  template <class S, class M2>
+  inline Persistent &operator=(const Persistent<S, M2> &that) {
+    Copy(that);
+    return *this;
+  }
+
+  inline ~Persistent() {
+    if (M::kResetInDestructor) this->Reset();
+  }
+
+ private:
+  inline T *operator*() const { return *PersistentBase<T>::persistent; }
+
+  template<typename S, typename M2>
+  inline void Copy(const Persistent<S, M2> &that) {
+    TYPE_CHECK(T, S);
+
+    this->Reset();
+
+    if (!that.IsEmpty()) {
+      this->persistent = v8::Persistent<T>::New(that.persistent);
+      M::Copy(that, this);
+    }
+  }
+};
+
+template<typename T>
+class Global : public PersistentBase<T> {
+  struct RValue {
+    inline explicit RValue(Global* obj) : object(obj) {}
+    Global* object;
+  };
+
+ public:
+  inline Global() : PersistentBase<T>(0) { }
+
+  template <typename S>
+  inline Global(v8::Local<S> that)
+      : PersistentBase<T>(v8::Persistent<T>::New(that)) {
+    TYPE_CHECK(T, S);
+  }
+
+  template <typename S>
+  inline Global(const PersistentBase<S> &that)
+    : PersistentBase<T>(that) {
+    TYPE_CHECK(T, S);
+  }
+  /**
+   * Move constructor.
+   */
+  inline Global(RValue rvalue)
+    : PersistentBase<T>(rvalue.object->persistent) {
+    rvalue.object->Reset();
+  }
+  inline ~Global() { this->Reset(); }
+  /**
+   * Move via assignment.
+   */
+  template<typename S>
+  inline Global &operator=(Global<S> rhs) {
+    TYPE_CHECK(T, S);
+    this->Reset(rhs.persistent);
+    rhs.Reset();
+    return *this;
+  }
+  /**
+   * Cast operator for moves.
+   */
+  inline operator RValue() { return RValue(this); }
+  /**
+   * Pass allows returning uniques from functions, etc.
+   */
+  Global Pass() { return Global(RValue(this)); }
+
+ private:
+  Global(Global &);
+  void operator=(Global &);
+  template<typename S> friend class ReturnValue;
+};
+
+#endif  // NAN_PERSISTENT_PRE_12_INL_H_

+ 305 - 0
node_modules/nan/nan_string_bytes.h

@@ -0,0 +1,305 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#ifndef NAN_STRING_BYTES_H_
+#define NAN_STRING_BYTES_H_
+
+// Decodes a v8::Local<v8::String> or Buffer to a raw char*
+
+namespace imp {
+
+using v8::Local;
+using v8::Object;
+using v8::String;
+using v8::Value;
+
+
+//// Base 64 ////
+
+#define base64_encoded_size(size) ((size + 2 - ((size + 2) % 3)) / 3 * 4)
+
+
+
+//// HEX ////
+
+static bool contains_non_ascii_slow(const char* buf, size_t len) {
+  for (size_t i = 0; i < len; ++i) {
+    if (buf[i] & 0x80) return true;
+  }
+  return false;
+}
+
+
+static bool contains_non_ascii(const char* src, size_t len) {
+  if (len < 16) {
+    return contains_non_ascii_slow(src, len);
+  }
+
+  const unsigned bytes_per_word = sizeof(void*);
+  const unsigned align_mask = bytes_per_word - 1;
+  const unsigned unaligned = reinterpret_cast<uintptr_t>(src) & align_mask;
+
+  if (unaligned > 0) {
+    const unsigned n = bytes_per_word - unaligned;
+    if (contains_non_ascii_slow(src, n)) return true;
+    src += n;
+    len -= n;
+  }
+
+
+#if defined(__x86_64__) || defined(_WIN64)
+  const uintptr_t mask = 0x8080808080808080ll;
+#else
+  const uintptr_t mask = 0x80808080l;
+#endif
+
+  const uintptr_t* srcw = reinterpret_cast<const uintptr_t*>(src);
+
+  for (size_t i = 0, n = len / bytes_per_word; i < n; ++i) {
+    if (srcw[i] & mask) return true;
+  }
+
+  const unsigned remainder = len & align_mask;
+  if (remainder > 0) {
+    const size_t offset = len - remainder;
+    if (contains_non_ascii_slow(src + offset, remainder)) return true;
+  }
+
+  return false;
+}
+
+
+static void force_ascii_slow(const char* src, char* dst, size_t len) {
+  for (size_t i = 0; i < len; ++i) {
+    dst[i] = src[i] & 0x7f;
+  }
+}
+
+
+static void force_ascii(const char* src, char* dst, size_t len) {
+  if (len < 16) {
+    force_ascii_slow(src, dst, len);
+    return;
+  }
+
+  const unsigned bytes_per_word = sizeof(void*);
+  const unsigned align_mask = bytes_per_word - 1;
+  const unsigned src_unalign = reinterpret_cast<uintptr_t>(src) & align_mask;
+  const unsigned dst_unalign = reinterpret_cast<uintptr_t>(dst) & align_mask;
+
+  if (src_unalign > 0) {
+    if (src_unalign == dst_unalign) {
+      const unsigned unalign = bytes_per_word - src_unalign;
+      force_ascii_slow(src, dst, unalign);
+      src += unalign;
+      dst += unalign;
+      len -= src_unalign;
+    } else {
+      force_ascii_slow(src, dst, len);
+      return;
+    }
+  }
+
+#if defined(__x86_64__) || defined(_WIN64)
+  const uintptr_t mask = ~0x8080808080808080ll;
+#else
+  const uintptr_t mask = ~0x80808080l;
+#endif
+
+  const uintptr_t* srcw = reinterpret_cast<const uintptr_t*>(src);
+  uintptr_t* dstw = reinterpret_cast<uintptr_t*>(dst);
+
+  for (size_t i = 0, n = len / bytes_per_word; i < n; ++i) {
+    dstw[i] = srcw[i] & mask;
+  }
+
+  const unsigned remainder = len & align_mask;
+  if (remainder > 0) {
+    const size_t offset = len - remainder;
+    force_ascii_slow(src + offset, dst + offset, remainder);
+  }
+}
+
+
+static size_t base64_encode(const char* src,
+                            size_t slen,
+                            char* dst,
+                            size_t dlen) {
+  // We know how much we'll write, just make sure that there's space.
+  assert(dlen >= base64_encoded_size(slen) &&
+      "not enough space provided for base64 encode");
+
+  dlen = base64_encoded_size(slen);
+
+  unsigned a;
+  unsigned b;
+  unsigned c;
+  unsigned i;
+  unsigned k;
+  unsigned n;
+
+  static const char table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+                              "abcdefghijklmnopqrstuvwxyz"
+                              "0123456789+/";
+
+  i = 0;
+  k = 0;
+  n = slen / 3 * 3;
+
+  while (i < n) {
+    a = src[i + 0] & 0xff;
+    b = src[i + 1] & 0xff;
+    c = src[i + 2] & 0xff;
+
+    dst[k + 0] = table[a >> 2];
+    dst[k + 1] = table[((a & 3) << 4) | (b >> 4)];
+    dst[k + 2] = table[((b & 0x0f) << 2) | (c >> 6)];
+    dst[k + 3] = table[c & 0x3f];
+
+    i += 3;
+    k += 4;
+  }
+
+  if (n != slen) {
+    switch (slen - n) {
+      case 1:
+        a = src[i + 0] & 0xff;
+        dst[k + 0] = table[a >> 2];
+        dst[k + 1] = table[(a & 3) << 4];
+        dst[k + 2] = '=';
+        dst[k + 3] = '=';
+        break;
+
+      case 2:
+        a = src[i + 0] & 0xff;
+        b = src[i + 1] & 0xff;
+        dst[k + 0] = table[a >> 2];
+        dst[k + 1] = table[((a & 3) << 4) | (b >> 4)];
+        dst[k + 2] = table[(b & 0x0f) << 2];
+        dst[k + 3] = '=';
+        break;
+    }
+  }
+
+  return dlen;
+}
+
+
+static size_t hex_encode(const char* src, size_t slen, char* dst, size_t dlen) {
+  // We know how much we'll write, just make sure that there's space.
+  assert(dlen >= slen * 2 &&
+      "not enough space provided for hex encode");
+
+  dlen = slen * 2;
+  for (uint32_t i = 0, k = 0; k < dlen; i += 1, k += 2) {
+    static const char hex[] = "0123456789abcdef";
+    uint8_t val = static_cast<uint8_t>(src[i]);
+    dst[k + 0] = hex[val >> 4];
+    dst[k + 1] = hex[val & 15];
+  }
+
+  return dlen;
+}
+
+
+
+static Local<Value> Encode(const char* buf,
+                           size_t buflen,
+                           enum Encoding encoding) {
+  assert(buflen <= node::Buffer::kMaxLength);
+  if (!buflen && encoding != BUFFER)
+    return New("").ToLocalChecked();
+
+  Local<String> val;
+  switch (encoding) {
+    case BUFFER:
+      return CopyBuffer(buf, buflen).ToLocalChecked();
+
+    case ASCII:
+      if (contains_non_ascii(buf, buflen)) {
+        char* out = new char[buflen];
+        force_ascii(buf, out, buflen);
+        val = New<String>(out, buflen).ToLocalChecked();
+        delete[] out;
+      } else {
+        val = New<String>(buf, buflen).ToLocalChecked();
+      }
+      break;
+
+    case UTF8:
+      val = New<String>(buf, buflen).ToLocalChecked();
+      break;
+
+    case BINARY: {
+      // TODO(isaacs) use ExternalTwoByteString?
+      const unsigned char *cbuf = reinterpret_cast<const unsigned char*>(buf);
+      uint16_t * twobytebuf = new uint16_t[buflen];
+      for (size_t i = 0; i < buflen; i++) {
+        // XXX is the following line platform independent?
+        twobytebuf[i] = cbuf[i];
+      }
+      val = New<String>(twobytebuf, buflen).ToLocalChecked();
+      delete[] twobytebuf;
+      break;
+    }
+
+    case BASE64: {
+      size_t dlen = base64_encoded_size(buflen);
+      char* dst = new char[dlen];
+
+      size_t written = base64_encode(buf, buflen, dst, dlen);
+      assert(written == dlen);
+
+      val = New<String>(dst, dlen).ToLocalChecked();
+      delete[] dst;
+      break;
+    }
+
+    case UCS2: {
+      const uint16_t* data = reinterpret_cast<const uint16_t*>(buf);
+      val = New<String>(data, buflen / 2).ToLocalChecked();
+      break;
+    }
+
+    case HEX: {
+      size_t dlen = buflen * 2;
+      char* dst = new char[dlen];
+      size_t written = hex_encode(buf, buflen, dst, dlen);
+      assert(written == dlen);
+
+      val = New<String>(dst, dlen).ToLocalChecked();
+      delete[] dst;
+      break;
+    }
+
+    default:
+      assert(0 && "unknown encoding");
+      break;
+  }
+
+  return val;
+}
+
+#undef base64_encoded_size
+
+}  // end of namespace imp
+
+#endif  // NAN_STRING_BYTES_H_

Some files were not shown because too many files changed in this diff