This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
2020-11-01 22:46:04 +00:00

27 lines
683 B
JavaScript

'use strict';
const hasLessInterpolation = require('../utils/hasLessInterpolation');
const hasPsvInterpolation = require('../utils/hasPsvInterpolation');
const hasScssInterpolation = require('../utils/hasScssInterpolation');
const hasTplInterpolation = require('../utils/hasTplInterpolation');
/**
* Check whether a string has interpolation
*
* @param {string} string
* @return {boolean} If `true`, a string has interpolation
*/
module.exports = function (string) {
// SCSS or Less interpolation
if (
hasLessInterpolation(string) ||
hasScssInterpolation(string) ||
hasTplInterpolation(string) ||
hasPsvInterpolation(string)
) {
return true;
}
return false;
};