Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djdeveloperr/fetch-base64
A simple module to fetch Base64 data of any image/gif, remote or local.
https://github.com/djdeveloperr/fetch-base64
base64 deno fetch
Last synced: 4 months ago
JSON representation
A simple module to fetch Base64 data of any image/gif, remote or local.
- Host: GitHub
- URL: https://github.com/djdeveloperr/fetch-base64
- Owner: DjDeveloperr
- License: mit
- Created: 2020-11-08T09:31:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-08T10:17:28.000Z (over 4 years ago)
- Last Synced: 2024-10-18T13:32:53.664Z (4 months ago)
- Topics: base64, deno, fetch
- Language: TypeScript
- Homepage:
- Size: 2.93 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fetch-base64
A simple module to fetch Base64 data of any image/gif, remote or local, for Deno.Inspired from [fetch-base64](https://github.com/gamell/fetch-base64) for Node.js. I needed it in Deno, so I made a new small module.
## Usage
* `fetchRemote(url: string, onlyData?: boolean)`: to fetch base64 data from a remote server
* **Params**
* `url`
* URL of the resource
* Type: string
* `onlyData`:
* Whether to fetch only data or complete URI
* Type: boolean?* `fetchLocal(url: string, onlyData?: boolean)`: to fetch base64 data from a local file
* **Params**
* `url`
* Path of the resource
* Type: string
* `onlyData`:
* Whether to fetch only data or complete URI
* Type: boolean?* `fetchAuto(url: string, onlyData?: boolean)`: to fetch base64 data from a remote server / locally, identifies automatically.
* **Params**
* `url`
* URL/Path of the resource
* Type: string
* `onlyData`:
* Whether to fetch only data or complete URI
* Type: boolean?## License
See [LICENSE](LICENSE) for more info.
Copyright 2020 @ DjDeveloper