source: frontend/node_modules/underscore/amd/_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: 406 bytes
Line 
1define(['./_getByteLength'], function (_getByteLength) {
2
3 // Internal function to wrap or shallow-copy an ArrayBuffer,
4 // typed array or DataView to a new view, reusing the buffer.
5 function toBufferView(bufferSource) {
6 return new Uint8Array(
7 bufferSource.buffer || bufferSource,
8 bufferSource.byteOffset || 0,
9 _getByteLength(bufferSource)
10 );
11 }
12
13 return toBufferView;
14
15});
Note: See TracBrowser for help on using the repository browser.