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

http-browserify

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-browserify - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

inject.js

4

index.js
var http = module.exports;
var EventEmitter = require('events').EventEmitter;
var Request = require('./lib/request');
var url = require('url')
http.request = function (params, cb) {
if (typeof params === 'string') {
params = url.parse(params)
}
if (!params) params = {};

@@ -7,0 +11,0 @@ if (!params.host && !params.port) {

13

package.json
{
"name": "http-browserify",
"version": "1.0.2",
"version": "1.1.0",
"description": "http module compatability for browserify",

@@ -12,2 +12,5 @@ "main": "index.js",

},
"scripts": {
"test": "tape test/*.js"
},
"dependencies": {

@@ -18,3 +21,4 @@ "Base64": "~0.2.0",

"devDependencies": {
"ecstatic": "~0.1.6"
"ecstatic": "~0.1.6",
"tape": "~2.3.2"
},

@@ -37,6 +41,3 @@ "repository": {

},
"license": "MIT/X11",
"engine": {
"node": ">=0.4"
}
"license": "MIT/X11"
}

@@ -30,3 +30,3 @@ global.window = {

test('Test full url object', function(t) {
var url = {
var url = {
host: "localhost:8081",

@@ -50,2 +50,12 @@ hostname: "localhost",

});
});
test('Test string as parameters', function(t) {
var url = '/api/foo';
var request = http.get(url, noop);
t.equal( request.uri, 'http://localhost:8081/api/foo', 'Url should be correct');
t.end();
})
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