diff --git a/lib/prompt.js b/lib/prompt.js index c43451d..4e2970f 100644 --- a/lib/prompt.js +++ b/lib/prompt.js @@ -7,8 +7,7 @@ var events = require('events'), readline = require('readline'), - utile = require('utile'), - async = utile.async, + async = require('async'), read = require('read'), validate = require('revalidator').validate, winston = require('winston'), @@ -396,13 +395,18 @@ prompt.confirm = function (/* msg, options, callback */) { function confirm(target, next) { var yes = target.yes || RX_Y, - options = utile.mixin({ + options = { description: typeof target === 'string' ? target : target.description||'yes/no', pattern: target.pattern || RX_YN, name: 'confirm', message: target.message || 'yes/no' - }, opts || {}); + }; + for(var k in (opts || {})) { + if(opts.hasOwnProperty(k)) { + options[k] = opts[k]; + } + } prompt.get([options], function (err, result) { next(err ? false : yes.test(result[options.name])); diff --git a/package.json b/package.json index 5bf0f33..ffdc1cb 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,10 @@ "validation" ], "dependencies": { + "async": "~0.9.0", "colors": "^1.1.2", "read": "1.0.x", "revalidator": "0.1.x", - "utile": "0.3.x", "winston": "2.x" }, "devDependencies": {