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

Function compareArrayBuffers

docs/app/js/sanddance-app.js:53870–53879  ·  view source on GitHub ↗
(arrayBuffer1, arrayBuffer2, byteLength)

Source from the content-addressed store, hash-verified

53868 return (0, _assertDefault.default)(false);
53869}
53870function compareArrayBuffers(arrayBuffer1, arrayBuffer2, byteLength) {
53871 byteLength = byteLength || arrayBuffer1.byteLength;
53872 if (arrayBuffer1.byteLength < byteLength || arrayBuffer2.byteLength < byteLength) return false;
53873 var array1 = new Uint8Array(arrayBuffer1);
53874 var array2 = new Uint8Array(arrayBuffer2);
53875 for(var i = 0; i < array1.length; ++i){
53876 if (array1[i] !== array2[i]) return false;
53877 }
53878 return true;
53879}
53880function concatenateArrayBuffers() {
53881 for(var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++)sources[_key] = arguments[_key];
53882 var sourceArrays = sources.map(function(source2) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected