* 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(...) != null)` or
(name)
| 12973 | |
| 12974 | |
| 12975 | get(name) { |
| 12976 | if (this.current.hasOwnProperty(name)) { |
| 12977 | return this.current[name]; |
| 12978 | } else { |
| 12979 | return this.builtins[name]; |
| 12980 | } |
| 12981 | } |
| 12982 | /** |
| 12983 | * Set the current value of a name, and optionally set it globally too. |
| 12984 | * Local set() sets the current value and (when appropriate) adds an undo |
no outgoing calls
no test coverage detected