MCPcopy Index your code
hub / github.com/feross/buffer / isZeroFilled

Function isZeroFilled

test/node/test-buffer-zero-fill-cli.js:12–16  ·  view source on GitHub ↗
(buf)

Source from the content-addressed store, hash-verified

10const assert = require('assert');
11
12function isZeroFilled(buf) {
13 for (let n = 0; n < buf.length; n++)
14 if (buf[n] > 0) return false;
15 return true;
16}
17
18// This can be somewhat unreliable because the
19// allocated memory might just already happen to

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…