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 🙏

© 2025 – Pkg Stats / Ryan Hefner

self-help

v0.3.2

Published

Interactive Q&A Guides for Web and the Command Line

Downloads

10

Readme

self-help

Interactive Q&A Guides for Web and the Command Line

NPM version NPM downloads Build Status Maintainability

Table of Contents

🌩 Installation

npm install --global self-help

🕹 Usage

Interactive CLI

Navigate a Self-Help Document from the Command Line:

self-help interactive --source ./path/to/help-document.js

Example

screenshot

Generate Markdown

Generate Markdown from a Self-Help Document:

self-help markdown --source ./path/to/help-document.js

Markdown is written to stdout for you to pipe into other Command Line Programs or write to a file.

Example

The self-help RxJS Operator Decision Tree Example exported as Markdown.

👩🏽‍💻 Writing Documents

A Help Document is a JavaScript Module exporting a getHelpDocument method of type GetHelpDocument.

type GetHelpDocument = () => Node | Promise<Node>;

It returns a Nested Hierarchy of Node Objects.

type Node = Leaf | Branch | AsyncBranch;

Which form the Decision Tree a User will navigate.

export const getHelpDocument = (): Node => ({
  label: "Welcome to Milk and Cookies, how can we help?",
  children: [
    {
      label: `I'm Thirsty, and`,
      children: () => http.get("/milks-walkthrough.json")
    },
    {
      label: `I'm Hungry, and`,
      children: [
        {
          label: "I love Cookies, so",
          children: () => http.get("/cookies-walkthrough.json")
        },
        {
          label: `Cookies aren't my thing`,
          value: fs.readFileSync("/GET-OUT.md", "utf8")
        }
      ]
    }
  ]
});

Node Types

Branch

A Branch presents multiple options to choose from in the form of its children Array. Children can be a combination of other Branch, AsyncBranch or Leaf Nodes.

{
  label: 'I just cloned the project, and',
  children: [...]
}

AsyncBranch

An AsyncBranch is the same as a Branch except its children property is a Function which returns a Promise.

This mechanism allows Help Documents to be combined and linked together, use it to compose higher-level guides which pull together other Help Documents hosted online or break down a large Help Document into smaller files that can be lazily-loaded at runtime.

{
  label: 'I just cloned the project, and',
  children: () => Promise.resolve([])
}

Leaf

A Leaf represents the answer the User has been looking for as they have been navigating a given Help Document. The value can be any String, but is normally the contents of a Markdown Document which explains the answer to the User.

{
  label: 'I want to install dependencies',
  value: fs.readFileSync('/installation.md', 'utf8')
}

🙋🏿‍♂️ Getting Help

Get help with issues by creating a Bug Report or discuss ideas by opening a Feature Request.

👀 Other Projects

If you find my Open Source projects useful, please share them ❤️

🤓 Author

I'm Jamie Mason from Leeds in England, I began Web Design and Development in 1999 and have been Contracting and offering Consultancy as Fold Left Ltd since 2012. Who I've worked with includes Sky Sports, Sky Bet, Sky Poker, The Premier League, William Hill, Shell, Betfair, and Football Clubs including Leeds United, Spurs, West Ham, Arsenal, and more.

Follow JamieMason on GitHub      Follow fold_left on Twitter