Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

getFormatterOptionsText.js 384B

12345678910111213141516171819
  1. 'use strict';
  2. const formatters = require('../formatters');
  3. /**
  4. * @param {{ useOr?: boolean }} [options={}]
  5. * @returns {string}
  6. */
  7. module.exports = function getFormatterOptionsText(options = {}) {
  8. let output = Object.keys(formatters)
  9. .map((name) => `"${name}"`)
  10. .join(', ');
  11. if (options.useOr) {
  12. output = output.replace(/, ([a-z"]+)$/u, ' or $1');
  13. }
  14. return output;
  15. };