0.0.8 • Published 12 months ago

@whizzes/mince v0.0.8

Weekly downloads
-
License
-
Repository
-
Last release
12 months ago

mince

Mince comes from "mincing" which means taking something that is roughly chopped and then chopping it finely

Warning This package is under heavy development

Usage

  1. Install package
npm install @whizzes/mince
  1. Initialize WASM Module
import init from "@whizzes/mince";
  1. Then use the Mince class
import { Mince } from "@whizzes/mince";

const resizeImage = (file: File): Promise<File> => {
    const mince: Mince = await Mince.fromFile(file);
    const resized: Mince = mince.resize(100, 100);
    const file: File = resized.toFile();

    // The resulting file is an instance of the Browser's native `File` object
    const url = URL.createObjectURL(file);

    document.getElementById('image').src = url;

    return file;
}

Development

  1. Install wasm-pack
cargo install wasm-pack

Geckodriver

https://github.com/rustwasm/wasm-pack/blob/master/src/test/webdriver/geckodriver.rs

0.0.8

12 months ago

0.0.7

12 months ago

0.0.6

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago