MCPcopy
hub / github.com/harness/harness / getString

Function getString

web/src/framework/strings/String.tsx:32–44  ·  view source on GitHub ↗
(key: StringKeys, vars: Record<string, any> = {})

Source from the content-addressed store, hash-verified

30 return {
31 // eslint-disable-next-line @typescript-eslint/no-explicit-any
32 getString(key: StringKeys, vars: Record<string, any> = {}) {
33 if (typeof getString === 'function') {
34 return getString(key, vars)
35 }
36
37 const template = get(strings, key)
38
39 if (typeof template !== 'string') {
40 throw new Error(`No valid template with id "${key}" found in any namespace`)
41 }
42
43 return mustache.render(template, { ...vars, $: strings })
44 }
45 }
46}
47

Callers 15

StringFunction · 0.70
PlanAndRenewSectionFunction · 0.50
StatusDropdownFunction · 0.50
CDEIDESelectFunction · 0.50
SortByDropdownFunction · 0.50
DefaultGitspaceImageFunction · 0.50
validateSubmissionFunction · 0.50
handleSubmitFunction · 0.50
EditGitspaceFunction · 0.50
DetailsCardFunction · 0.50
onSubmitHandlerFunction · 0.50

Calls 2

getFunction · 0.85
renderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…