4 const balancedMatch = require("balanced-match");
5 const styleSearch = require("style-search");
8 * Search a CSS string for functions by name.
9 * For every match, invoke the callback, passing the function's
10 * "argument(s) string" (whatever is inside the parentheses)
13 * Callback will be called once for every matching function found,
14 * with the function's "argument(s) string" and its starting index
17 module.exports = function(
19 functionName /*: string*/,
20 callback /*: Function*/
26 functionNames: "check"
29 if (source[match.endIndex] !== "(") {
32 const parensMatch = balancedMatch(
35 source.substr(match.startIndex)
37 callback(parensMatch.body, match.endIndex + 1);