securityos/node_modules/eslint-plugin-unicorn/rules/utils/escape-template-element-raw.js

7 lines
132 B
JavaScript

'use strict';
module.exports = string => string.replace(
/(?<=(?:^|[^\\])(?:\\\\)*)(?<symbol>(?:`|\$(?={)))/g,
'\\$<symbol>',
);