1 | const hasLessInterpolation = require('../utils/hasLessInterpolation')
|
2 | const hasPsvInterpolation = require('../utils/hasPsvInterpolation')
|
3 | const hasScssInterpolation = require('../utils/hasScssInterpolation')
|
4 | /**
|
5 | * Check whether a string has interpolation
|
6 | *
|
7 | * @param {string} string
|
8 | * @return {boolean} If `true`, a string has interpolation
|
9 | */
|
10 | module.exports = function (string /*: string */) /*: boolean */ {
|
11 | // SCSS or Less interpolation
|
12 | if (
|
13 | hasLessInterpolation(string) ||
|
14 | hasScssInterpolation(string) ||
|
15 | hasPsvInterpolation(string)
|
16 | ) {
|
17 | return true
|
18 | }
|
19 |
|
20 | return false
|
21 | }
|