remove-parentheses.js 294 B

1234567891011
  1. 'use strict';
  2. const {getParentheses} = require('../utils/parentheses.js');
  3. function * removeParentheses(node, fixer, sourceCode) {
  4. const parentheses = getParentheses(node, sourceCode);
  5. for (const token of parentheses) {
  6. yield fixer.remove(token);
  7. }
  8. }
  9. module.exports = removeParentheses;