Skip to content

Commit

Permalink
moved to modules.exports convenion and really implemented assert
Browse files Browse the repository at this point in the history
  • Loading branch information
samofab committed Aug 5, 2015
1 parent 45971e1 commit e3e2642
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 6 additions & 3 deletions nisa32.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var ref = require('ref');
var ffi = require('ffi');
var ArrayType = require('ref-array');
var assert = require("assert");


// typedef
Expand Down Expand Up @@ -33,9 +34,11 @@ function nisa32() {
}
*/

exports.query = function (visaAddress, queryString, callback){
return nisaQuery(visaAddress, queryString, callback);
};
module.exports = {
query: function (visaAddress, queryString, callback){
return nisaQuery(visaAddress, queryString, callback);
}
}

function nisaQuery(visaAddress, queryString, callback){
assert.equal(typeof (visaAddress), 'string', "argument 'visaAddress' must be a string");
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@
"homepage": "https://github.com/samofab/node-nisa32#readme",
"devDependencies": {
"express": "^4.13.3",
"http": "0.0.0",
"http": "0.0.0",
"socket.io": "^1.3.6"
},
"dependencies": {
"assert": "^1.3.0",
"ffi": "^1.3.2",
"ref": "^1.0.2",
"ref-array": "^1.1.1"
},
"files": ["nisa32.js"]
"files": [
"nisa32.js"
]
}

0 comments on commit e3e2642

Please sign in to comment.