index.js
function parseOptions(opts) {
    opts = opts || {};
    if (toString.call(opts) === '[object String]') {
        opts = {
            directory: opts
        };
    }

    opts.cwd = opts.cwd || process.cwd();

    log.verbosity = toString.call(opts.verbosity) === '[object Number]' ? opts.verbosity : DEFAULT_VERBOSITY;
    delete (opts.verbosity);

    cmd = opts.cmd || DEFAULT_CMD;
    delete (opts.cmd);

    // enable bower prompting but ignore the actual prompt if interactive == false
    enablePrompt = opts.interactive || DEFAULT_INTERACTIVE;
    opts.interactive = true;

    if (!opts.directory) {
        opts.directory = getDirectoryFromBowerRc(opts.cwd) || DEFAULT_DIRECTORY;
    }

    return opts;
}
function parseOptions(opts) {
    opts = opts || {};
    if (toString.call(opts) === '[object String]') {
        opts = {
            directory: opts
        };
    }

    opts.cwd = opts.cwd || process.cwd();

    log.verbosity = toString.call(opts.verbosity) === '[object Number]' ? opts.verbosity : DEFAULT_VERBOSITY;
    delete (opts.verbosity);

    cmd = opts.cmd || DEFAULT_CMD;
    delete (opts.cmd);

    // enable bower prompting but ignore the actual prompt if interactive == false
    enablePrompt = opts.interactive || DEFAULT_INTERACTIVE;
    opts.interactive = true;

    if (!opts.directory) {
        opts.directory = getDirectoryFromBowerRc(opts.cwd) || DEFAULT_DIRECTORY;
    }

    return opts;
}
function parseOptions ( opts ) { opts = opts || { } ; if ( toString . call ( opts ) === '[object String]' ) { opts = { directory : opts } ; } opts . cwd = opts . cwd || process . cwd ( ) ; log . verbosity = toString . call ( opts . verbosity ) === '[object Number]' ? opts . verbosity : DEFAULT_VERBOSITY ; delete ( opts . verbosity ) ; cmd = opts . cmd || DEFAULT_CMD ; delete ( opts . cmd ) ; // enable bower prompting but ignore the actual prompt if interactive == false enablePrompt = opts . interactive || DEFAULT_INTERACTIVE ; opts . interactive = true ; if ( ! opts . directory ) { opts . directory = getDirectoryFromBowerRc ( opts . cwd ) || DEFAULT_DIRECTORY ; } return opts ; }
Parse plugin options

@param {object | string} opts options object or directory string
Parse plugin options