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

@run-wasm/ts

v0.0.3

Published

<p align="center"> <a href="https://www.runwasm.com"> <img src="https://user-images.githubusercontent.com/22961671/135009624-47470419-7e17-47b5-99ed-0f15b8123dd0.png" width=600 /> </a> </p>

Readme

run-wasm

run-wasm is an easy to use tool for running WASM based code executions in the browser.

Brought to you by Slip and our amazing OSS contributors.

Install

npm

npm i @run-wasm/run-wasm

yarn

yarn add @run-wasm/run-wasm

Usage - Typescript

After installing run-wasm you'll need to import the run-wasm Typescript package

Install run-wasm Typescript package

npm i @run-wasm/ts

yarn

yarn add @run-wasm/ts

Next.js example

import React, { useEffect, useState, useRef } from 'react'
import { createTSClient } from '@run-wasm/ts'
import Script, { initScriptLoader } from 'next/script'
import CodeRunnerUI from '../components/CodeRunnerUI'

declare global {
  interface Window {
    ts: any
  }
}

const tsScript = 'https://unpkg.com/typescript@latest/lib/typescriptServices.js'
const initialCode = `// TypeScript code goes here
let a: number;
let b: number;
a = 12;
b = 3;
console.log(a + b);`

function App() {
  const [errors, setErrors] = useState<Array<string>>([])
  const [tsClient, setTsClient] = useState<any>(null)

  function initialiseTsClient() {
    const tsClient = createTSClient(window.ts)
    tsClient.fetchLibs(['es5', 'dom']).then(() => {
      setTsClient(tsClient)
    })
  }

  useEffect(() => {
    // handle client side navigation whenever that comes
    if (typeof window.ts === 'undefined') {
      initScriptLoader([
        {
          src: tsScript,
          onLoad: initialiseTsClient,
        },
      ])
    } else {
      initialiseTsClient()
    }
  }, [])

  async function runCode(code: string) {
    const { errors, output } = await tsClient.run({ code })
    setErrors(errors)
    return output
  }

  return (
    <>
      <Script strategy="beforeInteractive" src={tsScript} />
      <Script src="https://kit.fontawesome.com/137d63e13e.js" />
      <CodeRunnerUI
        initialCode={initialCode}
        languageLabel="TypeScript"
        defaultLanguage="typescript"
        onRunCode={runCode}
        isLoading={!tsClient}
      >
        {errors.length > 0 && (
          <div>
            <label className="block pt-8 text-sm font-medium text-gray-700 dark:text-gray-450">
              Errors
            </label>
            {errors.map((error, index) => (
              <div key={index} className="mt-1">
                <p className="text-sm text-red-500">{error}</p>
              </div>
            ))}
          </div>
        )}
      </CodeRunnerUI>
    </>
  )
}

export default App

Goal of the project

The goal of this project is to build an easy way to execute various programming languages in the browser via WebAssembly.

People should be able to use this project to embed executable code snippets on their websites easily!

We're building this as a new component to be used inside the Slip authoring tool.