MCPcopy Index your code
hub / github.com/nodejs/node / isZeroFilled

Function isZeroFilled

test/parallel/test-buffer-zero-fill-cli.js:11–15  ·  view source on GitHub ↗
(buf)

Source from the content-addressed store, hash-verified

9const assert = require('assert');
10
11function isZeroFilled(buf) {
12 for (const n of buf)
13 if (n > 0) return false;
14 return true;
15}
16
17// We have to consume the data from the pool as otherwise
18// we would be testing what's in snapshot, which is zero-filled

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…