MCPcopy Create free account
hub / github.com/processing/p5.js / matchDataViewAt

Function matchDataViewAt

src/webgl/loading.js:721–728  ·  view source on GitHub ↗

* @private * This function matches the `query` at the provided `offset`

(query, reader, offset)

Source from the content-addressed store, hash-verified

719 * This function matches the `query` at the provided `offset`
720 */
721 function matchDataViewAt(query, reader, offset) {
722 // Check if each byte in query matches the corresponding byte from the current offset
723 for (let i = 0, il = query.length; i < il; i++) {
724 if (query[i] !== reader.getUint8(offset + i, false)) return false;
725 }
726
727 return true;
728 }
729
730 /**
731 * @private

Callers 1

isBinaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected