Socket
Socket
Sign inDemoInstall

browserify

Package Overview
Dependencies
Maintainers
0
Versions
485
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify - npm Package Compare versions

Comparing version 0.2.9 to 0.2.10

examples/test/index.html

2

index.js

@@ -14,3 +14,3 @@ var fs = require('fs');

return function (req, res, next) {
if (req.url.split('?')[0] === opts.mount || '/browserify.js') {
if (req.url.split('?')[0] === (opts.mount || '/browserify.js')) {
res.writeHead(200, {

@@ -17,0 +17,0 @@ 'Last-Modified' : modified.toString(),

{
"name" : "browserify",
"version" : "0.2.9",
"version" : "0.2.10",
"description" : "Browser-side require() for js directories and npm modules",

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

"license" : "MIT/X11",
"engine" : ["node >=0.4.0"]
"engine" : { "node" : ">=0.4.0" }
}

@@ -9,2 +9,4 @@ Browserify

![browserify!](http://substack.net/images/browserify/browserify.png)
More features:

@@ -217,1 +219,6 @@

deployment!
read more
=========
[browserify: browser-side require() for your node.js](http://substack.net/posts/24ab8c)

@@ -5,2 +5,3 @@ var assert = require('assert');

var Script = process.binding('evals').Script;
var fs = require('fs');

@@ -25,6 +26,9 @@ var foo = require('./simple/foo');

}));
server.listen(port, makeRequest);
server.use(connect.static(__dirname + '/simple'));
server.listen(port, function () {
checkStatic(makeRequest);
});
var to = setTimeout(function () {
assert.fail('server never started');
assert.fail('request test never started');
}, 5000);

@@ -36,2 +40,28 @@

var ts = setTimeout(function () {
assert.fail('static test never started');
}, 5000);
function checkStatic (cb) {
clearTimeout(ts);
var req = { host : 'localhost', port : port, path : '/' };
http.get(req, function (res) {
assert.eql(res.statusCode, 200);
var src = '';
res.on('data', function (buf) {
src += buf.toString();
});
res.on('end', function () {
assert.eql(
src,
fs.readFileSync(__dirname + '/simple/index.html', 'utf8')
);
cb();
});
});
}
function makeRequest () {

@@ -38,0 +68,0 @@ clearTimeout(to);

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