ec0lint-style
Version:
CSS linter for reducing digital footprint with ec0lint.
20 lines (15 loc) • 384 B
JavaScript
;
const formatters = require('../formatters');
/**
* @param {{ useOr?: boolean }} [options={}]
* @returns {string}
*/
module.exports = function getFormatterOptionsText(options = {}) {
let output = Object.keys(formatters)
.map((name) => `"${name}"`)
.join(', ');
if (options.useOr) {
output = output.replace(/, ([a-z"]+)$/u, ' or $1');
}
return output;
};