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

@hecto/compiler

v3.0.0

Published

Zero-configuration build-time lowering for Hecto FP pipelines

Readme

@hecto/compiler

A build-time backend for explicitly pure @hecto/fp pipelines, including environments where new Function is unavailable: strict Content Security Policy pages, most browser extensions, and some serverless runtimes.

The plugin statically detects pipe(input, ...steps) / flow(...steps) / compile(...steps) / compilePure(...steps) call sites whose every step is a call to a tracked @hecto/fp/array, /option, /result, or /record operator with statically-inspectable arguments, and replaces the call site with a hoisted, monomorphic function __hgFused_N(input, ...bindings) { ... } whose generated bindings are isolated from user bindings — the same loop/ladder shape @hecto/fp's own runtime codegen produces, generated at build time via @hecto/fp's emitSource. It never reimplements that emission logic itself.

Single-step ordinary composition may be lowered because it preserves callback count, order, and exceptions. Multi-step fusion requires compilePure, pipe/flow imported from @hecto/fp/fusion, or plugin { pure: true }. That explicit contract promises every callback is total, depends only on its arguments, and has no observable side effects. Anything outside the supported scope is left byte-identical and reported with a decline reason.

Usage

// vite.config.ts
import { hgFp } from '@hecto/compiler/vite'

export default {
  plugins: [hgFp({ diagnostics: 'warn' })],
}

Also available: @hecto/compiler/rollup, @hecto/compiler/esbuild, @hecto/compiler/webpack, and @hecto/compiler's raw export (an unplugin factory) for hosts that consume unplugin directly.

Options

  • diagnostics: 'off' | 'warn' | 'error' (default 'warn') — 'warn' reports each declined site plus a build-end summary; 'error' throws at the first declined site.
  • pure: boolean (default false) — declares every matched pipeline in the included files pure and enables multi-step fusion. Prefer compilePure or the /fusion entry for a per-site contract.
  • include / exclude: file filters (default: JS/TS/JSX/TSX, excluding node_modules).

Testing without a bundler

transformHgPipelines(code, id, options) is exported as a pure function — call it directly to get { code, map, diagnostics } without going through any bundler.

Strict TypeScript consumers

The public adapter declarations use the native Vite, Rollup, esbuild and Webpack types. These four host packages are declared peers; install them with the compiler when your package manager does not install peers automatically. The typed adapter surface covers those four hosts and the concrete raw factory. Other unplugin adapter properties remain available at runtime for compatibility.