UNPKG

@stylistic/stylelint-plugin

Version:
11 lines (9 loc) 374 B
const HAS_TPL_INTERPOLATION = /\{.+?\}/su /** * Checks whether a string has JS template literal interpolation or HTML-like template. * @param {string} string - The string to check. * @returns {boolean} True if the string has template literal interpolation, false otherwise. */ export function hasTplInterpolation (string) { return HAS_TPL_INTERPOLATION.test(string) }