Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refactoring

  • Loading branch information...
commit cede046ab6b5cae162bc9faacc66dd6970c68f1c 1 parent 673e6f2
@tj authored
View
11 lib/ejs/index.js → lib/ejs.js
@@ -135,11 +135,12 @@ var parse = exports.parse = function(str, options){
*/
var compile = exports.compile = function(str, options){
- if (options.debug) sys.puts(exports.parse(str));
- var fn = new Function('locals, filters, escape', exports.parse(str, options));
- return function(locals){
- return fn.call(this, locals, filters, utils.escape);
- }
+ options = options || {};
+ if (options.debug) sys.puts(exports.parse(str));
+ var fn = new Function('locals, filters, escape', exports.parse(str, options));
+ return function(locals){
+ return fn.call(this, locals, filters, utils.escape);
+ }
};
/**
View
0  lib/ejs/filters.js → lib/filters.js
File renamed without changes
View
0  lib/ejs/utils.js → lib/utils.js
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.