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

@mostlyrightmd/econ

v1.17.0

Published

Economic-indicator data for TypeScript / Node — CPI, PPI, nonfarm payrolls (NFP), U3 unemployment, initial jobless claims, GDP, and Fed decisions, joined to Kalshi + Polymarket econ markets for leakage-free settlement pairs. First-print / ALFRED vintage d

Readme

@mostlyrightmd/econ

Economic-indicator data for the mostlyright TypeScript SDK — CPI (headline / core / YoY), PPI, nonfarm payrolls (NFP), U3 unemployment, initial jobless claims, GDP, and Fed decisions, sourced from FRED/ALFRED + BLS/BEA/DOL/Federal Reserve and joined to Kalshi + Polymarket econ markets for leakage-free settlement pairs. Mirrors the Python mostlyrightmd-econ distribution surface. Declares @mostlyrightmd/core as a peer dependency.

Install

pnpm add @mostlyrightmd/econ @mostlyrightmd/core

Surface

Surface-equivalent to the Python mostlyright.econ vertical (camelCase TS signatures):

  • history(indicator, fromDate, toDate, { vintages }) — observation rows. vintages: "settlement" (default) returns the settlement-grade first print (the value as-of the Kalshi expiration); vintages: "all" returns every vintage for feature engineering.
  • releases(indicator) — the release calendar / schedule for an indicator.
  • researchEcon(seriesOrContract, fromDate, toDate, { asOf }) — leakage-free settlement pairs (market outcome + first-print value + as-of features). When asOf is given, any pair whose knowledge_time (= vintage_date) is after it throws LeakageError — a future revision can never leak into a backtest.

Load-bearing invariants (parity with Python)

  • First-print / ALFRED vintage discipline. Kalshi settlements contractually exclude post-expiration revisions; the backtest layer serves as-released vintages, never the revised series. Vintage selection happens at read time via vintages.
  • Per-series settlement routing. 48 of the Kalshi Economics series settle to Trading Economics, not the government agency (incl. KXUSPPI PPI-MoM, KXUSNFP). Routing is genuinely per-series: KXUSPPI (MoM) → TradingEconomics, but KXUSPPIYOY (YoY) → BLS. The routing table is codegen-shared from schemas/kalshi-econ-settlement.json (the Python↔TS anti-drift gate).
  • TE-settled series are honest, never fabricated. For a Trading-Economics-settled series, researchEcon ships the agency first print labeled settlementGrade=false and emits a divergence warning — it NEVER fabricates a TE value.
  • IndicatorNotYetReleasedError, not []/null. "Not yet released" is a normal, branchable control state distinct from "unavailable". The error is re-exported from @mostlyrightmd/core (Python↔TS lockstep taxonomy).
  • Parity firewall. Econ never registers into the TS research() / merge / live-source equivalents — an econ row must never reach the weather settlement join (the same isolation the Python vertical and CWOP use).

Browser / Node constraints

The fetch layer uses the standard fetch API and JSON — no Node-only API on a browser-viable path (mirrors the weather TS browser-safe boundary). API keys (FRED_API_KEY / BLS_API_KEY for ALFRED / BLS-v2) are read from the Node environment only; they are never bundled into a browser build.

Schema

The EconObservationRow (schema.econ.observations.v1) column types are codegen-derived from the shared JSON via @mostlyrightmd/codegen — never hand-written in TS. Regenerate with pnpm codegen.

Docs

See https://mostlyright.md/docs/sdk/ for quickstart and the full API reference.