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

catalepsy

v1.0.10

Published

Catalepsy is a medium-read-only wrapper that lets you get all user (public) posts, also get a single post in raw format, markdown or html

Readme

CATALEPSY

CircleCi CodeCov Npm Version Npm License Npm Downloads Last Commit Love

Catalepsy is a medium-read-only wrapper that lets you get all user (public) posts, also get a single post in raw format, markdown or html

Try it online

just head to Runkit and click run

Install

yarn add catalepsy
or
npm install -S catalepsy

Usage

const Catalepsy = require('catalepsy')
const catalepsy = new Catalepsy({
  siteUrl: 'http://test.com/', // defaults to https://medium.com/
  cdn: 'https://amazontest.com/', // defaults to https://cdn-images-1.medium.com/max/1600/
  cacheInMinutes: 5, // defaults to 1
  logger: console.log // put here your favourite logger defaults to no-logs
})

Exposed methods

getPosts Async function({username, limit})
username is the medium user's username. This is required
limit is the number of latest post to fetch, defaults to 10

getPost Async function({ username, slug, format })
username is the medium user's username. This is required
slug is the desired post slug (you can get that from getPosts). This is required
format is the result format, defaults to html

You can set one of three possible format options:.

  • raw: will return a JSON format just like medium returns it
  • markdown: will return the post in markdown format
  • html: will return the post in html format

Examples:

const getAllUserPosts = async (username,limit) => {
  const {status, data} = await catalepsy.getPosts({username, limit})
  // status is an HTTP Status code (200 or 500)
  // data is a JSON file with `posts` and `user`
}

const getPost = async (username, slug) => {
  const {data: html} = await catalepsy.getPost({username, slug})
  // HTML with the post

  const {data: raw} = await catalepsy.getPost({username, slug, 'raw'})
  // raw is the JSON from medium

  const {data: markdown} = await catalepsy.getPost({username, slug, 'markdown'})
  // markdown is the post in markdown format
}

Develop

Must follow standard.js rules and keep test coverage over 90% to be able to commit

Testing

Just run yarn test coverage should be 100%