@gechiui/blob
TypeScript icon, indicating that this package has built-in type declarations

3.3.1 • Public • Published

Blob

Blob utilities for GeChiUI.

Installation

Install the module

npm install @gechiui/blob --save

API

createBlobURL

Create a blob URL from a file.

Parameters

  • file File: The file to create a blob URL for.

Returns

  • string: The blob URL.

getBlobByURL

Retrieve a file based on a blob URL. The file must have been created by createBlobURL and not removed by revokeBlobURL, otherwise it will return undefined.

Parameters

  • url string: The blob URL.

Returns

  • File|undefined: The file for the blob URL.

getBlobTypeByURL

Retrieve a blob type based on URL. The file must have been created by createBlobURL and not removed by revokeBlobURL, otherwise it will return undefined.

Parameters

  • url string: The blob URL.

Returns

  • string|undefined: The blob type.

isBlobURL

Check whether a url is a blob url.

Parameters

  • url string: The URL.

Returns

  • boolean: Is the url a blob url?

revokeBlobURL

Remove the resource and file cache from memory.

Parameters

  • url string: The blob URL.

Contributing to this package

This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to npm and used by GeChiUI as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project's main contributor guide.



Code is Poetry.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.3.10latest

Version History

VersionDownloads (Last 7 Days)Published
3.3.10
3.2.20

Package Sidebar

Install

npm i @gechiui/blob

Weekly Downloads

0

Version

3.3.1

License

GPL-2.0-or-later

Unpacked Size

62.3 kB

Total Files

14

Last publish

Collaborators

  • gechiui