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

should-http

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

should-http - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

.eslintrc.yml

5

History.md

@@ -0,1 +1,6 @@

0.1.1 / 2017-02-06
==================
* Provide alternative browser entry without nodejs staff
0.1.0 / 2017-02-06

@@ -2,0 +7,0 @@ ==================

28

http.js

@@ -9,34 +9,6 @@ /*

var contentType = require('content-type');
var http = require('http');
module.exports = function(should, Assertion) {
var i = should.format;
var t = should.modules.type;
var format = should.modules.format;
var NODE_HTTP_INCOMMING_MESSAGE = new t.Type(t.OBJECT, 'node-http-incomming-message');
t.checker.addBeforeFirstMatch({}, function(obj) {
if (obj instanceof http.IncomingMessage) {
return NODE_HTTP_INCOMMING_MESSAGE;
}
});
var FIELDS = {
headers: true,
httpVersion: true,
method: true,
statusCode: true,
url: true,
body: true
};
format.Formatter.addType(NODE_HTTP_INCOMMING_MESSAGE, function(value) {
return format.formatPlainObject.call(this, value, {
filterKey: function(key) {
return key in FIELDS;
}
});
});
/**

@@ -43,0 +15,0 @@ * Asserts given object has property headers which contain `field` and optional `val`. Will work well with node Request/Response etc.

2

index.js

@@ -1,1 +0,1 @@

require('should').use(require('./http'));
require('should').use(require('./http')).use(require('./http-node'));
{
"name": "should-http",
"version": "0.1.0",
"version": "0.1.1",
"description": "Http requests, response assertions for should.js",
"main": "index.js",
"browser": "index-browser.js",
"scripts": {

@@ -25,4 +26,6 @@ "test": "mocha --reporter mocha-better-spec-reporter test/**.test.js"

"devDependencies": {
"eslint": "^3.18.0",
"eslint-config-shouldjs": "^1.0.2",
"mocha": "latest",
"mocha-better-spec-reporter": "latest",
"mocha": "latest",
"should": "latest"

@@ -29,0 +32,0 @@ },

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