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

v1.2.0

Published

Quiz and poll items from a news article without an LLM — English or Nepali: fill-in-the-blank on figures (distractors by scaling the number exactly as written, keeping Devanagari digits, लाख/करोड scale words, decimals), fill-in-the-blank on names (distrac

Readme

@lacspace/quizpoll

Quiz and poll items from a news article, English or Nepali, with no LLM — fill-in-the-blank on figures and names, true/false, opinion polls, did-you-know cards — each with a correct answer index and a per-platform fit.

npm i @lacspace/quizpoll
import { quizpoll } from "@lacspace/quizpoll";

const q = quizpoll(articleText, { maxQuiz: 4, maxPolls: 2, seed: 42 });
q.quiz[0]
// { kind: "number", question: "खाली ठाउँ भर्नुहोस्: बैंकहरूले कर्जामा लिने ब्याजदर ____ माथि लैजान पाउने छैनन्",
//   options: [{ text: "१३ प्रतिशत" }, { text: "१२ प्रतिशत", correct: true }, { text: "११ प्रतिशत" }, { text: "१४ प्रतिशत" }],
//   answerIndex: 1, explanation: "उत्तर: १२ प्रतिशत", source: "…",
//   fits: { "instagram-poll": false, "instagram-quiz": true, youtube: true, x: true, facebook: true, telegram: true } }
q.polls        // opinion polls from safe templates (no claims): "यसबारे तपाईंको धारणा के छ?" राम्रो निर्णय / गलत निर्णय / थाहा छैन
q.didYouKnow   // "थाहा छ? …" cards from the figure sentences

Item kinds

  • number — the sentence with the figure blanked out; distractors scale the number as written: १२ प्रतिशत → ११/१३/१४ प्रतिशत, ५० अर्ब → २५/७५/१०० अर्ब, 1,20,000 → 60,000/180,000/240,000, 12.5% → 6.3/18.8/25.0%. Digit script, scale words, decimals and separators are preserved.
  • entity: a name blanked out. Every option has the same type as the answer (place↔place, person↔person, org↔org), using typedEntities().
    • People and organisations: the other options come from the same article, so they are never invented.
    • Districts and countries: the other options are districts or countries that the article does not mention. A place the article does mention could also be true.
    • Place level (1.2.0): places also match on level. A district answer gets districts, a province gets provinces, a city gets cities and a country gets countries. A municipality only gets other municipalities from the article, or the question is skipped. See placeLevel() / placePool().
    • Part of a longer name (1.2.0): a name that is part of a longer one in the same article is dropped ("Chalise" / "Devraj Chalise", "Madhesh" / "Madhesh Province"), so the two never meet as answer and option.
    • Never used as options:
      • sentence-opening words ("According", "Traders");
      • demonyms ("Sri Lankan");
      • news-outlet names;
      • plural groups ("Bagmati Provinces");
      • capitalised common words posing as names ("General Convention", "Weather Forecasting Division", which is typed as an org);
      • Nepali phrases after a role-like word (प्रमुख स्थान, सहरी केन्द्र, निर्णयहरू अनुमोदन);
      • anything that can't be typed.
  • truefalse — a high-ranked true sentence, and a false statement made by perturbing one figure (answer: False, with the real figure in explanation).
  • opinion — polls from templates (yours via opinionTemplates first, then built-ins). No factual claim is made.
  • didyouknow — figure sentences as cards.

Items are built only from full sentences: ending punctuation, 5+ words, no outlet named. A title line above the body is its own sentence, and रु., नं., डा., Rs. and No. never end a sentence; both rules come from @lacspace/extractive 1.2.2. A wrong figure is never another figure that appears in the article.

Shuffles are deterministic (seed, default derived from the text) so re-renders are stable. fits applies option limits: Instagram story poll 2, Instagram quiz sticker 4, YouTube community poll 5, X 4, Facebook/Telegram 10.

describe() returns the command schema for an AI conductor.

Licence

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