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

@lacspace/marketwrap

v1.0.0

Published

Deterministic, no-AI stock-market wrap writer in English and Nepali (Devanagari). From the index close/change, breadth, turnover, sector moves and top gainers/losers it writes a factual daily wrap such as "NEPSE fell 11.90 points (−0.45%) to 2,587.25. Dec

Readme

@lacspace/marketwrap

Writes a daily stock-market wrap in English and Nepali from your numbers, with no AI. Most days the wrap needs no LLM at all; when you do want an LLM, give it this as a grounded draft.

import { marketWrap } from "@lacspace/marketwrap";

const w = marketWrap({
  index: { name: "NEPSE", close: 2587.25, change: -11.9, pct: -0.45 },
  breadth: { up: 95, down: 238, flat: 23 },
  turnoverRs: 4293774181,
  sectors: [{ name: "Mutual Fund", pct: 0.2 }, { name: "Trading", pct: -0.96 }],
  gainers: [{ symbol: "SBLD89", pct: 8.8 }],
  losers: [{ symbol: "SINDU", pct: -8.55 }],
});

w.en;
// NEPSE fell 11.90 points (−0.45%) to 2,587.25. Decliners led 238 to 95. Turnover Rs 4.29 arba.
// Mutual Fund was the best sector (+0.20%), Trading the weakest (−0.96%).
w.ne;
// नेप्से ११.९० अंक (−०.४५%) घटेर २,५८७.२५ मा बन्द भयो। २३८ कम्पनीको शेयरमूल्य घट्यो भने ९५ को बढ्यो र २३ को स्थिर रह्यो।
// कारोबार रकम रु ४.२९ अर्ब रह्यो। उपसमूहतर्फ म्युचुअल फन्ड (+०.२०%) सबैभन्दा राम्रो र व्यापार (−०.९६%) सबैभन्दा कमजोर रह्यो।
w.headline; // { en: "NEPSE down 11.90 points", ne: "नेप्से ११.९० अंकले घट्यो" }
w.facts;    // direction, points, pct, breadth leader, turnover, best/worst sector, top movers

Options

  • seed: pass the trading date ("2026-10-04") to rotate between phrasings. Each sentence has 2–3 variants, chosen deterministically, so the same seed always gives the same text and different days read differently. Without a seed, every sentence uses its first (house) phrasing.
  • parts: which sentences to write, in order. The default is ["index", "breadth", "turnover", "sectors"]; add "movers" for the top gainer and loser.
  • nepaliNames: Nepali names for indices and sectors, merged over the built-in NEPSE map (NEPSE → नेप्से, Hydropower → जलविद्युत, Mutual Fund → म्युचुअल फन्ड …).
  • currency: { en: "Rs", ne: "रु" } by default.

Edge cases have their own wording: flat days, level breadth, all sectors up and all sectors down. Every number comes from your input. The wording describes what happened and never advises or predicts.

Helpers

groupSouthAsian(n, decimals) gives lakh/crore digit grouping. signedPct(p) gives +0.20% / −0.45%. rupeesInWords(rs) returns { en: "Rs 4.29 arba", ne: "रु ४.२९ अर्ब" }. toDevanagari(s) converts digits.

Related: @lacspace/nepali-utils (NPR formatting, Nepal time), @lacspace/nepali-date (BS ↔ AD), @lacspace/market-clock (NEPSE sessions).

Licence

Lacspace Free Licence v1.0: free for personal and commercial use.