Installation
Install the LOWESS library for your preferred language.
From NPM (recommended)
Section titled “From NPM (recommended)”npm install fastlowess-wasmFrom CDN
Section titled “From CDN”<script type="module"> import init, { Lowess } from "https://cdn.jsdelivr.net/npm/fastlowess-wasm@0.99/fastlowess_wasm.js"; await init();</script>From Source
Section titled “From Source”# Install Rust first: https://rustup.rs/# Install wasm-pack: https://rustwasm.github.io/wasm-pack/installer/git clone https://github.com/thisisamirv/lowess-projectcd lowess-project/bindings/wasm# For bundlers (Webpack, Vite, etc.)wasm-pack build --target bundler# For Node.jswasm-pack build --target nodejs# For browser (no bundler)wasm-pack build --target webVerify Installation
Section titled “Verify Installation”import init, { Lowess } from 'fastlowess-wasm';
async function verify() {await init();const x = new Float64Array([1.0, 2.0, 3.0]);const y = new Float64Array([2.0, 4.0, 6.0]);const result = new Lowess({}).fit(x, y);console.log("Installed successfully!");}verify();