1.0.3 • Published 1 year ago

@vandeurenglenn/typed-array-concat v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

typed-array-concat

TypedArray.set() the concat() way

install

npm i @vandeurenglenn/typed-array-concat

usage

import typedArrayConcat from '@vandeurenglenn/typed-array-concat'

const concated = typedArrayConcat([
  new TextEncoder('hello'),
  new TextEncoder('world')
])
console.log(new TextDecoder().decode(concated)) // helloworld

const concatedSeperated = typedArrayConcat([
  new TextEncoder('hello'),
  new TextEncoder('world')
], {
  seperator: ' '
})
console.log(new TextDecoder().decode(concatedSeperated)) // hello world