enhancement: decrease dist size

This commit is contained in:
harttle
2016-10-04 22:31:28 +08:00
parent 1e1b6e8cc3
commit 77930e2d20
30 changed files with 2724 additions and 3934 deletions
+2 -4
View File
@@ -1,12 +1,10 @@
const error = require('./error.js');
const Exp = require('./expression.js');
const assert = require('assert');
const Promise = require('any-promise');
var render = {
renderTemplates: function(templates, scope, opts) {
assert(scope, 'unable to evalTemplates: scope undefined');
if(!scope) throw new Error('unable to evalTemplates: scope undefined');
opts = opts || {};
opts.strict_filters = opts.strict_filters || false;
@@ -90,7 +88,7 @@ var render = {
},
evalOutput: function(template, scope, opts) {
assert(scope, 'unable to evalOutput: scope undefined');
if(!scope) throw new Error('unable to evalOutput: scope undefined');
var val = Exp.evalExp(template.initial, scope);
template.filters.some(filter => {
if (filter.error) {