hasLessInterpolation.mjs 297 B

1234567891011
  1. const HAS_LESS_INTERPOLATION = /@\{.+?\}/;
  2. /**
  3. * Check whether a string has less interpolation
  4. *
  5. * @param {string} string
  6. * @returns {boolean} If `true`, a string has less interpolation
  7. */
  8. export default function hasLessInterpolation(string) {
  9. return HAS_LESS_INTERPOLATION.test(string);
  10. }