MCPcopy Create free account
hub / github.com/wevm/viem / assertPosition

Function assertPosition

src/utils/cursor.ts:77–83  ·  view source on GitHub ↗
(position)

Source from the content-addressed store, hash-verified

75 })
76 },
77 assertPosition(position) {
78 if (position < 0 || position > this.bytes.length - 1)
79 throw new PositionOutOfBoundsError({
80 length: this.bytes.length,
81 position,
82 })
83 },
84 decrementPosition(offset) {
85 if (offset < 0) throw new NegativeOffsetError({ offset })
86 const position = this.position - offset

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected