Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use `bindings`.

@tootallnate implemented the `bindings` code. The patch used an
ambiguous version of `bindings`, I've changed this to specify version
1.0.0.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
  • Loading branch information...
commit d96e100cdefe2d44f2d7de259c5da0d6a5956460 1 parent 2d30d5a
@ncb000gt authored
Showing with 4 additions and 6 deletions.
  1. +1 −6 bcrypt.js
  2. +3 −0  package.json
View
7 bcrypt.js
@@ -1,9 +1,4 @@
-try {
- var bindings = require('./build/default/bcrypt_lib');
-} catch(e) {
- //update for v0.5.5+
- var bindings = require('./build/Release/bcrypt_lib');
-}
+var bindings = require('bindings')('bcrypt_lib');
/// generate a salt (sync)
/// @param {Number} [rounds] number of rounds (default 10)
View
3  package.json
@@ -21,6 +21,9 @@
"scripts": {
"test": "make test"
},
+ "dependencies": {
+ "bindings": "1.0.0"
+ },
"devDependencies": {
"nodeunit": ">=0.6.4"
},
Please sign in to comment.
Something went wrong with that request. Please try again.