0.5.4 • Published 9 years ago
uupaa.typedarray.js v0.5.4
TypedArray.js 
TypedArray utility functions.
This module made of WebModule.
Documentation
Browser, NW.js and Electron
<script src="<module-dir>/lib/WebModule.js"></script>
<script src="<module-dir>/lib/TypedArray.js"></script>
<script>
TypedArray.BIG_ENDIAN // -> false (ARM, Intel CPU)
TypedArray.hton16( new Uint8Array([1,2]) ) // -> [2, 1]
TypedArray.ntoh16( new Uint8Array([1,2]) ) // -> [2, 1]
TypedArray.hton16( TypedArray.ntoh16( new Uint8Array([1,2]) ) ) // -> [1, 2]
TypedArray.expand( new Uint32Array([1,2,3]) ) // -> Uint32Array([1,2,3,0,0,0])
TypedArray.concat(new Uint8Array(10), new Uint8Array(20)) // -> new Uint8Array(30)
TypedArray.toString( new Uint8Array([0x33, 0x34, 0x35, 0x36]) ) // -> "3456"
TypedArray.fromString("Hello") // -> [72, 101, 108, 108, 111]
TypedArray.fromString("あいう") // -> [66, 68, 70]
TypedArray.fromString("あいう", Uint16Array) // -> [12354, 12356, 12358]
</script>
WebWorkers
importScripts("<module-dir>lib/WebModule.js");
importScripts("<module-dir>lib/TypedArray.js");
Node.js
require("<module-dir>lib/WebModule.js");
require("<module-dir>lib/TypedArray.js");
0.5.4
9 years ago
0.5.2
9 years ago
0.5.1
9 years ago
0.4.0
10 years ago
0.3.3
10 years ago
0.3.2
10 years ago
0.3.1
10 years ago
0.3.0
10 years ago
0.2.2
10 years ago
0.2.1
10 years ago
0.2.0
10 years ago
0.1.12
10 years ago
0.1.11
10 years ago
0.1.10
10 years ago
0.1.9
10 years ago
0.1.8
10 years ago
0.1.7
10 years ago
0.1.6
10 years ago
0.1.5
10 years ago
0.1.4
10 years ago
0.1.3
10 years ago
0.1.2
10 years ago
0.1.1
10 years ago
0.1.0
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago
0.0.0
10 years ago