New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

in-process-request

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

in-process-request - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

6

dist/compile/getHeaders.d.ts
/// <reference types="node" />
import { OutgoingHttpHeaders } from 'http';
declare const _default: (res: any) => OutgoingHttpHeaders;
interface ObjectLikeServerResponse {
_headers?: OutgoingHttpHeaders;
getHeaders?: () => OutgoingHttpHeaders;
}
declare const _default: (res: ObjectLikeServerResponse) => OutgoingHttpHeaders;
export default _default;

26

dist/compile/httpMock.js

@@ -56,12 +56,22 @@ "use strict";

const encoding = typeof encodingOrCallback === 'string' ? encodingOrCallback : undefined;
const callback = typeof maybeCallback === 'function' ? maybeCallback : encodingOrCallback;
const callback = typeof maybeCallback === 'function' ?
maybeCallback : (typeof encodingOrCallback === 'function' ? encodingOrCallback : undefined);
addChunk(chunk, encoding);
if (typeof callback === 'function') {
callback();
if (callback) {
callback(null);
}
return true;
};
res.end = (chunk, encodingOrCallback, maybeCallback) => {
const encoding = typeof encodingOrCallback === 'string' ? encodingOrCallback : undefined;
const callback = typeof maybeCallback === 'function' ? maybeCallback : encodingOrCallback;
res.end = (chunkOrCallback, encodingOrCallback, maybeCallback) => {
let encoding = undefined;
let chunk = undefined;
let callback = typeof chunkOrCallback === 'function' ? chunkOrCallback : undefined;
if (!callback) {
chunk = chunkOrCallback;
callback = typeof encodingOrCallback === 'function' ? encodingOrCallback : undefined;
}
if (!callback) {
encoding = encodingOrCallback;
callback = maybeCallback;
}
addChunk(chunk, encoding);

@@ -80,4 +90,4 @@ const body = Buffer.concat(chunks);

res.emit('__mock_response', response);
if (typeof callback === 'function') {
callback();
if (callback) {
callback(null);
}

@@ -84,0 +94,0 @@ };

{
"name": "in-process-request",
"version": "0.0.9",
"version": "0.0.10",
"license": "(MIT OR Apache-2.0)",

@@ -35,3 +35,3 @@ "scripts": {

"@types/node": "^13.13.4",
"jest": "^25.4.0",
"jest": "^25.5.4",
"ts-jest": "^25.4.0",

@@ -38,0 +38,0 @@ "ts-node": "^8.9.1",

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