MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / array

Method array

src/shared/utils/ObjectParser.ts:144–155  ·  view source on GitHub ↗
(func: ObjectParserArrayFunc<P>)

Source from the content-addressed store, hash-verified

142 }
143
144 array(func: ObjectParserArrayFunc<P>): this {
145 const prop = this._property;
146 if (Array.isArray(prop)) {
147 for (let i = 0; i < prop.length; i++) {
148 const item = new ObjectParserProp(prop[i], this._context, createStack(this._stack, i));
149 func(item as any, i, prop);
150 }
151 } else {
152 this._context.onError(new ObjectParserError(this._stack, 'Property is not an array.'));
153 }
154 return this;
155 }
156
157 arrayRaw(func: ObjectParserArrayRawFunc<P>): this {
158 const prop = this._property;

Callers

nothing calls this directly

Calls 2

createStackFunction · 0.85
onErrorMethod · 0.45

Tested by

no test coverage detected