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

muxp

v1.6.6

Published

Node server for mock requests.

Readme

#Muxp

Fast and slick, no coding needed. Just launch and go.

###What is it? Muxp is simple node.js server used as an API endpoint(s) for testing purposes. ###When do I want to use it? When you are developing an application and your API is inaccessible for whatever reason, you can simply simulate its behavior with muxp. ###Tl;dr - how do I use it?

  1. Install npm package

     npm install muxp --save
  2. Launch muxp

    Muxp is located in destination node_modules/muxp. Launch it simply by calling following command in muxp folder:

     node muxp.js [port]

    Example call:

     node muxp.js 3000

    This call will create API endpoints defined in heap.js on port 3000.

##heap.js Muxp is shipped with heap.js file. It is dataset file for every API endpoint with predefined structure, so you do not have to worry about creating it. Heap contains data to be sent by server after requesting it and rules for validating incomming data from request header/body. ###Heap anatomy

  1. Main wrapper

     'your/endpoint/:name': {
            
         method: 'POST',
    
         options: {},
    
         data: []
     }

    This is how you define endpoint in heap.js. How to use and fill the object keys can be found in steppes below. Note that you can also use variable parameters, using the leading ':' symbol.

  2. Method

     method: 'POST'

    Define method for endpoint. Able to accept multiple methods separated with '/' (eg. 'POST/PUT/GET').

  3. Options

     options: {
    
         validate: {
    
             header: {
                 Authorization: '7x4egbc6s7fs2'    // If header of request payload contains 'Authorization' field, it has to have this value.
             },
    
             body: {
                 code: '5e7fxE'    // Same as header, just for body payload.
             }         
         }
     }

    Simply enough, you can add key-value pairs into header and body objects. Incomming keys from header/body payload will be matched against the keys you created in heap as a form of validation. Failed validation results in status code 400 with descriptive message returned.

  4. Data

     data: [
    
         {
             field: 'Hello!'
         },
    
         {
             anotherField: {
                 value: 'Hey!'
             }
         }
     ]

    Data array contains objects that can be sent back by API endpoint. User can browse through them by including 'dataIdx' field in the body of the request payload. dataIdx (with all other options) can either be placed directly in the body, or in special object called 'muxp-options' for better readability. Omitting dataIdx sets it automatically to 0.

####For POST request:

dataIdx: 0

######Placed directly in POST request body.

or

'muxp-options': {dataIdx: 2}

######Wrapped in muxp-options object, which is also placed directly in POST request body.

####For GET request:

http://localhost:3000/your/api/endpoint?dataIdx=3