Permalink
Browse files

added more idiomatic module.exports, also added check for undefined u…

…sername/passwrod
  • Loading branch information...
1 parent 593b7e1 commit 63be45c67e20f80131e47ae9992af095b7ee29f2 @mikolalysenko committed Feb 6, 2013
Showing with 7 additions and 4 deletions.
  1. +3 −2 index.js
  2. +3 −1 lib/shapeways.js
  3. +1 −1 package.json
View
@@ -1,2 +1,3 @@
-exports.connect = require('./lib/shapeways.js').connect;
-
+var connect = require('./lib/shapeways.js').connect;
+module.exports = connect;
+module.exports.connect = connect;
View
@@ -8,7 +8,9 @@ exports.connect = function(params, cb) {
"use strict";
if( !('username' in params)
- || !('password' in params) ) {
+ || !params.username
+ || !('password' in params)
+ || !params.password ) {
cb(new Error("Missing username/password"), null);
return;
}
View
@@ -1,6 +1,6 @@
{
"name": "shapeways",
- "version": "0.5.1",
+ "version": "0.5.2",
"author": "Mikola Lysenko (mikolalysenko@gmail.com)",
"description": "3D print stuff via ShapeWays",
"contributors": [

0 comments on commit 63be45c

Please sign in to comment.