MCPcopy
hub / github.com/deepops-ai/deepops / parseVariableFormat

Function parseVariableFormat

ui/src/utils/format.ts:29–37  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

27
28// parse all the ${xxx} to [xxx]
29export const parseVariableFormat = (s) => {
30 const reg = /\${(.*?)}/g;
31 const result = [];
32 let match;
33 while ((match = reg.exec(s))) {
34 result.push(match[1]);
35 }
36 return uniq(result);
37}
38
39
40// json to {a="b",c="d"}

Callers 7

replaceWithVariablesFunction · 0.90
loadValuesFunction · 0.90
setValueFunction · 0.90
onShareFunction · 0.90
PanelGrid.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected