Socket
Socket
Sign inDemoInstall

liquidjs

Package Overview
Dependencies
Maintainers
1
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liquidjs - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

2

dist/liquid.min.js

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

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Liquid=e()}}(function(){return function e(t,r,n){function s(o,u){if(!r[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return s(r||e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var i="function"==typeof require&&require,o=0;o<n.length;o++)s(n[o]);return s}({1:[function(e,t,r){"use strict";function n(e){return u(e).replace(/&|<|>|"|'/g,function(e){return g[e]})}function s(e){return u(e).replace(/&(amp|lt|gt|#34|#39);/g,function(e){return d[e]})}function i(e){var t=(e+"").split(".");return t.length>1?t[1].length:0}function o(e,t){return Math.max(i(e),i(t))}function u(e){return e+""}function a(e){return function(t,r){var n=o(t,r);return e(t,r).toFixed(n)}}function c(e){return p.forOwn(v,function(t,r){return e.registerFilter(r,t)})}function l(e){return e instanceof Date&&!isNaN(e.getTime())}var f=e("./src/util/strftime.js"),p=e("./src/util/underscore.js"),h=e("./src/syntax.js").isTruthy,g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},d={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"},v={abs:function(e){return Math.abs(e)},append:function(e,t){return e+t},capitalize:function(e){return u(e).charAt(0).toUpperCase()+e.slice(1)},ceil:function(e){return Math.ceil(e)},concat:function(e,t){return Array.prototype.concat.call(e,t)},date:function(e,t){var r=e;return"now"===e?r=new Date:p.isString(e)&&(r=new Date(e)),l(r)?f(r,t):e},default:function(e,t){return h(e)?e:t},divided_by:function(e,t){return Math.floor(e/t)},downcase:function(e){return e.toLowerCase()},escape:n,escape_once:function(e){return n(s(e))},first:function(e){return e[0]},floor:function(e){return Math.floor(e)},join:function(e,t){return e.join(t)},last:function(e){return e[e.length-1]},lstrip:function(e){return u(e).replace(/^\s+/,"")},map:function(e,t){return e.map(function(e){return e[t]})},minus:a(function(e,t){return e-t}),modulo:a(function(e,t){return e%t}),newline_to_br:function(e){return e.replace(/\n/g,"<br />")},plus:a(function(e,t){return Number(e)+Number(t)}),prepend:function(e,t){return t+e},remove:function(e,t){return e.split(t).join("")},remove_first:function(e,t){return e.replace(t,"")},replace:function(e,t,r){return u(e).split(t).join(r)},replace_first:function(e,t,r){return u(e).replace(t,r)},reverse:function(e){return e.reverse()},round:function(e,t){var r=Math.pow(10,t||0);return Math.round(e*r,t)/r},rstrip:function(e){return u(e).replace(/\s+$/,"")},size:function(e){return e.length},slice:function(e,t,r){return e.substr(t,void 0===r?1:r)},sort:function(e,t){return e.sort(t)},split:function(e,t){return u(e).split(t)},strip:function(e){return u(e).trim()},strip_html:function(e){return u(e).replace(/<\/?\s*\w+\s*\/?>/g,"")},strip_newlines:function(e){return u(e).replace(/\n/g,"")},times:function(e,t){return e*t},truncate:function(e,t,r){return e=u(e),r=void 0===r?"...":r,t=t||16,e.length<=t?e:e.substr(0,t-r.length)+r},truncatewords:function(e,t,r){void 0===r&&(r="...");var n=e.split(" "),s=n.slice(0,t).join(" ");return n.length>t&&(s+=r),s},uniq:function(e){var t={};return(e||[]).filter(function(e){return!t.hasOwnProperty(e)&&(t[e]=!0,!0)})},upcase:function(e){return u(e).toUpperCase()},url_encode:encodeURIComponent};c.filters=v,t.exports=c},{"./src/syntax.js":13,"./src/util/strftime.js":20,"./src/util/underscore.js":21}],2:[function(e,t,r){"use strict";function n(e){(e=o.assign({root:["."],cache:!1,extname:"",trim_tag_right:!1,trim_tag_left:!1,trim_value_right:!1,trim_value_left:!1,greedy:!0,strict_filters:!1,strict_variables:!1},e)).root=s(e.root);var t=Object.create(E);return t.init(g(),d(e),e),t}function s(e){return Array.isArray(e)?e:o.isString(e)?[e]:[]}var i=e("./src/scope"),o=e("./src/util/underscore.js"),u=e("./src/util/assert.js"),a=e("./src/tokenizer.js"),c=e("./src/util/fs.js").statFileAsync,l=e("./src/util/fs.js").readFileAsync,f=e("path"),p=e("./src/render.js"),h=e("./src/lexical.js"),g=e("./src/tag.js"),d=e("./src/filter.js"),v=e("./src/parser"),m=e("./src/syntax.js"),y=e("./tags"),j=e("./filters"),w=e("any-promise"),x=e("./src/util/promise.js").anySeries,b=e("./src/util/error.js"),E={init:function(e,t,r){return r.cache&&(this.cache={}),this.options=r,this.tag=e,this.filter=t,this.parser=v(e,t),this.renderer=p(),y(this),j(this),this},parse:function(e,t){var r=a.parse(e,t,this.options);return this.parser.parse(r)},render:function(e,t,r){r=o.assign({},this.options,r);var n=i.factory(t,r);return this.renderer.renderTemplates(e,n)},parseAndRender:function(e,t,r){var n=this;return w.resolve().then(function(){return n.parse(e)}).then(function(e){return n.render(e,t,r)})},renderFile:function(e,t,r){var n=this;return r=o.assign({},r),this.getTemplate(e,r.root).then(function(e){return n.render(e,t,r)})},evalOutput:function(e,t){return console.warn("[liquidjs:deprecated] use .evalValue() instead of .evalOutput"),this.evalValue(e,t)},evalValue:function(e,t){var r=this.parser.parseValue(e.trim());return this.renderer.evalValue(r,t)},registerFilter:function(e,t){return this.filter.register(e,t)},registerTag:function(e,t){return this.tag.register(e,t)},lookup:function(e,t){t=this.options.root.concat(t||[]);var r=(t=o.uniq(t)).map(function(t){return f.resolve(t,e)});return x(r,function(e){return c(e).then(function(){return e})}).catch(function(r){throw r.message=r.code+": Failed to lookup "+e+" in: "+t,r})},getTemplate:function(e,t){var r=this;return f.extname(e)||(e+=this.options.extname),this.lookup(e,t).then(function(e){if(r.options.cache){var t=r.cache[e];return t?w.resolve(t):l(e).then(function(e){return r.parse(e)}).then(function(t){return r.cache[e]=t})}return l(e).then(function(t){return r.parse(t,e)})})},express:function(e){e=e||{};var t=this;return function(r,n,s){u(Array.isArray(this.root)||o.isString(this.root),"illegal views root, are you using express.js?"),e.root=this.root,t.renderFile(r,n,e).then(function(e){return s(null,e)}).catch(function(e){return s(e)})}}};n.lexical=h,n.isTruthy=m.isTruthy,n.isFalsy=m.isFalsy,n.evalExp=m.evalExp,n.evalValue=m.evalValue,n.Types={ParseError:b.ParseError,TokenizationEroor:b.TokenizationError,RenderBreakError:b.RenderBreakError,AssertionError:b.AssertionError},t.exports=n},{"./filters":1,"./src/filter.js":7,"./src/lexical.js":8,"./src/parser":10,"./src/render.js":11,"./src/scope":12,"./src/syntax.js":13,"./src/tag.js":14,"./src/tokenizer.js":15,"./src/util/assert.js":16,"./src/util/error.js":17,"./src/util/fs.js":18,"./src/util/promise.js":19,"./src/util/underscore.js":21,"./tags":33,"any-promise":3,path:6}],3:[function(e,t,r){"use strict";t.exports=e("./register")().Promise},{"./register":5}],4:[function(e,t,r){"use strict";var n=null;t.exports=function(e,t){return function(r,s){r=r||null;var i=!1!==(s=s||{}).global;if(null===n&&i&&(n=e["@@any-promise/REGISTRATION"]||null),null!==n&&null!==r&&n.implementation!==r)throw new Error('any-promise already defined as "'+n.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===n&&(n=null!==r&&void 0!==s.Promise?{Promise:s.Promise,implementation:r}:t(r),i&&(e["@@any-promise/REGISTRATION"]=n)),n}}},{}],5:[function(e,t,r){"use strict";t.exports=e("./loader")(window,function(){if(void 0===window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}})},{"./loader":4}],6:[function(e,t,r){"use strict"},{}],7:[function(e,t,r){"use strict";var n=e("./lexical.js"),s=e("./syntax.js"),i=e("./util/assert.js"),o=e("./util/underscore.js"),u=new RegExp(""+n.value.source,"g");t.exports=function(e){e=o.assign({},e);var t={},r={render:function(e,t){var r=this.args.map(function(e){return s.evalValue(e,t)});return r.unshift(e),this.filter.apply(null,r)},parse:function(r){var s=n.filterLine.exec(r);i(s,"illegal filter: "+r);var o=s[1],a=s[2]||"",c=t[o];if("function"!=typeof c){if(e.strict_filters)throw new TypeError("undefined filter: "+o);return this.name=o,this.filter=function(e){return e},this.args=[],this}for(var l=[];s=u.exec(a.trim());){var f=s[0];new RegExp(f+"\\s*:","g").test(s.input)?l.push("'"+f+"'"):l.push(f)}return this.name=o,this.filter=c,this.args=l,this}};return{construct:function(e){return Object.create(r).parse(e)},register:function(e,r){t[e]=r},clear:function(){t={}}}}},{"./lexical.js":8,"./syntax.js":13,"./util/assert.js":16,"./util/underscore.js":21}],8:[function(e,t,r){"use strict";var n=/'[^']*'/,s=/"[^"]*"/,i=new RegExp(n.source+"|"+s.source),o=new RegExp("(?:"+i.source+"|[^'\"])*"),u=/-?\d+/,a=/-?\d+\.?\d*|\.?\d+/,c=/true|false/,l=/[\w-]+/,f=new RegExp("\\[(?:"+i.source+"|[\\w-\\.]+)\\]"),p=new RegExp("(?:"+i.source+"|"+c.source+"|"+a.source+")"),h=new RegExp(l.source+"(?:\\."+l.source+"|"+f.source+")*"),g=new RegExp("(?:"+h.source+"|"+a.source+")"),d=new RegExp("\\("+g.source+"\\.\\."+g.source+"\\)"),v=new RegExp("\\(("+g.source+")\\.\\.("+g.source+")\\)"),m=new RegExp("(?:"+h.source+"|"+p.source+"|"+d.source+")"),y=new RegExp("(?:"+l.source+")\\s*:\\s*(?:"+m.source+")"),j=new RegExp("("+l.source+")\\s*:\\s*("+m.source+")","g"),w=new RegExp("^\\s*("+l.source+")\\s*([\\s\\S]*)\\s*$"),x=new RegExp("^"+p.source+"$","i"),b=new RegExp("^"+h.source+"$"),E=new RegExp("^"+a.source+"$"),T=new RegExp("^"+c.source+"$","i"),k=new RegExp("^"+i.source+"$"),S=new RegExp("^"+v.source+"$"),R=new RegExp("^"+u.source+"$"),O=new RegExp("(?:"+l.source+"\\s*:\\s*)?"+m.source),_=new RegExp(O.source+"(\\s*,\\s*"+O.source+")*"),M=new RegExp(l.source+"(?:\\s*:\\s*"+_.source+")?","g"),A=new RegExp("("+l.source+")(?:\\s*:\\s*("+_.source+"))?"),F=new RegExp("^"+A.source+"$"),L=[/\s+or\s+/,/\s+and\s+/,/==|!=|<=|>=|<|>|\s+contains\s+/];t.exports={quoted:i,number:a,bool:c,literal:p,filter:M,integer:u,hash:y,hashCapture:j,range:d,rangeCapture:v,identifier:l,value:m,quoteBalanced:o,operators:L,quotedLine:k,numberLine:E,boolLine:T,rangeLine:S,literalLine:x,filterLine:F,tagLine:w,isLiteral:function(e){return x.test(e)},isVariable:function(e){return b.test(e)},parseLiteral:function(e){var t=e.match(E);if(t)return Number(e);if(t=e.match(T))return"true"===e.toLowerCase();if(t=e.match(k))return e.slice(1,-1);throw new TypeError("cannot parse '"+e+"' as literal")},isRange:function(e){return S.test(e)},matchValue:function(e){return m.exec(e)},isInteger:function(e){return R.test(e)}}},{}],9:[function(e,t,r){"use strict";t.exports=function(e){return{"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},">":function(e,t){return null!==e&&null!==t&&e>t},"<":function(e,t){return null!==e&&null!==t&&e<t},">=":function(e,t){return null!==e&&null!==t&&e>=t},"<=":function(e,t){return null!==e&&null!==t&&e<=t},contains:function(e,t){return!!e&&("function"==typeof e.indexOf&&e.indexOf(t)>-1)},and:function(t,r){return e(t)&&e(r)},or:function(t,r){return e(t)||e(r)}}}},{}],10:[function(e,t,r){"use strict";var n=e("./lexical.js"),s=e("./util/error.js").ParseError,i=e("./util/assert.js");t.exports=function(e,t){function r(e,t){try{var r=null;return r="tag"===e.type?o(e,t):"value"===e.type?u(e.value):e,r.token=e,r}catch(t){throw new s(t,e)}}function o(t,r){return"continue"===t.name||"break"===t.name?t:e.construct(t,r)}function u(e){var r=n.matchValue(e);i(r,"illegal value string: "+e);var s=r[0];e=e.substr(r.index+r[0].length);for(var o=[];r=n.filter.exec(e);)o.push([r[0].trim()]);return{type:"value",initial:s,filters:o.map(function(e){return t.construct(e)})}}var a={init:function(e){return this.tokens=e,this.handlers={},this},on:function(e,t){return this.handlers[e]=t,this},trigger:function(e,t){var r=this.handlers[e];if("function"==typeof r)return r(t),!0},start:function(){this.trigger("start");for(var e;!this.stopRequested&&(e=this.tokens.shift());)if(!(this.trigger("token",e)||"tag"===e.type&&this.trigger("tag:"+e.name,e))){var t=r(e,this.tokens);this.trigger("template",t)}return this.stopRequested||this.trigger("end"),this},stop:function(){return this.stopRequested=!0,this}};return{parse:function(e){for(var t,n=[];t=e.shift();)n.push(r(t,e));return n},parseTag:o,parseStream:function(e){return Object.create(a).init(e)},parseValue:u}}},{"./lexical.js":8,"./util/assert.js":16,"./util/error.js":17}],11:[function(e,t,r){"use strict";function n(e){return"string"==typeof e?e:JSON.stringify(e)}var s=e("./syntax.js"),i=e("any-promise"),o=e("./util/promise.js").mapSeries,u=e("./util/error.js").RenderBreakError,a=e("./util/error.js").RenderError,c=e("./util/assert.js"),l={renderTemplates:function(e,t){function r(e){var r=this;return"tag"===e.type?this.renderTag(e,t).then(function(e){return void 0===e?"":e}):"value"===e.type?i.resolve().then(function(){return r.evalValue(e,t)}).then(function(e){return void 0===e?"":n(e)}):i.resolve(e.value)}var s=this;c(t,"unable to evalTemplates: scope undefined");var l="";return o(e,function(e){return r.call(s,e).then(function(e){return l+=e}).catch(function(t){if(t instanceof u)throw t.resolvedHTML=l,t;throw new a(t,e)})}).then(function(){return l})},renderTag:function(e,t){return"continue"===e.name?i.reject(new u("continue")):"break"===e.name?i.reject(new u("break")):e.render(t)},evalValue:function(e,t){return c(t,"unable to evalValue: scope undefined"),e.filters.reduce(function(e,r){return r.render(e,t)},s.evalExp(e.initial,t))}};t.exports=function(){return Object.create(l)}},{"./syntax.js":13,"./util/assert.js":16,"./util/error.js":17,"./util/promise.js":19,"any-promise":3}],12:[function(e,t,r){"use strict";function n(e,t,r){for(var n=(t+"").replace(/\[/g,".").replace(/\]/g,"").split("."),s=0;s<n.length;s++){var i=n[s];if(s===n.length-1)return e[i]=r;void 0===e[i]&&(e[i]={}),e=e[i]||{}}}function s(e,t){return"size"===e&&(u.isArray(t)||u.isString(t))?t.length:t[e]}function i(e,t){for(var r=t.length-1;r>-1;r--){var n=t[r];if(n.hasOwnProperty(e))return n[e]}throw new TypeError("undefined variable: "+e)}function o(e,t){for(var r=1,n=t;n<e.length;n++)if("["===e[n]&&r++,"]"===e[n]&&0==--r)return n;return-1}var u=e("./util/underscore.js"),a=e("./lexical.js"),c=e("./util/assert.js"),l={getAll:function(){for(var e={},t=this.scopes.length-1;t>=0;t--)u.assign(e,this.scopes[t]);return e},get:function(e){if("liquid"===e)throw new Error('NO LONGER SUPPORTED: use scope.opts instead of scope.get("liquid")');try{return this.getPropertyByPath(this.scopes,e)}catch(e){if(!/undefined variable/.test(e.message)||this.opts.strict_variables)throw e}},set:function(e,t){return n(this.findScopeFor(e),e,t),this},push:function(e){return c(e,"trying to push "+e+" into scopes"),this.scopes.push(e)},pop:function(){return this.scopes.pop()},findScopeFor:function(e){for(var t=this.scopes.length-1;t>=0&&!(e in this.scopes[t]);)t--;return t<0&&(t=this.scopes.length-1),this.scopes[t]},unshift:function(e){return c(e,"trying to push "+e+" into scopes"),this.scopes.unshift(e)},shift:function(){return this.scopes.shift()},getPropertyByPath:function(e,t){var r=this.propertyAccessSeq(t+"");if(!r.length)throw new TypeError("undefined variable: "+t);var n=i(r.shift(),e);return r.reduce(function(e,t){if(u.isNil(e))throw new TypeError("undefined variable: "+t);return s(t,e)},n)},propertyAccessSeq:function(e){function t(){s.length&&n.push(s),s=""}for(var r,n=[],s="",i=0;i<e.length;)switch(e[i]){case"[":t();var u=e[i+1];/['"]/.test(u)?(r=e.indexOf(u,i+2),c(-1!==r,"unbalanced "+u+": "+e),s=e.slice(i+2,r),t(),i=r+2):(r=o(e,i+1),c(-1!==r,"unbalanced []: "+e),s=e.slice(i+1,r),a.isInteger(s)||(s=this.get(s)),t(),i=r+1);break;case".":t(),i++;break;default:s+=e[i],i++}return t(),n}};r.factory=function(e,t){var r={strict_variables:!1,strict_filters:!1,blocks:{},root:[]},n=Object.create(l);return n.opts=u.assign(r,t),n.scopes=[e||{}],n}},{"./lexical.js":8,"./util/assert.js":16,"./util/underscore.js":21}],13:[function(e,t,r){"use strict";function n(e,t){c(t,"unable to evalExp: scope undefined");for(var r,i=a.operators,o=0;o<i.length;o++){var l=i[o],f=new RegExp("^("+a.quoteBalanced.source+")("+l.source+")("+a.quoteBalanced.source+")$");if(r=e.match(f)){var p=n(r[1],t);return(0,u[r[2].trim()])(p,n(r[3],t))}}if(r=e.match(a.rangeLine)){for(var h=s(r[1],t),g=s(r[2],t),d=[],v=h;v<=g;v++)d.push(v);return d}return s(e,t)}function s(e,t){if(e=e&&e.trim()){if(a.isLiteral(e))return a.parseLiteral(e);if(a.isVariable(e))return t.get(e);throw new TypeError("cannot eval '"+e+"' as value")}}function i(e){return!o(e)}function o(e){return!1===e||void 0===e||null===e}var u=e("./operators.js")(i),a=e("./lexical.js"),c=e("../src/util/assert.js");t.exports={evalExp:n,evalValue:s,isTruthy:i,isFalsy:o}},{"../src/util/assert.js":16,"./lexical.js":8,"./operators.js":9}],14:[function(e,t,r){"use strict";function n(e,t){var r,n={};for(s.hashCapture.lastIndex=0;r=s.hashCapture.exec(e);){var i=r[1],u=r[2];n[i]=o.evalValue(u,t)}return n}var s=e("./lexical.js"),i=e("any-promise"),o=e("./syntax.js"),u=e("./util/assert.js");t.exports=function(){var e={},t={render:function(e){var t=n(this.token.args,e),r=this.tagImpl;return"function"!=typeof r.render?i.resolve(""):i.resolve().then(function(){return r.render(e,t)})},parse:function(t,r){this.type="tag",this.token=t,this.name=t.name;var n=e[this.name];u(n,"tag "+this.name+" not found"),this.tagImpl=Object.create(n),this.tagImpl.parse&&this.tagImpl.parse(t,r)}};return{construct:function(e,r){var n=Object.create(t);return n.parse(e,r),n},register:function(t,r){e[t]=r},clear:function(){e={}}}}},{"./lexical.js":8,"./syntax.js":13,"./util/assert.js":16,"any-promise":3}],15:[function(e,t,r){"use strict";function n(e){var t=0,r=-1;return{get:function(n){var s=e.slice(r+1,n).split("\n");return t+=s.length-1,r=n,t+1}}}var s=e("./lexical.js"),i=e("./util/error.js").TokenizationError,o=e("./util/underscore.js"),u=e("./whitespace-ctrl.js"),a=e("./util/assert.js");r.parse=function(e,t,r){function c(t,r){var n=e.slice(t,r);return p=o.last((n||"").split("\n")).length,{type:"html",raw:n,value:n}}a(o.isString(e),"illegal input");for(var l,f=/({%-?([\s\S]*?)-?%})|({{-?([\s\S]*?)-?}})/g,p=0,h=n(e),g=0,d=[];l=f.exec(e);g=f.lastIndex)l.index>g&&d.push(c(g,l.index)),d.push(l[1]?function(r,n,o){var u=n.match(s.tagLine),a={type:"tag",indent:p,line:h.get(o),trim_left:"{%-"===r.slice(0,3),trim_right:"-%}"===r.slice(-3),raw:r,value:n,input:e,file:t};if(!u)throw new i("illegal tag syntax",a);return a.name=u[1],a.args=u[2],a}(l[1],l[2].trim(),l.index):function(r,n,s){return{type:"value",line:h.get(s),trim_left:"{{-"===r.slice(0,3),trim_right:"-}}"===r.slice(-3),raw:r,value:n,input:e,file:t}}(l[3],l[4].trim(),l.index));return e.length>g&&d.push(c(g,e.length)),u(d,r),d},r.whiteSpaceCtrl=u},{"./lexical.js":8,"./util/assert.js":16,"./util/error.js":17,"./util/underscore.js":21,"./whitespace-ctrl.js":22}],16:[function(e,t,r){"use strict";var n=e("./error.js").AssertionError;t.exports=function(e,t){if(!e)throw t=t||"expect "+e+" to be true",new n(t)}},{"./error.js":17}],17:[function(e,t,r){"use strict";function n(){this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}function s(e,t){n.call(this),this.input=t.input,this.line=t.line,this.file=t.file;var r=l(t.input,t.line);this.message=p(e.message,t),this.stack=r+"\n"+(this.stack||this.message)+(e.stack?"\nFrom "+e.stack:"")}function i(e,t){s.call(this,{message:e},t)}function o(e,t){h.assign(this,e),this.originalError=e,s.call(this,e,t)}function u(e,t){if(e instanceof u)return e;h.assign(this,e),this.originalError=e,s.call(this,e,t.token)}function a(e){n.call(this),this.message=e+""}function c(e){n.call(this),this.message=e+""}function l(e,t){var r=e.split("\n"),n=Math.max(t-2,1),s=Math.min(t+3,r.length);return h.range(n,s+1).map(function(e){return[e===t?">> ":" ",f(e,s),"| ",r[e-1]].join("")}).join("\n")}function f(e,t){var r=(t+"").length,n=e+"";return Array(r-n.length).join(" ")+n}function p(e,t){return e=e||"",t.file&&(e+=", file:"+t.file),t.line&&(e+=", line:"+t.line),e}var h=e("./underscore.js");(i.prototype=Object.create(Error.prototype)).constructor=i,(o.prototype=Object.create(Error.prototype)).constructor=o,u.prototype=Object.create(Error.prototype),u.prototype.constructor=u,(a.prototype=Object.create(Error.prototype)).constructor=a,(c.prototype=Object.create(Error.prototype)).constructor=c,t.exports={TokenizationError:i,ParseError:o,RenderBreakError:a,AssertionError:c,RenderError:u}},{"./underscore.js":21}],18:[function(e,t,r){"use strict";var n=e("fs");t.exports={readFileAsync:function(e){return new Promise(function(t,r){n.readFile(e,"utf8",function(e,n){e?r(e):t(n)})})},statFileAsync:function(e){return new Promise(function(t,r){n.stat(e,function(e,n){return e?r(e):t(n)})})}}},{fs:6}],19:[function(e,t,r){"use strict";var n=e("any-promise");r.anySeries=function(e,t){var r=n.reject(new Error("init"));return e.forEach(function(n,s){r=r.catch(function(r){return t(n,s,e)})}),r},r.mapSeries=function(e,t){var r=n.resolve("init"),s=[];return e.forEach(function(n,i){r=r.then(function(){return t(n,i,e)}).then(function(e){return s.push(e)})}),r.then(function(){return s})}},{"any-promise":3}],20:[function(e,t,r){"use strict";var n=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],u={1:"st",2:"nd",3:"rd",default:"th"},a={daysInMonth:function(e){return[31,a.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31]},getDayOfYear:function(e){for(var t=0,r=0;r<e.getMonth();++r)t+=a.daysInMonth(e)[r];return t+e.getDate()},getWeekOfYear:function(e,t){var r=this.getDayOfYear(e)+(t-e.getDay()),n=7-new Date(e.getFullYear(),0,1).getDay()+t;return c.pad(Math.floor((r-n)/7)+1,2)},isLeapYear:function(e){var t=e.getFullYear();return!(0!=(3&t)||!(t%100||t%400==0&&t))},getSuffix:function(e){var t=e.getDate().toString(),r=parseInt(t.slice(-1));return u[r]||u.default},century:function(e){return parseInt(e.getFullYear().toString().substring(0,2),10)}},c={pad:function(e,t,r){r||(r="0");for(var n=e.toString(),s=t-n.length;s-- >0;)n=r+n;return n}},l={a:function(e){return o[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return s[e.getMonth()]},B:function(e){return n[e.getMonth()]},c:function(e){return e.toLocaleString()},C:function(e){return a.century(e)},d:function(e){return c.pad(e.getDate(),2)},e:function(e){return c.pad(e.getDate(),2," ")},H:function(e){return c.pad(e.getHours(),2)},I:function(e){return c.pad(e.getHours()%12||12,2)},j:function(e){return c.pad(a.getDayOfYear(e),3)},k:function(e){return c.pad(e.getHours(),2," ")},l:function(e){return c.pad(e.getHours()%12||12,2," ")},L:function(e){return c.pad(e.getMilliseconds(),3)},m:function(e){return c.pad(e.getMonth()+1,2)},M:function(e){return c.pad(e.getMinutes(),2)},p:function(e){return e.getHours()<12?"AM":"PM"},P:function(e){return e.getHours()<12?"am":"pm"},q:function(e){return a.getSuffix(e)},s:function(e){return Math.round(e.valueOf()/1e3)},S:function(e){return c.pad(e.getSeconds(),2)},u:function(e){return e.getDay()||7},U:function(e){return a.getWeekOfYear(e,0)},w:function(e){return e.getDay()},W:function(e){return a.getWeekOfYear(e,1)},x:function(e){return e.toLocaleDateString()},X:function(e){return e.toLocaleTimeString()},y:function(e){return e.getFullYear().toString().substring(2,4)},Y:function(e){return e.getFullYear()},z:function(e){var t=e.getTimezoneOffset()/60*100;return(t>0?"-":"+")+c.pad(Math.abs(t),4)},"%":function(){return"%"}};l.h=l.b,l.N=l.L;t.exports=function(e,t){for(var r="",n=t;;){var s=/%./g,i=s.exec(n);if(!i)return r+n;r+=n.slice(0,s.lastIndex-2),n=n.slice(s.lastIndex);var o=i[0].charAt(1),u=l[o];r+=u?u.call(this,e):"%"+o}}},{}],21:[function(e,t,r){"use strict";function n(e,t){e=e||{};for(var r in e)if(e.hasOwnProperty(r)&&!1===t(e[r],r,e))break;return e}function s(e,t){return n(t,function(t,r){e[r]=t}),e}function i(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"===t||"function"===t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=Object.prototype.toString;r.isString=function(e){return e instanceof String||"string"==typeof e},r.isObject=i,r.isArray=function(e){return"[object Array]"===u.call(e)},r.isNil=function(e){return null===e||void 0===e},r.isError=function(e){return"Error"===Object.prototype.toString.call(e).substr(-6,5)||"string"==typeof e.message&&"string"==typeof e.name},r.range=function(e,t,r){1===arguments.length&&(t=e,e=0),r=r||1;for(var n=[],s=e;s<t;s+=r)n.push(s);return n},r.last=function(e){return e[e.length-1]},r.forOwn=n,r.assign=function(e){return e=i(e)?e:{},Array.prototype.slice.call(arguments,1).forEach(function(t){s(e,t)}),e},r.uniq=function(e){for(var t={},r=[],n=0,s=e.length;n<s;++n)t.hasOwnProperty(e[n])||(r.push(e[n]),t[e[n]]=1);return r}},{}],22:[function(e,t,r){"use strict";function n(e,t,r){return!t&&("tag"===e.type?e.trim_left||r.trim_tag_left:"value"===e.type?e.trim_left||r.trim_value_left:void 0)}function s(e,t,r){return!t&&("tag"===e.type?e.trim_right||r.trim_tag_right:"value"===e.type?e.trim_right||r.trim_value_right:void 0)}function i(e,t){if(e&&"html"===e.type){var r=t?/\s+$/g:/[\t\r ]*$/g;e.value=e.value.replace(r,"")}}function o(e,t){if(e&&"html"===e.type){var r=t?/^\s+/g:/^[\t\r ]*\n?/g;e.value=e.value.replace(r,"")}}var u=e("./util/underscore.js");t.exports=function(e,t){t=u.assign({greedy:!0},t);var r=!1;e.forEach(function(u,a){n(u,r,t)&&i(e[a-1],t.greedy),"tag"===u.type&&"raw"===u.name&&(r=!0),"tag"===u.type&&"endraw"===u.name&&(r=!1),s(u,r,t)&&o(e[a+1],t.greedy)})}},{"./util/underscore.js":21}],23:[function(e,t,r){"use strict";var n=e("..").lexical,s=e("any-promise"),i=new RegExp("("+n.identifier.source+")\\s*=(.*)"),o=e("../src/util/assert.js");t.exports=function(e){e.registerTag("assign",{parse:function(e){var t=e.args.match(i);o(t,"illegal token "+e.raw),this.key=t[1],this.value=t[2]},render:function(t){return t.set(this.key,e.evalValue(this.value,t)),s.resolve("")}})}},{"..":2,"../src/util/assert.js":16,"any-promise":3}],24:[function(e,t,r){"use strict";var n=e("..").lexical,s=new RegExp("("+n.identifier.source+")"),i=e("../src/util/assert.js");t.exports=function(e){e.registerTag("capture",{parse:function(t,r){var n=this,o=t.args.match(s);i(o,t.args+" not valid identifier"),this.variable=o[1],this.templates=[];var u=e.parser.parseStream(r);u.on("tag:endcapture",function(e){return u.stop()}).on("template",function(e){return n.templates.push(e)}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")}),u.start()},render:function(t,r){var n=this;return e.renderer.renderTemplates(this.templates,t).then(function(e){t.set(n.variable,e)})}})}},{"..":2,"../src/util/assert.js":16}],25:[function(e,t,r){"use strict";var n=e("..");t.exports=function(e){e.registerTag("case",{parse:function(t,r){var n=this;this.cond=t.args,this.cases=[],this.elseTemplates=[];var s=[],i=e.parser.parseStream(r).on("tag:when",function(e){n.cases.push({val:e.args,templates:s=[]})}).on("tag:else",function(){return s=n.elseTemplates}).on("tag:endcase",function(e){return i.stop()}).on("template",function(e){return s.push(e)}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t,r){for(var s=0;s<this.cases.length;s++){var i=this.cases[s];if(n.evalExp(i.val,t)===n.evalExp(this.cond,t))return e.renderer.renderTemplates(i.templates,t)}return e.renderer.renderTemplates(this.elseTemplates,t)}})}},{"..":2}],26:[function(e,t,r){"use strict";t.exports=function(e){e.registerTag("comment",{parse:function(t,r){var n=e.parser.parseStream(r);n.on("token",function(e){"endcomment"===e.name&&n.stop()}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")}),n.start()}})}},{}],27:[function(e,t,r){"use strict";var n=e(".."),s=e("any-promise"),i=n.lexical,o=new RegExp("^(?:("+i.value.source+")\\s*:\\s*)?(.*)$"),u=new RegExp(i.value.source,"g"),a=e("../src/util/assert.js");t.exports=function(e){e.registerTag("cycle",{parse:function(e,t){var r=o.exec(e.args);a(r,"illegal tag: "+e.raw),this.group=r[1]||"";var n=r[2];for(this.candidates=[];r=u.exec(n);)this.candidates.push(r[0]);a(this.candidates.length,"empty candidates: "+e.raw)},render:function(e,t){var r="cycle:"+n.evalValue(this.group,e)+":"+this.candidates.join(","),i=e.opts.groups=e.opts.groups||{},o=i[r];void 0===o&&(o=i[r]=0);var u=this.candidates[o];return o=(o+1)%this.candidates.length,i[r]=o,s.resolve(n.evalValue(u,e))}})}},{"..":2,"../src/util/assert.js":16,"any-promise":3}],28:[function(e,t,r){"use strict";var n=e("..").lexical,s=e("../src/util/assert.js");t.exports=function(e){e.registerTag("decrement",{parse:function(e){var t=e.args.match(n.identifier);s(t,"illegal identifier "+e.args),this.variable=t[0]},render:function(e,t){var r=e.get(this.variable);"number"!=typeof r&&(r=0),e.set(this.variable,r-1)}})}},{"..":2,"../src/util/assert.js":16}],29:[function(e,t,r){"use strict";var n=e(".."),s=n.lexical,i=e("../src/util/promise.js").mapSeries,o=e("../src/util/underscore.js"),u=n.Types.RenderBreakError,a=e("../src/util/assert.js"),c=new RegExp("^("+s.identifier.source+")\\s+in\\s+("+s.value.source+")(?:\\s+"+s.hash.source+")*(?:\\s+(reversed))?(?:\\s+"+s.hash.source+")*$");t.exports=function(e){e.registerTag("for",{parse:function(t,r){var n=this,s=c.exec(t.args);a(s,"illegal tag: "+t.raw),this.variable=s[1],this.collection=s[2],this.reversed=!!s[3],this.templates=[],this.elseTemplates=[];var i,o=e.parser.parseStream(r).on("start",function(){return i=n.templates}).on("tag:else",function(){return i=n.elseTemplates}).on("tag:endfor",function(){return o.stop()}).on("template",function(e){return i.push(e)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});o.start()},render:function(t,r){var s=this,a=n.evalExp(this.collection,t);if(Array.isArray(a)||(o.isString(a)&&a.length>0?a=[a]:o.isObject(a)&&(a=Object.keys(a).map(function(e){return[e,a[e]]}))),!Array.isArray(a)||!a.length)return e.renderer.renderTemplates(this.elseTemplates,t);var c=a.length,l=r.offset||0,f=void 0===r.limit?a.length:r.limit;a=a.slice(l,l+f),this.reversed&&a.reverse();var p=a.map(function(e,t){var r={};return r[s.variable]=e,r.forloop={first:0===t,index:t+1,index0:t,last:t===c-1,length:c,rindex:c-t,rindex0:c-t-1},r}),h="";return i(p,function(r){return Promise.resolve().then(function(){return t.push(r)}).then(function(){return e.renderer.renderTemplates(s.templates,t)}).then(function(e){return h+=e}).catch(function(e){if(!(e instanceof u&&(h+=e.resolvedHTML,"continue"===e.message)))throw e}).then(function(){return t.pop()})}).catch(function(e){if(!(e instanceof u&&"break"===e.message))throw e}).then(function(){return h})}})}},{"..":2,"../src/util/assert.js":16,"../src/util/promise.js":19,"../src/util/underscore.js":21}],30:[function(e,t,r){"use strict";var n=e("..");t.exports=function(e){e.registerTag("if",{parse:function(t,r){var n=this;this.branches=[],this.elseTemplates=[];var s,i=e.parser.parseStream(r).on("start",function(){return n.branches.push({cond:t.args,templates:s=[]})}).on("tag:elsif",function(e){n.branches.push({cond:e.args,templates:s=[]})}).on("tag:else",function(){return s=n.elseTemplates}).on("tag:endif",function(e){return i.stop()}).on("template",function(e){return s.push(e)}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t,r){for(var s=0;s<this.branches.length;s++){var i=this.branches[s],o=n.evalExp(i.cond,t);if(n.isTruthy(o))return e.renderer.renderTemplates(i.templates,t)}return e.renderer.renderTemplates(this.elseTemplates,t)}})}},{"..":2}],31:[function(e,t,r){"use strict";var n=e(".."),s=n.lexical,i=new RegExp("with\\s+("+s.value.source+")"),o=e("../src/util/assert.js");t.exports=function(e){e.registerTag("include",{parse:function(e){var t=s.value.exec(e.args);o(t,"illegal token "+e.raw),this.value=t[0],(t=i.exec(e.args))&&(this.with=t[1])},render:function(t,r){var s=n.evalValue(this.value,t),i=t.opts.blocks,o=t.opts.blockMode;return t.opts.blocks={},t.opts.blockMode="output",this.with&&(r[s]=n.evalValue(this.with,t)),e.getTemplate(s,t.opts.root).then(function(n){return t.push(r),e.renderer.renderTemplates(n,t)}).then(function(e){return t.pop(),t.opts.blocks=i,t.opts.blockMode=o,e})}})}},{"..":2,"../src/util/assert.js":16}],32:[function(e,t,r){"use strict";var n=e(".."),s=e("../src/util/assert.js"),i=n.lexical;t.exports=function(e){e.registerTag("increment",{parse:function(e){var t=e.args.match(i.identifier);s(t,"illegal identifier "+e.args),this.variable=t[0]},render:function(e,t){var r=e.get(this.variable);"number"!=typeof r&&(r=0),e.set(this.variable,r+1)}})}},{"..":2,"../src/util/assert.js":16}],33:[function(e,t,r){"use strict";t.exports=function(t){e("./assign.js")(t),e("./capture.js")(t),e("./case.js")(t),e("./comment.js")(t),e("./cycle.js")(t),e("./decrement.js")(t),e("./for.js")(t),e("./if.js")(t),e("./include.js")(t),e("./increment.js")(t),e("./layout.js")(t),e("./raw.js")(t),e("./tablerow.js")(t),e("./unless.js")(t)}},{"./assign.js":23,"./capture.js":24,"./case.js":25,"./comment.js":26,"./cycle.js":27,"./decrement.js":28,"./for.js":29,"./if.js":30,"./include.js":31,"./increment.js":32,"./layout.js":34,"./raw.js":35,"./tablerow.js":36,"./unless.js":37}],34:[function(e,t,r){"use strict";var n=e(".."),s=e("any-promise"),i=n.lexical,o=e("../src/util/assert.js");t.exports=function(e){e.registerTag("layout",{parse:function(t,r){var n=i.value.exec(t.args);o(n,"illegal token "+t.raw),this.layout=n[0],this.tpls=e.parser.parse(r)},render:function(t,r){var s=n.evalValue(this.layout,t);return t.opts.blockMode="store",e.renderer.renderTemplates(this.tpls,t).then(function(r){return void 0===t.opts.blocks[""]&&(t.opts.blocks[""]=r),e.getTemplate(s,t.opts.root)}).then(function(n){return t.push(r),t.opts.blockMode="output",e.renderer.renderTemplates(n,t)}).then(function(e){return t.pop(),e})}}),e.registerTag("block",{parse:function(t,r){var n=this,s=/\w+/.exec(t.args);this.block=s?s[0]:"",this.tpls=[];var i=e.parser.parseStream(r).on("tag:endblock",function(){return i.stop()}).on("template",function(e){return n.tpls.push(e)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t){var r=this;return s.resolve(t.opts.blocks[this.block]).then(function(n){return void 0===n?e.renderer.renderTemplates(r.tpls,t):n}).then(function(e){return"store"===t.opts.blockMode?(t.opts.blocks[r.block]=e,""):e})}})}},{"..":2,"../src/util/assert.js":16,"any-promise":3}],35:[function(e,t,r){"use strict";var n=e("any-promise");t.exports=function(e){e.registerTag("raw",{parse:function(t,r){var n=this;this.tokens=[];var s=e.parser.parseStream(r);s.on("token",function(e){"endraw"===e.name?s.stop():n.tokens.push(e)}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")}),s.start()},render:function(e,t){var r=this.tokens.map(function(e){return e.raw}).join("");return n.resolve(r)}})}},{"any-promise":3}],36:[function(e,t,r){"use strict";var n=e(".."),s=e("../src/util/promise.js").mapSeries,i=n.lexical,o=e("../src/util/assert.js"),u=new RegExp("^("+i.identifier.source+")\\s+in\\s+("+i.value.source+")(?:\\s+"+i.hash.source+")*$");t.exports=function(e){e.registerTag("tablerow",{parse:function(t,r){var n=this,s=u.exec(t.args);o(s,"illegal tag: "+t.raw),this.variable=s[1],this.collection=s[2],this.templates=[];var i,a=e.parser.parseStream(r).on("start",function(){return i=n.templates}).on("tag:endtablerow",function(e){return a.stop()}).on("template",function(e){return i.push(e)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});a.start()},render:function(t,r){var i,o,u=this,a=n.evalExp(this.collection,t)||[],c="<table>",l=r.offset||0,f=void 0===r.limit?a.length:r.limit,p=r.cols;if(!p)throw new Error("illegal cols: "+p);var h=[];return(a=a.slice(l,l+f)).some(function(e,t){var r={};r[u.variable]=e,h.push(r)}),s(h,function(r,n){return i=Math.floor(n/p)+1,1===(o=n%p+1)&&(1!==i&&(c+="</tr>"),c+='<tr class="row'+i+'">'),c+='<td class="col'+o+'">',t.push(r),e.renderer.renderTemplates(u.templates,t).then(function(e){return t.pop(r),c+=e,c+="</td>"})}).then(function(){return i>0&&(c+="</tr>"),c+="</table>"})}})}},{"..":2,"../src/util/assert.js":16,"../src/util/promise.js":19}],37:[function(e,t,r){"use strict";var n=e("..");t.exports=function(e){e.registerTag("unless",{parse:function(t,r){var n=this;this.templates=[],this.elseTemplates=[];var s,i=e.parser.parseStream(r).on("start",function(e){s=n.templates,n.cond=t.args}).on("tag:else",function(e){return s=n.elseTemplates}).on("tag:endunless",function(e){return i.stop()}).on("template",function(e){return s.push(e)}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t,r){var s=n.evalExp(this.cond,t);return n.isFalsy(s)?e.renderer.renderTemplates(this.templates,t):e.renderer.renderTemplates(this.elseTemplates,t)}})}},{"..":2}]},{},[2])(2)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Liquid=e()}}(function(){return function e(t,r,n){function s(o,u){if(!r[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return s(r||e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var i="function"==typeof require&&require,o=0;o<n.length;o++)s(n[o]);return s}({1:[function(e,t,r){"use strict";function n(e){return i(e).replace(/&|<|>|"|'/g,function(e){return f[e]})}function s(e){var t=(e+"").split(".");return t.length>1?t[1].length:0}function i(e){return e+""}function o(e){return function(t,r){var n=function(e,t){return Math.max(s(e),s(t))}(t,r);return e(t,r).toFixed(n)}}function u(e){return c.forOwn(h,function(t,r){return e.registerFilter(r,t)})}var a=e("./src/util/strftime.js"),c=e("./src/util/underscore.js"),l=e("./src/syntax.js").isTruthy,f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},p={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"},h={abs:function(e){return Math.abs(e)},append:function(e,t){return e+t},capitalize:function(e){return i(e).charAt(0).toUpperCase()+e.slice(1)},ceil:function(e){return Math.ceil(e)},concat:function(e,t){return Array.prototype.concat.call(e,t)},date:function(e,t){var r=e;return"now"===e?r=new Date:c.isString(e)&&(r=new Date(e)),function(e){return e instanceof Date&&!isNaN(e.getTime())}(r)?a(r,t):e},default:function(e,t){return l(e)?e:t},divided_by:function(e,t){return Math.floor(e/t)},downcase:function(e){return e.toLowerCase()},escape:n,escape_once:function(e){return n(function(e){return i(e).replace(/&(amp|lt|gt|#34|#39);/g,function(e){return p[e]})}(e))},first:function(e){return e[0]},floor:function(e){return Math.floor(e)},join:function(e,t){return e.join(t)},last:function(e){return e[e.length-1]},lstrip:function(e){return i(e).replace(/^\s+/,"")},map:function(e,t){return e.map(function(e){return e[t]})},minus:o(function(e,t){return e-t}),modulo:o(function(e,t){return e%t}),newline_to_br:function(e){return e.replace(/\n/g,"<br />")},plus:o(function(e,t){return Number(e)+Number(t)}),prepend:function(e,t){return t+e},remove:function(e,t){return e.split(t).join("")},remove_first:function(e,t){return e.replace(t,"")},replace:function(e,t,r){return i(e).split(t).join(r)},replace_first:function(e,t,r){return i(e).replace(t,r)},reverse:function(e){return e.reverse()},round:function(e,t){var r=Math.pow(10,t||0);return Math.round(e*r,t)/r},rstrip:function(e){return i(e).replace(/\s+$/,"")},size:function(e){return e.length},slice:function(e,t,r){return e.substr(t,void 0===r?1:r)},sort:function(e,t){return e.sort(t)},split:function(e,t){return i(e).split(t)},strip:function(e){return i(e).trim()},strip_html:function(e){return i(e).replace(/<\/?\s*\w+\s*\/?>/g,"")},strip_newlines:function(e){return i(e).replace(/\n/g,"")},times:function(e,t){return e*t},truncate:function(e,t,r){return e=i(e),r=void 0===r?"...":r,t=t||16,e.length<=t?e:e.substr(0,t-r.length)+r},truncatewords:function(e,t,r){void 0===r&&(r="...");var n=e.split(" "),s=n.slice(0,t).join(" ");return n.length>t&&(s+=r),s},uniq:function(e){var t={};return(e||[]).filter(function(e){return!t.hasOwnProperty(e)&&(t[e]=!0,!0)})},upcase:function(e){return i(e).toUpperCase()},url_encode:encodeURIComponent};u.filters=h,t.exports=u},{"./src/syntax.js":13,"./src/util/strftime.js":20,"./src/util/underscore.js":21}],2:[function(e,t,r){"use strict";function n(e){(e=i.assign({root:["."],cache:!1,extname:"",trim_tag_right:!1,trim_tag_left:!1,trim_value_right:!1,trim_value_left:!1,greedy:!0,strict_filters:!1,strict_variables:!1},e)).root=function(e){return Array.isArray(e)?e:i.isString(e)?[e]:[]}(e.root);var t=Object.create(b);return t.init(h(),g(e),e),t}var s=e("./src/scope"),i=e("./src/util/underscore.js"),o=e("./src/util/assert.js"),u=e("./src/tokenizer.js"),a=e("./src/util/fs.js").statFileAsync,c=e("./src/util/fs.js").readFileAsync,l=e("path"),f=e("./src/render.js"),p=e("./src/lexical.js"),h=e("./src/tag.js"),g=e("./src/filter.js"),d=e("./src/parser"),v=e("./src/syntax.js"),m=e("./tags"),y=e("./filters"),j=e("any-promise"),w=e("./src/util/promise.js").anySeries,x=e("./src/util/error.js"),b={init:function(e,t,r){return r.cache&&(this.cache={}),this.options=r,this.tag=e,this.filter=t,this.parser=d(e,t),this.renderer=f(),m(this),y(this),this},parse:function(e,t){var r=u.parse(e,t,this.options);return this.parser.parse(r)},render:function(e,t,r){r=i.assign({},this.options,r);var n=s.factory(t,r);return this.renderer.renderTemplates(e,n)},parseAndRender:function(e,t,r){var n=this;return j.resolve().then(function(){return n.parse(e)}).then(function(e){return n.render(e,t,r)})},renderFile:function(e,t,r){var n=this;return r=i.assign({},r),this.getTemplate(e,r.root).then(function(e){return n.render(e,t,r)})},evalOutput:function(e,t){return console.warn("[liquidjs:deprecated] use .evalValue() instead of .evalOutput"),this.evalValue(e,t)},evalValue:function(e,t){var r=this.parser.parseValue(e.trim());return this.renderer.evalValue(r,t)},registerFilter:function(e,t){return this.filter.register(e,t)},registerTag:function(e,t){return this.tag.register(e,t)},lookup:function(e,t){t=this.options.root.concat(t||[]);var r=(t=i.uniq(t)).map(function(t){return l.resolve(t,e)});return w(r,function(e){return a(e).then(function(){return e})}).catch(function(r){throw r.message=r.code+": Failed to lookup "+e+" in: "+t,r})},getTemplate:function(e,t){var r=this;return l.extname(e)||(e+=this.options.extname),this.lookup(e,t).then(function(e){if(r.options.cache){var t=r.cache[e];return t?j.resolve(t):c(e).then(function(e){return r.parse(e)}).then(function(t){return r.cache[e]=t})}return c(e).then(function(t){return r.parse(t,e)})})},express:function(e){e=e||{};var t=this;return function(r,n,s){o(Array.isArray(this.root)||i.isString(this.root),"illegal views root, are you using express.js?"),e.root=this.root,t.renderFile(r,n,e).then(function(e){return s(null,e)}).catch(function(e){return s(e)})}}};n.lexical=p,n.isTruthy=v.isTruthy,n.isFalsy=v.isFalsy,n.evalExp=v.evalExp,n.evalValue=v.evalValue,n.Types={ParseError:x.ParseError,TokenizationEroor:x.TokenizationError,RenderBreakError:x.RenderBreakError,AssertionError:x.AssertionError},t.exports=n},{"./filters":1,"./src/filter.js":7,"./src/lexical.js":8,"./src/parser":10,"./src/render.js":11,"./src/scope":12,"./src/syntax.js":13,"./src/tag.js":14,"./src/tokenizer.js":15,"./src/util/assert.js":16,"./src/util/error.js":17,"./src/util/fs.js":18,"./src/util/promise.js":19,"./src/util/underscore.js":21,"./tags":33,"any-promise":3,path:6}],3:[function(e,t,r){"use strict";t.exports=e("./register")().Promise},{"./register":5}],4:[function(e,t,r){"use strict";var n="@@any-promise/REGISTRATION",s=null;t.exports=function(e,t){return function(r,i){r=r||null;var o=!1!==(i=i||{}).global;if(null===s&&o&&(s=e[n]||null),null!==s&&null!==r&&s.implementation!==r)throw new Error('any-promise already defined as "'+s.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===s&&(s=null!==r&&void 0!==i.Promise?{Promise:i.Promise,implementation:r}:t(r),o&&(e[n]=s)),s}}},{}],5:[function(e,t,r){"use strict";t.exports=e("./loader")(window,function(){if(void 0===window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}})},{"./loader":4}],6:[function(e,t,r){"use strict"},{}],7:[function(e,t,r){"use strict";var n=e("./lexical.js"),s=e("./syntax.js"),i=e("./util/assert.js"),o=e("./util/underscore.js"),u=new RegExp(""+n.value.source,"g");t.exports=function(e){e=o.assign({},e);var t={},r={render:function(e,t){var r=this.args.map(function(e){return s.evalValue(e,t)});return r.unshift(e),this.filter.apply(null,r)},parse:function(r){var s=n.filterLine.exec(r);i(s,"illegal filter: "+r);var o=s[1],a=s[2]||"",c=t[o];if("function"!=typeof c){if(e.strict_filters)throw new TypeError("undefined filter: "+o);return this.name=o,this.filter=function(e){return e},this.args=[],this}for(var l=[];s=u.exec(a.trim());){var f=s[0];new RegExp(f+"\\s*:","g").test(s.input)?l.push("'"+f+"'"):l.push(f)}return this.name=o,this.filter=c,this.args=l,this}};return{construct:function(e){return Object.create(r).parse(e)},register:function(e,r){t[e]=r},clear:function(){t={}}}}},{"./lexical.js":8,"./syntax.js":13,"./util/assert.js":16,"./util/underscore.js":21}],8:[function(e,t,r){"use strict";var n=new RegExp(/'[^']*'/.source+"|"+/"[^"]*"/.source),s=new RegExp("(?:"+n.source+"|[^'\"])*"),i=/-?\d+/,o=/-?\d+\.?\d*|\.?\d+/,u=/true|false/,a=/[\w-]+/,c=new RegExp("\\[(?:"+n.source+"|[\\w-\\.]+)\\]"),l=new RegExp("(?:"+n.source+"|"+u.source+"|"+o.source+")"),f=new RegExp(a.source+"(?:\\."+a.source+"|"+c.source+")*"),p=new RegExp("(?:"+f.source+"|"+o.source+")"),h=new RegExp("\\("+p.source+"\\.\\."+p.source+"\\)"),g=new RegExp("\\(("+p.source+")\\.\\.("+p.source+")\\)"),d=new RegExp("(?:"+f.source+"|"+l.source+"|"+h.source+")"),v=new RegExp("(?:"+a.source+")\\s*:\\s*(?:"+d.source+")"),m=new RegExp("("+a.source+")\\s*:\\s*("+d.source+")","g"),y=new RegExp("^\\s*("+a.source+")\\s*([\\s\\S]*)\\s*$"),j=new RegExp("^"+l.source+"$","i"),w=new RegExp("^"+f.source+"$"),x=new RegExp("^"+o.source+"$"),b=new RegExp("^"+u.source+"$","i"),E=new RegExp("^"+n.source+"$"),T=new RegExp("^"+g.source+"$"),k=new RegExp("^"+i.source+"$"),S=new RegExp("(?:"+a.source+"\\s*:\\s*)?"+d.source),R=new RegExp(S.source+"(\\s*,\\s*"+S.source+")*"),O=new RegExp(a.source+"(?:\\s*:\\s*"+R.source+")?","g"),_=new RegExp("("+a.source+")(?:\\s*:\\s*("+R.source+"))?"),M=new RegExp("^"+_.source+"$");t.exports={quoted:n,number:o,bool:u,literal:l,filter:O,integer:i,hash:v,hashCapture:m,range:h,rangeCapture:g,identifier:a,value:d,quoteBalanced:s,operators:[/\s+or\s+/,/\s+and\s+/,/==|!=|<=|>=|<|>|\s+contains\s+/],quotedLine:E,numberLine:x,boolLine:b,rangeLine:T,literalLine:j,filterLine:M,tagLine:y,isLiteral:function(e){return j.test(e)},isVariable:function(e){return w.test(e)},parseLiteral:function(e){var t=e.match(x);if(t)return Number(e);if(t=e.match(b))return"true"===e.toLowerCase();if(t=e.match(E))return e.slice(1,-1);throw new TypeError("cannot parse '"+e+"' as literal")},isRange:function(e){return T.test(e)},matchValue:function(e){return d.exec(e)},isInteger:function(e){return k.test(e)}}},{}],9:[function(e,t,r){"use strict";t.exports=function(e){return{"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},">":function(e,t){return null!==e&&null!==t&&e>t},"<":function(e,t){return null!==e&&null!==t&&e<t},">=":function(e,t){return null!==e&&null!==t&&e>=t},"<=":function(e,t){return null!==e&&null!==t&&e<=t},contains:function(e,t){return!!e&&("function"==typeof e.indexOf&&e.indexOf(t)>-1)},and:function(t,r){return e(t)&&e(r)},or:function(t,r){return e(t)||e(r)}}}},{}],10:[function(e,t,r){"use strict";var n=e("./lexical.js"),s=e("./util/error.js").ParseError,i=e("./util/assert.js");t.exports=function(e,t){function r(e,t){try{var r=null;return r="tag"===e.type?o(e,t):"value"===e.type?u(e.value):e,r.token=e,r}catch(t){throw new s(t,e)}}function o(t,r){return"continue"===t.name||"break"===t.name?t:e.construct(t,r)}function u(e){var r=n.matchValue(e);i(r,"illegal value string: "+e);var s=r[0];e=e.substr(r.index+r[0].length);for(var o=[];r=n.filter.exec(e);)o.push([r[0].trim()]);return{type:"value",initial:s,filters:o.map(function(e){return t.construct(e)})}}var a={init:function(e){return this.tokens=e,this.handlers={},this},on:function(e,t){return this.handlers[e]=t,this},trigger:function(e,t){var r=this.handlers[e];if("function"==typeof r)return r(t),!0},start:function(){this.trigger("start");for(var e;!this.stopRequested&&(e=this.tokens.shift());)if(!(this.trigger("token",e)||"tag"===e.type&&this.trigger("tag:"+e.name,e))){var t=r(e,this.tokens);this.trigger("template",t)}return this.stopRequested||this.trigger("end"),this},stop:function(){return this.stopRequested=!0,this}};return{parse:function(e){for(var t,n=[];t=e.shift();)n.push(r(t,e));return n},parseTag:o,parseStream:function(e){return Object.create(a).init(e)},parseValue:u}}},{"./lexical.js":8,"./util/assert.js":16,"./util/error.js":17}],11:[function(e,t,r){"use strict";var n=e("./syntax.js"),s=e("any-promise"),i=e("./util/promise.js").mapSeries,o=e("./util/error.js").RenderBreakError,u=e("./util/error.js").RenderError,a=e("./util/assert.js"),c={renderTemplates:function(e,t){function r(e){var r=this;return"tag"===e.type?this.renderTag(e,t).then(function(e){return void 0===e?"":e}):"value"===e.type?s.resolve().then(function(){return r.evalValue(e,t)}).then(function(e){return void 0===e?"":function(e){return"string"==typeof e?e:JSON.stringify(e)}(e)}):s.resolve(e.value)}var n=this;a(t,"unable to evalTemplates: scope undefined");var c="";return i(e,function(e){return r.call(n,e).then(function(e){return c+=e}).catch(function(t){if(t instanceof o)throw t.resolvedHTML=c,t;throw new u(t,e)})}).then(function(){return c})},renderTag:function(e,t){return"continue"===e.name?s.reject(new o("continue")):"break"===e.name?s.reject(new o("break")):e.render(t)},evalValue:function(e,t){return a(t,"unable to evalValue: scope undefined"),e.filters.reduce(function(e,r){return r.render(e,t)},n.evalExp(e.initial,t))}};t.exports=function(){return Object.create(c)}},{"./syntax.js":13,"./util/assert.js":16,"./util/error.js":17,"./util/promise.js":19,"any-promise":3}],12:[function(e,t,r){"use strict";var n=e("./util/underscore.js"),s=e("./lexical.js"),i=e("./util/assert.js"),o={getAll:function(){for(var e={},t=this.scopes.length-1;t>=0;t--)n.assign(e,this.scopes[t]);return e},get:function(e){if("liquid"===e)throw new Error('NO LONGER SUPPORTED: use scope.opts instead of scope.get("liquid")');try{return this.getPropertyByPath(this.scopes,e)}catch(e){if(!/undefined variable/.test(e.message)||this.opts.strict_variables)throw e}},set:function(e,t){return function(e,t,r){for(var n=(t+"").replace(/\[/g,".").replace(/\]/g,"").split("."),s=0;s<n.length;s++){var i=n[s];if(s===n.length-1)return e[i]=r;void 0===e[i]&&(e[i]={}),e=e[i]||{}}}(this.findScopeFor(e),e,t),this},push:function(e){return i(e,"trying to push "+e+" into scopes"),this.scopes.push(e)},pop:function(){return this.scopes.pop()},findScopeFor:function(e){for(var t=this.scopes.length-1;t>=0&&!(e in this.scopes[t]);)t--;return t<0&&(t=this.scopes.length-1),this.scopes[t]},unshift:function(e){return i(e,"trying to push "+e+" into scopes"),this.scopes.unshift(e)},shift:function(){return this.scopes.shift()},getPropertyByPath:function(e,t){var r=this.propertyAccessSeq(t+"");if(!r.length)throw new TypeError("undefined variable: "+t);var s=function(e,t){for(var r=t.length-1;r>-1;r--){var n=t[r];if(n.hasOwnProperty(e))return n[e]}throw new TypeError("undefined variable: "+e)}(r.shift(),e);return r.reduce(function(e,t){if(n.isNil(e))throw new TypeError("undefined variable: "+t);return function(e,t){return"size"===e&&(n.isArray(t)||n.isString(t))?t.length:t[e]}(t,e)},s)},propertyAccessSeq:function(e){function t(){o.length&&n.push(o),o=""}for(var r,n=[],o="",u=0;u<e.length;)switch(e[u]){case"[":t();var a=e[u+1];/['"]/.test(a)?(r=e.indexOf(a,u+2),i(-1!==r,"unbalanced "+a+": "+e),o=e.slice(u+2,r),t(),u=r+2):(r=function(e,t){for(var r=1,n=t;n<e.length;n++)if("["===e[n]&&r++,"]"===e[n]&&0==--r)return n;return-1}(e,u+1),i(-1!==r,"unbalanced []: "+e),o=e.slice(u+1,r),s.isInteger(o)||(o=this.get(o)),t(),u=r+1);break;case".":t(),u++;break;default:o+=e[u],u++}return t(),n}};r.factory=function(e,t){var r=Object.create(o);return r.opts=n.assign({strict_variables:!1,strict_filters:!1,blocks:{},root:[]},t),r.scopes=[e||{}],r}},{"./lexical.js":8,"./util/assert.js":16,"./util/underscore.js":21}],13:[function(e,t,r){"use strict";function n(e,t){c(t,"unable to evalExp: scope undefined");for(var r,i=a.operators,o=0;o<i.length;o++){var l=i[o],f=new RegExp("^("+a.quoteBalanced.source+")("+l.source+")("+a.quoteBalanced.source+")$");if(r=e.match(f)){var p=n(r[1],t);return(0,u[r[2].trim()])(p,n(r[3],t))}}if(r=e.match(a.rangeLine)){for(var h=s(r[1],t),g=s(r[2],t),d=[],v=h;v<=g;v++)d.push(v);return d}return s(e,t)}function s(e,t){if(e=e&&e.trim()){if(a.isLiteral(e))return a.parseLiteral(e);if(a.isVariable(e))return t.get(e);throw new TypeError("cannot eval '"+e+"' as value")}}function i(e){return!o(e)}function o(e){return!1===e||void 0===e||null===e}var u=e("./operators.js")(i),a=e("./lexical.js"),c=e("../src/util/assert.js");t.exports={evalExp:n,evalValue:s,isTruthy:i,isFalsy:o}},{"../src/util/assert.js":16,"./lexical.js":8,"./operators.js":9}],14:[function(e,t,r){"use strict";var n=e("./lexical.js"),s=e("any-promise"),i=e("./syntax.js"),o=e("./util/assert.js");t.exports=function(){var e={},t={render:function(e){var t=function(e,t){var r,s={};for(n.hashCapture.lastIndex=0;r=n.hashCapture.exec(e);){var o=r[1],u=r[2];s[o]=i.evalValue(u,t)}return s}(this.token.args,e),r=this.tagImpl;return"function"!=typeof r.render?s.resolve(""):s.resolve().then(function(){return r.render(e,t)})},parse:function(t,r){this.type="tag",this.token=t,this.name=t.name;var n=e[this.name];o(n,"tag "+this.name+" not found"),this.tagImpl=Object.create(n),this.tagImpl.parse&&this.tagImpl.parse(t,r)}};return{construct:function(e,r){var n=Object.create(t);return n.parse(e,r),n},register:function(t,r){e[t]=r},clear:function(){e={}}}}},{"./lexical.js":8,"./syntax.js":13,"./util/assert.js":16,"any-promise":3}],15:[function(e,t,r){"use strict";var n=e("./lexical.js"),s=e("./util/error.js").TokenizationError,i=e("./util/underscore.js"),o=e("./whitespace-ctrl.js"),u=e("./util/assert.js");r.parse=function(e,t,r){function a(t,r){var n=e.slice(t,r);return f=i.last((n||"").split("\n")).length,{type:"html",raw:n,value:n}}u(i.isString(e),"illegal input");for(var c,l=/({%-?([\s\S]*?)-?%})|({{-?([\s\S]*?)-?}})/g,f=0,p=function(e){var t=0,r=-1;return{get:function(n){var s=e.slice(r+1,n).split("\n");return t+=s.length-1,r=n,t+1}}}(e),h=0,g=[];c=l.exec(e);h=l.lastIndex)c.index>h&&g.push(a(h,c.index)),g.push(c[1]?function(r,i,o){var u=i.match(n.tagLine),a={type:"tag",indent:f,line:p.get(o),trim_left:"{%-"===r.slice(0,3),trim_right:"-%}"===r.slice(-3),raw:r,value:i,input:e,file:t};if(!u)throw new s("illegal tag syntax",a);return a.name=u[1],a.args=u[2],a}(c[1],c[2].trim(),c.index):function(r,n,s){return{type:"value",line:p.get(s),trim_left:"{{-"===r.slice(0,3),trim_right:"-}}"===r.slice(-3),raw:r,value:n,input:e,file:t}}(c[3],c[4].trim(),c.index));return e.length>h&&g.push(a(h,e.length)),o(g,r),g},r.whiteSpaceCtrl=o},{"./lexical.js":8,"./util/assert.js":16,"./util/error.js":17,"./util/underscore.js":21,"./whitespace-ctrl.js":22}],16:[function(e,t,r){"use strict";var n=e("./error.js").AssertionError;t.exports=function(e,t){if(!e)throw t=t||"expect "+e+" to be true",new n(t)}},{"./error.js":17}],17:[function(e,t,r){"use strict";function n(){this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}function s(e,t){n.call(this),this.input=t.input,this.line=t.line,this.file=t.file;var r=function(e,t){var r=e.split("\n"),n=Math.max(t-2,1),s=Math.min(t+3,r.length);return l.range(n,s+1).map(function(e){return[e===t?">> ":" ",function(e,t){var r=(t+"").length,n=e+"";return Array(r-n.length).join(" ")+n}(e,s),"| ",r[e-1]].join("")}).join("\n")}(t.input,t.line);this.message=function(e,t){e=e||"",t.file&&(e+=", file:"+t.file);t.line&&(e+=", line:"+t.line);return e}(e.message,t),this.stack=r+"\n"+(this.stack||this.message)+(e.stack?"\nFrom "+e.stack:"")}function i(e,t){s.call(this,{message:e},t)}function o(e,t){l.assign(this,e),this.originalError=e,s.call(this,e,t)}function u(e,t){if(e instanceof u)return e;l.assign(this,e),this.originalError=e,s.call(this,e,t.token)}function a(e){n.call(this),this.message=e+""}function c(e){n.call(this),this.message=e+""}var l=e("./underscore.js");(i.prototype=Object.create(Error.prototype)).constructor=i,(o.prototype=Object.create(Error.prototype)).constructor=o,(u.prototype=Object.create(Error.prototype)).constructor=u,(a.prototype=Object.create(Error.prototype)).constructor=a,(c.prototype=Object.create(Error.prototype)).constructor=c,t.exports={TokenizationError:i,ParseError:o,RenderBreakError:a,AssertionError:c,RenderError:u}},{"./underscore.js":21}],18:[function(e,t,r){"use strict";var n=e("fs");t.exports={readFileAsync:function(e){return new Promise(function(t,r){n.readFile(e,"utf8",function(e,n){e?r(e):t(n)})})},statFileAsync:function(e){return new Promise(function(t,r){n.stat(e,function(e,n){return e?r(e):t(n)})})}}},{fs:6}],19:[function(e,t,r){"use strict";var n=e("any-promise");r.anySeries=function(e,t){var r=n.reject(new Error("init"));return e.forEach(function(n,s){r=r.catch(function(r){return t(n,s,e)})}),r},r.mapSeries=function(e,t){var r=n.resolve("init"),s=[];return e.forEach(function(n,i){r=r.then(function(){return t(n,i,e)}).then(function(e){return s.push(e)})}),r.then(function(){return s})}},{"any-promise":3}],20:[function(e,t,r){"use strict";var n=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],u={1:"st",2:"nd",3:"rd",default:"th"},a={daysInMonth:function(e){return[31,a.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31]},getDayOfYear:function(e){for(var t=0,r=0;r<e.getMonth();++r)t+=a.daysInMonth(e)[r];return t+e.getDate()},getWeekOfYear:function(e,t){var r=this.getDayOfYear(e)+(t-e.getDay()),n=7-new Date(e.getFullYear(),0,1).getDay()+t;return c.pad(Math.floor((r-n)/7)+1,2)},isLeapYear:function(e){var t=e.getFullYear();return!(0!=(3&t)||!(t%100||t%400==0&&t))},getSuffix:function(e){var t=e.getDate().toString(),r=parseInt(t.slice(-1));return u[r]||u.default},century:function(e){return parseInt(e.getFullYear().toString().substring(0,2),10)}},c={pad:function(e,t,r){r||(r="0");for(var n=e.toString(),s=t-n.length;s-- >0;)n=r+n;return n}},l={a:function(e){return o[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return s[e.getMonth()]},B:function(e){return n[e.getMonth()]},c:function(e){return e.toLocaleString()},C:function(e){return a.century(e)},d:function(e){return c.pad(e.getDate(),2)},e:function(e){return c.pad(e.getDate(),2," ")},H:function(e){return c.pad(e.getHours(),2)},I:function(e){return c.pad(e.getHours()%12||12,2)},j:function(e){return c.pad(a.getDayOfYear(e),3)},k:function(e){return c.pad(e.getHours(),2," ")},l:function(e){return c.pad(e.getHours()%12||12,2," ")},L:function(e){return c.pad(e.getMilliseconds(),3)},m:function(e){return c.pad(e.getMonth()+1,2)},M:function(e){return c.pad(e.getMinutes(),2)},p:function(e){return e.getHours()<12?"AM":"PM"},P:function(e){return e.getHours()<12?"am":"pm"},q:function(e){return a.getSuffix(e)},s:function(e){return Math.round(e.valueOf()/1e3)},S:function(e){return c.pad(e.getSeconds(),2)},u:function(e){return e.getDay()||7},U:function(e){return a.getWeekOfYear(e,0)},w:function(e){return e.getDay()},W:function(e){return a.getWeekOfYear(e,1)},x:function(e){return e.toLocaleDateString()},X:function(e){return e.toLocaleTimeString()},y:function(e){return e.getFullYear().toString().substring(2,4)},Y:function(e){return e.getFullYear()},z:function(e){var t=e.getTimezoneOffset()/60*100;return(t>0?"-":"+")+c.pad(Math.abs(t),4)},"%":function(){return"%"}};l.h=l.b,l.N=l.L;t.exports=function(e,t){for(var r="",n=t;;){var s=/%./g,i=s.exec(n);if(!i)return r+n;r+=n.slice(0,s.lastIndex-2),n=n.slice(s.lastIndex);var o=i[0].charAt(1),u=l[o];r+=u?u.call(this,e):"%"+o}}},{}],21:[function(e,t,r){"use strict";function n(e,t){e=e||{};for(var r in e)if(e.hasOwnProperty(r)&&!1===t(e[r],r,e))break;return e}function s(e){var t=void 0===e?"undefined":i(e);return null!=e&&("object"===t||"function"===t)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=Object.prototype.toString;r.isString=function(e){return e instanceof String||"string"==typeof e},r.isObject=s,r.isArray=function(e){return"[object Array]"===o.call(e)},r.isNil=function(e){return null===e||void 0===e},r.isError=function(e){return"Error"===Object.prototype.toString.call(e).substr(-6,5)||"string"==typeof e.message&&"string"==typeof e.name},r.range=function(e,t,r){1===arguments.length&&(t=e,e=0),r=r||1;for(var n=[],s=e;s<t;s+=r)n.push(s);return n},r.last=function(e){return e[e.length-1]},r.forOwn=n,r.assign=function(e){return e=s(e)?e:{},Array.prototype.slice.call(arguments,1).forEach(function(t){!function(e,t){n(t,function(t,r){e[r]=t})}(e,t)}),e},r.uniq=function(e){for(var t={},r=[],n=0,s=e.length;n<s;++n)t.hasOwnProperty(e[n])||(r.push(e[n]),t[e[n]]=1);return r}},{}],22:[function(e,t,r){"use strict";var n=e("./util/underscore.js");t.exports=function(e,t){t=n.assign({greedy:!0},t);var r=!1;e.forEach(function(n,s){(function(e,t,r){return!t&&("tag"===e.type?e.trim_left||r.trim_tag_left:"value"===e.type?e.trim_left||r.trim_value_left:void 0)})(n,r,t)&&function(e,t){if(e&&"html"===e.type){var r=t?/\s+$/g:/[\t\r ]*$/g;e.value=e.value.replace(r,"")}}(e[s-1],t.greedy),"tag"===n.type&&"raw"===n.name&&(r=!0),"tag"===n.type&&"endraw"===n.name&&(r=!1),function(e,t,r){return!t&&("tag"===e.type?e.trim_right||r.trim_tag_right:"value"===e.type?e.trim_right||r.trim_value_right:void 0)}(n,r,t)&&function(e,t){if(e&&"html"===e.type){var r=t?/^\s+/g:/^[\t\r ]*\n?/g;e.value=e.value.replace(r,"")}}(e[s+1],t.greedy)})}},{"./util/underscore.js":21}],23:[function(e,t,r){"use strict";var n=e("..").lexical,s=e("any-promise"),i=new RegExp("("+n.identifier.source+")\\s*=(.*)"),o=e("../src/util/assert.js");t.exports=function(e){e.registerTag("assign",{parse:function(e){var t=e.args.match(i);o(t,"illegal token "+e.raw),this.key=t[1],this.value=t[2]},render:function(t){return t.set(this.key,e.evalValue(this.value,t)),s.resolve("")}})}},{"..":2,"../src/util/assert.js":16,"any-promise":3}],24:[function(e,t,r){"use strict";var n=e("..").lexical,s=new RegExp("("+n.identifier.source+")"),i=e("../src/util/assert.js");t.exports=function(e){e.registerTag("capture",{parse:function(t,r){var n=this,o=t.args.match(s);i(o,t.args+" not valid identifier"),this.variable=o[1],this.templates=[];var u=e.parser.parseStream(r);u.on("tag:endcapture",function(e){return u.stop()}).on("template",function(e){return n.templates.push(e)}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")}),u.start()},render:function(t,r){var n=this;return e.renderer.renderTemplates(this.templates,t).then(function(e){t.set(n.variable,e)})}})}},{"..":2,"../src/util/assert.js":16}],25:[function(e,t,r){"use strict";var n=e("..");t.exports=function(e){e.registerTag("case",{parse:function(t,r){var n=this;this.cond=t.args,this.cases=[],this.elseTemplates=[];var s=[],i=e.parser.parseStream(r).on("tag:when",function(e){n.cases.push({val:e.args,templates:s=[]})}).on("tag:else",function(){return s=n.elseTemplates}).on("tag:endcase",function(e){return i.stop()}).on("template",function(e){return s.push(e)}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t,r){for(var s=0;s<this.cases.length;s++){var i=this.cases[s];if(n.evalExp(i.val,t)===n.evalExp(this.cond,t))return e.renderer.renderTemplates(i.templates,t)}return e.renderer.renderTemplates(this.elseTemplates,t)}})}},{"..":2}],26:[function(e,t,r){"use strict";t.exports=function(e){e.registerTag("comment",{parse:function(t,r){var n=e.parser.parseStream(r);n.on("token",function(e){"endcomment"===e.name&&n.stop()}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")}),n.start()}})}},{}],27:[function(e,t,r){"use strict";var n=e(".."),s=e("any-promise"),i=n.lexical,o=new RegExp("^(?:("+i.value.source+")\\s*:\\s*)?(.*)$"),u=new RegExp(i.value.source,"g"),a=e("../src/util/assert.js");t.exports=function(e){e.registerTag("cycle",{parse:function(e,t){var r=o.exec(e.args);a(r,"illegal tag: "+e.raw),this.group=r[1]||"";var n=r[2];for(this.candidates=[];r=u.exec(n);)this.candidates.push(r[0]);a(this.candidates.length,"empty candidates: "+e.raw)},render:function(e,t){var r="cycle:"+n.evalValue(this.group,e)+":"+this.candidates.join(","),i=e.opts.groups=e.opts.groups||{},o=i[r];void 0===o&&(o=i[r]=0);var u=this.candidates[o];return o=(o+1)%this.candidates.length,i[r]=o,s.resolve(n.evalValue(u,e))}})}},{"..":2,"../src/util/assert.js":16,"any-promise":3}],28:[function(e,t,r){"use strict";var n=e("..").lexical,s=e("../src/util/assert.js");t.exports=function(e){e.registerTag("decrement",{parse:function(e){var t=e.args.match(n.identifier);s(t,"illegal identifier "+e.args),this.variable=t[0]},render:function(e,t){var r=e.get(this.variable);"number"!=typeof r&&(r=0),e.set(this.variable,r-1)}})}},{"..":2,"../src/util/assert.js":16}],29:[function(e,t,r){"use strict";var n=e(".."),s=n.lexical,i=e("../src/util/promise.js").mapSeries,o=e("../src/util/underscore.js"),u=n.Types.RenderBreakError,a=e("../src/util/assert.js"),c=new RegExp("^("+s.identifier.source+")\\s+in\\s+("+s.value.source+")(?:\\s+"+s.hash.source+")*(?:\\s+(reversed))?(?:\\s+"+s.hash.source+")*$");t.exports=function(e){e.registerTag("for",{parse:function(t,r){var n=this,s=c.exec(t.args);a(s,"illegal tag: "+t.raw),this.variable=s[1],this.collection=s[2],this.reversed=!!s[3],this.templates=[],this.elseTemplates=[];var i,o=e.parser.parseStream(r).on("start",function(){return i=n.templates}).on("tag:else",function(){return i=n.elseTemplates}).on("tag:endfor",function(){return o.stop()}).on("template",function(e){return i.push(e)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});o.start()},render:function(t,r){var s=this,a=n.evalExp(this.collection,t);if(Array.isArray(a)||(o.isString(a)&&a.length>0?a=[a]:o.isObject(a)&&(a=Object.keys(a).map(function(e){return[e,a[e]]}))),!Array.isArray(a)||!a.length)return e.renderer.renderTemplates(this.elseTemplates,t);var c=a.length,l=r.offset||0,f=void 0===r.limit?a.length:r.limit;a=a.slice(l,l+f),this.reversed&&a.reverse();var p=a.map(function(e,t){var r={};return r[s.variable]=e,r.forloop={first:0===t,index:t+1,index0:t,last:t===c-1,length:c,rindex:c-t,rindex0:c-t-1},r}),h="";return i(p,function(r){return Promise.resolve().then(function(){return t.push(r)}).then(function(){return e.renderer.renderTemplates(s.templates,t)}).then(function(e){return h+=e}).catch(function(e){if(!(e instanceof u&&(h+=e.resolvedHTML,"continue"===e.message)))throw e}).then(function(){return t.pop()})}).catch(function(e){if(!(e instanceof u&&"break"===e.message))throw e}).then(function(){return h})}})}},{"..":2,"../src/util/assert.js":16,"../src/util/promise.js":19,"../src/util/underscore.js":21}],30:[function(e,t,r){"use strict";var n=e("..");t.exports=function(e){e.registerTag("if",{parse:function(t,r){var n=this;this.branches=[],this.elseTemplates=[];var s,i=e.parser.parseStream(r).on("start",function(){return n.branches.push({cond:t.args,templates:s=[]})}).on("tag:elsif",function(e){n.branches.push({cond:e.args,templates:s=[]})}).on("tag:else",function(){return s=n.elseTemplates}).on("tag:endif",function(e){return i.stop()}).on("template",function(e){return s.push(e)}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t,r){for(var s=0;s<this.branches.length;s++){var i=this.branches[s],o=n.evalExp(i.cond,t);if(n.isTruthy(o))return e.renderer.renderTemplates(i.templates,t)}return e.renderer.renderTemplates(this.elseTemplates,t)}})}},{"..":2}],31:[function(e,t,r){"use strict";var n=e(".."),s=n.lexical,i=new RegExp("with\\s+("+s.value.source+")"),o=e("../src/util/assert.js");t.exports=function(e){e.registerTag("include",{parse:function(e){var t=s.value.exec(e.args);o(t,"illegal token "+e.raw),this.value=t[0],(t=i.exec(e.args))&&(this.with=t[1])},render:function(t,r){var s=n.evalValue(this.value,t),i=t.opts.blocks,o=t.opts.blockMode;return t.opts.blocks={},t.opts.blockMode="output",this.with&&(r[s]=n.evalValue(this.with,t)),e.getTemplate(s,t.opts.root).then(function(n){return t.push(r),e.renderer.renderTemplates(n,t)}).then(function(e){return t.pop(),t.opts.blocks=i,t.opts.blockMode=o,e})}})}},{"..":2,"../src/util/assert.js":16}],32:[function(e,t,r){"use strict";var n=e(".."),s=e("../src/util/assert.js"),i=n.lexical;t.exports=function(e){e.registerTag("increment",{parse:function(e){var t=e.args.match(i.identifier);s(t,"illegal identifier "+e.args),this.variable=t[0]},render:function(e,t){var r=e.get(this.variable);"number"!=typeof r&&(r=0),e.set(this.variable,r+1)}})}},{"..":2,"../src/util/assert.js":16}],33:[function(e,t,r){"use strict";t.exports=function(t){e("./assign.js")(t),e("./capture.js")(t),e("./case.js")(t),e("./comment.js")(t),e("./cycle.js")(t),e("./decrement.js")(t),e("./for.js")(t),e("./if.js")(t),e("./include.js")(t),e("./increment.js")(t),e("./layout.js")(t),e("./raw.js")(t),e("./tablerow.js")(t),e("./unless.js")(t)}},{"./assign.js":23,"./capture.js":24,"./case.js":25,"./comment.js":26,"./cycle.js":27,"./decrement.js":28,"./for.js":29,"./if.js":30,"./include.js":31,"./increment.js":32,"./layout.js":34,"./raw.js":35,"./tablerow.js":36,"./unless.js":37}],34:[function(e,t,r){"use strict";var n=e(".."),s=e("any-promise"),i=n.lexical,o=e("../src/util/assert.js");t.exports=function(e){e.registerTag("layout",{parse:function(t,r){var n=i.value.exec(t.args);o(n,"illegal token "+t.raw),this.layout=n[0],this.tpls=e.parser.parse(r)},render:function(t,r){var s=n.evalValue(this.layout,t);return t.opts.blockMode="store",e.renderer.renderTemplates(this.tpls,t).then(function(r){return void 0===t.opts.blocks[""]&&(t.opts.blocks[""]=r),e.getTemplate(s,t.opts.root)}).then(function(n){return t.push(r),t.opts.blockMode="output",e.renderer.renderTemplates(n,t)}).then(function(e){return t.pop(),e})}}),e.registerTag("block",{parse:function(t,r){var n=this,s=/\w+/.exec(t.args);this.block=s?s[0]:"",this.tpls=[];var i=e.parser.parseStream(r).on("tag:endblock",function(){return i.stop()}).on("template",function(e){return n.tpls.push(e)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t){var r=this;return s.resolve(t.opts.blocks[this.block]).then(function(n){return void 0===n?e.renderer.renderTemplates(r.tpls,t):n}).then(function(e){return"store"===t.opts.blockMode?(t.opts.blocks[r.block]=e,""):e})}})}},{"..":2,"../src/util/assert.js":16,"any-promise":3}],35:[function(e,t,r){"use strict";var n=e("any-promise");t.exports=function(e){e.registerTag("raw",{parse:function(t,r){var n=this;this.tokens=[];var s=e.parser.parseStream(r);s.on("token",function(e){"endraw"===e.name?s.stop():n.tokens.push(e)}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")}),s.start()},render:function(e,t){var r=this.tokens.map(function(e){return e.raw}).join("");return n.resolve(r)}})}},{"any-promise":3}],36:[function(e,t,r){"use strict";var n=e(".."),s=e("../src/util/promise.js").mapSeries,i=n.lexical,o=e("../src/util/assert.js"),u=new RegExp("^("+i.identifier.source+")\\s+in\\s+("+i.value.source+")(?:\\s+"+i.hash.source+")*$");t.exports=function(e){e.registerTag("tablerow",{parse:function(t,r){var n=this,s=u.exec(t.args);o(s,"illegal tag: "+t.raw),this.variable=s[1],this.collection=s[2],this.templates=[];var i,a=e.parser.parseStream(r).on("start",function(){return i=n.templates}).on("tag:endtablerow",function(e){return a.stop()}).on("template",function(e){return i.push(e)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});a.start()},render:function(t,r){var i,o,u=this,a=n.evalExp(this.collection,t)||[],c="<table>",l=r.offset||0,f=void 0===r.limit?a.length:r.limit,p=r.cols;if(!p)throw new Error("illegal cols: "+p);var h=[];return(a=a.slice(l,l+f)).some(function(e,t){var r={};r[u.variable]=e,h.push(r)}),s(h,function(r,n){return i=Math.floor(n/p)+1,1===(o=n%p+1)&&(1!==i&&(c+="</tr>"),c+='<tr class="row'+i+'">'),c+='<td class="col'+o+'">',t.push(r),e.renderer.renderTemplates(u.templates,t).then(function(e){return t.pop(r),c+=e,c+="</td>"})}).then(function(){return i>0&&(c+="</tr>"),c+="</table>"})}})}},{"..":2,"../src/util/assert.js":16,"../src/util/promise.js":19}],37:[function(e,t,r){"use strict";var n=e("..");t.exports=function(e){e.registerTag("unless",{parse:function(t,r){var n=this;this.templates=[],this.elseTemplates=[];var s,i=e.parser.parseStream(r).on("start",function(e){s=n.templates,n.cond=t.args}).on("tag:else",function(e){return s=n.elseTemplates}).on("tag:endunless",function(e){return i.stop()}).on("template",function(e){return s.push(e)}).on("end",function(e){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t,r){var s=n.evalExp(this.cond,t);return n.isFalsy(s)?e.renderer.renderTemplates(this.templates,t):e.renderer.renderTemplates(this.elseTemplates,t)}})}},{"..":2}]},{},[2])(2)});
{
"name": "liquidjs",
"version": "2.1.2",
"description": "A Liquid template engine for Node.js and browsers, with all shopify/liquid features.",
"version": "2.1.3",
"description": "Liquid template engine by pure JavaScript: compatible to shopify, easy to extend.",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

# liquidjs
[![npm](https://img.shields.io/npm/v/liquidjs.svg)](https://www.npmjs.org/package/liquidjs)
[![npm](https://img.shields.io/npm/dm/localeval.svg)]()
[![Build Status](https://travis-ci.org/harttle/liquidjs.svg?branch=master)](https://travis-ci.org/harttle/liquidjs)
[![Coveralls](https://img.shields.io/coveralls/harttle/liquidjs.svg)](https://coveralls.io/github/harttle/liquidjs?branch=master)
[![GitHub issues](https://img.shields.io/github/issues-closed/harttle/liquidjs.svg)](https://github.com/harttle/liquidjs/issues)
[![GitHub contributors](https://img.shields.io/github/contributors/harttle/liquidjs.svg)](https://github.com/harttle/liquidjs/graphs/contributors)
[![David](https://img.shields.io/david/harttle/liquidjs.svg)](https://david-dm.org/harttle/liquidjs)
[![David Dev](https://img.shields.io/david/dev/harttle/liquidjs.svg)](https://david-dm.org/harttle/liquidjs?type=dev)
[![DUB](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/harttle/liquidjs/blob/master/LICENSE)
A Liquid engine implementation for both Node.js and browsers, with all [shopify/liquid][shopify/liquid] features.
Formerly known as shopify-liquid.
Visit our website: <http://harttle.com/liquidjs/>
Live Demo: <http://harttle.com/liquidjs/>
## Features
> The Liquid template engine is implemented in Ruby originally,
> which is used by [Jekyll][jekyll] and [Github Pages][gh].
* Support both Node.js and browsers. Here's a demo: <https://jsfiddle.net/6u40xbzs/>
* Fully compatible to [shopify][shopify/liquid], with all [tags][tags] and [filters][filters] implemented
* In pure JavaScript with [any-promise][any-promise] as the only one dependency
Features:
* A wide range of [filters](https://github.com/harttle/liquidjs/wiki/Builtin-Filters) and [tags](https://github.com/harttle/liquidjs/wiki/Builtin-Tags)
* Easy tag/filter registration, allows async tags
* [any-promise][any-promise]
API Reference:

@@ -29,4 +28,6 @@

Installation:
## Render from String
Install as Node.js dependency:
```bash

@@ -36,4 +37,2 @@ npm install --save liquidjs

## Render from String
Parse and Render:

@@ -45,6 +44,7 @@

engine.parseAndRender('{{name | capitalize}}', {name: 'alice'})
.then(function(html){
// html === 'Alice'
});
engine
.parseAndRender('{{name | capitalize}}', {name: 'alice'})
.then(console.log);
// outputs 'Alice'
```

@@ -56,6 +56,7 @@

var tpl = engine.parse('{{name | capitalize}}');
engine.render(tpl, {name: 'alice'})
.then(function(html){
// html === 'Alice'
});
engine
.render(tpl, {name: 'alice'})
.then(console.log);
// outputs 'Alice'
```

@@ -68,13 +69,11 @@

root: path.resolve(__dirname, 'views/'), // dirs to lookup layouts/includes
extname: '.liquid' // the default extname used for layouts/includes
extname: '.liquid' // the extname used for layouts/includes, defaults ""
});
engine.renderFile("hello.liquid", {name: 'alice'})
.then(function(html){
// html === 'Alice'
});
// equivalent to:
engine.renderFile("hello", {name: 'alice'})
.then(function(html){
// html === 'Alice'
});
.then(console.log) // outputs "Alice"
// which is equivalent to:
engine
.renderFile("hello", {name: 'alice'})
.then(console.log) // outputs "Alice"
```

@@ -119,38 +118,22 @@

> There's an Express demo [here](demo/express/).
[Here](demo/express/)'s an Express demo. When used with Express.js,
Express [`views`][express-views] will be included when looking up
partials(includes and layouts).
When using with Express.js, partials(includes and layouts) will be looked up in
both Liquid `root` and Express `views` directories.
## Use in Browser
[Download][releases] the dist files and import into your HTML.
And `window.Liquid` is what you want. There's also a [demo](demo/browser/).
You can get a dist file for browsers from
```html
<html lang="en">
<head>
<script src="dist/liquid.min.js"></script>
</head>
<body>
<script>
var engine = window.Liquid();
var src = '{{ name | capitalize}}';
var ctx = {
name: 'welcome to liquidjs'
};
engine.parseAndRender(src, ctx)
.then(function(html) {
// html === Welcome to liquidjs
});
</script>
</body>
</html>
```
* [Releases][releases] page for liquidjs, or
* unpkg.com: <https://unpkg.com/liquidjs/dist/liquid.min.js>
Note: In [IE and Android UC][caniuse-promises] browser, you need a Promise implementation
registered to [any-promise][any-promise].
Here's the demo:
## Includes
* JSFiddle: <https://jsfiddle.net/6u40xbzs/>
* Demo directory: [/demo/browser/](demo/browser/).
Note: For [IE and Android UC][caniuse-promises] browser, you will need a [Promise polyfill][pp].
## Include Partials
```

@@ -175,3 +158,3 @@ // file: color.liquid

## Layouts
## Layout Templates (Extends)

@@ -204,9 +187,14 @@ ```

// Usage: {{ name | uppper }}
engine.registerFilter('upper', function(v){
return v.toUpperCase();
});
engine.registerFilter('upper', v => v.toUpperCase())
```
> See existing filter implementations: <https://github.com/harttle/liquidjs/blob/master/filters.js>
Filter arguments will be passed to the registered filter function, for example:
```javascript
// Usage: {{ 1 | add: 2, 3 }}
engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)
```
See existing filter implementations here: <https://github.com/harttle/liquidjs/blob/master/filters.js>
## Register Tags

@@ -227,10 +215,7 @@

> See existing tag implementations: <https://github.com/harttle/liquidjs/blob/master/tags/>
* `parse`: Read tokens from `remainTokens` until your end token.
* `render`: Combine scope data with your parsed tokens into HTML string.
## Contribution Guide
See existing tag implementations here: <https://github.com/harttle/liquidjs/blob/master/tags/>
1. Write a [test][test] to define the feature you want.
2. File an issue, or optionally:
3. Get your test pass and make a pull request.
[nunjucks]: http://mozilla.github.io/nunjucks/

@@ -246,1 +231,5 @@ [liquid-node]: https://github.com/sirlantis/liquid-node

[whitespace control]: https://github.com/harttle/liquidjs/wiki/Whitespace-Control
[tags]: https://github.com/harttle/liquidjs/wiki/Builtin-Tags
[filters]: https://github.com/harttle/liquidjs/wiki/Builtin-Filters
[express-views]: http://expressjs.com/en/guide/using-template-engines.html
[pp]: https://github.com/taylorhakes/promise-polyfill
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