source: frontend/node_modules/underscore/cjs/_toBufferView.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 387 bytes
Line 
1var _getByteLength = require('./_getByteLength.js');
2
3// Internal function to wrap or shallow-copy an ArrayBuffer,
4// typed array or DataView to a new view, reusing the buffer.
5function toBufferView(bufferSource) {
6 return new Uint8Array(
7 bufferSource.buffer || bufferSource,
8 bufferSource.byteOffset || 0,
9 _getByteLength(bufferSource)
10 );
11}
12
13module.exports = toBufferView;
Note: See TracBrowser for help on using the repository browser.