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 🙏

© 2024 – Pkg Stats / Ryan Hefner

mdmanifest

v1.0.8

Published

markdown manifests for muxrpc apis

Downloads

126

Readme

Markdown Manifest

Uses a regular markdown form to produce muxrpc manifests and cli usage descriptions.

The form:

# api-name

Api short description.

Api long, multiline description (optional).
Api long, multiline description (optional).
Api long, multiline description (optional).

## method-name: type

Method short description.

```bash
bash usage (optional)
``` --

```js
js usage (optional)
``` --

Method long, multiline description (optional).
Method long, multiline description (optional).
Method long, multiline description (optional).

Example:

# example-api

Example API, v1.0.0.

This is an example API, written by Paul Frazee.
It's not a real API, but it would work with muxrpc.

## ping: async

Pings a target machine.

```bash
ping {target string} [-n number]
``` --

```js
ping(target, { n: })
``` --

 - target: string, an IPv4/IPv6 address
 - opts:
   - n: optional number, how many times to ping

Sends ICMP ping messages to the given target.
Will wait 1 second between pings.

## listen: source

Listens for pings.

```bash
listen
``` --

```js
listen()
``` --

Will emit a string describing incoming pings, as they occur.

The api:

var mdm = require('mdmanifest')

mdm.muxrpcManifest(exampleMd)
/* => {
  ping: 'async',
  listen: 'source'
}*/

mdm.usage(exampleMd) 
/* => 
Example API, v1.0.0.

This is an example API, written by Paul Frazee.
It's not a real API, but it would work with muxrpc.

Commands:

 - ping    Pings a target machine.
 - listen  Listens for pings.
*/

mdm.usage(exampleMd, { prefix: 'foo' })
/* => 
Example API, v1.0.0.

This is an example API, written by Paul Frazee.
It's not a real API, but it would work with muxrpc.

Commands:

 - foo.ping    Pings a target machine.
 - foo.listen  Listens for pings.
*/

mdm.usage(exampleMd, { nameWidth: 20 }) 
/* => 
Example API, v1.0.0.

This is an example API, written by Paul Frazee.
It's not a real API, but it would work with muxrpc.

Commands:

 - ping                Pings a target machine.
 - listen              Listens for pings.
*/

mdm.usage(exampleMd, 'ping')
/* =>
Pings a target machine.

ping {target string} [-n number]

-   target: string, an IPv4/IPv6 address
-   opts:
    -   n: optional number, how many times to ping

Sends ICMP ping messages to the given target.
Will wait 1 second between pings.
*/

mdm.html(exampleMd) // standard HTML output

Command-line usage:

:~/mdmanifest⭐  ./mdm.js manifest ./test/valid-example.md 
{
  "ping": "async",
  "listen": "source"
}

:~/mdmanifest⭐  ./mdm.js html ./test/valid-example.md 
<h1>example-api</h1>
<p>Example API, v1.0.0.</p>
...

:~/mdmanifest⭐  ./mdm.js usage ./test/valid-example.md 
Example API, v1.0.0.

This is an example API, written by Paul Frazee.
It's not a real API, but it would work with muxrpc.

Commands:
  ping    Pings a target machine.
  listen  Listens for pings.

:~/mdmanifest⭐  ./mdm.js usage ./test/valid-example.md ping
Pings a target machine.

ping {target string} [-n number]

-   target: string, an IPv4/IPv6 address
-   opts:
    -   n: optional number, how many times to ping

Sends ICMP ping messages to the given target.
Will wait 1 second between pings.