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

@x2t/wasm

v0.1.0

Published

WASM-based document format converter powered by OnlyOffice x2t

Readme

@x2t/wasm

npm version npm downloads npm license

TypeScript wrapper for OnlyOffice x2t WASM document format converter.

Features

  • Multi-format - DOCX, DOC, ODT, RTF, TXT, HTML, XLSX, XLS, ODS, CSV, PPTX, PPT, ODP and more
  • Node.js & Browser - Works in Node.js, browser main thread, and Web Worker
  • TypeScript-First - Full type safety with comprehensive TypeScript support

Installation

# Install with npm
$ npm install @x2t/wasm

# Install with yarn
$ yarn add @x2t/wasm

# Install with pnpm
$ pnpm add @x2t/wasm

Note: This package does NOT bundle x2t.js and x2t.wasm (AGPL-3.0 licensed). You need to download them separately. See Downloading x2t.

Quick Start

Node.js

import { X2tConverter, Format } from "@x2t/wasm";

const converter = await X2tConverter.init({
  x2tJsPath: "/path/to/x2t.js", // x2t.wasm must be in the same directory
});

const { output } = converter.convert({
  input: Buffer.from("Hello, world!", "utf-8"),
  inputFormat: Format.TXT,
  outputFormat: Format.DOCX,
});

converter.destroy();

Browser

<script type="module">
  import { X2tConverter, Format } from "@x2t/wasm";

  const converter = await X2tConverter.init({
    x2tJsPath: "https://example.com/x2t.js",
  });

  const { output } = converter.convert({
    input: new Uint8Array([
      /* file bytes */
    ]),
    inputFormat: Format.DOCX,
    outputFormat: Format.ODT,
  });

  converter.destroy();
</script>

Web Worker

// worker.ts
import { X2tConverter, Format } from "@x2t/wasm";

const converter = await X2tConverter.init({
  x2tJsPath: "/path/to/x2t.js",
});

In Worker mode, x2t.js is loaded via importScripts().

Downloading x2t

Use the built-in script to download the latest x2t release:

npx tsx scripts/x2t.ts

This downloads x2t.js and x2t.wasm to the .temp/ directory.

Or manually from onlyoffice-x2t-wasm releases.

Important Notes

  • x2t.js and x2t.wasm are licensed under AGPL-3.0 and must be obtained separately
  • x2t.wasm must be in the same directory as x2t.js
  • The converter operates on Emscripten's virtual filesystem (MEMFS) — no real filesystem access in browser
  • PDF, SVG, and image output formats require the OnlyOffice Canvas renderer (not included in the WASM build)
  • For PDF conversion, consider using LibreOffice headless or the full OnlyOffice Document Server

License

MIT © Demo Macro