Socket
Socket
Sign inDemoInstall

ng-backend-mocker

Package Overview
Dependencies
1
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ng-backend-mocker

ng-backend-mocker ===============


Version published
Maintainers
1
Created

Readme

Source

ng-backend-mocker

This package helps to mock apis for angular components, per end-point and depending on the request.

To use the package, you will install it using npm, and add the NgBackendMockerModule, to your angular app. Then you will implement IBackendMockDataProvider which basically is just supposed to return an array of ResponseCheckPoint objects. Each ResponseCheckPoint by defines a response for a response.

By default, ResponseCheckPoint objects will respond to requests matching their uri and http method. but this can be customized and you can put your own logic to determine whether to respond or not to a request by assigning a (HttpRequest,ResponseCheckPoint) => boolean method to the requestSelector property of ResponseCheckPoint.

For more details and examples please checkout The github page

FAQs

Last updated on 11 Jan 2023

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc