code: function replaceInFile (filename, regex, replacement) {
      let contents = fs.readFileSync (filename, 'utf8')
      const parts = contents.split (regex)
      const newContents = parts[0] + replacement + parts[1]
      fs.truncateSync (filename)
      fs.writeFileSync (filename, newContents)
  }
docs: ---------------------------------------------------------------------------