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

Method optimizeNames

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

Source from the content-addressed store, hash-verified

998 return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
999 }
1000 optimizeNames(names, constants) {
1001 if (!super.optimizeNames(names, constants))
1002 return;
1003 this.iterable = optimizeExpr(this.iterable, names, constants);
1004 return this;
1005 }
1006 get names() {
1007 return addNames(super.names, this.iterable.names);
1008 }

Callers

nothing calls this directly

Calls 2

optimizeExprFunction · 0.85
optimizeNamesMethod · 0.45

Tested by

no test coverage detected