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

Function exportArrayBuffer

lib/ffi.js:245–259  ·  view source on GitHub ↗
(source, data, len)

Source from the content-addressed store, hash-verified

243}
244
245function exportArrayBuffer(source, data, len) {
246 checkFFIPermission();
247
248 if (ObjectPrototypeToString(source) !== '[object ArrayBuffer]') {
249 throw new ERR_INVALID_ARG_TYPE('arrayBuffer', 'ArrayBuffer', source);
250 }
251
252 validateInteger(len, 'len', 0);
253
254 if (len < source.byteLength) {
255 throw new ERR_OUT_OF_RANGE('len', `>= ${source.byteLength}`, len);
256 }
257
258 exportBytes(source, data, len);
259}
260
261function exportArrayBufferView(source, data, len) {
262 checkFFIPermission();

Callers

nothing calls this directly

Calls 1

checkFFIPermissionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…