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

7 lines
132 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
module.exports = string => string.replace(
/(?<=(?:^|[^\\])(?:\\\\)*)(?<symbol>(?:`|\$(?={)))/g,
'\\$<symbol>',
);