{"_id":"@buxlabs/ejs-engine","_rev":"10-a8e1e3472dbd88bacac5111a458ce6c4","name":"@buxlabs/ejs-engine","dist-tags":{"latest":"0.3.2"},"versions":{"0.2.0":{"name":"@buxlabs/ejs-engine","version":"0.2.0","description":"ejs engine","main":"index.js","scripts":{"test":"node test/render.js && node test/prefixer.js && node test/compile.js"},"repository":{"type":"git","url":"git+https://github.com/buxlabs/ejs-engine.git"},"keywords":["ejs","engine"],"author":{"name":"Emil Ajdyna","email":"emil@ajdyna.com"},"license":"MIT","bugs":{"url":"https://github.com/buxlabs/ejs-engine/issues"},"homepage":"https://github.com/buxlabs/ejs-engine#readme","dependencies":{"@buxlabs/ast":"^0.9.4","@buxlabs/ejs-lexer":"^1.0.0"},"gitHead":"f7a4c0c18fbb6f03bb3edc0ab1099e13f181e81e","_id":"@buxlabs/ejs-engine@0.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.1","_npmUser":{"name":"buxlabs","email":"emil@ajdyna.com"},"dist":{"integrity":"sha512-O5MdOsJjSlyBsUJXpLDyUfpBEMMsqyDSdvh/EhjmOkJLb9nNG6pafb3QW7wCdK4RmE+naA27/JcUAC0x9BSDGg==","shasum":"0512c4016b616c84b79549a45d70bc43ed8d3d72","tarball":"https://registry.npmjs.org/@buxlabs/ejs-engine/-/ejs-engine-0.2.0.tgz","fileCount":10,"unpackedSize":27035,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF6PUCkm7eHmkoGm5h8yGe3uIZmPlT+ryQX0LZMJojl2AiBsUh4UNGwwbyOmgIfXzW53qSrb1miAEkjpctsNOlnvbw=="}]},"maintainers":[{"name":"buxlabs","email":"emil@ajdyna.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ejs-engine_0.2.0_1518692691230_0.7693120493523893"},"_hasShrinkwrap":false},"0.2.1":{"name":"@buxlabs/ejs-engine","version":"0.2.1","description":"ejs engine","main":"index.js","scripts":{"test":"node test/render.js && node test/prefixer.js && node test/compile.js"},"repository":{"type":"git","url":"git+https://github.com/buxlabs/ejs-engine.git"},"keywords":["ejs","engine"],"author":{"name":"Emil Ajdyna","email":"emil@ajdyna.com"},"license":"MIT","bugs":{"url":"https://github.com/buxlabs/ejs-engine/issues"},"homepage":"https://github.com/buxlabs/ejs-engine#readme","dependencies":{"@buxlabs/ast":"^0.9.4","@buxlabs/ejs-lexer":"^1.0.0"},"gitHead":"8a8625b1fb1ced0a4be30a870ec9b620718c9477","_id":"@buxlabs/ejs-engine@0.2.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.1","_npmUser":{"name":"buxlabs","email":"emil@ajdyna.com"},"dist":{"integrity":"sha512-ksyxzxhsmQ2LJCAYOepEC13ilKhf6Q/b949aNJWs9HxWDxqRbeLvy36agaJ/rD7Te0UwNiEVK9cSIlEaKiqiBA==","shasum":"850eda28674794970a341d4d95dbe0dee87d0840","tarball":"https://registry.npmjs.org/@buxlabs/ejs-engine/-/ejs-engine-0.2.1.tgz","fileCount":10,"unpackedSize":27494,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBd97q2JENkgjizfuN1Tf8D2jrpQKjfcuzw0+3ZRCejhAiEAjpuwkJhkM/uO7CbmS2eenj80ARZ51/cxZT1HnVtXQAo="}]},"maintainers":[{"name":"buxlabs","email":"emil@ajdyna.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ejs-engine_0.2.1_1518787383756_0.19239076350364037"},"_hasShrinkwrap":false},"0.2.2":{"name":"@buxlabs/ejs-engine","version":"0.2.2","description":"ejs engine","main":"index.js","scripts":{"test":"node test/render.js && node test/prefixer.js && node test/compile.js"},"repository":{"type":"git","url":"git+https://github.com/buxlabs/ejs-engine.git"},"keywords":["ejs","engine"],"author":{"name":"Emil Ajdyna","email":"emil@ajdyna.com"},"license":"MIT","bugs":{"url":"https://github.com/buxlabs/ejs-engine/issues"},"homepage":"https://github.com/buxlabs/ejs-engine#readme","dependencies":{"@buxlabs/ast":"^0.9.4","@buxlabs/ejs-lexer":"^1.0.0"},"gitHead":"a2834b52b756ed2370a2b8323bb644575d353ce9","_id":"@buxlabs/ejs-engine@0.2.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.1","_npmUser":{"name":"buxlabs","email":"emil@ajdyna.com"},"dist":{"integrity":"sha512-hWN+c1qZM0uFy6eLOAKnGRr1Nmyrkble6dPAsctP9Y2m39ldJ4DY/WD9HLHPmBCgFCAQNhI0pxs5OPNbqBJSig==","shasum":"2489bedc3b3f270fa66ff2db6d09923931fdebd6","tarball":"https://registry.npmjs.org/@buxlabs/ejs-engine/-/ejs-engine-0.2.2.tgz","fileCount":10,"unpackedSize":27847,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGZ/jhTq7HtqULw+2wmUPNhl/O75kYuB+VWWQmexyTvIAiEAwvKW2E4Dd/eF6E+g794dEGv2h7fMSqG+ucQt7UXPk3k="}]},"maintainers":[{"name":"buxlabs","email":"emil@ajdyna.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ejs-engine_0.2.2_1518793536729_0.534044485177716"},"_hasShrinkwrap":false},"0.3.0":{"name":"@buxlabs/ejs-engine","version":"0.3.0","description":"ejs engine","main":"index.js","scripts":{"test":"node test/render.js && node test/prefixer.js && node test/compile.js","benchmark":"node test/benchmark.js"},"repository":{"type":"git","url":"git+https://github.com/buxlabs/ejs-engine.git"},"keywords":["ejs","engine"],"author":{"name":"Emil Ajdyna","email":"emil@ajdyna.com"},"license":"MIT","bugs":{"url":"https://github.com/buxlabs/ejs-engine/issues"},"homepage":"https://github.com/buxlabs/ejs-engine#readme","dependencies":{"@buxlabs/ast":"^0.9.4","@buxlabs/ejs-lexer":"^1.0.0"},"devDependencies":{"benchmark":"^2.1.4","escape-html":"^1.0.3","lodash.template":"^4.4.0","underscore":"^1.8.3"},"gitHead":"a79251d6feb958d65dfc6a1e229e542b076c7913","_id":"@buxlabs/ejs-engine@0.3.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.1","_npmUser":{"name":"buxlabs","email":"emil@ajdyna.com"},"dist":{"integrity":"sha512-hk7S40jSbmGkhXuqGX93W11nGXs3B2X5OihH4yKSrt92b68OZTyS2I2neux+zcLJqXswbPJ1RFLxlaMusBxWtQ==","shasum":"c63137697ffbe96a9dda782d931896951c057be0","tarball":"https://registry.npmjs.org/@buxlabs/ejs-engine/-/ejs-engine-0.3.0.tgz","fileCount":11,"unpackedSize":31494,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDL6xmErAA2IfkyGMpqNE2K12l/lYryw1k1sk6jn2sjlwIhANQNbZsdrPB373rzLAgGpP5y61G60fVoWoFm3eUcOEIu"}]},"maintainers":[{"name":"buxlabs","email":"emil@ajdyna.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ejs-engine_0.3.0_1519754652998_0.4277493189118502"},"_hasShrinkwrap":false},"0.3.1":{"name":"@buxlabs/ejs-engine","version":"0.3.1","description":"ejs engine","main":"index.js","scripts":{"test":"node test/render.js && node test/prefixer.js && node test/compile.js && node test/fixtures.js","benchmark":"node test/benchmark.js"},"engines":{"node":">= 8.10.0"},"repository":{"type":"git","url":"git+https://github.com/buxlabs/ejs-engine.git"},"keywords":["ejs","engine"],"author":{"name":"Emil Ajdyna","email":"emil@ajdyna.com"},"license":"MIT","bugs":{"url":"https://github.com/buxlabs/ejs-engine/issues"},"homepage":"https://github.com/buxlabs/ejs-engine#readme","dependencies":{"@buxlabs/ast":"^0.9.4","@buxlabs/ejs-lexer":"^1.0.0"},"devDependencies":{"benchmark":"^2.1.4","escape-html":"^1.0.3","lodash.template":"^4.4.0","underscore":"^1.8.3"},"gitHead":"98578710836913b399010b6aa6f4420ba60cf453","_id":"@buxlabs/ejs-engine@0.3.1","_npmVersion":"5.8.0","_nodeVersion":"8.9.1","_npmUser":{"name":"buxlabs","email":"emil@ajdyna.com"},"dist":{"integrity":"sha512-rOND3u8lvT/q7qR0ACLtp9LAsw/b6cpbwmfIzhq2uTgSAOZNcZc4oCCuuDaqjVo8BeNUjodxhUDnZjv6nHaXiA==","shasum":"bb635dd1b8eb853d779d6c0eff23e7c4addf7b87","tarball":"https://registry.npmjs.org/@buxlabs/ejs-engine/-/ejs-engine-0.3.1.tgz","fileCount":13,"unpackedSize":32920,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnDzfCzvytzgA0s7ovN30rU5kGuOzyHEM/Od//ZbSSzgIgAWCfnyRr/GYRK0g7UhvbEejp45qP85m4FU9Dkd8zOeE="}]},"maintainers":[{"name":"buxlabs","email":"emil@ajdyna.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ejs-engine_0.3.1_1522011596818_0.723965431576318"},"_hasShrinkwrap":false},"0.3.2":{"name":"@buxlabs/ejs-engine","version":"0.3.2","description":"ejs engine","main":"index.js","scripts":{"test":"node test/render.js && node test/prefixer.js && node test/compile.js && node test/fixtures.js","benchmark":"node test/benchmark.js"},"engines":{"node":">= 8.10.0"},"repository":{"type":"git","url":"git+https://github.com/buxlabs/ejs-engine.git"},"keywords":["ejs","engine"],"author":{"name":"Emil Ajdyna","email":"emil@ajdyna.com"},"license":"MIT","bugs":{"url":"https://github.com/buxlabs/ejs-engine/issues"},"homepage":"https://github.com/buxlabs/ejs-engine#readme","dependencies":{"@buxlabs/ast":"^0.9.4","@buxlabs/ejs-lexer":"^1.0.0"},"devDependencies":{"benchmark":"^2.1.4","escape-html":"^1.0.3","lodash.template":"^4.4.0","underscore":"^1.8.3"},"gitHead":"65b07573a29be0deb3acd2b3d5d5335214bf6795","_id":"@buxlabs/ejs-engine@0.3.2","_npmVersion":"5.8.0","_nodeVersion":"8.9.1","_npmUser":{"name":"buxlabs","email":"emil@ajdyna.com"},"dist":{"integrity":"sha512-9KHv9xpMgjrGkHgMlWmyJBpdvGVXJuut+akwQwnJviq0a470BuklE715JwjyNjBNoUTUp1fz754oLUWm3irPJw==","shasum":"5932bafae9e156ae8c64d17687081dded010b0cc","tarball":"https://registry.npmjs.org/@buxlabs/ejs-engine/-/ejs-engine-0.3.2.tgz","fileCount":14,"unpackedSize":33971,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBYbpM/WZRzXCS8hTw562Qd0AMLdAcVLYSBf0jSYz5moAiEAgUAK2Cb1GO/RWBrvimaYps+2A0RcQloM6rUfFe2Wb/8="}]},"maintainers":[{"name":"buxlabs","email":"emil@ajdyna.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ejs-engine_0.3.2_1522137678846_0.7509594261364745"},"_hasShrinkwrap":false}},"time":{"created":"2018-02-15T11:04:50.891Z","0.2.0":"2018-02-15T11:04:51.943Z","modified":"2022-04-04T21:10:58.604Z","0.2.1":"2018-02-16T13:23:03.806Z","0.2.2":"2018-02-16T15:05:36.825Z","0.3.0":"2018-02-27T18:04:13.052Z","0.3.1":"2018-03-25T20:59:56.882Z","0.3.2":"2018-03-27T08:01:18.905Z"},"maintainers":[{"email":"emilajdyna@gmail.com","name":"buxlabs-dev"},{"email":"emil@ajdyna.com","name":"emilos"}],"description":"ejs engine","homepage":"https://github.com/buxlabs/ejs-engine#readme","keywords":["ejs","engine"],"repository":{"type":"git","url":"git+https://github.com/buxlabs/ejs-engine.git"},"author":{"name":"Emil Ajdyna","email":"emil@ajdyna.com"},"bugs":{"url":"https://github.com/buxlabs/ejs-engine/issues"},"license":"MIT","readme":"# ejs-engine\n\n[![Codeship](https://img.shields.io/codeship/d95aca00-129b-0136-009f-4ee608a1a18e.svg)](https://app.codeship.com/projects/283039)\n\n## Installation\n\n```\nnpm install @buxlabs/ejs-engine\n```\n\n## Usage\n\n```js\nconst { compile } = require('@buxlabs/ejs-engine')\nconst template = compile('<div><%= foo %></div>')\nassert(template({ foo: 'bar' }) === '<div>bar</div>')\n```\n\n```js\nconst escape = require('escape-html')\nconst { compile } = require('@buxlabs/ejs-engine')\nconst template = compile('<div><%- foo %></div>')\nassert(template({ foo: 'bar & baz' }, escape) === '<div>bar &amp; baz</div>')\n```\n\n## Features\n\n- no `with` statement inside of the output code,\n- no `data` prefix for variables is required to speed up the template,\n- can use any `escape` method you choose,\n- does not allow to use any globals, they must be passed to the template\n\n## How does it work?\n\n1) lexer converts the source into tokens\n2) prefixer transforms the identifiers inside of the tokens\n3) render method concatenates the rendering function based on the tokens\n4) compile method creates a new function instance\n\n## How different it is from other ejs templates?\n\nThe engine is not intended to be used in the browser directly, the templates should be compiled before being sent to the browser. The engine tokenizes and makes a static analysis of the template to create an optimal rendering method that does not contain any unnecessary code.\n\n## Benchmarks\n\nFew tests are in the `test/benchmark.js` file, please feel free to add more examples.\n\n```\n@buxlabs/ejs-engine x 2,704,910 ops/sec ±1.14% (82 runs sampled)\n_.template x 388,450 ops/sec ±1.42% (81 runs sampled)\nlodash.template x 473,581 ops/sec ±4.13% (84 runs sampled)\n_.template optimized x 2,304,672 ops/sec ±1.70% (79 runs sampled)\nlodash.template optimized x 2,599,384 ops/sec ±1.39% (83 runs sampled)\nFastest is @buxlabs/ejs-engine\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}