MCPcopy Create free account
hub / github.com/Effect-TS/effect / subject

Method subject

packages/effect/src/encoding/JsonArray.ts:254–261  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

252
253 // Names the value being captured, for limit errors.
254 subject(): string {
255 if (this.capture === ELEMENT) return "Element"
256 const depth = this.frames.length - 1
257 if (this.capture === KEY) return `Key in ${this.pointerPrefix(depth)}`
258 const frame = this.frames[depth]
259 const token = frame.object ? this.key : String(frame.index - 1)
260 return `Value outside the selected array at ${this.pointerPrefix(depth, token)}`
261 }
262
263 feed(text: string, out: Array<unknown>): void {
264 if (!this.started && text.length > 0) {

Callers 2

checkSizeMethod · 0.95
failDepthMethod · 0.95

Calls 2

pointerPrefixMethod · 0.95
StringFunction · 0.50

Tested by

no test coverage detected