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

@mentorspok/mockless

v0.1.6

Published

Angular library to record and mock HTTP traffic dynamically.

Readme

Mockless

An Angular library that provides intelligent HTTP request recording and replay capabilities for seamless API mocking during development and testing.

With Mockless, you can develop the frontend without needing the backend up and running.

Mock More with less

  1. Code
  2. Servers
  3. Hassel
  4. Followups

Features

  • Automatic HTTP Recording: Intercepts and records all outgoing HTTP requests and their responses
  • Request Replay: Automatically replay recorded responses for matching requests
  • Error Handling: Records and replays both successful responses and error conditions
  • Visual Interface: Built-in component to view request history and manage mock data
  • Editable Mocks: Modify recorded responses through an intuitive JSON editor
  • Toggle Mode: Easy enable/disable functionality via localStorage
  • Zero Configuration: Works out of the box with minimal setup

Installation

npm install @mentorspok/mockless

Setup

1. Override the Http Handler:

For Angular 20

Import the required fields in the app.Config.ts

import { HttpBackend, HttpHandler } from '@angular/common/http';
import { MockHttpHandlerFactory } from '@mentorspok/mockless';

Add the Mockless Provider for the HttpHandler

export const appConfig: ApplicationConfig = {
  providers: [
    ... // Existing providers
    ...
    {
      provide: HttpHandler,
      useFactory: MockHttpHandlerFactory,
      deps: [HttpBackend]
    }
  ]
};

For earlier system

import { MockHttpHandlerFactory } from '@mentorspok/mockless';

@NgModule({
  providers: [
    {
      provide: HttpBackend,
      useFactory: MockHttpHandlerFactory,
      deps: [HttpBackend]
    }
  ]
})
export class AppModule { }

2. Add Mockless panel for control:

For Angular 20

Update app.routes.ts Add the Mockless component to "mockless" or any route you want to use, to add the MocklessPanel

import { Routes } from '@angular/router';
import { MocklessPanelComponent } from '@mentorspok/mockless';

export const routes: Routes = [
    ... // existing routes
    { path: 'mockless', component: MocklessPanelComponent }
];

For earlier system

Update app.module.ts Add the Mockless component to "mockless" or any route you want to use, to add the MocklessPanel Remember to add MocklessModule to the module imports

import { Routes } from '@angular/router';
import { MockHttpHandlerFactory, MocklessModule, MocklessPanelComponent } from 'mockless';

export const routes: Routes = [
    ... // existing routes
    { path: 'mockless', component: MocklessPanelComponent }
];
@NgModule({
  declarations: [
    ... // existing declarations
  ],
  imports: [
    ... // existing imports
    MocklessModule // <- add this.
  ],
  providers: [
    {
      provide: HttpHandler,
      useFactory: MockHttpHandlerFactory,
      deps: [HttpBackend]
    }
  ],
  bootstrap: [AppComponent]
})

Now you can navigate to /mockless in your app to view and manage recorded requests.

How It Works

  1. Recording Phase: Make HTTP requests normally - Mockless records all requests and responses
  2. Replay Phase: Subsequent identical requests return the recorded responses automatically
  3. Management: Use the record viewer inspect, edit, or delete recorded mocks