blurComments.js 190 B

12345678910
  1. 'use strict';
  2. /**
  3. * @param {string} source
  4. *
  5. * @returns {string}
  6. */
  7. module.exports = function blurComments(source, blurChar = '`') {
  8. return source.replace(/\/\*.*\*\//g, blurChar);
  9. };