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

@fduseless/sqlglot-ts

v0.1.0

Published

SQL parser, transpiler, optimizer, and engine in TypeScript

Readme

@fduseless/sqlglot-ts

TypeScript port of sqlglot, the SQL parser, transpiler, optimizer, and engine created by @tobymao.

Credit

All core ideas, architecture, and implementation logic belong to the original sqlglot project:

  • Upstream project: https://github.com/tobymao/sqlglot
  • Author: Toby Mao and contributors

This package is only a TypeScript translation of that work. We did not design the SQL engine, parser architecture, optimizer rules, or dialect behavior. The goal of this repository is to port the Python implementation as faithfully as possible.

What This Package Is

@fduseless/sqlglot-ts provides a TypeScript build of sqlglot for JavaScript and TypeScript environments.

It includes:

  • SQL parsing
  • SQL generation
  • Cross-dialect transpilation
  • Expression tree utilities
  • Optimizer and type annotation utilities
  • A growing set of dialect-specific parser and generator behaviors

Install

npm install @fduseless/sqlglot-ts

Quick Start

import { parseOne, transpile } from '@fduseless/sqlglot-ts';

const expression = parseOne('SELECT a + 1 FROM x');

console.log(expression.sql());
// SELECT a + 1 FROM x

console.log(expression.sql('spark'));
// SELECT a + 1 FROM x

console.log(
  transpile('SELECT CAST(a AS SIGNED) FROM t', {
    read: 'mysql',
    write: 'postgres',
  })[0],
);
// SELECT CAST(a AS BIGINT) FROM t

API Shape

The public API is intended to closely follow the Python project where practical in TypeScript. Common entry points include:

  • parse
  • parseOne
  • transpile
  • expression classes from src/expressions
  • optimizer utilities such as annotateTypes

Project Status

This project is an active port, not an independent reimplementation. Behavior is continuously aligned against upstream Python sqlglot.

That means:

  • some areas may still lag upstream
  • names and behavior are chosen for parity first
  • changes are often driven by upstream diff syncing rather than local redesign

Upstream First

If you need the canonical implementation, complete feature coverage, or want to understand the original design decisions, use or read the upstream Python project first:

https://github.com/tobymao/sqlglot

License

This repository is published under the MIT license. Please also review the license and notices of the upstream sqlglot project.