New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

liquid-node

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liquid-node - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

examples/custom_file_system.coffee

41

CHANGELOG.md
# LiquidNode Change History
## 2.6.0
- Migrated to `native-or-bluebird` so that native Promises are used (thanks @dotnil).
## 2.5.0
- Added `include` with a file-system layer (very big thanks to @imjoshholloway).
## 2.4.0
- For-Loops now can iterate over objects (like Ruby's Hashes).
## 2.3.0
- Added `default` filter (thanks to @sebastianseilund).
## 2.2.0
- Make `assign` support filters.
## 2.1.4
- Performance optimizations.
- Make `bluebird` a `peerDependency`.
## 2.1.3
- Fixed undefined properties causing exceptions (thanks to @vmira).
## 2.1.2
- Fixed `undefined variable Liquid` in join-helper.
## 2.1.1
- Removed a stray `console.log` in the library.
## 2.1.0
- Added support for `case` tag.
## 2.0.0

@@ -4,0 +45,0 @@

4

lib/index.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {

@@ -91,2 +91,2 @@ var Liquid, customError, util;

//# sourceMappingURL=index.map
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {

@@ -32,9 +32,9 @@ var Liquid;

Liquid.QuotedFragment = RegExp("" + Liquid.QuotedString.source + "|(?:[^\\s,\\|'\"]|" + Liquid.QuotedString.source + ")+");
Liquid.QuotedFragment = RegExp(Liquid.QuotedString.source + "|(?:[^\\s,\\|'\"]|" + Liquid.QuotedString.source + ")+");
Liquid.StrictQuotedFragment = /"[^"]+"|'[^']+'|[^\s|:,]+/;
Liquid.FirstFilterArgument = RegExp("" + Liquid.FilterArgumentSeparator.source + "(?:" + Liquid.StrictQuotedFragment.source + ")");
Liquid.FirstFilterArgument = RegExp(Liquid.FilterArgumentSeparator.source + "(?:" + Liquid.StrictQuotedFragment.source + ")");
Liquid.OtherFilterArgument = RegExp("" + Liquid.ArgumentSeparator.source + "(?:" + Liquid.StrictQuotedFragment.source + ")");
Liquid.OtherFilterArgument = RegExp(Liquid.ArgumentSeparator.source + "(?:" + Liquid.StrictQuotedFragment.source + ")");

@@ -49,3 +49,3 @@ Liquid.SpacelessFilter = RegExp("^(?:'[^']+'|\"[^\"]+\"|[^'\"])*" + Liquid.FilterSeparator.source + "(?:" + Liquid.StrictQuotedFragment.source + ")(?:" + Liquid.FirstFilterArgument.source + "(?:" + Liquid.OtherFilterArgument.source + ")*)?");

Liquid.PartialTemplateParser = RegExp("" + Liquid.TagStart.source + ".*?" + Liquid.TagEnd.source + "|" + Liquid.VariableStart.source + ".*?" + Liquid.VariableIncompleteEnd.source);
Liquid.PartialTemplateParser = RegExp(Liquid.TagStart.source + ".*?" + Liquid.TagEnd.source + "|" + Liquid.VariableStart.source + ".*?" + Liquid.VariableIncompleteEnd.source);

@@ -62,2 +62,2 @@ Liquid.TemplateParser = RegExp("(" + Liquid.PartialTemplateParser.source + "|" + Liquid.AnyStartingTag.source + ")");

//# sourceMappingURL=liquid.map
//# sourceMappingURL=liquid.js.map

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {

@@ -7,3 +7,3 @@ var Liquid, Promise;

Promise = require("bluebird");
Promise = require("native-or-bluebird");

@@ -14,5 +14,3 @@ module.exports = Liquid.BlankFileSystem = (function() {

BlankFileSystem.prototype.readTemplateFile = function(templatePath) {
return new Promise(function(resolve, reject) {
return reject(new Liquid.FileSystemError("This file system doesn't allow includes"));
});
return Promise.reject(new Liquid.FileSystemError("This file system doesn't allow includes"));
};

@@ -26,2 +24,2 @@

//# sourceMappingURL=blank_file_system.map
//# sourceMappingURL=blank_file_system.js.map

@@ -1,6 +0,6 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Block, Liquid, Promise, util,
__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; };
var Block, Liquid, Promise, Promise_each, util,
extend = 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; },
hasProp = {}.hasOwnProperty;

@@ -11,7 +11,24 @@ Liquid = require("../liquid");

Promise = require("bluebird");
Promise = require("native-or-bluebird");
module.exports = Block = (function(_super) {
__extends(Block, _super);
Promise_each = function(promises, cb) {
var iterator;
iterator = function(index) {
var promise;
if (index >= promises.length) {
return Promise.resolve();
}
promise = promises[index];
return Promise.resolve(promise).then(function(value) {
return Promise.resolve(cb(value)).then(function() {
return iterator(index + 1);
});
});
};
return iterator(0);
};
module.exports = Block = (function(superClass) {
extend(Block, superClass);
function Block() {

@@ -43,6 +60,6 @@ return Block.__super__.constructor.apply(this, arguments);

if (tokens.length === 0 || this.ended) {
return Promise.cast();
return Promise.resolve();
}
token = tokens.shift();
return Promise["try"]((function(_this) {
return Promise.resolve().then((function(_this) {
return function() {

@@ -52,3 +69,3 @@ return _this.parseToken(token, tokens);

})(this))["catch"](function(e) {
e.message = "" + e.message + "\n at " + token.value + " (" + token.filename + ":" + token.line + ":" + token.col + ")";
e.message = e.message + "\n at " + token.value + " (" + token.filename + ":" + token.line + ":" + token.col + ")";
if (e.location == null) {

@@ -101,3 +118,3 @@ e.location = {

if (tag === 'else') {
throw new Liquid.SyntaxError("" + (this.blockName()) + " tag does not expect else tag");
throw new Liquid.SyntaxError((this.blockName()) + " tag does not expect else tag");
} else if (tag === 'end') {

@@ -119,4 +136,4 @@ throw new Liquid.SyntaxError("'end' is not a valid delimiter for " + (this.blockName()) + " tags. use " + (this.blockDelimiter()));

Block.prototype.createVariable = function(token) {
var match, _ref;
match = (_ref = Liquid.Block.ContentOfVariable.exec(token.value)) != null ? _ref[1] : void 0;
var match, ref;
match = (ref = Liquid.Block.ContentOfVariable.exec(token.value)) != null ? ref[1] : void 0;
if (match) {

@@ -134,3 +151,3 @@ return new Liquid.Variable(match);

if (!this.ended) {
throw new Liquid.SyntaxError("" + (this.blockName()) + " tag was never closed");
throw new Liquid.SyntaxError((this.blockName()) + " tag was never closed");
}

@@ -142,3 +159,3 @@ };

accumulator = [];
return Promise.each(list, function(token) {
return Promise_each(list, function(token) {
if (typeof (token != null ? token.render : void 0) !== "function") {

@@ -148,3 +165,3 @@ accumulator.push(token);

}
return Promise["try"](function() {
return Promise.resolve().then(function() {
return token.render(context);

@@ -167,2 +184,2 @@ }).then(function(s) {

//# sourceMappingURL=block.map
//# sourceMappingURL=block.js.map

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {

@@ -7,3 +7,3 @@ var Condition, Liquid, Promise;

Promise = require("bluebird");
Promise = require("native-or-bluebird");

@@ -46,6 +46,6 @@ module.exports = Condition = (function() {

function Condition(left, operator, right) {
this.left = left;
function Condition(left1, operator, right1) {
this.left = left1;
this.operator = operator;
this.right = right;
this.right = right1;
this.childRelation = null;

@@ -63,3 +63,3 @@ this.childCondition = null;

case "or":
return Promise.cast(result).then((function(_this) {
return Promise.resolve(result).then((function(_this) {
return function(result) {

@@ -70,3 +70,3 @@ return result || _this.childCondition.evaluate(context);

case "and":
return Promise.cast(result).then((function(_this) {
return Promise.resolve(result).then((function(_this) {
return function(result) {

@@ -116,3 +116,3 @@ return result && _this.childCondition.evaluate(context);

if (v in LITERALS) {
return Promise.cast(LITERALS[v]);
return Promise.resolve(LITERALS[v]);
} else {

@@ -134,4 +134,6 @@ return context.get(v);

right = this.resolveVariable(right, context);
return Promise.join(left, right).spread((function(_this) {
return function(left, right) {
return Promise.all([left, right]).then((function(_this) {
return function(arg) {
var left, right;
left = arg[0], right = arg[1];
return operation(_this, left, right);

@@ -148,2 +150,2 @@ };

//# sourceMappingURL=condition.map
//# sourceMappingURL=condition.js.map

@@ -1,14 +0,14 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Context, Liquid, Promise,
__slice = [].slice,
__hasProp = {}.hasOwnProperty;
slice = [].slice,
hasProp = {}.hasOwnProperty;
Liquid = require("../liquid");
Promise = require("bluebird");
Promise = require("native-or-bluebird");
module.exports = Context = (function() {
function Context(engine, environments, outerScope, registers, rethrowErrors) {
var _ref;
var ref;
if (environments == null) {

@@ -31,3 +31,3 @@ environments = {};

this.rethrowErrors = rethrowErrors;
this.strainer = (_ref = engine != null ? new engine.Strainer(this) : void 0) != null ? _ref : {};
this.strainer = (ref = engine != null ? new engine.Strainer(this) : void 0) != null ? ref : {};
this.squashInstanceAssignsWithEnvironments();

@@ -37,8 +37,8 @@ }

Context.prototype.registerFilters = function() {
var filter, filters, k, v, _i, _len;
filters = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
for (_i = 0, _len = filters.length; _i < _len; _i++) {
filter = filters[_i];
var filter, filters, i, k, len, v;
filters = 1 <= arguments.length ? slice.call(arguments, 0) : [];
for (i = 0, len = filters.length; i < len; i++) {
filter = filters[i];
for (k in filter) {
if (!__hasProp.call(filter, k)) continue;
if (!hasProp.call(filter, k)) continue;
v = filter[k];

@@ -66,3 +66,3 @@ if (v instanceof Function) {

var args, available, method, methodName;
methodName = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
methodName = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
method = this.strainer[methodName];

@@ -88,13 +88,13 @@ if (method instanceof Function) {

Context.prototype.merge = function(newScope) {
var k, v, _results;
var k, results, v;
if (newScope == null) {
newScope = {};
}
_results = [];
results = [];
for (k in newScope) {
if (!__hasProp.call(newScope, k)) continue;
if (!hasProp.call(newScope, k)) continue;
v = newScope[k];
_results.push(this.scopes[0][k] = v);
results.push(this.scopes[0][k] = v);
}
return _results;
return results;
};

@@ -155,3 +155,3 @@

Context.prototype.hasKey = function(key) {
return Promise.cast(this.resolve(key)).then(function(v) {
return Promise.resolve(this.resolve(key)).then(function(v) {
return v != null;

@@ -182,3 +182,5 @@ });

hi = this.resolve(match[2]);
return Promise.join(lo, hi).spread(function(lo, hi) {
return Promise.all([lo, hi]).then(function(arg) {
var hi, lo;
lo = arg[0], hi = arg[1];
lo = Number(lo);

@@ -230,3 +232,3 @@ hi = Number(hi);

}
return Promise.cast(variable).then((function(_this) {
return Promise.resolve(variable).then((function(_this) {
return function(v) {

@@ -239,3 +241,3 @@ return _this.liquify(v);

Context.prototype.variable = function(markup) {
return Promise["try"]((function(_this) {
return Promise.resolve().then((function(_this) {
return function() {

@@ -255,5 +257,5 @@ var firstPart, iterator, mapper, match, object, parts, squareBracketed;

if (object == null) {
return Promise.cast(object);
return Promise.resolve(object);
}
return Promise.cast(object).then(_this.liquify.bind(_this)).then(function(object) {
return Promise.resolve(object).then(_this.liquify.bind(_this)).then(function(object) {
var bracketMatch;

@@ -267,3 +269,3 @@ if (object == null) {

}
return Promise.cast(part).then(function(part) {
return Promise.resolve(part).then(function(part) {
var isArrayAccess, isObjectAccess, isSpecialAccess;

@@ -274,3 +276,3 @@ isArrayAccess = Array.isArray(object) && isFinite(part);

if (isArrayAccess || isObjectAccess) {
return Promise.cast(_this.lookupAndEvaluate(object, part)).then(_this.liquify.bind(_this));
return Promise.resolve(_this.lookupAndEvaluate(object, part)).then(_this.liquify.bind(_this));
} else if (isSpecialAccess) {

@@ -299,3 +301,3 @@ switch (part) {

} else {
return Promise.cast(object);
return Promise.resolve(object);
}

@@ -334,3 +336,3 @@ };

Context.prototype.liquify = function(object) {
return Promise.cast(object).then((function(_this) {
return Promise.resolve(object).then((function(_this) {
return function(object) {

@@ -362,2 +364,2 @@ if (object == null) {

//# sourceMappingURL=context.map
//# sourceMappingURL=context.js.map

@@ -1,11 +0,11 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Liquid,
__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; };
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../liquid");
module.exports = Liquid.Document = (function(_super) {
__extends(Document, _super);
module.exports = Liquid.Document = (function(superClass) {
extend(Document, superClass);

@@ -28,2 +28,2 @@ function Document(template) {

//# sourceMappingURL=document.map
//# sourceMappingURL=document.js.map

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {

@@ -67,2 +67,2 @@ var Drop;

//# sourceMappingURL=drop.map
//# sourceMappingURL=drop.js.map

@@ -1,11 +0,11 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var ElseCondition, Liquid,
__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; };
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../liquid");
module.exports = ElseCondition = (function(_super) {
__extends(ElseCondition, _super);
module.exports = ElseCondition = (function(superClass) {
extend(ElseCondition, superClass);

@@ -26,2 +26,2 @@ function ElseCondition() {

//# sourceMappingURL=else_condition.map
//# sourceMappingURL=else_condition.js.map

@@ -1,11 +0,9 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Liquid, Promise,
__hasProp = {}.hasOwnProperty,
__slice = [].slice;
var Liquid,
hasProp = {}.hasOwnProperty,
slice = [].slice;
Liquid = require("../liquid");
Promise = require("bluebird");
module.exports = Liquid.Engine = (function() {

@@ -21,3 +19,3 @@ function Engine() {

isSubclassOf = function(klass, ofKlass) {
var _ref;
var ref;
if (typeof klass !== 'function') {

@@ -28,7 +26,7 @@ return false;

} else {
return isSubclassOf((_ref = klass.__super__) != null ? _ref.constructor : void 0, ofKlass);
return isSubclassOf((ref = klass.__super__) != null ? ref.constructor : void 0, ofKlass);
}
};
for (tagName in Liquid) {
if (!__hasProp.call(Liquid, tagName)) continue;
if (!hasProp.call(Liquid, tagName)) continue;
tag = Liquid[tagName];

@@ -51,17 +49,17 @@ if (!isSubclassOf(tag, Liquid.Tag)) {

var filters;
filters = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
filters = 1 <= arguments.length ? slice.call(arguments, 0) : [];
return filters.forEach((function(_this) {
return function(filter) {
var k, v, _results;
_results = [];
var k, results, v;
results = [];
for (k in filter) {
if (!__hasProp.call(filter, k)) continue;
if (!hasProp.call(filter, k)) continue;
v = filter[k];
if (v instanceof Function) {
_results.push(_this.Strainer.prototype[k] = v);
results.push(_this.Strainer.prototype[k] = v);
} else {
_results.push(void 0);
results.push(void 0);
}
}
return _results;
return results;
};

@@ -79,3 +77,3 @@ })(this));

var args, source;
source = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
source = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
return this.parse(source).then(function(template) {

@@ -99,2 +97,2 @@ return template.render.apply(template, args);

//# sourceMappingURL=engine.map
//# sourceMappingURL=engine.js.map

@@ -1,6 +0,6 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
module.exports = {
flatten: function(array) {
var output, _flatten;
var _flatten, output;
output = [];

@@ -23,3 +23,3 @@ _flatten = function(array) {

scan: function(string, regexp, globalMatch) {
var result, _scan;
var _scan, result;
if (globalMatch == null) {

@@ -54,2 +54,2 @@ globalMatch = false;

//# sourceMappingURL=helpers.map
//# sourceMappingURL=helpers.js.map

@@ -1,10 +0,10 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Iterable, IterableForArray, Promise, Range, isString,
__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; };
extend = 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; },
hasProp = {}.hasOwnProperty;
Range = require("./range");
Promise = require("bluebird");
Promise = require("native-or-bluebird");

@@ -25,4 +25,7 @@ isString = function(input) {

Iterable.prototype.map = function() {
var _ref;
return (_ref = this.toArray()).map.apply(_ref, arguments);
var args;
args = arguments;
return this.toArray().then(function(a) {
return Promise.all(a.map.apply(a, args));
});
};

@@ -43,7 +46,7 @@

Iterable.prototype.slice = function() {
throw new Error("" + this.constructor.name + ".slice() not implemented");
throw new Error(this.constructor.name + ".slice() not implemented");
};
Iterable.prototype.last = function() {
throw new Error("" + this.constructor.name + ".last() not implemented");
throw new Error(this.constructor.name + ".last() not implemented");
};

@@ -69,4 +72,4 @@

IterableForArray = (function(_super) {
__extends(IterableForArray, _super);
IterableForArray = (function(superClass) {
extend(IterableForArray, superClass);

@@ -78,8 +81,8 @@ function IterableForArray(array) {

IterableForArray.prototype.slice = function() {
var _ref;
return Promise.cast((_ref = this.array).slice.apply(_ref, arguments));
var ref;
return Promise.resolve((ref = this.array).slice.apply(ref, arguments));
};
IterableForArray.prototype.last = function() {
return Promise.cast(this.array[this.array.length - 1]);
return Promise.resolve(this.array[this.array.length - 1]);
};

@@ -93,2 +96,2 @@

//# sourceMappingURL=iterable.map
//# sourceMappingURL=iterable.js.map

@@ -1,19 +0,31 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Fs, Liquid, Path, Promise,
__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; };
var Fs, Liquid, Path, Promise, readFile,
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../liquid");
Promise = require("bluebird");
Promise = require("native-or-bluebird");
Fs = Promise.promisifyAll(require("fs"));
Fs = require("fs");
Path = require("path");
module.exports = Liquid.LocalFileSystem = (function(_super) {
readFile = function(fpath, encoding) {
return new Promise(function(resolve, reject) {
return Fs.readFile(fpath, encoding, function(err, content) {
if (err) {
return reject(err);
} else {
return resolve(content);
}
});
});
};
module.exports = Liquid.LocalFileSystem = (function(superClass) {
var PathPattern;
__extends(LocalFileSystem, _super);
extend(LocalFileSystem, superClass);

@@ -32,3 +44,3 @@ PathPattern = /^[^.\/][a-zA-Z0-9-_\/]+$/;

return this.fullPath(templatePath).then(function(fullPath) {
return Fs.readFileAsync(fullPath, 'utf8')["catch"](function(err) {
return readFile(fullPath, 'utf8')["catch"](function(err) {
throw new Liquid.FileSystemError("Error loading template: " + err.message);

@@ -40,10 +52,7 @@ });

LocalFileSystem.prototype.fullPath = function(templatePath) {
return new Promise((function(_this) {
return function(resolve, reject) {
if (!PathPattern.test(templatePath)) {
reject(new Liquid.ArgumentError("Illegal template name '" + templatePath + "'"));
}
return resolve(Path.resolve(Path.join(_this.root, Path.dirname(templatePath), Path.basename(templatePath + ("." + _this.fileExtension)))));
};
})(this));
if (PathPattern.test(templatePath)) {
return Promise.resolve(Path.resolve(Path.join(this.root, templatePath + ("." + this.fileExtension))));
} else {
return Promise.reject(new Liquid.ArgumentError("Illegal template name '" + templatePath + "'"));
}
};

@@ -57,2 +66,2 @@

//# sourceMappingURL=local_file_system.map
//# sourceMappingURL=local_file_system.js.map

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {

@@ -6,6 +6,6 @@ var Range;

module.exports = Range = (function() {
function Range(start, end, step) {
function Range(start, end1, step1) {
this.start = start;
this.end = end;
this.step = step != null ? step : 0;
this.end = end1;
this.step = step1 != null ? step1 : 0;
if (this.step === 0) {

@@ -72,2 +72,2 @@ if (this.end < this.start) {

//# sourceMappingURL=range.map
//# sourceMappingURL=range.js.map

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {

@@ -7,3 +7,3 @@ var HTML_ESCAPE, HTML_ESCAPE_ONCE_REGEXP, HTML_ESCAPE_REGEXP, Iterable, Promise, flatten, has, hasOwnProperty, isArguments, isArray, isBlank, isEmpty, isNumber, isString, strftime, toDate, toIterable, toNumber, toObjectString, toString;

Promise = require("bluebird");
Promise = require("native-or-bluebird");

@@ -120,4 +120,4 @@ Iterable = require("./iterable");

size: function(input) {
var _ref;
return (_ref = input != null ? input.length : void 0) != null ? _ref : 0;
var ref;
return (ref = input != null ? input.length : void 0) != null ? ref : 0;
},

@@ -149,3 +149,3 @@ downcase: function(input) {

return toIterable(input).map(function(item) {
return Promise.cast(item != null ? item[property] : void 0).then(function(key) {
return Promise.resolve(item != null ? item[property] : void 0).then(function(key) {
return {

@@ -158,5 +158,5 @@ key: key,

return array.sort(function(a, b) {
var _ref, _ref1;
return (_ref = a.key > b.key) != null ? _ref : {
1: (_ref1 = a.key === b.key) != null ? _ref1 : {
var ref, ref1;
return (ref = a.key > b.key) != null ? ref : {
1: (ref1 = a.key === b.key) != null ? ref1 : {
0: -1

@@ -290,2 +290,5 @@ }

},
round: function(input, operand) {
return toNumber(input).toFixed(operand);
},
modulo: function(input, operand) {

@@ -305,7 +308,7 @@ return toNumber(input) % toNumber(operand);

"default": function(input, defaultValue) {
var blank, _ref;
var blank, ref;
if (arguments.length < 2) {
defaultValue = '';
}
blank = (_ref = input != null ? typeof input.isBlank === "function" ? input.isBlank() : void 0 : void 0) != null ? _ref : isBlank(input);
blank = (ref = input != null ? typeof input.isBlank === "function" ? input.isBlank() : void 0 : void 0) != null ? ref : isBlank(input);
if (blank) {

@@ -321,2 +324,2 @@ return defaultValue;

//# sourceMappingURL=standard_filters.map
//# sourceMappingURL=standard_filters.js.map

@@ -1,7 +0,7 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Promise, Tag,
__slice = [].slice;
slice = [].slice;
Promise = require("bluebird");
Promise = require("native-or-bluebird");

@@ -17,3 +17,3 @@ module.exports = Tag = (function() {

var args, parse;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
if (this.afterParse) {

@@ -35,3 +35,3 @@ parse = (function(_this) {

if (this.beforeParse) {
return Promise.cast(this.beforeParse.apply(this, args)).then(parse);
return Promise.resolve(this.beforeParse.apply(this, args)).then(parse);
} else {

@@ -58,2 +58,2 @@ return parse();

//# sourceMappingURL=tag.map
//# sourceMappingURL=tag.js.map

@@ -1,15 +0,13 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Assign, Liquid, Promise,
__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; };
var Assign, Liquid,
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../../liquid");
Promise = require("bluebird");
module.exports = Assign = (function(_super) {
module.exports = Assign = (function(superClass) {
var Syntax, SyntaxHelp;
__extends(Assign, _super);
extend(Assign, superClass);

@@ -42,2 +40,2 @@ SyntaxHelp = "Syntax Error in 'assign' - Valid syntax: assign [var] = [source]";

//# sourceMappingURL=assign.map
//# sourceMappingURL=assign.js.map

@@ -1,13 +0,13 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Capture, Liquid,
__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; };
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../../liquid");
module.exports = Capture = (function(_super) {
module.exports = Capture = (function(superClass) {
var Syntax, SyntaxHelp;
__extends(Capture, _super);
extend(Capture, superClass);

@@ -46,2 +46,2 @@ Syntax = /(\w+)/;

//# sourceMappingURL=capture.map
//# sourceMappingURL=capture.js.map

@@ -1,15 +0,17 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Case, Liquid, Promise,
__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; };
var Case, Liquid, Promise, PromiseReduce,
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../../liquid");
Promise = require("bluebird");
Promise = require("native-or-bluebird");
module.exports = Case = (function(_super) {
PromiseReduce = require("../../promise_reduce");
module.exports = Case = (function(superClass) {
var Syntax, SyntaxHelp, WhenSyntax;
__extends(Case, _super);
extend(Case, superClass);

@@ -44,7 +46,7 @@ SyntaxHelp = "Syntax Error in tag 'case' - Valid syntax: case [expression]";

return function() {
return Promise.reduce(_this.blocks, function(chosenBlock, block) {
return PromiseReduce(_this.blocks, function(chosenBlock, block) {
if (chosenBlock != null) {
return chosenBlock;
}
return Promise["try"](function() {
return Promise.resolve().then(function() {
return block.evaluate(context);

@@ -68,3 +70,3 @@ }).then(function(ok) {

Case.prototype.pushBlock = function(tag, markup) {
var block, expressions, nodelist, value, _i, _len, _ref, _results;
var block, expressions, i, len, nodelist, ref, results, value;
if (tag === "else") {

@@ -77,15 +79,15 @@ block = new Liquid.ElseCondition();

nodelist = [];
_ref = expressions[0];
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
value = _ref[_i];
ref = expressions[0];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
value = ref[i];
if (value) {
block = new Liquid.Condition(this.markup, '==', value);
this.blocks.push(block);
_results.push(this.nodelist = block.attach(nodelist));
results.push(this.nodelist = block.attach(nodelist));
} else {
_results.push(void 0);
results.push(void 0);
}
}
return _results;
return results;
}

@@ -100,2 +102,2 @@ };

//# sourceMappingURL=case.map
//# sourceMappingURL=case.js.map

@@ -1,11 +0,11 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Comment, Raw,
__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; };
extend = 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; },
hasProp = {}.hasOwnProperty;
Raw = require("./raw");
module.exports = Comment = (function(_super) {
__extends(Comment, _super);
module.exports = Comment = (function(superClass) {
extend(Comment, superClass);

@@ -26,2 +26,2 @@ function Comment() {

//# sourceMappingURL=comment.map
//# sourceMappingURL=comment.js.map

@@ -1,11 +0,11 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Decrement, Liquid,
__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; };
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../../liquid");
module.exports = Decrement = (function(_super) {
__extends(Decrement, _super);
module.exports = Decrement = (function(superClass) {
extend(Decrement, superClass);

@@ -18,4 +18,4 @@ function Decrement(template, tagName, markup) {

Decrement.prototype.render = function(context) {
var value, _base, _name;
value = (_base = context.environments[0])[_name = this.variable] || (_base[_name] = 0);
var base, name, value;
value = (base = context.environments[0])[name = this.variable] || (base[name] = 0);
value = value - 1;

@@ -32,2 +32,2 @@ context.environments[0][this.variable] = value;

//# sourceMappingURL=decrement.map
//# sourceMappingURL=decrement.js.map

@@ -1,17 +0,19 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var For, Iterable, Liquid, Promise,
__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; };
var For, Iterable, Liquid, Promise, PromiseReduce,
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../../liquid");
Promise = require("bluebird");
Promise = require("native-or-bluebird");
PromiseReduce = require("../../promise_reduce");
Iterable = require("../iterable");
module.exports = For = (function(_super) {
module.exports = For = (function(superClass) {
var Syntax, SyntaxHelp;
__extends(For, _super);
extend(For, superClass);

@@ -28,3 +30,3 @@ SyntaxHelp = "Syntax Error in 'for loop' - Valid syntax: for [item] in [collection]";

this.collectionName = match[2];
this.registerName = "" + match[1] + "=" + match[2];
this.registerName = match[1] + "=" + match[2];
this.reversed = match[3];

@@ -52,5 +54,5 @@ this.attributes = {};

For.prototype.render = function(context) {
var _base;
(_base = context.registers)["for"] || (_base["for"] = {});
return Promise.cast(context.get(this.collectionName)).then((function(_this) {
var base;
(base = context.registers)["for"] || (base["for"] = {});
return Promise.resolve(context.get(this.collectionName)).then((function(_this) {
return function(collection) {

@@ -62,10 +64,10 @@ var from, k, limit, to, v;

collection = (function() {
var _results;
_results = [];
var results;
results = [];
for (k in collection) {
if (!__hasProp.call(collection, k)) continue;
if (!hasProp.call(collection, k)) continue;
v = collection[k];
_results.push([k, v]);
results.push([k, v]);
}
return _results;
return results;
})();

@@ -89,3 +91,3 @@ } else {

return context.stack(function() {
return Promise.reduce(segment, function(output, item, index) {
return PromiseReduce(segment, function(output, item, index) {
context.set(_this.variableName, item);

@@ -102,3 +104,3 @@ context.set("forloop", {

});
return Promise["try"](function() {
return Promise.resolve().then(function() {
return _this.renderAll(_this.forBlock, context);

@@ -120,3 +122,3 @@ }).then(function(rendered) {

For.prototype.sliceCollection = function(collection, from, to) {
var args, _ref;
var args, ref;
args = [from];

@@ -126,3 +128,3 @@ if (to != null) {

}
return (_ref = Iterable.cast(collection)).slice.apply(_ref, args);
return (ref = Iterable.cast(collection)).slice.apply(ref, args);
};

@@ -144,2 +146,2 @@

//# sourceMappingURL=for.map
//# sourceMappingURL=for.js.map

@@ -1,15 +0,17 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var If, Liquid, Promise,
__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; };
var If, Liquid, Promise, PromiseReduce,
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../../liquid");
Promise = require("bluebird");
Promise = require("native-or-bluebird");
module.exports = If = (function(_super) {
PromiseReduce = require("../../promise_reduce");
module.exports = If = (function(superClass) {
var ExpressionsAndOperators, Syntax, SyntaxHelp;
__extends(If, _super);
extend(If, superClass);

@@ -39,7 +41,7 @@ SyntaxHelp = "Syntax Error in tag 'if' - Valid syntax: if [expression]";

return function() {
return Promise.reduce(_this.blocks, function(chosenBlock, block) {
return PromiseReduce(_this.blocks, function(chosenBlock, block) {
if (chosenBlock != null) {
return chosenBlock;
}
return Promise["try"](function() {
return Promise.resolve().then(function() {
return block.evaluate(context);

@@ -109,2 +111,2 @@ }).then(function(ok) {

//# sourceMappingURL=if.map
//# sourceMappingURL=if.js.map

@@ -1,13 +0,13 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var IfChanged, Liquid, Promise,
__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; };
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../../liquid");
Promise = require("bluebird");
Promise = require("native-or-bluebird");
module.exports = IfChanged = (function(_super) {
__extends(IfChanged, _super);
module.exports = IfChanged = (function(superClass) {
extend(IfChanged, superClass);

@@ -23,3 +23,3 @@ function IfChanged() {

rendered = _this.renderAll(_this.nodelist, context);
return Promise.cast(rendered).then(function(output) {
return Promise.resolve(rendered).then(function(output) {
output = Liquid.Helpers.toFlatString(output);

@@ -42,2 +42,2 @@ if (output !== context.registers.ifchanged) {

//# sourceMappingURL=ifchanged.map
//# sourceMappingURL=ifchanged.js.map

@@ -1,13 +0,13 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Include, Liquid,
__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; };
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../../liquid");
module.exports = Include = (function(_super) {
module.exports = Include = (function(superClass) {
var Syntax, SyntaxHelp;
__extends(Include, _super);
extend(Include, superClass);

@@ -43,2 +43,2 @@ Syntax = /([a-z0-9\/\\_-]+)/i;

//# sourceMappingURL=include.map
//# sourceMappingURL=include.js.map

@@ -1,11 +0,11 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Increment, Liquid,
__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; };
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../../liquid");
module.exports = Increment = (function(_super) {
__extends(Increment, _super);
module.exports = Increment = (function(superClass) {
extend(Increment, superClass);

@@ -18,4 +18,4 @@ function Increment(template, tagName, markup) {

Increment.prototype.render = function(context) {
var value, _base, _name;
value = (_base = context.environments[0])[_name = this.variable] != null ? _base[_name] : _base[_name] = 0;
var base, name, value;
value = (base = context.environments[0])[name = this.variable] != null ? base[name] : base[name] = 0;
context.environments[0][this.variable] = value + 1;

@@ -31,2 +31,2 @@ return String(value);

//# sourceMappingURL=increment.map
//# sourceMappingURL=increment.js.map

@@ -1,13 +0,13 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Liquid, Promise, Raw,
__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; };
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../../liquid");
Promise = require("bluebird");
Promise = require("native-or-bluebird");
module.exports = Raw = (function(_super) {
__extends(Raw, _super);
module.exports = Raw = (function(superClass) {
extend(Raw, superClass);

@@ -19,7 +19,7 @@ function Raw() {

Raw.prototype.parse = function(tokens) {
return Promise["try"]((function(_this) {
return Promise.resolve().then((function(_this) {
return function() {
var match, token;
if (tokens.length === 0 || _this.ended) {
return Promise.cast();
return Promise.resolve();
}

@@ -43,2 +43,2 @@ token = tokens.shift();

//# sourceMappingURL=raw.map
//# sourceMappingURL=raw.js.map

@@ -1,11 +0,11 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Liquid, Unless,
__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; };
extend = 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; },
hasProp = {}.hasOwnProperty;
Liquid = require("../../liquid");
module.exports = Unless = (function(_super) {
__extends(Unless, _super);
module.exports = Unless = (function(superClass) {
extend(Unless, superClass);

@@ -30,2 +30,2 @@ function Unless() {

//# sourceMappingURL=unless.map
//# sourceMappingURL=unless.js.map

@@ -1,10 +0,10 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Liquid, Promise,
__slice = [].slice,
__hasProp = {}.hasOwnProperty;
slice = [].slice,
hasProp = {}.hasOwnProperty;
Liquid = require("../liquid");
Promise = require("bluebird");
Promise = require("native-or-bluebird");

@@ -26,3 +26,3 @@ module.exports = Liquid.Template = (function() {

}
return Promise["try"]((function(_this) {
return Promise.resolve().then((function(_this) {
return function() {

@@ -42,4 +42,4 @@ var tokens;

var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return Promise["try"]((function(_this) {
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
return Promise.resolve().then((function(_this) {
return function() {

@@ -52,3 +52,3 @@ return _this._render.apply(_this, args);

Template.prototype._render = function(assigns, options) {
var context, k, v, _ref;
var context, copyErrors, k, ref, v;
if (this.root == null) {

@@ -70,6 +70,6 @@ throw new Error("No document root. Did you parse the document yet?");

if (options != null ? options.registers : void 0) {
_ref = options.registers;
for (k in _ref) {
if (!__hasProp.call(_ref, k)) continue;
v = _ref[k];
ref = options.registers;
for (k in ref) {
if (!hasProp.call(ref, k)) continue;
v = ref[k];
this.registers[k] = v;

@@ -81,9 +81,17 @@ }

}
copyErrors = (function(_this) {
return function(actualResult) {
_this.errors = context.errors;
return actualResult;
};
})(this);
return this.root.render(context).then(function(chunks) {
return Liquid.Helpers.toFlatString(chunks);
})["finally"]((function(_this) {
return function() {
return _this.errors = context.errors;
};
})(this));
}).then(function(result) {
this.errors = context.errors;
return result;
}, function(error) {
this.errors = context.errors;
throw error;
});
};

@@ -127,2 +135,2 @@

//# sourceMappingURL=template.map
//# sourceMappingURL=template.js.map

@@ -1,10 +0,12 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.10.0
(function() {
var Liquid, Promise, Variable,
__slice = [].slice;
var Liquid, Promise, PromiseReduce, Variable,
slice = [].slice;
Liquid = require("../liquid");
Promise = require("bluebird");
Promise = require("native-or-bluebird");
PromiseReduce = require("../promise_reduce");
module.exports = Variable = (function() {

@@ -17,3 +19,3 @@ var FilterArgParser, FilterListFragment, VariableNameFragment;

FilterListFragment = RegExp("" + Liquid.FilterSeparator.source + "\\s*(.*)");
FilterListFragment = RegExp(Liquid.FilterSeparator.source + "\\s*(.*)");

@@ -63,9 +65,9 @@ FilterArgParser = RegExp("(?:" + Liquid.FilterArgumentSeparator.source + "|" + Liquid.ArgumentSeparator.source + ")\\s*(" + Liquid.QuotedFragment.source + ")");

});
return Promise.join.apply(Promise, [input].concat(__slice.call(filterArgs))).spread(function() {
var e, filterArgs, input;
input = arguments[0], filterArgs = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
return Promise.all([input].concat(slice.call(filterArgs))).then(function(results) {
var e, error;
input = results.shift();
try {
return context.invoke.apply(context, [filter[0], input].concat(__slice.call(filterArgs)));
} catch (_error) {
e = _error;
return context.invoke.apply(context, [filter[0], input].concat(slice.call(results)));
} catch (error) {
e = error;
if (!(e instanceof Liquid.FilterNotFound)) {

@@ -79,3 +81,3 @@ throw e;

})(this);
value = Promise.cast(context.get(this.name));
value = Promise.resolve(context.get(this.name));
switch (this.filters.length) {

@@ -89,3 +91,3 @@ case 0:

default:
filtered = Promise.reduce(this.filters, reducer, value);
filtered = PromiseReduce(this.filters, reducer, value);
}

@@ -109,2 +111,2 @@ return filtered.then(function(f) {

//# sourceMappingURL=variable.map
//# sourceMappingURL=variable.js.map

@@ -15,3 +15,3 @@ {

"description": "Node.js port of Tobias Lütke's Liquid template engine.",
"version": "2.5.0",
"version": "2.6.0",
"license": "MIT",

@@ -32,19 +32,16 @@ "homepage": "https://github.com/sirlantis/liquid-node",

"dependencies": {
"strftime": "~0.8.0"
"native-or-bluebird": "~1.2.0",
"strftime": "~0.9.2"
},
"peerDependencies": {
"bluebird": "^2.1.3"
},
"devDependencies": {
"chai": "~1.9.1",
"chai-as-promised": "~4.1.1",
"coffee-script": "~1.7.1",
"coffeelint": "^1.5.2",
"coveralls": "^2.10.1",
"jscoverage": "^0.5.4",
"mocha": "~1.20.1",
"mocha-lcov-reporter": "0.0.1",
"sinon": "^1.10.2",
"sinon-chai": "^2.5.0",
"bluebird": "^2.3.10"
"chai": "~3.2.0",
"chai-as-promised": "~5.1.0",
"coffee-script": "~1.10.0",
"coffeelint": "^1.11.1",
"coveralls": "^2.11.4",
"jscoverage": "^0.6.0",
"mocha": "~2.3.2",
"mocha-lcov-reporter": "0.0.2",
"sinon": "^1.16.1",
"sinon-chai": "^2.8.0"
},

@@ -51,0 +48,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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