{"_id":"jazz","_rev":"19-7d9290668800dff957afeedabcf2946c","name":"jazz","description":"A simple template engine built specifically for nodejs.","dist-tags":{"latest":"0.0.18"},"versions":{"0.0.1":{"name":"jazz","description":"A simple template engine built specifically for nodejs.","version":"0.0.1","author":{"name":"Thomas Lee","email":"thomas.lee@shinetech.com"},"keywords":["template","engine"],"main":"./lib/jazz","directories":{"lib":"./lib/jazz"},"engines":{"node":">= 0.1.102"},"_id":"jazz@0.0.1","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/jazz/-/jazz-0.0.1.tgz","shasum":"e52115e24e1ee3235c28d91d3e3252a9e091fcd5","integrity":"sha512-TWORTYfzCDpZzFXO84ZWrEZxJ7LjFcUfgYJyTXdC/r4Pb2idlMiX17EKqOi9j6zq4bKQaTYMeaewQQ6NBEkaOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/qNVAqpMQHsagN/TnCymfsJ2eTacmwFRHDwoCKcVmGAIgfyUPe6/+nwdVc5O4eEHXF+4utI26vj0WLrr/hYWN6WM="}]}},"0.0.3":{"name":"jazz","description":"A simple template engine built specifically for nodejs.","version":"0.0.3","author":{"name":"Thomas Lee","email":"thomas.lee@shinetech.com"},"keywords":["template","engine"],"main":"./lib/jazz","directories":{"lib":"./lib/jazz"},"engines":{"node":">= 0.1.102"},"_id":"jazz@0.0.3","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/jazz/-/jazz-0.0.3.tgz","shasum":"d3f12513f89c0ba28021c35876c1fa3b62d8621a","integrity":"sha512-gKPLJw4eRF4IdRCgskukKgW4nKmoPOSU/FWzibEK9rlM/mbdRtZTtk3zXVGUgr16sMaKr+RHsrtDp6vREyOJ9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXsYWUnvy5SvA/KOJ9hTQ/5BxQA/y7GMhAW3dvsHsfvAIgdFuO4qDgF/CG8UpzLn03pYZgJkdd8hCR5cf9yV7mmT8="}]}},"0.0.4":{"name":"jazz","description":"A simple template engine built specifically for nodejs.","version":"0.0.4","author":{"name":"Thomas Lee","email":"thomas.lee@shinetech.com"},"keywords":["template","engine"],"main":"./lib/jazz","directories":{"lib":"./lib/jazz"},"engines":{"node":">= 0.1.102"},"_id":"jazz@0.0.4","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/jazz/-/jazz-0.0.4.tgz","shasum":"c083a7301661ff2bba3692294cf619b0d778e150","integrity":"sha512-f1SLPjpY6QpPBQl8jjcVc+QGJcKR7tnkcdJsNqwWNMY2nNeECPdqquDgF37GgzMBiPErVZCDeajMB1vd11y5sQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBee1bCZEsCqsBhVCRDwEq4yjzJqvelP1MockgZI2a1lAiAtPwhqNyZPp1qMKRJ4DwngqUHrSsEbK5De+jmQRq3XdA=="}]}},"0.0.14":{"name":"jazz","description":"A simple template engine built specifically for nodejs.","version":"0.0.14","author":{"name":"Thomas Lee","email":"thomas.lee@shinetech.com"},"keywords":["template","engine"],"main":"./lib/jazz","directories":{"lib":"./lib/jazz"},"engines":{"node":">= 0.1.102"},"_id":"jazz@0.0.14","_engineSupported":true,"_npmVersion":"0.2.15","_nodeVersion":"v0.2.6","modules":{"ast.js":"lib/jazz/ast.js","compiler.js":"lib/jazz/compiler.js","error.js":"lib/jazz/error.js","parser.js":"lib/jazz/parser.js","scanner.js":"lib/jazz/scanner.js","tokens.js":"lib/jazz/tokens.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"33cb3bc0ca5ab7ea902c2954a3215cfab7de3608","tarball":"https://registry.npmjs.org/jazz/-/jazz-0.0.14.tgz","integrity":"sha512-Cj/kozhN5Zfheb4x8XMrSmRqjGci2kjcLImQ6UsI2Nhi3dSse8nehPiNydd3SxVSncogeXH2dxuUFZpsIn5XsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZI2bGrdHrfwIo4/PPc8W62yiIsjwHfwCF6Fe+0WT06AiEA0YXb/vN1qravAeWv39k7i8tqPtB2LzIWAg/UzUI4i2Q="}]}},"0.0.18":{"name":"jazz","description":"A simple template engine built specifically for nodejs.","version":"0.0.18","author":{"name":"Thomas Lee","email":"thomas.lee@shinetech.com"},"keywords":["template","engine"],"main":"./lib/jazz.js","directories":{"lib":"./lib/jazz"},"scripts":{"test":"node test/all.js"},"engines":{"node":">= 0.1.102"},"_npmUser":{"name":"cliffano","email":"cliffano@gmail.com"},"_id":"jazz@0.0.18","dependencies":{},"devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-2","_nodeVersion":"v0.6.8","_defaultsLoaded":true,"dist":{"shasum":"8704ff96297fdd0895b998be17fc40df9fa66e2d","tarball":"https://registry.npmjs.org/jazz/-/jazz-0.0.18.tgz","integrity":"sha512-EaQJD/lHUEuUjqv5z86QG0qXisyglHGW6J+eCP9xJ1br9qqXak1GkDdicYmtUryOaciW+ybse2y7EA19zvRVeA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSAXcAZz7OhTbrET/T+wefIRU6hFwtiyUDONGjvnoaPQIgSKB0wLj0euPuPGtof9Iy3lNmYdRt67KJseNCdz3Sch8="}]},"maintainers":[{"name":"cliffano","email":"cliffano@gmail.com"}]}},"maintainers":[{"name":"cliffano","email":"cliffano@gmail.com"},{"name":"shinesolutions","email":"opensource@shinesolutions.com"}],"author":{"name":"Thomas Lee","email":"thomas.lee@shinetech.com"},"time":{"modified":"2022-06-19T03:56:16.302Z","created":"2011-02-14T08:22:58.914Z","0.0.1":"2011-02-14T08:22:58.914Z","0.0.3":"2011-02-14T08:22:58.914Z","0.0.4":"2011-02-14T08:22:58.914Z","0.0.14":"2011-02-14T08:22:58.914Z","0.0.18":"2012-02-14T19:33:29.934Z"},"readme":"Jazz is a simple template engine built specifically for nodejs.\n\n# Usage\n\n    var jazz = require(\"jazz\");\n\n    var template = jazz.compile(\"my template source code {someVariable}\");\n    template.eval({\"someVariable\": \"lolmuffin\"}, function(data) { sys.puts(data); });\n\nThis example would output the following:\n\n    my template source code lolmuffin\n\n# Syntax\n\n## Printing variables\n\n    {someVariable}\n\nThis works for any type of expression, so the following should also work:\n\n    {users.fred}\n    {\"hello\"}\n    {45}\n    {a eq b}\n\n## Filter functions\n\nYou can call filter functions like so:\n\n    {someFilter(arg1, arg2)}\n\nFilter functions are statements, NOT expressions so they cannot be chained\nnor used in if/forelse/etc. tests. However, calls can be made on any type\nof expression -- e.g.\n\n    {math.sin(45)}\n\n### Implementing filter functions\n\nFilter functions may block so rather than returning the value you want\nrendered as you might in other frameworks, jazz passes in a callback to\nyour filter function that you then call to indicate that you have a\nresult. e.g. here we simulate a blocking operation using setTimeout().\n\n    // sum.jazz\n\n    {sum(5, 10)}\n\n    // sum.js\n\n    var jazz = require(\"jazz\");\n\n    var params = {\n        sum: function(arg1, arg2, cb) {\n            setTimeout(function() {\n                cb((arg1 + arg2).toString());\n            }, 2000);\n        }\n    }\n    jazz.compile(\"sum.jazz\").eval(params, function(output) { console.log(output); });\n\nNote that even though the execution of the callback is delayed, this example still\nworks.\n\n## Conditional Statements\n\nYou can check if a variable evaluates to a true value like so:\n\n    {if name}\n        Hello, {name}\n    {end}\n\nElse clauses are also supported:\n\n    {if name}\n        Hello, {name}\n    {else}\n        Hello, Captain Anonymous\n    {end}\n\nAs are else..if clauses:\n\n    {if firstName}\n        Hello, {firstName}\n    {elif lastName}\n        Hello, Mr. {lastName}\n    {else}\n        Hello, Captain Anonymous\n    {end}\n\nLimited logical expressions are also possible:\n\n    {if user.lastName and user.isVip}\n        Hello, Mr. {user.lastName}, my good man!\n    {end}\n\n    {if fred.tired or fred.bored}\n        Fred: \"Yawn!\"\n    {end}\n\n    {if not awake}\n        Zzz\n    {end}\n\neq & neq comparison operators are available for comparing two values:\n\n    {if config.feature eq \"enabled\"}\n        Feature is enabled!\n    {end}\n\n    {if status neq \"inactive\"}\n        Huzzah!\n    {end}\n\nYou can also group expressions using parentheses:\n\n    {if (a and b) or c}\n        ...\n    {end}\n\n## Looping over an array\n\n    {foreach item in someArray}\n        <p>{item}</p>\n    {end}\n\n\nThe value being iterated over can be any expression supporting\nan Array-like interface.\n\n","readmeFilename":"","keywords":["template","engine"]}