blob-to-it
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -0,2 +1,20 @@ | ||
/** | ||
* @packageDocumentation | ||
* | ||
* Allows reading Blob contents as an async iterator. | ||
* | ||
* @example | ||
* | ||
* ```javascript | ||
* import toIt from 'blob-to-it' | ||
* import all from 'it-all' | ||
* | ||
* const content = [ Uint8Array.from([0, 1, 2, 3, 4]) ] | ||
* const blob = new Blob(content) | ||
* const arr = await all(toIt(blob)) | ||
* | ||
* console.info(arr) // [ [ 0, 1, 2, 3, 4 ] ] | ||
* ``` | ||
*/ | ||
export default function blobToIt(blob: Blob): AsyncIterable<Uint8Array>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,19 @@ | ||
/* eslint-env browser */ | ||
/** | ||
* @packageDocumentation | ||
* | ||
* Allows reading Blob contents as an async iterator. | ||
* | ||
* @example | ||
* | ||
* ```javascript | ||
* import toIt from 'blob-to-it' | ||
* import all from 'it-all' | ||
* | ||
* const content = [ Uint8Array.from([0, 1, 2, 3, 4]) ] | ||
* const blob = new Blob(content) | ||
* const arr = await all(toIt(blob)) | ||
* | ||
* console.info(arr) // [ [ 0, 1, 2, 3, 4 ] ] | ||
* ``` | ||
*/ | ||
import browserReadableStreamToIt from 'browser-readablestream-to-it'; | ||
@@ -3,0 +20,0 @@ export default function blobToIt(blob) { |
{ | ||
"name": "blob-to-it", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "Turns a blob into an async iterator", | ||
@@ -32,2 +32,3 @@ "author": "Alex Potsides <alex@achingbrain.net>", | ||
"parserOptions": { | ||
"project": true, | ||
"sourceType": "module" | ||
@@ -137,5 +138,5 @@ } | ||
"devDependencies": { | ||
"aegir": "^40.0.11", | ||
"aegir": "^41.1.9", | ||
"it-all": "^3.0.0" | ||
} | ||
} |
@@ -1,3 +0,1 @@ | ||
# blob-to-it <!-- omit in toc --> | ||
[![codecov](https://img.shields.io/codecov/c/github/achingbrain/it.svg?style=flat-square)](https://codecov.io/gh/achingbrain/it) | ||
@@ -8,12 +6,21 @@ [![CI](https://img.shields.io/github/actions/workflow/status/achingbrain/it/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/achingbrain/it/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) | ||
## Table of contents <!-- omit in toc --> | ||
# About | ||
- [Install](#install) | ||
- [Browser `<script>` tag](#browser-script-tag) | ||
- [Usage](#usage) | ||
- [License](#license) | ||
- [Contribution](#contribution) | ||
Allows reading Blob contents as an async iterator. | ||
## Install | ||
## Example | ||
```javascript | ||
import toIt from 'blob-to-it' | ||
import all from 'it-all' | ||
const content = [ Uint8Array.from([0, 1, 2, 3, 4]) ] | ||
const blob = new Blob(content) | ||
const arr = await all(toIt(blob)) | ||
console.info(arr) // [ [ 0, 1, 2, 3, 4 ] ] | ||
``` | ||
# Install | ||
```console | ||
@@ -23,3 +30,3 @@ $ npm i blob-to-it | ||
### Browser `<script>` tag | ||
## Browser `<script>` tag | ||
@@ -32,17 +39,4 @@ Loading this module through a script tag will make it's exports available as `BlobToIt` in the global namespace. | ||
## Usage | ||
# License | ||
```javascript | ||
import toIt from 'blob-to-it' | ||
import all from 'it-all' | ||
const content = [ Uint8Array.from([0, 1, 2, 3, 4]) ] | ||
const blob = new Blob(content) | ||
const arr = await all(toIt(blob)) | ||
console.info(arr) // [ [ 0, 1, 2, 3, 4 ] ] | ||
``` | ||
## License | ||
Licensed under either of | ||
@@ -53,4 +47,4 @@ | ||
## Contribution | ||
# 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. |
@@ -1,2 +0,19 @@ | ||
/* eslint-env browser */ | ||
/** | ||
* @packageDocumentation | ||
* | ||
* Allows reading Blob contents as an async iterator. | ||
* | ||
* @example | ||
* | ||
* ```javascript | ||
* import toIt from 'blob-to-it' | ||
* import all from 'it-all' | ||
* | ||
* const content = [ Uint8Array.from([0, 1, 2, 3, 4]) ] | ||
* const blob = new Blob(content) | ||
* const arr = await all(toIt(blob)) | ||
* | ||
* console.info(arr) // [ [ 0, 1, 2, 3, 4 ] ] | ||
* ``` | ||
*/ | ||
@@ -3,0 +20,0 @@ import browserReadableStreamToIt from 'browser-readablestream-to-it' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8696
78
47