|
12345678910111213141516171819 |
- 'use strict';
-
- 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;
- };
|