MCPcopy Create free account
hub / github.com/RubyLouvre/anu / allocUnsafe

Function allocUnsafe

test/babel.js:45893–45902  ·  view source on GitHub ↗
(that, size)

Source from the content-addressed store, hash-verified

45891 };
45892
45893 function allocUnsafe(that, size) {
45894 assertSize(size);
45895 that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
45896 if (!Buffer.TYPED_ARRAY_SUPPORT) {
45897 for (var i = 0; i < size; ++i) {
45898 that[i] = 0;
45899 }
45900 }
45901 return that;
45902 }
45903
45904 /**
45905 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.

Callers 3

cloneBufferFunction · 0.85
BufferFunction · 0.85
babel.jsFile · 0.85

Calls 3

assertSizeFunction · 0.85
createBufferFunction · 0.85
checkedFunction · 0.85

Tested by

no test coverage detected