MCPcopy Create free account
hub / github.com/openai/plugins / countDecisionPoints

Function countDecisionPoints

plugins/plugin-eval/src/evaluators/typescript.js:8–19  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

6}
7
8function countDecisionPoints(text) {
9 return (
10 countMatches(text, /\bif\b/g) +
11 countMatches(text, /\bfor\b/g) +
12 countMatches(text, /\bwhile\b/g) +
13 countMatches(text, /\bcase\b/g) +
14 countMatches(text, /\bcatch\b/g) +
15 countMatches(text, /&&/g) +
16 countMatches(text, /\|\|/g) +
17 countMatches(text, /\?/g)
18 );
19}
20
21function detectFunctions(lines) {
22 const functions = [];

Callers 2

detectFunctionsFunction · 0.70
analyzeTypeScriptFilesFunction · 0.70

Calls 1

countMatchesFunction · 0.70

Tested by

no test coverage detected