replace-template-element.js 254 B

1234567891011
  1. 'use strict';
  2. const replaceTemplateElement = (fixer, node, replacement) => {
  3. const {range: [start, end], tail} = node;
  4. return fixer.replaceTextRange(
  5. [start + 1, end - (tail ? 1 : 2)],
  6. replacement,
  7. );
  8. };
  9. module.exports = replaceTemplateElement;