New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@phuetz/lm-resizer

Package Overview
Dependencies
Maintainers
1
Versions
3
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.

Source
npmnpm
Version
0.2.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 09 Sep 2026

Related posts