Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: generate typedocs #59

Merged
merged 1 commit into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules
coverage
.nyc_output
.coverage
package-lock.json
dist
.clinic
.clinic
.docs
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
# it-length-prefixed <!-- omit in toc -->

[![codecov](https://img.shields.io/codecov/c/github/alanshaw/it-length-prefixed.svg?style=flat-square)](https://codecov.io/gh/alanshaw/it-length-prefixed)
[![CI](https://img.shields.io/github/workflow/status/alanshaw/it-length-prefixed/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/alanshaw/it-length-prefixed/actions/workflows/js-test-and-release.yml)
[![CI](https://img.shields.io/github/actions/workflow/status/alanshaw/it-length-prefixed/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/alanshaw/it-length-prefixed/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)

> Streaming length prefixed buffers with async iterables

## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Browser `<script>` tag](#browser-script-tag)
- [Usage](#usage)
- [API](#api)
- [`encode([opts])`](#encodeopts)
- [`encode.single(chunk, [opts])`](#encodesinglechunk-opts)
- [`decode([opts])`](#decodeopts)
- [`decode.fromReader(reader, [opts])`](#decodefromreaderreader-opts)
- [Contribute](#contribute)
- [API Docs](#api-docs)
- [License](#license)
- [Contribute](#contribute-1)
- [Contribution](#contribution)

## Install

```console
$ npm i it-length-prefixed
```

### Browser `<script>` tag

Loading this module through a script tag will make it's exports available as `ItLengthPrefixed` in the global namespace.

```html
<script src="https://unpkg.com/it-length-prefixed/dist/index.min.js"></script>
```

## Usage

```js
Expand Down Expand Up @@ -124,13 +134,17 @@ Returns a [transform](https://gist.github.com/alanshaw/591dc7dd54e4f99338a347ef5

PRs and issues gladly accepted! Check out the [issues](https://github.com/alanshaw/it-length-prefixed/issues).

## API Docs

- <https://alanshaw.github.io/it-length-prefixed>

## License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribute
## Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"files": [
"src",
"dist/src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
Expand Down Expand Up @@ -168,7 +168,8 @@
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
"test:node": "aegir test -t node --cov",
"test:electron-main": "aegir test -t electron-main",
"release": "aegir release"
"release": "aegir release",
"docs": "aegir docs"
},
"dependencies": {
"err-code": "^3.0.1",
Expand All @@ -181,11 +182,11 @@
"@types/varint": "^6.0.0",
"aegir": "^37.4.5",
"iso-random-stream": "^2.0.0",
"it-all": "^1.0.6",
"it-all": "^2.0.0",
"it-block": "^6.0.0",
"it-drain": "^1.0.5",
"it-foreach": "^0.1.1",
"it-map": "^1.0.6",
"it-drain": "^2.0.0",
"it-foreach": "^1.0.0",
"it-map": "^2.0.0",
"it-pipe": "^2.0.2",
"it-pushable": "^3.0.0",
"it-reader": "^6.0.1",
Expand Down