add an assert

This commit is contained in:
Andrew Kelley 2013-01-02 04:46:01 -05:00
parent 4b0780db66
commit 4237787082

View File

@ -17,7 +17,7 @@ exports.createClient = createClient;
function createClient(options) { function createClient(options) {
// defaults // defaults
options = options || {}; assert.ok(options, "options is required");
var port = options.port || 25565; var port = options.port || 25565;
var host = options.host || 'localhost'; var host = options.host || 'localhost';
assert.ok(options.username, "username is required"); assert.ok(options.username, "username is required");