TypeScript file functions library.
Quickstart:
npm install fitool
# or:
yarn add fitool
import { download } from 'fitool';
async function example() {
const result = await toString('data:text/plain,abc');
// result = abc
}
import { download } from 'fitool';
async function example() {
await download('data:image/png;base64,...');
}
Converts a given File
, Blob
, ArrayBuffer
, data URL, blob URL or string to a File
.
Converts a given File
, Blob
, ArrayBuffer
, data URL, blob URL or string to a Blob
.
Converts a given File
, Blob
, ArrayBuffer
, data URL, blob URL or string to a data URL.
Converts a given File
, Blob
, ArrayBuffer
, data URL, blob URL or string to a blob URL.
Converts a given File
, Blob
, ArrayBuffer
, data URL, blob URL or string to an ArrayBuffer
.
Converts a given File
, Blob
, ArrayBuffer
, data URL, blob URL or string to an UTF-8 string.
Initiates a download for a given File
, Blob
, ArrayBuffer
, data URL, blob URL or string.