Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

res-interceptor

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

res-interceptor - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

2

example/example.js

@@ -7,3 +7,3 @@ var express = require('express');

interceptor (function (req,res,next,data) {
console.log(data); // { headers: { 'x-powered-by': 'Express', id: '1' }, status: 200, body: 'hello world' }
console.log(data); // => { headers: { 'x-powered-by': 'Express', id: '1' }, status: 200, body: 'hello world' }
this.set('id','2'); // overwrite response headers in middleware.

@@ -10,0 +10,0 @@ // or

{
"name": "res-interceptor",
"version": "0.1.0",
"description": "Get response in middleware with Express.",
"version": "1.0.0",
"description": "Get & overwrite response in middleware with Express.",
"main": "./index.js",

@@ -6,0 +6,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc