Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Richienb/cross-blob
Cross-platform Blob implementation for Node.js and the Web.
https://github.com/Richienb/cross-blob
Last synced: about 2 months ago
JSON representation
Cross-platform Blob implementation for Node.js and the Web.
- Host: GitHub
- URL: https://github.com/Richienb/cross-blob
- Owner: Richienb
- License: mit
- Created: 2019-11-16T23:03:10.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-10-18T04:41:40.000Z (about 2 years ago)
- Last Synced: 2024-04-25T00:31:36.508Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 307 KB
- Stars: 12
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-ponyfills - cross-blob - [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) (Browser Features)
README
# cross-blob
Cross-platform Blob implementation for Node.js and the Web.
> Blob has been [a global since Node.js 18 and is available in modern browsers](https://developer.mozilla.org/en-US/docs/Web/API/Blob#browser_compatibility). Don't use this module if you don't need to.
[![NPM Badge](https://nodei.co/npm/cross-blob.png)](https://npmjs.com/package/cross-blob)
## Install
```sh
npm install cross-blob
```## Usage
```js
import Blob from "cross-blob"new Blob([]);
//=> Blob {size: 0, type: ""}// Global patch (to support external modules like is-blob).
globalThis.Blob = Blob;
```## API
### [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob)