hasInterpolation.cjs 849 B

123456789101112131415161718192021222324252627282930
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. const hasLessInterpolation = require('./hasLessInterpolation.cjs');
  5. const hasPsvInterpolation = require('./hasPsvInterpolation.cjs');
  6. const hasScssInterpolation = require('./hasScssInterpolation.cjs');
  7. const hasTplInterpolation = require('./hasTplInterpolation.cjs');
  8. /**
  9. * Check whether a string has interpolation
  10. *
  11. * @param {string} string
  12. * @returns {boolean} If `true`, a string has interpolation
  13. */
  14. function hasInterpolation(string) {
  15. // SCSS or Less interpolation
  16. if (
  17. hasLessInterpolation(string) ||
  18. hasScssInterpolation(string) ||
  19. hasTplInterpolation(string) ||
  20. hasPsvInterpolation(string)
  21. ) {
  22. return true;
  23. }
  24. return false;
  25. }
  26. module.exports = hasInterpolation;