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

api-routes

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-routes - npm Package Compare versions

Comparing version

to
0.1.0

tests/example_tests.js

4

example/server.js

@@ -23,3 +23,3 @@ // builtin

get: function (req, res) {
res.send({method:'get', endpoint: 'base'});
res.send('base route!');
}

@@ -36,3 +36,3 @@ });

var server = http.createServer(app).listen(8000, function(){
module.exports = http.createServer(app).listen(8000, function(){
console.log("Api server listening on port 8000 at route /api");

@@ -39,0 +39,0 @@ });

@@ -57,3 +57,3 @@ // api.js

if (_.intersection(filtered, ['options', 'all']).length === 0) {
var options = _.extend(_.omit(endpoint, this.methods), {
var options = _.extend(_.omit(endpoint, this.methods, 'middleware'), {
url: endpoint.url,

@@ -82,3 +82,3 @@ name: endpoint.name,

var url = (parent.url || '') + (child.url || '');
return _.extend(_.pick(parent, 'help'), child, {url: url});
return _.extend(_.omit(parent, this.methods), child, {url: url});
};

@@ -85,0 +85,0 @@

{
"name": "api-routes",
"description": "A declarative system for creating express API routes.",
"version": "0.0.1",
"version": "0.1.0",
"author": "Jon Eisen <jon.m.eisen@gmail.com>",

@@ -10,2 +10,3 @@ "scripts": {

"devDependencies": {
"request": "~2.23.0"
},

@@ -12,0 +13,0 @@ "keywords": [