# convertbase64

> Convert your file to base 64 format

Latest version **1.0.1** (published 2023-10-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install convertbase64
pnpm add convertbase64
yarn add convertbase64
bun add convertbase64
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-10-26 |
| First published | 2023-10-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Okello Marvin Kevin |
| Maintainers | okellomarvin |

## Links

- npm: https://www.npmjs.com/package/convertbase64
- npm.io page: https://npm.io/package/convertbase64

## Recent versions

- 1.0.1 (latest) — 2023-10-26
- 1.0.0 — 2023-10-26

## README

# Convertbase64

A simple npm package to convert a file to a Base64-encoded string.

## Installation

```bash
npm install convertbase64
```

## Usage

```js
import convertbase64 from 'convertbase64'

const file = /* ... */; // Your file object here

const fileInfo = convertbase64(file);
console.log(fileInfo);

const fileInBase64 = fileInfo.base64

```
fileInBase64 will contain your file encoded in base64

This package exports a function that takes a File object as input and returns an object with the following properties:

- name: The name of the file.
- type: The MIME type of the file.
- size: The size of the file in kilobytes (kB).
- base64: The Base64-encoded string of the file.
- file: The original File object.

---
_Source: https://npm.io/package/convertbase64 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
