* Returns the stringified value of the global state for a given field-based * expression, e.g. "foo.bar.baz". * @param {string} expr * @return {?string}
(expr)
| 568 | * @return {?string} |
| 569 | */ |
| 570 | getStateValue(expr) { |
| 571 | const value = getValueForExpr(this.state_, expr); |
| 572 | if (value === undefined || value === null) { |
| 573 | return null; |
| 574 | } else if (isObject(value) || isArray(value)) { |
| 575 | return JSON.stringify(/** @type {JsonObject} */ (value)); |
| 576 | } else { |
| 577 | return String(value); |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | /** |
| 582 | * Scans the root node (and array of optional nodes) for bindings. |
no test coverage detected