npm.io
1.0.5 • Published 1 year ago

nv-facutil-init-ta

Licence
ISC
Version
1.0.5
Deps
0
Size
4 kB
Vulns
0
Weekly
0

nv-facutil-init-ta

  • init fill a typed-array with a typed-array-unit

install

  • npm install nv-facutil-init-ta

splitted

usage

   const x=require("nv-facutil-init-ta") 

example

        var uint = new Uint32Array([1,2,3])
        var tary = new Uint32Array(30)

        > x(tary,uint)
        10
        > tary
        Uint32Array(30) [
          1, 2, 3, 1, 2, 3, 1, 2, 3,
          1, 2, 3, 1, 2, 3, 1, 2, 3,
          1, 2, 3, 1, 2, 3, 1, 2, 3,
          1, 2, 3
        ]
        > 


        > var tary = new Uint32Array(30)
        > x(tary,uint,5)
        10
        > tary
        Uint32Array(30) [
          0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0, 0, 0, 0, 1, 2, 3,
          1, 2, 3, 1, 2, 3, 1, 2, 3,
          1, 2, 3
        ]
        > 


        > x(tary,uint,5,8)
        8
        > tary
        Uint32Array(30) [
          0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0, 0, 0, 0, 1, 2, 3,
          1, 2, 3, 1, 2, 3, 0, 0, 0,
          0, 0, 0
        ]
        > 

METHODS

APIS

LICENSE

  • ISC