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/datanews

v1.1.1

Published

Zero-AI bilingual (English / Nepali) news stories from structured data: gold & silver prices, Nepal Rastra Bank forex rates, NEPSE market close, DHM weather forecasts and fuel prices. render(kind, data, { lang }) returns headline, deck, summary, 3-5 body

Readme

@lacspace/datanews

Writes routine data stories in English and Nepali from structured numbers, with no AI. It covers gold and silver prices, Nepal Rastra Bank forex rates, the NEPSE market close, Department of Hydrology and Meteorology forecasts, and fuel prices. Each story is a complete pack: headline, deck, summary, 3–5 body paragraphs, 3 bullets, tags, category and the key numbers. These stories make up a large share of a newsroom's output, and none of them needs an LLM call.

import { render, renderBoth } from "@lacspace/datanews";

render("gold_silver", {
  gold: { perTola: 294800, prev: 293300 },
  silver: { perTola: 4425, prev: 4400 },
}, { lang: "en", date: "2026-10-04" }).headline;
// Gold rises Rs 1,500 to Rs 294,800 per tola; silver at Rs 4,425

render("gold_silver", { gold: { perTola: 294800, prev: 293300 } }, { lang: "ne" }).headline;
// सुनको भाउ तोलामा १,५०० रुपैयाँले बढेर २,९४,८०० रुपैयाँ पुग्यो

const { en, ne } = renderBoth("nepse_close", {
  index: 2683, change: -12.4, changePct: -0.46, turnover: 4123456789, volume: 9876543,
  gainers: [{ symbol: "SBLD89", pct: 8.8 }], losers: [{ symbol: "SINDU", pct: -8.55 }],
}, { date: "2026-10-04" });
en.headline; // NEPSE falls 12.4 points to 2,683 as turnover crosses Rs 4 billion
ne.headline; // नेप्से १२.४ अंकले घटेर २,६८३ मा, कारोबार ४ अर्ब नाघ्यो
en.body;     // ["The Nepal Stock Exchange (NEPSE) index fell 12.4 points, or 0.46%, to close at 2,683 on 4 October 2026.", ...]

Kinds

| Kind | Input | Attribution (default) | |---|---|---| | gold_silver | { gold: { perTola, prev? }, silver: { perTola, prev? }, unit?: "tola" \| "10g" } | the Federation of Nepal Gold and Silver Dealers' Association | | forex_nrb | { rates: [{ code, buy, sell, unit?, prevSell? }] } | Nepal Rastra Bank | | nepse_close | { index, change?, changePct?, turnover?, volume?, transactions?, gainers?, losers? } | none | | weather_dhm | { regions: [{ name, forecast }], warnings? } (text as a string or { en, ne }) | Department of Hydrology and Meteorology | | fuel_price | { petrol?, diesel?, kerosene?, lpg?, prev?: {...} } | Nepal Oil Corporation |

forex_nrb lists up to five currencies. The Indian rupee always comes first and the US dollar second; the rest are the biggest movers by selling rate, or the major currencies when no previous rates are given.

Rules it keeps

  • Numbers: every number in the text comes from your input. Totals are only converted (e.g. to billion, crore or arba), never invented.
  • Missing fields: a missing field drops its sentence. The text never says "N/A". If nothing usable is left, it throws DataNewsError.
  • No editorialising: no invented causes, quotes or judgement words, and no media outlets named.
  • Phrasing: rotates with a seed taken from date (or pass seed), so consecutive days don't read the same.
  • Nepali: reads as native Nepali, not a translation. It uses Devanagari numerals with lakh grouping (२,९४,८००) and करोड/अर्ब for large sums. English uses international grouping and million/billion.

Options

  • lang: "en" (the default) or "ne".
  • date: an ISO date or Date. It seeds the phrasing and appears in English text as "4 October 2026".
  • dateLabel: a pre-formatted date per language, e.g. { ne: "असोज १८" } for Bikram Sambat. Nepali text omits the date unless you pass one. The template adds the postposition (असोज १९मा), and a Nepali-only label never appears in English text.
  • seed: fixes the phrasing.
  • source: overrides the attribution, as a string or { en, ne }. In English, start it with "the" where the name needs one.
  • category: overrides the category.
  • maxHeadline: the headline budget in characters, 80 by default. Optional parts, such as the silver price on a gold headline, are shortened or dropped to fit.

Helpers

  • formatNumber(n, lang, decimals?): 294,800 / २,९४,८००
  • formatBigMoney(n, lang): Rs 4.12 billion / ४.१२ अर्ब रुपैयाँ
  • toDevanagari(s)
  • KINDS
  • describe()

Licence

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