MCPcopy
hub / github.com/KaTeX/KaTeX / get

Method get

src/Namespace.ts:85–91  ·  view source on GitHub ↗

* Get the current value of a name, or `undefined` if there is no value. * * Note: Do not use `if (namespace.get(...))` to detect whether a macro * is defined, as the definition may be the empty string which evaluates * to `false` in JavaScript. Use `if (namespace.get(...) != nul

(name: string)

Source from the content-addressed store, hash-verified

83 * `if (namespace.has(...))`.
84 */
85 get(name: string): Value | undefined {
86 if (this.current.hasOwnProperty(name)) {
87 return this.current[name];
88 } else {
89 return this.builtins[name];
90 }
91 }
92
93 /**
94 * Set the current value of a name, and optionally set it globally too.

Callers 14

initFunction · 0.80
macros.tsFile · 0.80
braketHelperFunction · 0.80
_getExpansionMethod · 0.80
isExpandableMethod · 0.80
parseTreeFunction · 0.80
endRowFunction · 0.80
mainFunction · 0.80
delimsizing.tsFile · 0.80
letCommandFunction · 0.80
processTestCaseFunction · 0.80
setupDriverFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected