{"_id":"qejs","_rev":"75-0014f1b838a8cd35648f6b9b65afc8aa","name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","dist-tags":{"latest":"3.0.5"},"versions":{"0.0.1":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"0.0.1","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@0.0.1","devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.10","_defaultsLoaded":true,"dist":{"shasum":"788bfd7c9e6b41ef43ec42a61966eb444174752d","tarball":"https://registry.npmjs.org/qejs/-/qejs-0.0.1.tgz","integrity":"sha512-PxSzUVjtMWuNRpoh9Os+tIAA0r4WqtG8XG2JLYXYtZF7AIPTpOcV9dUMUyaYlBvTTz3vhEkRxzn+Q3yVngh4TQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDB4ObnIE71hSQvGJOeIcedgvJpz2zTkM9TUA2KPng7ugIgIhmC00mIhLZApO+QguA8kgjXq5m/vLGyPIz7571tZhA="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1-beta":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1-beta","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1-beta","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"81c1416fdbea384d57f886f4d6f9edf5832e19e1","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1-beta.tgz","integrity":"sha512-m2yfNabmwlmmNjFuL7IsVBFuG6g+C2on/KSDqKMSliWz72Tcp13nJ2K8Vu31+QXMj1FsBGk2DhRoxwznopEewQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPQXtjBJQSNuKpG8ljhzdkINBET44FPkcAZvIGeYLhEAIhANztGRLcCVJewQW+w1hkLKzyhPo5udY/E+aPNm0+wvIY"}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1-beta2":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1-beta2","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1-beta2","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"21c87a6adf2293f7e767d1bf97b0cd669cb46be9","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1-beta2.tgz","integrity":"sha512-cC3Fgv/Fm5sH9XDWXXwzCAjAG5jkA9vEdKFzQKNh0lLLWbYGejobsQS9DTnjs+Byt/w5C+VJF1VcuUgX56gIWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCN0piKxfURjcA5/t3tNh3bKRbalqNi8D7UQCEDHXhwmAIhAMcDFgSEFMB4l+cL4I2k+5SVRwiZzjb6wEIYYQ7RRiH3"}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1-beta3":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1-beta3","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1-beta3","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"6c3624d7e052f921360e14f305111418f71d2d7c","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1-beta3.tgz","integrity":"sha512-XKPyERkrbv/Xq52r9njYnjxE3zHRA4cgJjiC38ByFl5cAiMT5sr/51lTq5Sv36WNLEv6bSIgqihU9fWQV8gbxQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFNvbB52VwKcsrNJ2TvmlRWRAmVZJi/r64kav5LMiBhKAiEAvDiMkNX/IMn+hQFIRYikJjxjmOwpo8aivw0NwairTlw="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1-beta4":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1-beta4","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1-beta4","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"f9e2b4fbbbb76d5da65cc290d50452d4331d69e6","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1-beta4.tgz","integrity":"sha512-w91IImMioFmJ0UIyqaTPvNmO+8IfA3GxqZDoXRnoltqh6dpgzBkXjRIZlKJRa66rKAmOnU2U9zCgKLBGY+Wzhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRo8c/3L6AMFxWSG6lYPF5/abY1X1csljWBlz1vg/W9QIgOAtP+0wUKnS7c7C6sFpIqrHjH49lQYQaHvuXhPyb8/o="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1-beta5":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1-beta5","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1-beta5","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"2e60404697d931c5db031327565f9be50e05736c","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1-beta5.tgz","integrity":"sha512-047IXcD/ovlcIxGFAfhYs7+CiafZ0Z4+apjNff+9krbh9KnE2UW2sTRm5PnToc/H7HiQdDwWDOy+2rE9i0Ibsg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIClTWhmC09TVKDyd4V2HEqCAdpdUhs8rcjNgqPmGG99FAiA48mdlTMX+N9aii+wvJIE+EhBkYIqasdQur1wMWT/ilg=="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1-beta6":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1-beta6","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1-beta6","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"2cc75f79a7ac0d2d4b136c9658c4d47b03195e56","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1-beta6.tgz","integrity":"sha512-Xm3dmvnH5LLFMvJ44uWRD2SRq2UR8JoMEPv9NK+cLD5PBQSDSyrXEnMRApEbm+P6DImhivJcYanFkNDBW3hXxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFqsa1Zr0GvsZ0dciKIar4+tLMcIq0ZAaLotITHYnssgIhAKrrgWbXfS/Rfw1P2IBQrG1WtHfphjo4VqTIh/hQ//e+"}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1-beta7":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1-beta7","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1-beta7","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"2f203f621512757107ff85765cdf83e3d2ae76ad","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1-beta7.tgz","integrity":"sha512-jUMrNR5nVqdAvbC0hzmBLU8BH43FlD/GgKe7PPrMm1a2JsHw2pI2YygBOKlH6FJJzYDZBEbDc+XCEvBhtGyv1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFsJBQza/d5/54uFOS242/HqAOChQOKTecCp62ySYILcAiAHGj9Pbgy3wmz6aBF/vz7elK+LFCAsNyf2nFKE7ETy1A=="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1-beta8":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1-beta8","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1-beta8","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"4e09890546bfd0cc4a6c43216572a8bacd687d26","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1-beta8.tgz","integrity":"sha512-NF5Xz00/AMlqgydUG5cH3Ug9ilQzNXlG87hkO+xd+N/pGoxbl3kRiHxRVyDgJoSsBikv1o4FKJ9w8e070D8Bmw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID/RllG/JKQvnnB4gRGdUCVPv+Sh94+vJijuEqsT0CMrAiEA9xn2CEy4Fs8aW3DubHzy0QFbq72Sx9VWVjiqqunJX/g="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1-beta9":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1-beta9","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1-beta9","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"035e6780ba1da1e090c3dce64a7f403ab0372586","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1-beta9.tgz","integrity":"sha512-01T0loSZvWaMuWANp6v/v61H5FfXBpbNPmIP9LBQMlY0ay0Os180Etd59tGQW/qNKDLkdrcbCycpNJysM96Q9g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE1If3kL0Lx1UuXapuZpsIFcb2ZmhaPO7+5kEw+qUEXCAiBf78RXVHsFmcqe6y7k+g+g5FeBQq+fJZ3zPfpAJcsd9Q=="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1-beta10":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1-beta10","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1-beta10","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"cc3b84c4a7ecfe3a1981c00add97298b6b7368da","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1-beta10.tgz","integrity":"sha512-lKcOLEBCLBgFKDmWNQB4ioFRvXKo6Q5Lp8cTwvSxLACHKz/tDRafvaISQX9hDgE0vl0OxDviYkxxefHsSAKpsg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGydLvSk/riDQsOyton+xEpCRA5c4ww/UXtCrdRy6Lt/AiB5+FMw6QW4MUbQwNqsln5eAtGn5NwqcUCoL8kbIryXJA=="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1-beta11":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1-beta11","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1-beta11","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"25c3043260e31a28230b0df453084467effd1134","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1-beta11.tgz","integrity":"sha512-oG680Iift2OmGaxc0b7T2zc9EG83ibLXoRs//r0SzsP1/UD0WYlk0vnTYW10mA18Xlut0NtF3H1SGa1XCNV55A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHI1fRpWoHwQ9PQMLXuRPR8Qf9SN1TXS8z9ZJwyYaVnAIhAMhBITgt6UYc2CNVp8Q/PhwHNGchozCc5XR1CtJ2w7YL"}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.1":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.1","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.1","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"7c04c274c4b47184668aac964454e1bdf503cbe7","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.1.tgz","integrity":"sha512-nZ+GZohbxADuDWp4tASIZMd3WZ00y+njrMJsJEAZxd5FbVkYaxIlPAQ+l46xjGHCLJiBeirtj1gWMLat69nhNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAPd1wwh+C/Dh4KLoYA+SWkCwAEI/tZGuuOLAmTXdNCgIhAIHMgwpDx6+o09KJNNiUj93JFg1ihhbmM3PSgodYKuG6"}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.2":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.2","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_npmUser":{"name":"forbes","email":"forbes@lindesay.co.uk"},"_id":"qejs@1.0.2","_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"93d77c99991e47c5b6f31cf2b6220a421d103153","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.2.tgz","integrity":"sha512-1Nbn6IZxUbPzw+xRKWM26v+vpImiAMnI6I1Fxvu2aQJuDWDxEoFGgDlO5n2rFl5rbumMLanGQspRjrRInOAdSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAy0Filfi4lTPYtIMHL2TIKdYhw868QJawi3MSiCOpCQIgBYptJnhGLOkuoeB1pBkxTMQWfTYg5PijXBoWSmwuqEQ="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.3":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.3","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_id":"qejs@1.0.3","dist":{"shasum":"1351b54239cfaa03e3222def8e5b0a959a5bb7a9","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.3.tgz","integrity":"sha512-EZEMbM4JZ+kliPxLNnLZAVJR1nSAEWMskkQZ/LOG9SzH85aiFfcLYcna3pSjyW4lm7YmZf+TBBYBpwy/gMZVfA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvNN2C42LL7Nk8XxBaNkFb4r5pjHPLwQFhFEL1Anv8EAIgaGZlll+jqtJyVeZg0rb9Mn9ws2Os2pr9kzudRej2HCU="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"1.0.4":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"1.0.4","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_id":"qejs@1.0.4","dist":{"shasum":"f781c6b581f2a060346a246ae9bbf599c7f23a41","tarball":"https://registry.npmjs.org/qejs/-/qejs-1.0.4.tgz","integrity":"sha512-p762ZH8l8NGTtLMIk4s3MZKu/GOHkZ+9bzaCKU05kXhLWAlnyCGLcZLK7VmS9z0xpaLjZTu1JK4ZVevWK8pbtw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFDhLPn+Nbc16iRNT3A7KeeTSzLf7HtVKAgTJDohUygZAiEAixo6me5ieRPtp0+JuqCpRw7ot5/RdqG18aTcw5sOlgY="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"2.0.0":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"2.0.0","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_id":"qejs@2.0.0","dist":{"shasum":"ad7dba7bb12509ff75c7e9148992b390babab6d8","tarball":"https://registry.npmjs.org/qejs/-/qejs-2.0.0.tgz","integrity":"sha512-0nQSKCPg4BVh6HZQsqSJTcP//dB7oqAt9gb7elrktLCnOX1g/YLVrKHj8RLSwI9Plvwz1na5usB2QGpPucbggw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqYon7vvnaXSAVAHKLGCbtarsIsOFnkOYwUSy04NQm4QIgPd0OcM3hb+uYCwiTuqIKSrKHK74WEPFY1CeKXNF59Uw="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"2.0.1":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"2.0.1","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_id":"qejs@2.0.1","dist":{"shasum":"520cb631f37621acb7a20d4d72b8df9bf33c0b9b","tarball":"https://registry.npmjs.org/qejs/-/qejs-2.0.1.tgz","integrity":"sha512-cA2Cj3qEFKFJ5bh9P8q86QSNn5uhP/PUSpM0AmOnp1VOMWal/0j8WSCcn8zo5K7GRZcv/P2eXgmW/O01fG48dw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/Z1gFVcTzNlXWqNqgIvClwwdVVBddsbgLOApMSfpnKgIgfJ4r8Qc4XYZ0YEHeW065TvrqX/L6Wk77/LocRiC0g1Y="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"2.0.2":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"2.0.2","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"test":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"test":"node test/index.js"},"_id":"qejs@2.0.2","dist":{"shasum":"819e2bd6505f7822086eed670ebc7ed5ac6de879","tarball":"https://registry.npmjs.org/qejs/-/qejs-2.0.2.tgz","integrity":"sha512-7dMJRafUxdKMTc3pR3SUIkvQmSZ6bQZQSQPToSwgJRI93PYUxxydeq7DPU5shW0i5OE4pLTR/KZU8HTf4StXug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJW9UDcDiRoNyDmH344hDns1yDPPzE8u9E4aB7bKBCsgIgV1BtEbq4MOe2CFKEB6cTJvVdYjm5qALYtuM+K4mhqk8="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"2.0.3":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"2.0.3","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.5"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha"},"readme":"# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Configuring express for inheritance and partials\r\n\r\nInstead of using consolidate, simply use the following:\r\n\r\n```javascript\r\napp.engine('html', function (path, options, fn) {\r\n    require('qejs').renderFile(path, options).then(function (result) {\r\n        fn(null, result);\r\n    }, function (err) {\r\n        fn(err);\r\n    }).end();\r\n});\r\n```\r\n\r\nI will submit a pull request to get consolidate.js updated as soon as possible.\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2012 Forbes Lindesay &lt;contact@jepso.coma&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n## EJS License\r\n\r\nThe EJS License (by visionmedia) on which this library is based, is reproduced here:\r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2009-2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","_id":"qejs@2.0.3","dist":{"shasum":"2025e406b890b8c93ece735850ce4e60ebac4f13","tarball":"https://registry.npmjs.org/qejs/-/qejs-2.0.3.tgz","integrity":"sha512-HUYQS8BrEHBtt5MFxijMSqFal8XvXcCh74//j6Vynh7UFPkOjum3tU+VIMoQYwu+UPc0EkegiJu5CJFLPsRZnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCq2V4AlCfqrJGYo3NcTsSRn7K2aZj8WOQqpcQRD1scewIgRokvrF3cWt8P8q/3Oa5EIbfCP8GmlGSwaoU/c+mQ49c="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"2.0.4":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"2.0.4","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.x"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha"},"readme":"# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Configuring express for inheritance and partials\r\n\r\nInstead of using consolidate, simply use the following:\r\n\r\n```javascript\r\napp.engine('html', function (path, options, fn) {\r\n    require('qejs').renderFile(path, options).then(function (result) {\r\n        fn(null, result);\r\n    }, function (err) {\r\n        fn(err);\r\n    }).end();\r\n});\r\n```\r\n\r\nI will submit a pull request to get consolidate.js updated as soon as possible.\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2012 Forbes Lindesay &lt;contact@jepso.coma&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n## EJS License\r\n\r\nThe EJS License (by visionmedia) on which this library is based, is reproduced here:\r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2009-2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","_id":"qejs@2.0.4","dist":{"shasum":"af77c3414bc9947243efedf077dc30c2b79406b2","tarball":"https://registry.npmjs.org/qejs/-/qejs-2.0.4.tgz","integrity":"sha512-QdIjr0K38rWqoZGfD6zDu66vBNRJgofOpV/qOVIaedVTPwUr8NkqR84npXAJqEyCNYqrFjsZaM8tQU8hgF1smw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBqTQpJJpWwNS4J4TznLt25qhiG3hw2i5sbHjKD2qS93AiAT7mOmdnrBasTexLPOmrdOh/6FeQG13WDaieqR10EAlA=="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"2.0.5":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"2.0.5","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.x"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha"},"readme":"# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Configuring express for inheritance and partials\r\n\r\nInstead of using consolidate, simply use the following:\r\n\r\n```javascript\r\napp.engine('html', function (path, options, fn) {\r\n    require('qejs').renderFile(path, options).then(function (result) {\r\n        fn(null, result);\r\n    }, function (err) {\r\n        fn(err);\r\n    }).end();\r\n});\r\n```\r\n\r\nI will submit a pull request to get consolidate.js updated as soon as possible.\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2012 Forbes Lindesay &lt;contact@jepso.coma&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n## EJS License\r\n\r\nThe EJS License (by visionmedia) on which this library is based, is reproduced here:\r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2009-2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","_id":"qejs@2.0.5","dist":{"shasum":"be76abf518ce2ac6cb813e5fe2ff239ea4c316bd","tarball":"https://registry.npmjs.org/qejs/-/qejs-2.0.5.tgz","integrity":"sha512-s1C2VkmHhWvmzJgtKfs8n56XE5Wi2ClM5gMXpBlgwlvyCNLOgLgl0IRCiAw25QJTlNuGSQt8bN22osNC2QC4vQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhXa3tfrRczJo6TE8OYP+w/aa6YgNR5JeEbNWbp2JPjwIgL4t3HzJXSJEOCVcthcd9a4/t/eREco7u1I88rIeNvG4="}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"2.0.6":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"2.0.6","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.x"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha"},"readme":"# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Configuring express for inheritance and partials\r\n\r\nInstead of using consolidate, simply use the following:\r\n\r\n```javascript\r\napp.engine('html', function (path, options, fn) {\r\n    require('qejs').renderFile(path, options).then(function (result) {\r\n        fn(null, result);\r\n    }, function (err) {\r\n        fn(err);\r\n    }).end();\r\n});\r\n```\r\n\r\nI will submit a pull request to get consolidate.js updated as soon as possible.\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2012 Forbes Lindesay &lt;contact@jepso.coma&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n## EJS License\r\n\r\nThe EJS License (by visionmedia) on which this library is based, is reproduced here:\r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2009-2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","_id":"qejs@2.0.6","dist":{"shasum":"da0310e393e03708f733f9746c979c500323e017","tarball":"https://registry.npmjs.org/qejs/-/qejs-2.0.6.tgz","integrity":"sha512-aRU9bdyoFFuBRL1K3h6OIj6xwWT/g4CJ+FIABXu2YHz7khWg+Ffn5mIYP/UQOO+eMtsY6kYbOiGYPaL1SYlKMA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXg3GowlWS+RlyQC79JCxh2geZ9HRWstZPX2Q7lRvzbQIhALQ06rZKbuRIjQt8DWazso11x6nVpB4i9lFzACYUt6Fi"}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"2.0.7":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"2.0.7","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.x"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha"},"readme":"# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Configuring express for inheritance and partials\r\n\r\nInstead of using consolidate, simply use the following:\r\n\r\n```javascript\r\napp.engine('html', function (path, options, fn) {\r\n    require('qejs').renderFile(path, options).then(function (result) {\r\n        fn(null, result);\r\n    }, function (err) {\r\n        fn(err);\r\n    }).end();\r\n});\r\n```\r\n\r\nI will submit a pull request to get consolidate.js updated as soon as possible.\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2012 Forbes Lindesay &lt;contact@jepso.coma&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n## EJS License\r\n\r\nThe EJS License (by visionmedia) on which this library is based, is reproduced here:\r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2009-2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","_id":"qejs@2.0.7","dist":{"shasum":"c069555ea70070e2c34cfe885d6e84f69ba00258","tarball":"https://registry.npmjs.org/qejs/-/qejs-2.0.7.tgz","integrity":"sha512-1MP57/PlD+jVTkLAmWRxMX53MusokfVMyhUuYbSBirDgHSkXNYjyluchi7/qKpPybDCl1VZz3sSXa+X5McsuTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpa6CO8h0yZsd4SLQO0eQFMApUey0Z/gvkDghH0vI/+wIhAN8vTrItPU8nFYQ92rr3hb54S9IRqMCKLBkRJu60tI8N"}]},"maintainers":[{"name":"forbes","email":"forbes@lindesay.co.uk"}],"directories":{}},"2.0.8":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"2.0.8","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.x"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha"},"readme":"[![Build Status](https://secure.travis-ci.org/jepso/QEJS.png?branch=master)](http://travis-ci.org/jepso/QEJS)\r\n# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2012 Forbes Lindesay &lt;contact@jepso.coma&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n## EJS License\r\n\r\nThe EJS License (by visionmedia) on which this library is based, is reproduced here:\r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2009-2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","_id":"qejs@2.0.8","dist":{"shasum":"708bf4a429579e0d0c7b0f33a63c1008006bbc30","tarball":"https://registry.npmjs.org/qejs/-/qejs-2.0.8.tgz","integrity":"sha512-UTTPP11IB6YQenc9c2Av7Nd8QvSneVl+tTv3Y30szFBK0i71MsVRzFft3aSm/dG4aUQ3K639leQpmLQtJuUSSA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGMzO7FJp87gJrHeiH2XW7CyJr5g8JmwsRgAOqv12S+nAiEA0naNkltQ4iPwTsjwHDVhLS+2YhtM2ZICmezcxUgB+eA="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}]},"3.0.0":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"3.0.0","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.x"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha"},"readme":"[![Build Status](https://secure.travis-ci.org/jepso/QEJS.png?branch=master)](http://travis-ci.org/jepso/QEJS)\r\n# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2012 Forbes Lindesay &lt;contact@jepso.coma&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n## EJS License\r\n\r\nThe EJS License (by visionmedia) on which this library is based, is reproduced here:\r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2009-2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","readmeFilename":"readme.md","_id":"qejs@3.0.0","dist":{"shasum":"9a7d422e5eb05e0b5675dc5b678543958f636f9c","tarball":"https://registry.npmjs.org/qejs/-/qejs-3.0.0.tgz","integrity":"sha512-EbARmU/3b/mAm5czzkW7k/U/Qrb93qMMzxXEZcPfaTue5yiPai4LrXsT0GlhX0xOVIxbJzAKCmghO0tBfXBtHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICxqdCTV1SPUK5EWJHHNEPXvQHunQSFgLZptwuW6/FbaAiEAkg/lhpF96P5CV5unsE81WeVwpW6EZ5tYeij4MpV817U="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}]},"3.0.1":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"3.0.1","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.x"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha -R spec"},"readme":"[![Build Status](https://secure.travis-ci.org/jepso/QEJS.png?branch=master)](http://travis-ci.org/jepso/QEJS)\r\n# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2012 Forbes Lindesay &lt;contact@jepso.coma&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n## EJS License\r\n\r\nThe EJS License (by visionmedia) on which this library is based, is reproduced here:\r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2009-2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","readmeFilename":"readme.md","_id":"qejs@3.0.1","dist":{"shasum":"47914be6fc7efd86e805eb526fcb61f26f7ca068","tarball":"https://registry.npmjs.org/qejs/-/qejs-3.0.1.tgz","integrity":"sha512-b8r+Jth54G8Mg08Z7PKZGb4YY1NvpGR/lO6XTNsxV8LQLliWxD4u8R7l2nIOJdV7n/zJWa5zM7p8vXaKnHjjCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHzutVWEaIq+E/xOvHNqzOT4SFDIfWljE8lkvpKbFAnLAiEArLQ+2o5NPn5U5ahO/nPOzLuGEWDPdJOIxYHMjSrQFR8="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}]},"3.0.2":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"3.0.2","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.x"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha -R spec"},"readme":"[![Build Status](https://secure.travis-ci.org/jepso/QEJS.png?branch=master)](http://travis-ci.org/jepso/QEJS)\r\n# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n  MIT\r\n","readmeFilename":"readme.md","_id":"qejs@3.0.2","dist":{"shasum":"3cbeec6b9a8eefaa9bbfceae6d03fd6a41cb9c7f","tarball":"https://registry.npmjs.org/qejs/-/qejs-3.0.2.tgz","integrity":"sha512-7ZPeLsDBR5RXYJy1gYwn+gxn+YQz8iRi+0e1Br0eF6+OMcRvxMRApZ6UNroKjD1P1UtgZHNElxd0nVZw+QDx9g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5WXdSJ3+XrvwkIbDzFQBiTT+CwQVSAQ7GbZOUdivDNwIhAJspDnVizoIjJzrpXicH+M0w6RJMRb601vAixmFD5/BT"}]},"_npmVersion":"1.1.69","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}]},"3.0.3":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"3.0.3","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.x"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha -R spec"},"readme":"[![Build Status](https://secure.travis-ci.org/jepso/QEJS.png?branch=master)](http://travis-ci.org/jepso/QEJS)\r\n# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n  MIT\r\n","readmeFilename":"readme.md","_id":"qejs@3.0.3","dist":{"shasum":"e5b4be05e3c01b7f4166dd1a03b531e0ad9f75c2","tarball":"https://registry.npmjs.org/qejs/-/qejs-3.0.3.tgz","integrity":"sha512-H3b/9VLA6Q57jqDv8aaFbibiBvbl1d3PhYZAWLr7ZRPHbt8SV/JyZtkiSvriX6c3sikRioOYhcEZLgVQhO5oWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCA55d4jur4x4aKbMUMlva4T6fA0dQSESMtuk7wLnECQwIgKJXtNAFXvbloteNKLAd5QuSr9Z/mVvqe0E9YtbVa/PY="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}]},"3.0.4":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"3.0.4","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.x"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha -R spec"},"readme":"[![Build Status](https://secure.travis-ci.org/jepso/QEJS.png?branch=master)](http://travis-ci.org/jepso/QEJS)\r\n# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n  MIT\r\n","readmeFilename":"readme.md","_id":"qejs@3.0.4","dist":{"shasum":"d71c444f3bf02157c93725b8e141cbfd523675e7","tarball":"https://registry.npmjs.org/qejs/-/qejs-3.0.4.tgz","integrity":"sha512-dRa5SJ4lv4QTB9ST4ZfPNJA6zGXkJ79lmVWnHrzpqoS0gN6rIiNnFtspzB3EA1+PVhsCg7qtqZMQxNjznMKAbw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcuIqiDM+TCIli22Ja0Nn5NqfqCeaCHOzxTJcJAt06hgIhALrRUaCdGDndMPahn0cfOmhXPrHkPFS3P8cmjQ+FqulL"}]},"_npmVersion":"1.1.69","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}]},"3.0.5":{"name":"qejs","description":"Asyncronous Embedded JavaScript Templates with Q","version":"3.0.5","keywords":["templating","template","engine","promises","Q","EJS","JavaScript","async","Asyncronous"],"dependencies":{"q":"0.8.x"},"devDependencies":{"mocha":"*","should":"*"},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"homepage":"http://substance.io/forbeslindesay/qejs","repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"scripts":{"prepublish":"mocha","test":"mocha -R spec"},"readme":"[![Build Status](https://secure.travis-ci.org/jepso/QEJS.png?branch=master)](http://travis-ci.org/jepso/QEJS)\r\n# Asyncronous Embedded JavaScript Templates with Q\r\n\r\n![QEJS](http://i.imgur.com/WRIlB.png)\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescaped Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% <- %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% <- %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% <- %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and means that you can use async blocks inside `if` statments, `for` statements, `while` statements, `function` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Inheritance and Partials\r\n\r\nQEJS supports both inheritance and partials.  Inheritance is used to include the current template in the middle of some other template (similar to express's layout templates except a little more powerful).  Currently this only works if you use the renderFile method (or render in express with the following snippet to setup).\r\n\r\n### Inheritance\r\n\r\nInheritance allows you to support features similar to those in express's layout template.  To use a layout for a template, simply call `inherits('relative/path/to/template')` anywhere in your template that is not run asyncronously.  That is to say, it can't go inside an async block, or inside the then callback of a promise.  Usually it's best to put it at the top of your file.  If you call it multiple times, it will throw an exception.\r\n\r\nviews/foobar.html\r\n\r\n```html\r\n<% inherits('layouts/navigation') %>\r\n<p>The great page foobar</p>\r\n```\r\n\r\nlayouts/navigation\r\n\r\n```html\r\n<% inherits('base') %>\r\n<a href=\"#home\">Home</a>\r\n<a href=\"#about\">About</a>\r\n<div class=\"content\">\r\n    <%- contents %>\r\n</div>\r\n```\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- contents %>\r\n    </body>\r\n</html>\r\n```\r\n\r\nBe careful not to inherit from yourself as this would create errors that never got caught if you create an infinite loop of inheritance.\r\n\r\nAs you can see, paths are resolved in a very forgiving way.  They are resolved relative to the current file, then relative to the parent directory of the current directory and so on up the tree until a file is found.  It will try for files with extensions '.qejs', '.ejs' and '.html' in that order unless you specify an extension.\r\n\r\n### Partials\r\n\r\nYou can render a child template within the current template.  By default, it does not currently have access to any local variables of the calling template, only those supplied in options.\r\n\r\nTo use, simply call render anywhere in the parent template.\r\n\r\nlayouts/base\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <title>Document</title>\r\n    </head>\r\n    <body>\r\n        <%- render('views/foobar', {message:'hello world'}) %>\r\n    </body>\r\n</html>\r\n```\r\n\r\n```html\r\n<p><%= message %></p>\r\n```\r\n\r\n## Newline slurping\r\n\r\nIf you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nThis module is fully compatible with [express 3.0.0](https://github.com/visionmedia/express) via the [consolidate.js](https://github.com/visionmedia/consolidate.js) library.\r\n\r\nTo use it you'll need to install both consolidate and QEJS.  You can do this in a single command with:\r\n\r\n    npm install consolidate qejs\r\n\r\nThe following example demonstrates using QEJS in express:\r\n\r\n```javascript\r\nvar express = require('express')\r\n  , cons = require('consolidate')\r\n  , app = express();\r\n\r\n// assign the swig engine to .html files\r\napp.engine('html', cons.qejs);\r\n\r\n// set .html as the default extension \r\napp.set('view engine', 'html');\r\napp.set('views', __dirname + '/views');\r\n\r\nvar users = [];\r\nusers.push({ name: 'tobi' });\r\nusers.push({ name: 'loki' });\r\nusers.push({ name: 'jane' });\r\n\r\napp.get('/', function(req, res){\r\n  res.render('index', {\r\n    title: 'Consolidate.js'\r\n  });\r\n});\r\n\r\napp.get('/users', function(req, res){\r\n  res.render('users', {\r\n    title: 'Users',\r\n    users: users\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\nconsole.log('Express server listening on port 3000');\r\n```\r\n\r\nIf it doesn't work, be sure to make absolutely certain you've got the latest version of express, and make sure you have actually created a users.html and index.html view.\r\n\r\n## Contribute\r\n\r\nFork this repository to add features or:\r\n\r\n<a href=\"http://flattr.com/thing/699596/QEJS\" target=\"_blank\">\r\n<img src=\"http://api.flattr.com/button/flattr-badge-large.png\" alt=\"Flattr this\" title=\"Flattr this\" border=\"0\" /></a>\r\n\r\n## License \r\n\r\n  MIT\r\n","readmeFilename":"readme.md","_id":"qejs@3.0.5","dist":{"shasum":"c78eaba5cef05f48de3353c9d07ad692ffa8b492","tarball":"https://registry.npmjs.org/qejs/-/qejs-3.0.5.tgz","integrity":"sha512-LCCMc7nZ8qRkg9hm5k5/S0cybPeJoX+56Qw8rNK0NLjmyOvMCg2KD7K8s2rpG3L9+xBeeSN/QNVIvXoeqCM/aw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAc7njQ6bQW6LkbLao8ewCjA97x3IBn8CyizRnyusXKQAiBlhCpB+mKU2Ku8dS2DZSy1mXU2F90qsMe9Z43qulYMLQ=="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}]}},"readme":"# Asyncronous Embedded JavaScript Templates with Q\r\n\r\nThis library impliments Embedded JavaScript with some asyncronous additions provided by Q.  It is broadly based on https://github.com/visionmedia/ejs and fully supports everything except filters.  For a full discussion of the reasoning behind this, see Features below.  The promises implimentation for ayncronous operations uses https://github.com/kriskowal/q so you'll need to make sure that all asyncronous functions/values you supply to the templates are 'thenables' so that they'll work with Q.  All that means in practice is that you need your promises to have a function `then` that you can call with a promise.\r\n\r\n## Installation\r\n\r\n    $ npm install qejs\r\n\r\n## Example\r\n\r\n    <% if (user) { %>\r\n        <h2><%= user.getNameAsync() %></h2>\r\n    <% } %>\r\n\r\n## Usage\r\n\r\n    qejs.compile(str, options);\r\n    // => Function\r\n\r\n    qejs.render(str, options);\r\n    // => promise\r\n\r\n    qejs.render(str, options).then(function(output){\r\n            //output is a string\r\n        });\r\n\r\n## Options\r\n\r\n  - `cache`           Compiled functions are cached, requires `filename`\r\n  - `filename`        Used by `cache` to key caches\r\n  - `scope`           Function execution context\r\n  - `debug`           Output generated function body\r\n  - `open`            Open tag, defaulting to \"<%\"\r\n  - `close`           Closing tag, defaulting to \"%>\"\r\n  - *                 All others are template-local variables\r\n\r\n## Custom tags\r\n\r\nCustom tags can also be applied globally:\r\n\r\n    var qejs = require('qejs');\r\n    qejs.open = '{{';\r\n    qejs.close = '}}';\r\n\r\nWhich would make the following a valid template:\r\n\r\n    <h1>{{= title }}</h1>\r\n\r\n## Unbuffered Code\r\n\r\n```\r\n<% code %>\r\n```\r\n\r\nQEJS supports exactly the same syntax as EJS for unbuffered code, usefull for conditionals, loops etc.\r\n\r\n## Escapes HTML\r\n\r\n```\r\n<%= code %>\r\n```\r\n\r\nThis differs from EJS in that if `code` returns a promise, it is resolved and then escaped before being outputted.  While this is happening, QEJS will continue on to render the rest of the template, allowing many promised functions to be executed in parallel.\r\n\r\n## Unescapted Buffering\r\n\r\n```\r\n<%- code %>\r\n```\r\n\r\nIf `code` isn't a promise, this will work exactly like EJS, but if `code` is a promise, we will resolve it, before outputting the resolved value.  We won't do any escaping on this value, so only use for trusted values, not user input.\r\n\r\n## Async Blocks\r\n\r\n```\r\n<% promise -> value %>...Use value here...<% < %>\r\n<% PromiseForAnArray -> [valueA, valueB, valueC...] %>...Use values individually here...<% < %>\r\n<% [promiseA,promiseB,promiseC...] -> values %>...Use identifier as an array of resolved values...<% < %>\r\n<% [promiseA,promiseB,promiseC...] -> [valueA,valueB,valueC...] %>...Use values individually here...<% < %>\r\n```\r\n\r\nAsync blocks are considered a relatively advanced feature, and where possible you should try and tick to just returning promises through `<%= code %>` as it's much easier to write that without creating bugs.\r\n\r\nHaving said that, async blocks are not difficult to write and I hope you'll end up really loving them for those times when you really need them.\r\n\r\nWhat happens in an async block is we reserve a space for whatever text is outputted by the block, allowing you to use any QEJS inside the async block (including another async block).  We then resolve the value of the promise you give us, and we give it the name you specify on the right hand side of the arrow operator.  The async block starter must go in its own separate unbuffered code block, but you could put other things like comments inside the block with the end marker.\r\n\r\nOnce you go past the end marker of an async block, you will no longer have access to the value of the promise.  This lets us run lots of calls in parallel, and menas that you can use async blocks inside `if` statments, `for` statements, `while` statements, `functions` statements, pretty much anywhere you could write regular EJS.\r\n\r\n## Newlien slurping\r\n\r\nif you end any code block with a `-` even if it's an async block, we'll support newline slurping for you (`<% code -%>` or `<% -%>` or `<%= code -%>`, `<%- code -%>`, `<% promise -> result -%>` or `<% < -%>`)  That is to say, we won't output the next new line after we see that symbol.  QEJS never outputs a newline inside a code block.\r\n\r\n## Filters\r\n\r\nQEJS doesn't support filters.  Although in a way it seems a shame not to maintain 100% compatability with the syncronous form of EJS, I think that it's more important to keep this library lean.  Filters don't really add a lot, you can always attach such methods to arrays yourself and use standard javascript syntax, I don't want to hurt the purity of EJS though, so I've chosen not to add this syntax (bloat).\r\n\r\n## ExpressJS Integration\r\n\r\nI'm really keen to get express integration working, however unfortunately at version 2.x this isn't possible because of our asyncronous rendering, Shims can be made.  However I will endevour to ensure this does support Express.js @ v3.0 as soon as possible after that's released.\r\n\r\n## License \r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2012 Forbes Lindesay &lt;contact@jepso.coma&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n## EJS License\r\n\r\nThe EJS License (by visionmedia) on which this library is based, is reproduced here:\r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2009-2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"time":{"modified":"2022-06-25T03:59:35.799Z","created":"2012-05-25T13:20:21.503Z","0.0.1":"2012-05-25T13:20:23.789Z","1.0.1-beta":"2012-06-27T12:43:04.240Z","1.0.1-beta2":"2012-06-27T16:29:03.588Z","1.0.1-beta3":"2012-06-27T16:31:40.400Z","1.0.1-beta4":"2012-06-27T16:47:26.309Z","1.0.1-beta5":"2012-06-27T16:48:56.881Z","1.0.1-beta6":"2012-06-27T16:53:07.637Z","1.0.1-beta7":"2012-06-27T17:07:53.390Z","1.0.1-beta8":"2012-06-27T17:09:17.926Z","1.0.1-beta9":"2012-06-27T17:13:57.301Z","1.0.1-beta10":"2012-06-27T17:18:30.722Z","1.0.1-beta11":"2012-06-27T17:31:35.980Z","1.0.1":"2012-06-27T17:32:21.088Z","1.0.2":"2012-06-27T22:15:09.414Z","1.0.3":"2012-06-29T02:03:01.769Z","1.0.4":"2012-06-29T02:09:59.030Z","2.0.0":"2012-06-29T04:21:30.215Z","2.0.1":"2012-06-29T04:23:44.579Z","2.0.2":"2012-06-30T17:31:07.459Z","2.0.3":"2012-07-22T18:38:13.968Z","2.0.4":"2012-07-22T18:43:53.544Z","2.0.5":"2012-07-29T19:18:32.858Z","2.0.6":"2012-07-29T20:12:34.387Z","2.0.7":"2012-08-02T20:33:51.846Z","2.0.8":"2012-08-27T13:47:37.074Z","3.0.0":"2013-01-06T21:39:30.762Z","3.0.1":"2013-01-07T19:59:49.606Z","3.0.2":"2013-01-28T17:41:27.493Z","3.0.3":"2013-01-28T18:20:11.752Z","3.0.4":"2013-01-28T18:37:15.381Z","3.0.5":"2013-03-07T16:56:01.383Z"},"author":{"name":"JEPSO","email":"contact@jepso.com","url":"http://www.jepso.com"},"repository":{"type":"git","url":"git://github.com/jepso/QEJS.git"},"users":{"fgribreau":true}}