Socket
Book a DemoInstallSign in
Socket

mirage-pretender

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mirage-pretender

Allow mirage to use Pretender as the interceptor

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Mirage Pretender JS

This repo contains all the code allow MirageJS to use Pretender as its interceptor.

Documentation

To tell Mirage which interceptor you wish to use, update the server config

import { createServer } from "miragejs"
import PretenderInterceptor from 'mirage-pretender';

export default function () {
  createServer({
    interceptor: new PretenderInterceptor(),  
    routes() {
      this.get("/api/reminders", () => ({
        reminders: [],
      }))
    },
  })
}

Keywords

pretender

FAQs

Package last updated on 14 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts