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.3 to 0.2.4

24

lib/controller.js

@@ -5,3 +5,4 @@ // Generated by CoffeeScript 1.7.1

__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__slice = [].slice;

@@ -18,2 +19,23 @@ Controller = (function(_super) {

Controller.prototype.send = function() {
var args, _ref;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return (_ref = this.response).send.apply(_ref, args);
};
Controller.prototype.json = function() {
var args, _ref;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return (_ref = this.response).json.apply(_ref, args);
};
Controller.prototype.error = function() {
var args, type, _ref;
type = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
this.response.writeHead(type, {
"Content-type": "text/plain"
});
return (_ref = this.response).end.apply(_ref, args);
};
return Controller;

@@ -20,0 +42,0 @@

12

lib/router.js

@@ -66,13 +66,7 @@ // Generated by CoffeeScript 1.7.1

return function(req, res) {
if (req == null) {
req = {};
}
if (res == null) {
res = {};
}
controller.request = req || {};
controller.response = res || {};
controller.body = req.body || {};
controller.params = req.params || {};
return controller[action].call(controller);
controller.body = controller.request.body || {};
controller.params = controller.request.params || {};
return controller[action].call(controller, req, res);
};

@@ -79,0 +73,0 @@ };

{
"name": "diamond.js",
"description": "MVC web framework",
"version": "0.2.3",
"version": "0.2.4",
"author": {

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

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