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

studyplug

v0.1.4

Published

TypeScript SDK for the StudyPlug educational content API

Readme

studyplug

TypeScript SDK for the StudyPlug API — generate educational content for K-8 math, reading, vocabulary, spelling, and science.

npm version license

Install

npm install studyplug

Quick Start

import { StudyPlug } from "studyplug";

const sp = new StudyPlug({ apiKey: "sp_live_..." });

// Generate 5 addition problems
const { data } = await sp.generate({ skill: "add-within-10", count: 5 });
console.log(data.items);

// Generate a single problem
const single = await sp.generate.single({ skill: "add-within-20" });
console.log(single.data.item);

Features

  • Zero dependencies — lightweight, works everywhere
  • Full TypeScript support — every response is fully typed
  • Structured errors — typed error classes with helper functions
  • Curriculum catalog — browse grades, subjects, topics, skills, and standards
  • Deterministic generation — pass a seed for reproducible content

Browse the Curriculum

// List all grades
const grades = await sp.grades.list();

// List skills for a grade/subject
const skills = await sp.skills.list({ grade: "grade-3", subject: "math" });

// Get skill details
const skill = await sp.skills.get("multiply-by-5");

// Find skills by standard
const standards = await sp.standards.list({ framework: "ccss-math" });

Error Handling

import { StudyPlug, isRateLimitError, isNotFoundError } from "studyplug";

try {
  const result = await sp.generate({ skill: "add-within-10", count: 5 });
} catch (err) {
  if (isRateLimitError(err)) {
    console.log(`Rate limited. Retry after ${err.retryAfter}s`);
  } else if (isNotFoundError(err)) {
    console.log("Skill not found");
  }
}

API Reference

| Method | Description | |--------|-------------| | sp.generate(params) | Generate a batch of content items | | sp.generate.single(params) | Generate a single content item | | sp.grades.list() | List all grades | | sp.grades.get(slug) | Get grade details | | sp.subjects.list() | List all subjects | | sp.subjects.get(slug) | Get subject details | | sp.topics.list(params?) | List topics (optionally filtered) | | sp.skills.list(params?) | List skills (optionally filtered) | | sp.skills.get(slug) | Get skill details | | sp.standards.list(params?) | List standards | | sp.standards.get(code) | Get standard details | | sp.health() | API health check |

Configuration

const sp = new StudyPlug({
  apiKey: "sp_live_...",               // optional for anonymous tier
  baseUrl: "https://api.studyplug.org", // default
  timeout: 10000,                       // ms, default 30000
});

See It in Action

StudyPlug.org — free K-5 printable worksheets for math, reading, vocabulary, spelling, and science. Every worksheet is generated by the same API this SDK connects to.

Links

License

MIT