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

Method map

src/shared/utils/ObjectParser.ts:119–130  ·  view source on GitHub ↗
(func: ObjectParserMapFunc<P>)

Source from the content-addressed store, hash-verified

117 }
118
119 map(func: ObjectParserMapFunc<P>): this {
120 const prop = this._property;
121 if (typeof prop === 'object' && prop !== null && !Array.isArray(prop)) {
122 for (const label in prop) {
123 const item = new ObjectParserProp(prop[label], this._context, createStack(this._stack, label));
124 func(item as any, label, prop);
125 }
126 } else {
127 this._context.onError(new ObjectParserError(this._stack, 'Property is not a non-array object.'));
128 }
129 return this;
130 }
131
132 mapRaw(func: ObjectParserMapRawFunc<P>): this {
133 const prop = this._property;

Callers

nothing calls this directly

Calls 2

createStackFunction · 0.85
onErrorMethod · 0.45

Tested by

no test coverage detected