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

icecream

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icecream - npm Package Compare versions

Comparing version 0.8.6 to 0.8.7

42

icecream/controller.js

@@ -7,6 +7,6 @@ /**

* http://github.com/zhiyu/icecream
*
*
*/
var utils = require('./utils');

@@ -25,3 +25,3 @@ var fs = require('fs');

prototype.render = function(){
prototype.render = function(){

@@ -31,4 +31,8 @@ var self = this;

var debug = this.context.get("debug");
var file, options;
var file;
var options = {
title:''
}
if(arguments.length > 1 || (arguments.length == 1 && typeof arguments[0] == 'string')){

@@ -41,7 +45,5 @@ file = arguments[0];

if(arguments.length > 1){
options = arguments[1];
}else if(arguments.length == 0 || (arguments.length == 1 && typeof arguments[0] == 'string')){
options = {};
}else{
options = arguments[0];
utils.merge(arguments[1], options);
}else if(arguments.length == 1 && typeof arguments[0] != 'string'){
utils.merge(arguments[0], options);
}

@@ -64,14 +66,14 @@

self.send(content);
if(self.context.get("static")){
var stc = self.context.getObject("statics", self.req.url);
var stc = self.context.getObject("statics", self.req.url);
var file = self.context.get('staticDir')+stc;
if(stc){
fs.writeFile(file, content, function (err) {
console.log(err);
console.log(err);
});
}
}
}

@@ -81,3 +83,3 @@

var engine = this.context.engines[ext];
file += '.' + ext;

@@ -88,3 +90,3 @@ if(file.indexOf('/')==0)

file = this.context.get('appDir')+'/views'+this.viewDir+'/'+file;
//render body

@@ -99,3 +101,3 @@ engine(file, options, callbackForPage);

prototype.error = function(errorCode){
prototype.error = function(errorCode){
var self = this;

@@ -167,3 +169,3 @@ var body;

}
data['flash_time'] = time;

@@ -207,3 +209,3 @@

}
if(val!==undefined){

@@ -227,2 +229,2 @@ this.req.session[key] = val;

this.afterFilter = func;
}
}

@@ -53,3 +53,3 @@ {

},
"version": "0.8.6"
"version": "0.8.7"
}
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