MCPcopy Create free account
hub / github.com/json-editor/json-editor / optimizeNames

Method optimizeNames

docs/scripts/ajv-validator.js:759–765  ·  view source on GitHub ↗
(names, constants)

Source from the content-addressed store, hash-verified

757 return `${varKind} ${this.name}${rhs};` + _n;
758 }
759 optimizeNames(names, constants) {
760 if (!names[this.name.str])
761 return;
762 if (this.rhs)
763 this.rhs = optimizeExpr(this.rhs, names, constants);
764 return this;
765 }
766 get names() {
767 return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};
768 }

Callers

nothing calls this directly

Calls 1

optimizeExprFunction · 0.85

Tested by

no test coverage detected