MCPcopy
hub / github.com/lutzroeder/netron / peek

Method peek

source/python.js:22573–22583  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

22571 }
22572
22573 peek(length) {
22574 const position = this._position;
22575 length = length === undefined ? this._length - this._position : length;
22576 this.skip(length);
22577 const end = this._position;
22578 this.skip(-length);
22579 if (position === 0 && length === this._length) {
22580 return this._buffer;
22581 }
22582 return this._buffer.subarray(position, end);
22583 }
22584
22585 read(length) {
22586 const position = this._position;

Callers 15

parseMethod · 0.45
_parseStatementMethod · 0.45
_parseExpressionMethod · 0.45
_parseNameMethod · 0.45
_parseLiteralMethod · 0.45
_parseTypeMethod · 0.45
matchMethod · 0.45
acceptMethod · 0.45
expectMethod · 0.45
constructorMethod · 0.45
initMethod · 0.45
deserializeMethod · 0.45

Calls 2

skipMethod · 0.45
seekMethod · 0.45

Tested by

no test coverage detected