.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / hasInterpolation.js
1 /* @flow */
2 "use strict";
3
4 const hasLessInterpolation = require("../utils/hasLessInterpolation");
5 const hasPsvInterpolation = require("../utils/hasPsvInterpolation");
6 const hasScssInterpolation = require("../utils/hasScssInterpolation");
7 /**
8  * Check whether a string has interpolation
9  *
10  * @param {string} string
11  * @return {boolean} If `true`, a string has interpolation
12  */
13 module.exports = function(string /*: string*/) /*: boolean*/ {
14   // SCSS or Less interpolation
15   if (
16     hasLessInterpolation(string) ||
17     hasScssInterpolation(string) ||
18     hasPsvInterpolation(string)
19   ) {
20     return true;
21   }
22
23   return false;
24 };