entryPointCallsAny static method

bool entryPointCallsAny(
  1. String source,
  2. Iterable<String> functionNames
)

Returns whether source calls at least one supported entry point.

Implementation

static bool entryPointCallsAny(
  String source,
  Iterable<String> functionNames,
) {
  final names = functionNames.map(RegExp.escape).toList(growable: false);
  if (names.isEmpty) return false;
  final stripped = _entryDetectionSource(source);
  return RegExp('\\b(?:${names.join('|')})\\s*\\(').hasMatch(stripped);
}