{"_id":"@starptech/expression-parser","_rev":"368148","name":"@starptech/expression-parser","description":"Framework agnostic template expression parser","dist-tags":{"latest":"0.10.0"},"maintainers":[{"name":"starptech","email":"deusdustin@gmail.com"}],"time":{"modified":"2021-07-19T07:34:51.000Z","created":"2018-12-12T22:29:48.741Z","0.10.0":"2019-06-21T21:58:23.501Z","0.9.0":"2019-04-28T10:14:20.163Z","0.8.17":"2019-04-07T17:43:57.731Z","0.8.15":"2018-12-18T22:48:32.627Z","0.8.12":"2018-12-12T22:29:48.741Z"},"users":{},"author":{"name":"Dustin Deus","email":"deusdustin@gmail.com","url":"http://www.starptech.de"},"repository":{"type":"git","url":"git+https://github.com/StarpTech/prettyhtml.git"},"versions":{"0.10.0":{"name":"@starptech/expression-parser","version":"0.10.0","description":"Framework agnostic template expression parser","main":"index.js","repository":{"type":"git","url":"git+https://github.com/StarpTech/prettyhtml.git"},"scripts":{"debug-test":"node --nolazy --inspect-brk=9229 node_modules/ava/profile.js -- ./test/index.js","test-coverage":"nyc --reporter lcov ava ./test/index.js","test":"ava ./test/index.js"},"keywords":["formatter","prettyhtml","parser","expressions","angular","vue","riotjs","html5"],"author":{"name":"Dustin Deus","email":"deusdustin@gmail.com","url":"http://www.starptech.de"},"license":"MIT","bugs":{"url":"https://github.com/StarpTech/prettyhtml/issues"},"homepage":"https://github.com/StarpTech/prettyhtml#readme","devDependencies":{"ava":"^2.1.0"},"nyc":{"check-coverage":true,"lines":90,"functions":90,"branches":85},"publishConfig":{"access":"public"},"gitHead":"c417941cf747a0c94abd2dd17eb468395195e752","_id":"@starptech/expression-parser@0.10.0","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.13.0/node@v12.4.0+x64 (linux)","_npmUser":{"name":"starptech","email":"deusdustin@gmail.com"},"dist":{"shasum":"5fa4d2fd0b36cd14a1f4ac3dcb176d123f9d9e37","size":5930,"noattachment":false,"key":"/@starptech/expression-parser/-/@starptech/expression-parser-0.10.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@starptech/expression-parser/download/@starptech/expression-parser-0.10.0.tgz"},"maintainers":[{"name":"starptech","email":"deusdustin@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expression-parser_0.10.0_1561154303301_0.7801309160426644"},"_hasShrinkwrap":false,"publish_time":1561154303501,"_cnpm_publish_time":1561154303501},"0.9.0":{"name":"@starptech/expression-parser","version":"0.9.0","description":"Framework agnostic template expression parser","main":"index.js","repository":{"type":"git","url":"git+https://github.com/StarpTech/prettyhtml.git"},"scripts":{"debug-test":"node --nolazy --inspect-brk=9229 node_modules/ava/profile.js -- ./test/index.js","test-coverage":"nyc --reporter lcov ava ./test/index.js","test":"ava ./test/index.js"},"keywords":["formatter","prettyhtml","parser","expressions","angular","vue","riotjs","html5"],"author":{"name":"Dustin Deus","email":"deusdustin@gmail.com","url":"http://www.starptech.de"},"license":"MIT","bugs":{"url":"https://github.com/StarpTech/prettyhtml/issues"},"homepage":"https://github.com/StarpTech/prettyhtml#readme","devDependencies":{"ava":"^1.4.1"},"nyc":{"check-coverage":true,"lines":90,"functions":90,"branches":85},"publishConfig":{"access":"public"},"gitHead":"c7c203521b9e87f18690e30ca5a9b413de918c5e","_id":"@starptech/expression-parser@0.9.0","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.13.0/node@v11.14.0+x64 (linux)","_npmUser":{"name":"starptech","email":"deusdustin@gmail.com"},"dist":{"shasum":"0718817bb93d59856024f78791a5a5733366bcb8","size":5927,"noattachment":false,"key":"/@starptech/expression-parser/-/@starptech/expression-parser-0.9.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@starptech/expression-parser/download/@starptech/expression-parser-0.9.0.tgz"},"maintainers":[{"name":"starptech","email":"deusdustin@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expression-parser_0.9.0_1556446460001_0.21312776872306638"},"_hasShrinkwrap":false,"publish_time":1556446460163,"_cnpm_publish_time":1556446460163},"0.8.17":{"name":"@starptech/expression-parser","version":"0.8.17","description":"Framework agnostic template expression parser","main":"index.js","repository":{"type":"git","url":"git+https://github.com/StarpTech/prettyhtml.git"},"scripts":{"debug-test":"node --nolazy --inspect-brk=9229 node_modules/ava/profile.js -- ./test/index.js","test-coverage":"nyc --reporter lcov ava ./test/index.js","test":"ava ./test/index.js"},"keywords":["formatter","prettyhtml","parser","expressions","angular","vue","riotjs","html5"],"author":{"name":"Dustin Deus","email":"deusdustin@gmail.com","url":"http://www.starptech.de"},"license":"MIT","bugs":{"url":"https://github.com/StarpTech/prettyhtml/issues"},"homepage":"https://github.com/StarpTech/prettyhtml#readme","devDependencies":{"ava":"^1.2.1"},"nyc":{"check-coverage":true,"lines":90,"functions":90,"branches":85},"publishConfig":{"access":"public"},"gitHead":"f51b884554e7d3f7ae31fc3245f89e606334109a","_id":"@starptech/expression-parser@0.8.17","_nodeVersion":"8.10.0","_npmVersion":"lerna/3.13.0/node@v8.10.0+x64 (linux)","_npmUser":{"name":"starptech","email":"deusdustin@gmail.com"},"dist":{"shasum":"f89230e32fd1c5704f4012724ec48cb765efd895","size":5930,"noattachment":false,"key":"/@starptech/expression-parser/-/@starptech/expression-parser-0.8.17.tgz","tarball":"http://registry.cnpm.dingdandao.com/@starptech/expression-parser/download/@starptech/expression-parser-0.8.17.tgz"},"maintainers":[{"name":"starptech","email":"deusdustin@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expression-parser_0.8.17_1554659037592_0.15431650041690603"},"_hasShrinkwrap":false,"publish_time":1554659037731,"_cnpm_publish_time":1554659037731},"0.8.15":{"name":"@starptech/expression-parser","version":"0.8.15","description":"Framework agnostic template expression parser","main":"index.js","repository":{"type":"git","url":"git+https://github.com/StarpTech/prettyhtml.git"},"scripts":{"debug-test":"node --nolazy --inspect-brk=9229 node_modules/ava/profile.js -- ./test/index.js","test-coverage":"nyc --reporter lcov ava ./test/index.js","test":"ava ./test/index.js"},"keywords":["formatter","prettyhtml","parser","expressions","angular","vue","riotjs","html5"],"author":{"name":"Dustin Deus","email":"deusdustin@gmail.com","url":"http://www.starptech.de"},"license":"MIT","bugs":{"url":"https://github.com/StarpTech/prettyhtml/issues"},"homepage":"https://github.com/StarpTech/prettyhtml#readme","devDependencies":{"ava":"^0.25.0"},"nyc":{"check-coverage":true,"lines":90,"functions":90,"branches":85},"publishConfig":{"access":"public"},"gitHead":"cb5d79a609203f90dbed1e5a5dbf4a55b8bc8ba1","_resolved":"","_integrity":"","_from":"file:starptech-expression-parser-0.8.15.tgz","_id":"@starptech/expression-parser@0.8.15","_npmVersion":"6.4.1","_nodeVersion":"10.14.1","_npmUser":{"name":"starptech","email":"deusdustin@gmail.com"},"dist":{"shasum":"8e196138c3e7127ee6139a13822cf23a8b159fcb","size":5931,"noattachment":false,"key":"/@starptech/expression-parser/-/@starptech/expression-parser-0.8.15.tgz","tarball":"http://registry.cnpm.dingdandao.com/@starptech/expression-parser/download/@starptech/expression-parser-0.8.15.tgz"},"maintainers":[{"name":"starptech","email":"deusdustin@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expression-parser_0.8.15_1545173312476_0.20189884977008132"},"_hasShrinkwrap":false,"publish_time":1545173312627,"_cnpm_publish_time":1545173312627},"0.8.12":{"name":"@starptech/expression-parser","version":"0.8.12","description":"Framework agnostic template expression parser","main":"index.js","repository":{"type":"git","url":"git+https://github.com/StarpTech/prettyhtml.git"},"scripts":{"debug-test":"node --nolazy --inspect-brk=9229 node_modules/ava/profile.js -- ./test/index.js","test-coverage":"nyc --reporter lcov ava ./test/index.js","test":"ava ./test/index.js"},"keywords":["formatter","prettyhtml","parser","expressions","angular","vue","riotjs","html5"],"author":{"name":"Dustin Deus","email":"deusdustin@gmail.com","url":"http://www.starptech.de"},"license":"MIT","bugs":{"url":"https://github.com/StarpTech/prettyhtml/issues"},"homepage":"https://github.com/StarpTech/prettyhtml#readme","devDependencies":{"ava":"^0.25.0"},"nyc":{"check-coverage":true,"lines":90,"functions":90,"branches":85},"publishConfig":{"access":"public"},"gitHead":"92ccc2d613cfc2f35bcec384102c49f286cfa6d9","_resolved":"","_integrity":"","_from":"file:starptech-expression-parser-0.8.12.tgz","_id":"@starptech/expression-parser@0.8.12","_npmVersion":"6.4.1","_nodeVersion":"10.14.1","_npmUser":{"name":"starptech","email":"deusdustin@gmail.com"},"dist":{"shasum":"2e8a080728f8bedf4884d99f065aa1f745723015","size":5932,"noattachment":false,"key":"/@starptech/expression-parser/-/@starptech/expression-parser-0.8.12.tgz","tarball":"http://registry.cnpm.dingdandao.com/@starptech/expression-parser/download/@starptech/expression-parser-0.8.12.tgz"},"maintainers":[{"name":"starptech","email":"deusdustin@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expression-parser_0.8.12_1544653788579_0.714052638291675"},"_hasShrinkwrap":false,"publish_time":1544653788741,"_cnpm_publish_time":1544653788741}},"readme":"# @starptech/expression-parser\n\nFramework agnostic template expression parser\n\n## Installation\n\n```\nnpm install --save @starptech/expression-parser\n```\n\n## Usage\n\nThis example shows how we parse HTML\n\n```js\nconst parse = require('@starptech/expression-parser')\nconst result = parse(`{ a + /<g></g> b }`, { brackets: ['{', '}'] })\n```\n\n## Representation\n\n- `unescape`: Indentify a template marker as escaped. This information is useful to understand why a marker was skipped\n- `expressions`: A list of template expressions\n  - `start`: Start position\n  - `end`: End position\n  - `text`: The content of the expression\n\n```json\n{\n  \"unescape\": \"\",\n  \"expressions\": [\n    {\n      \"start\": 1,\n      \"end\": 19,\n      \"text\": \" a + /<g></g> b \"\n    }\n  ]\n}\n```\n\n## Details\n\nThere may be more than one expression as part of one attribute value or text node, or only one replacing the entire value or node.\n\nWhen used as the whole attribute value, there's no need to enclose the expression inside quotes, even if the expression contains whitespace.\n\nSingle and double quotes can be nested inside the expression.\n\nTo emit opening (left) brackets as literal text wherever an opening bracket is expected, the bracket must be prefixed with a backslash (the JS escape char '\\'). This character is preserved in the output, but the parser will add a replace property for the attribute or node containing the escaped bracket, whose value is the bracket itself.\n\n## Credits\n\nThe parser is a modificated version of [Riot](https://github.com/riot/parser) template expression parser.\n","_attachments":{},"homepage":"https://github.com/StarpTech/prettyhtml#readme","bugs":{"url":"https://github.com/StarpTech/prettyhtml/issues"},"license":"MIT"}