|
1 |
| -# purescript-arraybuffer |
| 1 | +# arraybuffer |
| 2 | + |
2 | 3 | [](https://github.com/purescript-contrib/purescript-arraybuffer/actions?query=workflow%3ACI+branch%3Amain)
|
3 | 4 | [](https://github.com/purescript-contrib/purescript-arraybuffer/releases)
|
4 | 5 | [](https://pursuit.purescript.org/packages/purescript-arraybuffer)
|
5 |
| -[](https://github.com/jamesdbrock) |
| 6 | +[](https://github.com/jacereda) |
| 7 | +[](https://github.com/jamesdbrock) |
| 8 | + |
| 9 | + |
| 10 | +Bindings and implementation for mutable JavaScript `ArrayBuffer`s. |
6 | 11 |
|
7 |
| -ArrayBuffer bindings for PureScript. |
| 12 | +An `ArrayBuffer` is a built-in JavaScript object for storage of a flat continuous |
| 13 | +region of memory. |
8 | 14 |
|
| 15 | +The `Typed` module provides a view into an `ArrayBuffer` for array |
| 16 | +access of aligned local-machine-endian types, for in-process flat memory operations. |
| 17 | + |
| 18 | +The `DataView` module provides a view into an `ArrayBuffer` for inter-process |
| 19 | +flat memory operations. |
| 20 | + |
| 21 | +* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) |
| 22 | +* [ECMA-262](https://tc39.es/ecma262/multipage/structured-data.html#sec-arraybuffer-objects) |
9 | 23 |
|
10 | 24 |
|
11 | 25 | ## Installation
|
12 | 26 |
|
13 | 27 | Install `arraybuffer` with [Spago](https://github.com/purescript/spago):
|
14 |
| -``` |
15 |
| -spago install purescript-arraybuffer |
| 28 | + |
| 29 | +```sh |
| 30 | +spago install arraybuffer |
16 | 31 | ```
|
17 | 32 |
|
18 | 33 | ## Documentation
|
19 | 34 |
|
20 |
| -Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-arraybuffer). |
| 35 | +`arraybuffer` documentation is stored in a few places: |
| 36 | + |
| 37 | +1. Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-arraybuffer). |
| 38 | +2. Written documentation is kept in the [docs directory](./docs). |
| 39 | +3. Usage examples can be found in [the test suite](./test). |
| 40 | + |
| 41 | +If you get stuck, there are several ways to get help: |
| 42 | + |
| 43 | +- [Open an issue](https://github.com/purescript-contrib/purescript-arraybuffer/issues) if you have encountered a bug or problem. |
| 44 | +- [Search or start a thread on the PureScript Discourse](https://discourse.purescript.org) if you have general questions. You can also ask questions in the `#purescript` and `#purescript-beginners` channels on the [Functional Programming Slack](https://functionalprogramming.slack.com) ([invite link](https://fpchat-invite.herokuapp.com/)). |
| 45 | + |
| 46 | +## Contributing |
| 47 | + |
| 48 | +You can contribute to `arraybuffer` in several ways: |
| 49 | + |
| 50 | +1. If you encounter a problem or have a question, please [open an issue](https://github.com/purescript-contrib/purescript-arraybuffer/issues). We'll do our best to work with you to resolve or answer it. |
| 51 | + |
| 52 | +2. If you would like to contribute code, tests, or documentation, please [read the contributor guide](./CONTRIBUTING.md). It's a short, helpful introduction to contributing to this library, including development instructions. |
| 53 | + |
| 54 | +3. If you have written a library, tutorial, guide, or other resource based on this package, please share it on the [PureScript Discourse](https://discourse.purescript.org)! Writing libraries and learning resources are a great way to help this library succeed. |
| 55 | + |
| 56 | +## Other packages |
| 57 | + |
| 58 | +These are some other packages which provide more `ArrayBuffer` features. |
| 59 | + |
| 60 | +### Reading and Writing |
| 61 | + |
| 62 | +* [__arraybuffer-class__](https://pursuit.purescript.org/packages/purescript-arraybuffer-class) |
| 63 | +* [__dynamic-buffers__](https://pursuit.purescript.org/packages/purescript-dynamic-buffers) |
| 64 | +* [__parsing-dataview__](https://pursuit.purescript.org/packages/purescript-parsing-dataview) |
| 65 | +* [__arraybuffer-builder__](https://pursuit.purescript.org/packages/purescript-arraybuffer-builder) |
| 66 | + |
| 67 | +### Node.js |
| 68 | + |
| 69 | +* [__node-buffer__](https://pursuit.purescript.org/packages/purescript-node-buffer) |
| 70 | + |
| 71 | +### UTF |
| 72 | + |
| 73 | +* [__text-encoding__](https://pursuit.purescript.org/packages/purescript-text-encoding) |
| 74 | + |
| 75 | +### Base64 |
21 | 76 |
|
22 |
| -See https://github.com/AlexaDeWit/purescript-arraybuffer-codecs if you need text/base64 encoding/decoding functions. |
| 77 | +* [__base64-codec__](https://pursuit.purescript.org/packages/purescript-base64-codec) |
0 commit comments