{"_id":"character-parser","_rev":"2061363","name":"character-parser","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","dist-tags":{"canary":"4.0.0-canary-5","latest":"4.0.0"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"time":{"modified":"2021-12-23T17:00:29.000Z","created":"2013-04-14T01:44:54.201Z","4.0.0":"2021-12-23T16:35:22.299Z","4.0.0-canary-5":"2021-12-23T16:33:01.755Z","4.0.0-canary-4":"2021-12-23T16:30:06.439Z","3.1.0":"2018-05-16T09:52:25.566Z","3.0.0":"2017-06-23T11:28:09.908Z","2.2.0":"2016-02-08T15:07:56.135Z","2.1.1":"2015-10-31T22:44:03.033Z","2.1.0":"2015-10-31T22:42:41.798Z","2.0.0":"2015-10-31T19:13:54.001Z","1.2.2":"2015-01-20T08:04:03.752Z","1.2.1":"2014-07-16T12:27:19.082Z","1.2.0":"2013-08-12T17:47:49.353Z","1.1.1":"2013-08-08T11:15:14.292Z","1.1.0":"2013-08-08T10:44:27.221Z","1.0.2":"2013-05-02T08:54:55.076Z","1.0.1":"2013-04-26T02:50:49.919Z","1.0.0":"2013-04-14T01:44:54.201Z"},"users":{"seangenabe":true},"author":{"name":"ForbesLindesay"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/character-parser.git"},"versions":{"4.0.0":{"name":"character-parser","@rollingversions":{"versioning":"ALWAYS_INCREASING"},"description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"lib/index.js","types":"lib/index.d.ts","exports":{".":[{"import":"./lib/index.mjs","require":"./lib/index.js","default":"./lib/index.js"},"./lib/index.js"]},"scripts":{"pretest":"npm run build","prepublishOnly":"npm run build","build":"tsc && tsc -p tsconfig.modules.json && mv lib-next/index.js lib/index.mjs && rimraf lib-next","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"rimraf":"^3.0.2","testit":"~3.1.0","typescript":"^4.5.4"},"dependencies":{},"version":"4.0.0","gitHead":"4023aa5bb3a73b09d11e4efc8c4d6fb76f796ab8","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"homepage":"https://github.com/ForbesLindesay/character-parser#readme","_id":"character-parser@4.0.0","_nodeVersion":"12.22.8","_npmVersion":"6.14.15","dist":{"shasum":"fb6899d41279880c20f1bfa31c9c7c51662744cd","size":7006,"noattachment":false,"key":"/character-parser/-/character-parser-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-4.0.0.tgz"},"_npmUser":{"name":"character-parser-bot","email":"forbeslindesay+characterparserbot@hey.com"},"directories":{},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/character-parser_4.0.0_1640277322146_0.8404662686383988"},"_hasShrinkwrap":false,"publish_time":1640277322299,"_cnpm_publish_time":1640277322299},"4.0.0-canary-5":{"name":"character-parser","@rollingversions":{"versioning":"ALWAYS_INCREASING"},"description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"lib/index.js","types":"lib/index.d.ts","exports":{".":[{"import":"./lib/index.mjs","require":"./lib/index.js","default":"./lib/index.js"},"./lib/index.js"]},"scripts":{"pretest":"npm run build","prepublishOnly":"npm run build","build":"tsc && tsc -p tsconfig.modules.json && mv lib-next/index.js lib/index.mjs && rimraf lib-next","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"rimraf":"^3.0.2","testit":"~3.1.0","typescript":"^4.5.4"},"dependencies":{},"version":"4.0.0-canary-5","readmeFilename":"README.md","gitHead":"4023aa5bb3a73b09d11e4efc8c4d6fb76f796ab8","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"homepage":"https://github.com/ForbesLindesay/character-parser#readme","_id":"character-parser@4.0.0-canary-5","_nodeVersion":"12.22.8","_npmVersion":"6.14.15","dist":{"shasum":"478d0b39b2faca300ec51b5a6b80965cc57a7231","size":7012,"noattachment":false,"key":"/character-parser/-/character-parser-4.0.0-canary-5.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-4.0.0-canary-5.tgz"},"_npmUser":{"name":"character-parser-bot","email":"forbeslindesay+characterparserbot@hey.com"},"directories":{},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/character-parser_4.0.0-canary-5_1640277181614_0.25869417662913397"},"_hasShrinkwrap":false,"publish_time":1640277181755,"_cnpm_publish_time":1640277181755},"4.0.0-canary-4":{"name":"character-parser","@rollingversions":{"versioning":"ALWAYS_INCREASING"},"description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"lib/index.js","types":"lib/index.d.ts","exports":{".":[{"import":"./lib/index.mjs","require":"./lib/index.js","default":"./lib/index.js"},"./lib/index.js"]},"scripts":{"pretest":"npm run build","prepublishOnly":"npm run build","build":"tsc && tsc -p tsconfig.modules.json && mv lib-next/index.js lib/index.mjs && rimraf lib-next","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"rimraf":"^3.0.2","testit":"~3.1.0","typescript":"^4.5.4"},"dependencies":{},"version":"4.0.0-canary-4","readmeFilename":"README.md","gitHead":"cf22c08a22b38e69e97fe7c7d7d6a08d13985f8f","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"homepage":"https://github.com/ForbesLindesay/character-parser#readme","_id":"character-parser@4.0.0-canary-4","_nodeVersion":"12.22.8","_npmVersion":"6.14.15","dist":{"shasum":"65b1b9af28a0b727899171c9ae8fa2302b32add6","size":7012,"noattachment":false,"key":"/character-parser/-/character-parser-4.0.0-canary-4.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-4.0.0-canary-4.tgz"},"_npmUser":{"name":"character-parser-bot","email":"forbeslindesay+characterparserbot@hey.com"},"directories":{},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/character-parser_4.0.0-canary-4_1640277006197_0.011144878074644149"},"_hasShrinkwrap":false,"publish_time":1640277006439,"_cnpm_publish_time":1640277006439},"3.1.0":{"name":"character-parser","version":"3.1.0","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"lib/index.js","types":"lib/index.d.ts","files":["lib"],"scripts":{"pretest":"npm run build","prepublishOnly":"npm run build","build":"tsc && flowgen lib/**/*","coverage":"istanbul cover test/index.js","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"flowgen2":"^2.0.0-alpha.12","istanbul":"~0.4.5","testit":"~3.0.0","typescript":"^2.4.0"},"dependencies":{},"gitHead":"1ff4e656f84f1c429e1d50de384e612d29441f2d","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"homepage":"https://github.com/ForbesLindesay/character-parser#readme","_id":"character-parser@3.1.0","_npmVersion":"6.0.1","_nodeVersion":"8.10.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"shasum":"97a9f4e167347c5d5465f4a875eabeaa5c86795c","size":6844,"noattachment":false,"key":"/character-parser/-/character-parser-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-3.1.0.tgz"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/character-parser_3.1.0_1526464345511_0.375204287039107"},"_hasShrinkwrap":false,"publish_time":1526464345566,"_cnpm_publish_time":1526464345566},"3.0.0":{"name":"character-parser","version":"3.0.0","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"lib/index.js","types":"lib/index.d.ts","files":["lib"],"scripts":{"pretest":"npm run build","prepublishOnly":"npm run build","build":"tsc && flowgen lib/**/*","coverage":"istanbul cover test/index.js","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"flowgen2":"^2.0.0-alpha.12","istanbul":"~0.4.5","testit":"~2.1.3","typescript":"^2.4.0"},"dependencies":{"@types/node":"^7.0.31"},"gitHead":"2312310acd7519dc8672baf657ba56616c4abb00","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"homepage":"https://github.com/ForbesLindesay/character-parser#readme","_id":"character-parser@3.0.0","_npmVersion":"5.0.3","_nodeVersion":"8.0.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"dist":{"shasum":"aaae4dfdf9cda0f6396783029f09af2ff987bb3d","size":6941,"noattachment":false,"key":"/character-parser/-/character-parser-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-3.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/character-parser-3.0.0.tgz_1498217288922_0.5814570956863463"},"directories":{},"publish_time":1498217289908,"_cnpm_publish_time":1498217289908,"_hasShrinkwrap":false},"2.2.0":{"name":"character-parser","version":"2.2.0","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"coverage":"istanbul cover test/index.js","test":"node test/index.js"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"istanbul":"~0.3.22","testit":"~2.0.2"},"dependencies":{"is-regex":"^1.0.3"},"gitHead":"345cb926eb5bc1bb0f2803a06af685cd58cdee87","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"homepage":"https://github.com/ForbesLindesay/character-parser","_id":"character-parser@2.2.0","_shasum":"c7ce28f36d4bcd9744e5ffc2c5fcde1c73261fc0","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.2","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"shasum":"c7ce28f36d4bcd9744e5ffc2c5fcde1c73261fc0","size":6582,"noattachment":false,"key":"/character-parser/-/character-parser-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-2.2.0.tgz"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/character-parser-2.2.0.tgz_1454944074579_0.6497116768732667"},"directories":{},"publish_time":1454944076135,"_cnpm_publish_time":1454944076135,"_hasShrinkwrap":false},"2.1.1":{"name":"character-parser","version":"2.1.1","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"coverage":"istanbul cover test/index.js","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"istanbul":"~0.3.22","testit":"~2.0.2"},"gitHead":"f7ee85db2baaffc3ce2873f86c0dd8442e8aa9f5","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"homepage":"https://github.com/ForbesLindesay/character-parser#readme","_id":"character-parser@2.1.1","_shasum":"68dac9db5072e2f52611fc36e0a81325310e1946","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"timothygu","email":"timothygu99@gmail.com"},"dist":{"shasum":"68dac9db5072e2f52611fc36e0a81325310e1946","size":5769,"noattachment":false,"key":"/character-parser/-/character-parser-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-2.1.1.tgz"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"publish_time":1446331443033,"_cnpm_publish_time":1446331443033,"_hasShrinkwrap":false},"2.1.0":{"name":"character-parser","version":"2.1.0","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"coverage":"istanbul cover test/index.js","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"istanbul":"~0.3.22","testit":"~2.0.2"},"gitHead":"feebd19e4b1c66341ac0a3cab1eb615bd48a36c6","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"homepage":"https://github.com/ForbesLindesay/character-parser#readme","_id":"character-parser@2.1.0","_shasum":"5750c900e0fbf53cb922aa4702a579562121add7","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"timothygu","email":"timothygu99@gmail.com"},"dist":{"shasum":"5750c900e0fbf53cb922aa4702a579562121add7","size":5773,"noattachment":false,"key":"/character-parser/-/character-parser-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-2.1.0.tgz"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"publish_time":1446331361798,"_cnpm_publish_time":1446331361798,"_hasShrinkwrap":false},"2.0.0":{"name":"character-parser","version":"2.0.0","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"coverage":"istanbul cover test/index.js","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"istanbul":"~0.3.22","testit":"~2.0.2"},"gitHead":"f45e6ed79ca4e85bd008e9c7c4d1030d8f947d60","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"homepage":"https://github.com/ForbesLindesay/character-parser#readme","_id":"character-parser@2.0.0","_shasum":"d04f0b81d7ceeb159f2bb1b089aa4d2667896ed8","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"timothygu","email":"timothygu99@gmail.com"},"dist":{"shasum":"d04f0b81d7ceeb159f2bb1b089aa4d2667896ed8","size":5648,"noattachment":false,"key":"/character-parser/-/character-parser-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-2.0.0.tgz"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"publish_time":1446318834001,"_cnpm_publish_time":1446318834001,"_hasShrinkwrap":false},"1.2.2":{"name":"character-parser","version":"1.2.2","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0"},"gitHead":"cfd4c8ccbb90a52646594377425b805c8bebc482","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"homepage":"https://github.com/ForbesLindesay/character-parser","_id":"character-parser@1.2.2","_shasum":"92d3dd48bfdc9ad5e913ec953d90f6d571a467d3","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"forbeslindesay","email":"forbes@lindeay.co.uk"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"dist":{"shasum":"92d3dd48bfdc9ad5e913ec953d90f6d571a467d3","size":4473,"noattachment":false,"key":"/character-parser/-/character-parser-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-1.2.2.tgz"},"directories":{},"publish_time":1421741043752,"_cnpm_publish_time":1421741043752,"_hasShrinkwrap":false},"1.2.1":{"name":"character-parser","version":"1.2.1","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0"},"bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"homepage":"https://github.com/ForbesLindesay/character-parser","_id":"character-parser@1.2.1","dist":{"shasum":"c0dde4ab182713b919b970959a123ecc1a30fcd6","size":4464,"noattachment":false,"key":"/character-parser/-/character-parser-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-1.2.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"forbeslindesay","email":"forbes@lindeay.co.uk"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"publish_time":1405513639082,"_cnpm_publish_time":1405513639082,"_hasShrinkwrap":false},"1.2.0":{"name":"character-parser","version":"1.2.0","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"_id":"character-parser@1.2.0","dist":{"shasum":"94134d6e5d870a39be359f7d22460935184ddef6","size":4347,"noattachment":false,"key":"/character-parser/-/character-parser-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-1.2.0.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"publish_time":1376329669353,"_cnpm_publish_time":1376329669353,"_hasShrinkwrap":false},"1.1.1":{"name":"character-parser","version":"1.1.1","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"_id":"character-parser@1.1.1","dist":{"shasum":"d84528b686a5b173c23c9a522b1d7cde1a813236","size":4079,"noattachment":false,"key":"/character-parser/-/character-parser-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-1.1.1.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"publish_time":1375960514292,"_cnpm_publish_time":1375960514292,"_hasShrinkwrap":false},"1.1.0":{"name":"character-parser","version":"1.1.0","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"_id":"character-parser@1.1.0","dist":{"shasum":"dac08ba664a35059cb9beb7679d8284b158950bd","size":4062,"noattachment":false,"key":"/character-parser/-/character-parser-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-1.1.0.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"publish_time":1375958667221,"_cnpm_publish_time":1375958667221,"_hasShrinkwrap":false},"1.0.2":{"name":"character-parser","version":"1.0.2","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0"},"readmeFilename":"README.md","_id":"character-parser@1.0.2","dist":{"shasum":"55384d6afcf8c6b9dd483e8347646a790e4545e7","size":3700,"noattachment":false,"key":"/character-parser/-/character-parser-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-1.0.2.tgz"},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"publish_time":1367484895076,"_cnpm_publish_time":1367484895076,"_hasShrinkwrap":false},"1.0.1":{"name":"character-parser","version":"1.0.1","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0"},"readmeFilename":"README.md","_id":"character-parser@1.0.1","dist":{"shasum":"056da8b9fe7c88d8de7ea6f7cfcf01ab15a17da8","size":3705,"noattachment":false,"key":"/character-parser/-/character-parser-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-1.0.1.tgz"},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"publish_time":1366944649919,"_cnpm_publish_time":1366944649919,"_hasShrinkwrap":false},"1.0.0":{"name":"character-parser","version":"1.0.0","description":"Parse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/character-parser.git"},"keywords":["parser","JavaScript","bracket","nesting","comment","string","escape","escaping"],"author":{"name":"ForbesLindesay"},"license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0"},"readmeFilename":"README.md","_id":"character-parser@1.0.0","dist":{"shasum":"11301d24b12b00b32185dbaf18ee19ecd23f3e8b","size":2860,"noattachment":false,"key":"/character-parser/-/character-parser-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/character-parser/download/character-parser-1.0.0.tgz"},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"character-parser-bot","email":""},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"publish_time":1365903894201,"_cnpm_publish_time":1365903894201,"_hasShrinkwrap":false}},"readme":"# character-parser\n\nParse JavaScript one character at a time to look for snippets in Templates.  This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.\n\n[![Build Status](https://img.shields.io/travis/ForbesLindesay/character-parser/master.svg)](https://travis-ci.org/ForbesLindesay/character-parser)\n\n## Installation\n\n    npm install character-parser\n\n## Usage\n\n### Parsing\n\nWork out how much depth changes:\n\n```js\nvar state = parse('foo(arg1, arg2, {\\n  foo: [a, b\\n');\nassert.deepEqual(state.stack, [')', '}', ']']);\n\nparse('    c, d]\\n  })', state);\nassert.deepEqual(state.stack, []);\n```\n\n### Custom Delimited Expressions\n\nFind code up to a custom delimiter:\n\n```js\n// EJS-style\nvar section = parser.parseUntil('foo.bar(\"%>\").baz%> bing bong', '%>');\nassert(section.start === 0);\nassert(section.end === 17); // exclusive end of string\nassert(section.src = 'foo.bar(\"%>\").baz');\n\nvar section = parser.parseUntil('<%foo.bar(\"%>\").baz%> bing bong', '%>', {start: 2});\nassert(section.start === 2);\nassert(section.end === 19); // exclusive end of string\nassert(section.src = 'foo.bar(\"%>\").baz');\n\n// Jade-style\nvar section = parser.parseUntil('#[p= [1, 2][i]]', ']', {start: 2})\nassert(section.start === 2);\nassert(section.end === 14); // exclusive end of string\nassert(section.src === 'p= [1, 2][i]')\n\n// Dumb parsing\n// Stop at first delimiter encountered, doesn't matter if it's nested or not\n// This is the character-parser@1 default behavior.\nvar section = parser.parseUntil('#[p= [1, 2][i]]', '}', {start: 2, ignoreNesting: true})\nassert(section.start === 2);\nassert(section.end === 10); // exclusive end of string\nassert(section.src === 'p= [1, 2')\n''\n```\n\nDelimiters are ignored if they are inside strings or comments.\n\n## API\n\nAll methods may throw an exception in the case of syntax errors. The exception contains an additional `code` property that always starts with `CHARACTER_PARSER:` that is unique for the error.\n\n### parse(str, state = defaultState(), options = {start: 0, end: src.length})\n\nParse a string starting at the index start, and return the state after parsing that string.\n\nIf you want to parse one string in multiple sections you should keep passing the resulting state to the next parse operation.\n\nReturns a `State` object.\n\n### parseUntil(src, delimiter, options = {start: 0, ignoreLineComment: false, ignoreNesting: false})\n\nParses the source until the first occurrence of `delimiter` which is not in a string or a comment.\n\nIf `ignoreLineComment` is `true`, it will still count if the delimiter occurs in a line comment.\n\nIf `ignoreNesting` is `true`, it will stop at the first bracket, not taking into account if the bracket part of nesting or not. See example above.\n\nIt returns an object with the structure:\n\n```js\n{\n  start: 0,//index of first character of string\n  end: 13,//index of first character after the end of string\n  src: 'source string'\n}\n```\n\n### parseChar(character, state = defaultState())\n\nParses the single character and returns the state.  See `parse` for the structure of the returned state object.  N.B. character must be a single character not a multi character string.\n\n### defaultState()\n\nGet a default starting state.\n\n### isPunctuator(character)\n\nReturns `true` if `character` represents punctuation in JavaScript.\n\n### isKeyword(name)\n\nReturns `true` if `name` is a keyword in JavaScript.\n\n### TOKEN_TYPES & BRACKETS\n\nObjects whose values can be a frame in the `stack` property of a State (documented below).\n\n## State\n\nA state is an object with the following structure\n\n```js\n{\n  stack: [],          // stack of detected brackets; the outermost is [0]\n  regexpStart: false, // true if a slash is just encountered and a REGEXP state has just been added to the stack\n\n  escaped: false,     // true if in a string and the last character was an escape character\n  hasDollar: false,   // true if in a template string and the last character was a dollar sign\n\n  src: '',            // the concatenated source string\n  history: '',        // reversed `src`\n  lastChar: ''        // last parsed character\n}\n```\n\n`stack` property can contain any of the following:\n\n- Any of the property values of `characterParser.TOKEN_TYPES`\n- Any of the property values of `characterParser.BRACKETS` (the end bracket, not the starting bracket)\n\nIt also has the following useful methods:\n\n- `.current()` returns the innermost bracket (i.e. the last stack frame).\n- `.isString()` returns `true` if the current location is inside a string.\n- `.isComment()` returns `true` if the current location is inside a comment.\n- `.isNesting([opts])` returns `true` if the current location is not at the top level, i.e. if the stack is not empty. If `opts.ignoreLineComment` is `true`, line comments are not counted as a level, so for `// a` it will still return false.\n\n### Errors\n\nAll errors thrown by character-parser has a `code` property attached to it that allows one to identify what sort of error is thrown. For errors thrown from `parse` and `parseUntil`, an additional `index` property is available.\n\n## Transition from v1\n\nIn character-parser@2, we have changed the APIs quite a bit. These are some notes that will help you transition to the new version.\n\n### State Object Changes\n\nInstead of keeping depths of different brackets, we are now keeping a stack. We also removed some properties:\n\n```js\nstate.lineComment  → state.current() === parser.TOKEN_TYPES.LINE_COMMENT\nstate.blockComment → state.current() === parser.TOKEN_TYPES.BLOCK_COMMENT\nstate.singleQuote  → state.current() === parser.TOKEN_TYPES.SINGLE_QUOTE\nstate.doubleQuote  → state.current() === parser.TOKEN_TYPES.DOUBLE_QUOTE\nstate.regexp       → state.current() === parser.TOKEN_TYPES.REGEXP\n```\n\n### `parseMax`\n\nThis function has been removed since the usefulness of this function has been questioned. You should find that `parseUntil` is a better choice for your task.\n\n### `parseUntil`\n\nThe default behavior when the delimiter is a bracket has been changed so that nesting is taken into account to determine if the end is reached.\n\nTo preserve the original behavior, pass `ignoreNesting: true` as an option.\n\nTo see the difference between the new and old behaviors, see the \"Usage\" section earlier.\n\n### `parseMaxBracket`\n\nThis function has been merged into `parseUntil`. You can directly rename the function call without any repercussions.\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/ForbesLindesay/character-parser#readme","bugs":{"url":"https://github.com/ForbesLindesay/character-parser/issues"},"license":"MIT"}