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

servie

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

servie - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

3

dist/index.d.ts

@@ -8,3 +8,3 @@ import { Readable } from 'stream';

*/
export declare type Body = undefined | string | Buffer | Readable | {};
export declare type Body = undefined | string | Buffer | Readable;
/**

@@ -82,3 +82,2 @@ * Raw HTTP header formats allowed.

text(maxBufferSize?: number): Promise<string | undefined>;
json(maxBufferSize?: number): Promise<{}>;
}

@@ -85,0 +84,0 @@ /**

@@ -274,3 +274,4 @@ "use strict";

this.type = 'application/json';
this.length = undefined;
this._body = JSON.stringify(body);
this.length = Buffer.byteLength(this._body);
}

@@ -409,11 +410,2 @@ throw new TypeError("Unknown body: " + body);

};
Common.prototype.json = function (maxBufferSize) {
if (isBasicObject(this._body)) {
var body = this._body;
this._body = undefined;
this._bodyUsed = true;
return Promise.resolve(body);
}
return this.text(maxBufferSize).then(function (x) { return x ? JSON.parse(x) : undefined; });
};
return Common;

@@ -420,0 +412,0 @@ }());

"use strict";
var index_1 = require("./index");
describe('httpco', function () {
describe('servie', function () {
describe('common', function () {

@@ -5,0 +5,0 @@ it('should accept headers', function () {

{
"name": "servie",
"version": "0.0.3",
"version": "0.0.4",
"description": "Standard HTTP interfaces",

@@ -38,3 +38,3 @@ "main": "dist/index.js",

},
"license": "MIT",
"license": "Apache-2.0",
"bugs": {

@@ -41,0 +41,0 @@ "url": "https://github.com/blakeembrey/node-servie/issues"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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