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

diamond.js

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diamond.js - npm Package Compare versions

Comparing version 0.2.28 to 0.2.29

30

lib/router.js

@@ -16,10 +16,12 @@ // Generated by CoffeeScript 1.8.0

Router.prototype.resource = function(name, callback) {
this.get("/" + name, "" + name + "#index");
this.get("/" + name + "/:" + name, "" + name + "#show");
this.post("/" + name, "" + name + "#create");
this.put("/" + name + "/:" + name, "" + name + "#update");
this["delete"]("/" + name + "/:" + name, "" + name + "#destroy");
if (callback != null) {
return this.route("/" + name, callback);
}
return this.route("/" + name, function() {
if (callback != null) {
callback.call(this);
}
this.get("/", "" + name + "#index");
this.get("/:" + name, "" + name + "#show");
this.post("/", "" + name + "#create");
this.put("/:" + name, "" + name + "#update");
return this["delete"]("/:" + name, "" + name + "#destroy");
});
};

@@ -39,15 +41,19 @@

Router.prototype.get = function(route, action) {
return this.server.get("" + this.prefix + route, Router.route(this.action(action)));
this.server.get("" + this.prefix + route, Router.route(this.action(action)));
return console.log("GET " + this.prefix + route, action);
};
Router.prototype.post = function(route, action) {
return this.server.post("" + this.prefix + route, Router.route(this.action(action)));
this.server.post("" + this.prefix + route, Router.route(this.action(action)));
return console.log("POST " + this.prefix + route, action);
};
Router.prototype.put = function(route, action) {
return this.server.put("" + this.prefix + route, Router.route(this.action(action)));
this.server.put("" + this.prefix + route, Router.route(this.action(action)));
return console.log("PUT " + this.prefix + route, action);
};
Router.prototype["delete"] = function(route, action) {
return this.server["delete"]("" + this.prefix + route, Router.route(this.action(action)));
this.server["delete"]("" + this.prefix + route, Router.route(this.action(action)));
return console.log("DELETE " + this.prefix + route, action);
};

@@ -54,0 +60,0 @@

2

package.json
{
"name": "diamond.js",
"description": "Generic MVC web framework",
"version": "0.2.28",
"version": "0.2.29",
"author": {

@@ -6,0 +6,0 @@ "name": "Arthur Xavier",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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