code: function _replace (regex, replacement, file) {
    const stats = fs.lstatSync(file)
    if (stats.isSymbolicLink()) {
      return
    }
    if (stats.isFile()) {
      let text = fs.readFileSync(file, 'utf-8')
      const ok = typeof regex === 'string' ? text.includes(regex) : regex.test(text)
  
      if (ok) {
        text = text.replace(regex, replacement)
        console.log(`updating ${relative(file)}`)
        fs.writeFileSync(file, text, 'utf8')
      }
    } else {
      console.log(`${relative(file)} is not a file.`)
    }
  }
docs: ---------------------------------------------------------------------------- Replacing (assume files are already renamed) ----------------------------------------------------------------------------