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

network.http-router

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

network.http-router - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.npmignore

25

index.js

@@ -5,3 +5,3 @@ 'use strict';

module.exports = function makeRouter(route, handler, parent) {
module.exports = exports = function makeRouter(route, handler, parent) {
var router = function routeHandler(oreq, ores, onext) {

@@ -79,6 +79,27 @@ if (!onext) {

return makeRouter(route, fn, this);
return makeRouter(route, fn, router);
};
router.useAll = function(routes) {
return reduce(function(router, route) {
if (typeof route === 'function') {
return router.use(route);
} else {
return router.use(route[0], route[1]);
}
}, router, routes);
};
return router;
};
function reduce(fn, data, array) {
var index = -1;
var length = array.length;
while (index++ < length) {
data = fn(data, array[index]);
}
return data;
}

7

package.json
{
"name": "network.http-router",
"version": "0.0.1",
"version": "0.0.2",
"repository": {

@@ -16,4 +16,7 @@ "type": "git",

"bugs": {
"url": "https://github.com/L8D/network.http-router"
"url": "https://github.com/L8D/network.http-router/issues"
},
"dependencies": {
"data.future": "^2.3.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