🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@phuetz/lm-resizer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@phuetz/lm-resizer

Minimal WebAssembly wrapper for lm-resizer-core.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@phuetz/lm-resizer

Minimal JavaScript wrapper around the lm-resizer WASM ABI.

Build the WASM module:

rustup target add wasm32-unknown-unknown
./scripts/build-wasm.sh
# Windows:
powershell -File scripts/build-wasm.ps1

The build script copies lm_resizer_wasm.wasm next to this package's index.js. To create a local npm tarball under dist, run scripts/package-wasm.sh or scripts/package-wasm.ps1.

import { readFile } from "node:fs/promises";
import { initLmResizerWasm } from "@phuetz/lm-resizer";

const bytes = await readFile("lm_resizer_wasm.wasm");
const lm = await initLmResizerWasm(bytes);
const report = lm.compressJson('{ "a": 1 }');
console.log(report.output);

FAQs

Package last updated on 23 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts