This adds TypedArrays of arbitrary length together




This adds TypedArrays of arbitrary length together
npm install typedarray-addition``javascript`
const typedAddition = require('typedarray-addition')
const result = typedAddition.add(new Uint8Array([1, 2, 4]), new Uint8Array([42, 4, 1]))
console.log(result) // [43, 6, 5]
Adds two typed arrays together. The arrays must be the same bitwidth
Parameters
- a TypedArray b
- TypedArray
Returns TypedArray the result is stored in a new typed array
Adds a typed arrays and a natural number together
Parameters
- a TypedArray n` Number
-
Returns TypedArray the result is stored in a new typed array