MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / assertPngBuffer

Function assertPngBuffer

scripts/integration/cli.mjs:2027–2032  ·  view source on GitHub ↗
(buffer)

Source from the content-addressed store, hash-verified

2025}
2026
2027function assertPngBuffer(buffer) {
2028 const pngSignature = "89504e470d0a1a0a";
2029 if (buffer.subarray(0, 8).toString("hex") !== pngSignature) {
2030 throw new Error("Expected PNG data.");
2031 }
2032}
2033
2034function assertMp4Buffer(buffer) {
2035 if (

Callers 2

runRestControlsFunction · 0.70
assertPngFunction · 0.70

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected