npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wasm-bridge

v0.1.1

Published

Typed WebAssembly bridge for TypeScript and JavaScript

Readme

wasm-bridge

Framework-agnostic, strongly-typed WebAssembly loader and SDK for Emscripten / embind modules

wasm-bridge — это универсальная TypeScript-библиотека для безопасной и типизированной работы с WebAssembly-модулями, собранными через Emscripten + embind.

Библиотека:

  • не привязана к Angular / React / Vue
  • корректно работает с любым сборщиком
  • решает проблему конкурентной загрузки wasm
  • предоставляет строгую типизацию C++ API в TypeScript

✨ Features

  • 🚀 Framework-agnostic — работает в любом JS/TS окружении
  • 🔒 Concurrency-safe loading — защита от повторных и параллельных загрузок
  • 🧠 Strong typing — полная типизация embind API
  • ♻️ Memory-safe helpers — безопасная работа с C++ объектами
  • 📦 Modular architecture — подключай только нужные wasm-модули
  • ESM + tree-shaking friendly

🧪 Full Example: Using wasm-bridge Modules

import { WasmLoader, loadArrayStatisticsModule } from 'wasm-bridge';

// 1️⃣ Создаём лоадер
const loader = new WasmLoader();

async function runExample() {
  // 2️⃣ Загружаем модуль статистики
  const statisticsModule = await loadArrayStatisticsModule(loader);

  // 3️⃣ Создаём C++ вектор и работаем с ним
  await statisticsModule.withVector(statisticsModule.VectorInt, async (vector) => {
    vector.push_back(10);
    vector.push_back(20);
    vector.push_back(30);
    vector.push_back(40);

    // 4️⃣ Вычисляем статистику
    const sum = statisticsModule.sumArrayInt(vector);
    const average = statisticsModule.averageArrayInt(vector);
    const min = statisticsModule.minArrayInt(vector);
    const max = statisticsModule.maxArrayInt(vector);

    console.log('Vector values: [10, 20, 30, 40]');
    console.log('Sum:', sum);          // Sum: 100
    console.log('Average:', average);  // Average: 25
    console.log('Min:', min);          // Min: 10
    console.log('Max:', max);          // Max: 40
  });

  // 5️⃣ Используем расширенные функции (например, медиану)
  await statisticsModule.withVector(statisticsModule.VectorFloat, async (vector) => {
    vector.push_back(1.5);
    vector.push_back(2.5);
    vector.push_back(3.5);

    const median = statisticsModule.medianInt(vector); // пример для int, кастуем float в int
    console.log('Median of [1.5, 2.5, 3.5]:', median); // 2
  });

  // 6️⃣ Завершаем работу с модулями
  loader.dispose(); // освобождаем все загруженные WASM модули и память
}

// Запускаем пример
runExample().catch(console.error);

## 📦 Installation

```bash
npm install wasm-bridge