error.js 308 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 error(message) {
  7. if (!/=-(f|-format)=/.test(process.argv.join('='))) {
  8. // eslint-disable-next-line no-console
  9. console.error(message);
  10. }
  11. }
  12. module.exports = error;