3.0.1 • Published 6 months ago

@rossbob/image-to-base64 v3.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

$ npm install @rossbob/image-to-base64

Unit Test

  • Jest
  • Coverage : 100%

Usage

toBase64(image: Media): Promise

interface Media {
  path?: string,
  uri?: string,
}
import { toBase64 } from "@rossbob/image-to-base64";

async function main() {
  const imageBase64WithFile = await toBase64({ path: "./hdm-panda-chine.jpg" });

  const imageBase64WithURI = await toBase64({ uri: "https://www.ecosia.org/images?q=panda#id=9E3AE73E84FAAFFC7DD4D3725F33ADFD2346CA77" })
}

main().catch(console.error);
3.0.1

6 months ago

3.0.0

6 months ago

1.0.4

6 months ago

2.0.0

6 months ago

1.0.3

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago