mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 05:27:15 -04:00
21 lines
607 B
JavaScript
21 lines
607 B
JavaScript
|
/* @flow */
|
||
|
"use strict"
|
||
|
|
||
|
const hasLessInterpolation = require("../utils/hasLessInterpolation")
|
||
|
const hasPsvInterpolation = require("../utils/hasPsvInterpolation")
|
||
|
const hasScssInterpolation = require("../utils/hasScssInterpolation")
|
||
|
/**
|
||
|
* Check whether a string has interpolation
|
||
|
*
|
||
|
* @param {string} string
|
||
|
* @return {boolean} If `true`, a string has interpolation
|
||
|
*/
|
||
|
module.exports = function (string/*: string*/)/*: boolean*/ {
|
||
|
// SCSS or Less interpolation
|
||
|
if (hasLessInterpolation(string) || hasScssInterpolation(string) || hasPsvInterpolation(string)) {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|