MCPcopy Index your code
hub / github.com/pythongosssss/ComfyUI-Custom-Scripts / peek

Method peek

web/js/workflowImage.js:215–227  ·  view source on GitHub ↗

* Reads N bytes * @param {1 | 2 | 4 | 8} size

(size, signed = false, littleEndian = undefined)

Source from the content-addressed store, hash-verified

213 * @param {1 | 2 | 4 | 8} size
214 */
215 peek(size, signed = false, littleEndian = undefined) {
216 this.view.getBigInt64;
217 let m = "";
218 if (size === 8) m += "Big";
219 m += signed ? "Int" : "Uint";
220 m += size * 8;
221 m = "get" + m;
222 if (!this.view[m]) {
223 throw new Error("Method not found: " + m);
224 }
225
226 return this.view[m](this.offset, littleEndian == null ? this.littleEndian : littleEndian);
227 }
228
229 /**
230 * Seeks to the specified position or by the number of bytes specified relative to the current offset

Callers 1

readMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected