MCPcopy Create free account
hub / github.com/aiscript-dev/aiscript / exists

Method exists

src/interpreter/scope.ts:87–97  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

85 */
86 @autobind
87 public exists(name: string): boolean {
88 for (const layer of this.layerdStates) {
89 if (layer.has(name)) {
90 this.log('exists', { var: name });
91 return true;
92 }
93 }
94
95 this.log('not exists', { var: name });
96 return false;
97 }
98
99 /**
100 * 現在のスコープに存在する全ての変数を取得します

Callers 2

__evalMethod · 0.80
__evalSyncMethod · 0.80

Calls 1

logMethod · 0.95

Tested by

no test coverage detected