Comparing version 0.1.4 to 0.1.5
@@ -10,2 +10,3 @@ | ||
var req = kwargs.req; | ||
var next = kwargs.next; | ||
@@ -30,2 +31,5 @@ | ||
} | ||
self.next = function () { | ||
process.nextTick(next || function(){}); | ||
} | ||
self.param = function (name, def) { | ||
@@ -39,3 +43,3 @@ return req.param(name, def || ''); | ||
self.json = function (obj) { | ||
res.writeHead(200, { 'Content-Type': 'application/json' }); | ||
res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' }); | ||
res.end(JSON.stringify(obj)); | ||
@@ -137,2 +141,3 @@ } | ||
res: arguments[1] || null, | ||
next: arguments[2] || null, | ||
defaults: options, | ||
@@ -139,0 +144,0 @@ }; |
{ "name": "ctl" | ||
, "version": "0.1.4" | ||
, "version": "0.1.5" | ||
, "author": "Leander Lee" | ||
@@ -4,0 +4,0 @@ , "description": "Controller module for NodeJS. Made to be extremely hackable and light!" |
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
8495
125
99
5
1