https://github.com/parro-it/ai-decode
Decode a Buffer async iterable into a String async iterable.
https://github.com/parro-it/ai-decode
Last synced: 10 months ago
JSON representation
Decode a Buffer async iterable into a String async iterable.
- Host: GitHub
- URL: https://github.com/parro-it/ai-decode
- Owner: parro-it
- License: mit
- Created: 2017-12-06T19:53:31.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-06T20:47:30.000Z (about 8 years ago)
- Last Synced: 2024-10-12T23:15:48.762Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 80.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# ai-decode
[](http://travis-ci.org/parro-it/ai-decode)
[](https://npmjs.org/package/ai-decode)
> Decode a Buffer async iterable into a String async iterable.
>
> **_This module is part of
> [Async iterable fun](https://github.com/parro-it/ai-fun), a complete toolset
> of modules to work with async iterables._**
## Usage
description of the example
```js
import aiDecode from 'ai-decode';
for (const item of aiDecode()) {
yield item;
};
```
This will output
```
```
## API
### aiDecode
Decode a Buffer async iterable into a String async iterable.
**Parameters**
- `iterable` **AsyncIterable** The source iterable to decode. It must emit Buffer instances
- `encoding` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The encoding to use for the conversion. Default to 'utf8' (optional, default `"utf8"`)
Returns **AsyncIterable** An async iterable that iterates over the decode String s
## Install
With [npm](https://npmjs.org/) installed, run
```bash
npm install --save ai-decode
```
## See Also
- [`parro-it/ai-fun`](https://github.com/parro-it/ai-fun) - A collection of modules to easy deal with async iterables.
- [`noffle/common-readme`](https://github.com/noffle/common-readme) - « a common readme for node ».
## License
MIT Licensed
© 2017 Andrea Parodi