src/format/index.js
/**
 * Format result of search by using specified formatter.
 * 
 * @param {Object} data
 *      Result of {@link module:seeq.search search}.
 * @param {String} name
 *      Name of formatter that should be used.
 * @param {Object} [settings]
 *      Format settings. Default values for settings are the following:
        <ul>
        <li><code>queryList</code> - extracted from <code>data</code> parameter
        <li><code>verbose</code> - <code>false</code>
        </ul>
 * @return {String}
 *      Result returned by specified formatter or empty string if no one of formatters has the specified name.
 * @alias module:format.format
 */
Format result of search by using specified formatter.

@param {Object} data
Result of  module:seeq.search search.
@param {String} name
Name of formatter that should be used.
@param {Object} [settings]
Format settings. Default values for settings are the following:

queryList - extracted from data parameter
verbose - false

@return {String}
Result returned by specified formatter or empty string if no one of formatters has the specified name.
Format result of search by using specified formatter . @param { Object } data Result of module : seeq . search search . @param { String } name Name of formatter that should be used . @param { Object } [ settings ] Format settings . Default values for settings are the following : queryList - extracted from data parameter verbose - false @return { String } Result returned by specified formatter or empty string if no one of formatters has the specified name .
function format(data, name, settings) {
    var fmt = formatMap[name];
    if (! settings) {
        settings = {};
    }
    if (! settings.queryList) {
        settings.queryList = Object.keys(data);
    }
    else if (! Array.isArray(settings.queryList)) {
        settings.queryList = [settings.queryList];
    }
    if (! ("verbose" in settings)) {
        settings.verbose = false;
    }
    return fmt ? fmt(data, settings) : "";
}
function format ( data , name , settings ) { var fmt = formatMap [ name ] ; if ( ! settings ) { settings = { } ; } if ( ! settings . queryList ) { settings . queryList = Object . keys ( data ) ; } else if ( ! Array . isArray ( settings . queryList ) ) { settings . queryList = [ settings . queryList ] ; } if ( ! ( "verbose" in settings ) ) { settings . verbose = false ; } return fmt ? fmt ( data , settings ) : "" ; }
Format result of search by using specified formatter.
Format result of search by using specified formatter .