MCPcopy Create free account
hub / github.com/microsoft/SandDance / fromArrayLike

Function fromArrayLike

docs/app/js/sanddance-app.js:113012–113017  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

113010 return buf;
113011}
113012function fromArrayLike(array) {
113013 var length = array.length < 0 ? 0 : checked(array.length) | 0;
113014 var buf = createBuffer(length);
113015 for(var i = 0; i < length; i += 1)buf[i] = array[i] & 255;
113016 return buf;
113017}
113018function fromArrayView(arrayView) {
113019 if (isInstance(arrayView, Uint8Array)) {
113020 var copy = new Uint8Array(arrayView);

Callers 2

fromArrayViewFunction · 0.70
fromObjectFunction · 0.70

Calls 2

checkedFunction · 0.70
createBufferFunction · 0.70

Tested by

no test coverage detected