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

syntaxase

v0.1.0

Published

Lightning-fast type stripping and JSX lowering

Readme

Syntaxase

Lightning-fast type stripping and JSX lowering.

Named like an enzyme, Syntaxase removes erasable TypeScript syntax and lowers supported TypeScript and JSX runtime constructs.

Install

npm install syntaxase

Usage

import { stripTypes, transform } from "syntaxase";

const stripped = stripTypes(`
interface User { name: string }
const user: User = { name: "Ada" };
`);

const transformed = transform(`const view: JSX.Element = <h1>Hello</h1>;`, { jsx: true });

TypeScript syntax

stripTypes erases fixed-width TypeScript syntax while preserving source length and line layout. Use it with source accepted by TypeScript's erasableSyntaxOnly option. It does not validate that constraint: runtime TypeScript constructs such as enums may remain unchanged or lose TypeScript-only modifiers without gaining the JavaScript code needed to preserve their semantics.

transform additionally lowers supported runtime TypeScript constructs and, when enabled, JSX.

JSX options

| options.jsx | Behavior | Defaults and supported fields | | -------------------------- | ------------------------------------------------- | --------------------------------------------------------------- | | omitted or false | Parse TypeScript without JSX | None | | true | Lower JSX with the automatic production runtime | importSource: "react" | | { runtime: "automatic" } | Lower JSX with the automatic runtime | development: false, importSource: "react" | | { runtime: "classic" } | Lower JSX to factory calls without adding imports | pragma: "React.createElement", pragmaFrag: "React.Fragment" | | { runtime: "preserve" } | Parse JSX and leave it in the output | No additional fields |

Automatic development mode imports jsxDEV from <importSource>/jsx-dev-runtime; production mode imports jsx and jsxs from <importSource>/jsx-runtime. The default therefore requires React's JSX runtime to be installed. Set importSource for another compatible runtime.

development is supported only by the automatic runtime. pragma and pragmaFrag are supported only by the classic runtime.

Diagnostics and errors

The JavaScript API returns transformed strings only. Parser recovery diagnostics are not exposed, so malformed input can still produce output. Use a TypeScript checker or another parser when validation is required. Invalid API arguments and internal transform failures throw.