Version 1
[yaffs-website] / node_modules / typedarray / readme.markdown
1 # typedarray
2
3 TypedArray polyfill ripped from [this
4 module](https://raw.github.com/inexorabletash/polyfill).
5
6 [![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray)
7
8 [![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray)
9
10 # example
11
12 ``` js
13 var Uint8Array = require('typedarray').Uint8Array;
14 var ua = new Uint8Array(5);
15 ua[1] = 256 + 55;
16 console.log(ua[1]);
17 ```
18
19 output:
20
21 ```
22 55
23 ```
24
25 # methods
26
27 ``` js
28 var TA = require('typedarray')
29 ```
30
31 The `TA` object has the following constructors:
32
33 * TA.ArrayBuffer
34 * TA.DataView
35 * TA.Float32Array
36 * TA.Float64Array
37 * TA.Int8Array
38 * TA.Int16Array
39 * TA.Int32Array
40 * TA.Uint8Array
41 * TA.Uint8ClampedArray
42 * TA.Uint16Array
43 * TA.Uint32Array
44
45 # install
46
47 With [npm](https://npmjs.org) do:
48
49 ```
50 npm install typedarray
51 ```
52
53 To use this module in the browser, compile with
54 [browserify](http://browserify.org)
55 or download a UMD build from browserify CDN:
56
57 http://wzrd.in/standalone/typedarray@latest
58
59 # license
60
61 MIT