log.js 302 B

1234567891011121314
  1. 'use strict';
  2. /**
  3. * Logs out a message if there is no format option set.
  4. * @param {String} message - Message to log.
  5. */
  6. function log(message) {
  7. if (!/=-(f|-format)=/.test(process.argv.join('='))) {
  8. // eslint-disable-next-line no-console
  9. console.log(message);
  10. }
  11. }
  12. module.exports = log;