blob: 86917f44583ee62b56883f5641092e00b6884216 [file] [log] [blame]
/* @flow */
"use strict";
const _ = require("lodash");
const formatters = require("../formatters");
module.exports = function getFormatterOptionsText(
options /*: { useOr?: boolean }*/ = {}
) /*: string*/ {
let output = _.chain(formatters)
.keys()
.map(name => `"${name}"`)
.join(", ")
.value();
if (options.useOr) {
output = output.replace(/, ([a-z"]+)$/u, " or $1");
}
return output;
};