{"_id":"strscanner","_rev":"92432","name":"strscanner","description":"lexical string analysis for javascript","dist-tags":{"latest":"0.0.8"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"},{"name":"crcn","email":"craig.j.condon@gmail.com"}],"time":{"modified":"2021-06-03T10:30:35.000Z","created":"2012-06-12T16:42:21.792Z","0.0.8":"2014-02-20T23:45:00.074Z","0.0.6":"2014-02-20T23:21:14.125Z","0.0.5":"2013-05-24T19:53:11.160Z","0.0.4":"2013-04-22T06:27:33.018Z","0.0.3":"2013-04-20T07:46:44.087Z","0.0.2":"2013-04-18T07:05:50.250Z","0.0.1":"2012-06-12T19:43:20.616Z","0.0.0":"2012-06-12T16:42:21.792Z"},"users":{},"author":{"name":"Craig Condon"},"repository":{"type":"git","url":"git://github.com/crcn/strscan.js.git"},"versions":{"0.0.8":{"author":{"name":"Craig Condon"},"name":"strscanner","description":"lexical string analysis for javascript","version":"0.0.8","repository":{"type":"git","url":"git://github.com/crcn/strscan.js.git"},"main":"./lib/index.js","dependencies":{},"devDependencies":{},"bugs":{"url":"https://github.com/crcn/strscan.js/issues"},"_id":"strscanner@0.0.8","dist":{"shasum":"51b640e42907eeed7f6e0f3c861863160709bda1","size":1884,"noattachment":false,"key":"/strscanner/-/strscanner-0.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/strscanner/download/strscanner-0.0.8.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"},{"name":"crcn","email":"craig.j.condon@gmail.com"}],"directories":{},"publish_time":1392939900074,"_cnpm_publish_time":1392939900074,"_hasShrinkwrap":false},"0.0.6":{"author":{"name":"Craig Condon"},"name":"strscanner","description":"lexical string analysis for javascript","version":"0.0.6","repository":{"type":"git","url":"git://github.com/crcn/strscan.js.git"},"main":"./lib/index.js","dependencies":{},"devDependencies":{},"bugs":{"url":"https://github.com/crcn/strscan.js/issues"},"_id":"strscanner@0.0.6","dist":{"shasum":"07c391e488d411c67e0a1081c8c7a6db20d8069f","size":1737,"noattachment":false,"key":"/strscanner/-/strscanner-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/strscanner/download/strscanner-0.0.6.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"},{"name":"crcn","email":"craig.j.condon@gmail.com"}],"directories":{},"publish_time":1392938474125,"_cnpm_publish_time":1392938474125,"_hasShrinkwrap":false},"0.0.5":{"author":{"name":"Craig Condon"},"name":"strscanner","description":"lexical string analysis for javascript","version":"0.0.5","repository":{"type":"git","url":"git://github.com/crcn/strscan.js.git"},"main":"./lib/index.js","dependencies":{},"devDependencies":{},"readmeFilename":"README.md","_id":"strscanner@0.0.5","dist":{"shasum":"1904c781433e18c8d22bb44aa7f7245d8115212b","size":1724,"noattachment":false,"key":"/strscanner/-/strscanner-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/strscanner/download/strscanner-0.0.5.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"},{"name":"crcn","email":"craig.j.condon@gmail.com"}],"directories":{},"publish_time":1369425191160,"_cnpm_publish_time":1369425191160,"_hasShrinkwrap":false},"0.0.4":{"author":{"name":"Craig Condon"},"name":"strscanner","description":"lexical string analysis for javascript","version":"0.0.4","repository":{"type":"git","url":"git://github.com/crcn/strscan.js.git"},"main":"./lib/index.js","dependencies":{},"devDependencies":{},"readmeFilename":"README.md","_id":"strscanner@0.0.4","dist":{"shasum":"9b81098b5985cbcd79e5869d0a8d2065fb68130c","size":1718,"noattachment":false,"key":"/strscanner/-/strscanner-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/strscanner/download/strscanner-0.0.4.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"},{"name":"crcn","email":"craig.j.condon@gmail.com"}],"directories":{},"publish_time":1366612053018,"_cnpm_publish_time":1366612053018,"_hasShrinkwrap":false},"0.0.3":{"author":{"name":"Craig Condon"},"name":"strscanner","description":"lexical string analysis for javascript","version":"0.0.3","repository":{"type":"git","url":"git://github.com/crcn/strscan.js.git"},"main":"./lib/index.js","dependencies":{},"devDependencies":{},"readmeFilename":"README.md","_id":"strscanner@0.0.3","dist":{"shasum":"34d1fdea20676d2ba89063148e24107205030d95","size":1710,"noattachment":false,"key":"/strscanner/-/strscanner-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/strscanner/download/strscanner-0.0.3.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"},{"name":"crcn","email":"craig.j.condon@gmail.com"}],"directories":{},"publish_time":1366444004087,"_cnpm_publish_time":1366444004087,"_hasShrinkwrap":false},"0.0.2":{"author":{"name":"Craig Condon"},"name":"strscanner","description":"lexical string analysis for javascript","version":"0.0.2","repository":{"type":"git","url":"git://github.com/crcn/strscan.js.git"},"main":"./lib/index.js","dependencies":{},"devDependencies":{},"readmeFilename":"README.md","_id":"strscanner@0.0.2","dist":{"shasum":"ae43151209faa75897ee78260440de3252ac9e14","size":1686,"noattachment":false,"key":"/strscanner/-/strscanner-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/strscanner/download/strscanner-0.0.2.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"},{"name":"crcn","email":"craig.j.condon@gmail.com"}],"directories":{},"publish_time":1366268750250,"_cnpm_publish_time":1366268750250,"_hasShrinkwrap":false},"0.0.1":{"author":{"name":"Craig Condon"},"name":"strscanner","description":"lexical string analysis for javascript","version":"0.0.1","repository":{"type":"git","url":"git://github.com/crcn/strscan.js.git"},"main":"./lib/index.js","dependencies":{},"devDependencies":{},"_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"_id":"strscanner@0.0.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.19","_defaultsLoaded":true,"dist":{"shasum":"0522af5fd39c314586000ba063148f1e69d19840","size":10240,"noattachment":false,"key":"/strscanner/-/strscanner-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/strscanner/download/strscanner-0.0.1.tgz"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"},{"name":"crcn","email":"craig.j.condon@gmail.com"}],"directories":{},"publish_time":1339530200616,"_cnpm_publish_time":1339530200616,"_hasShrinkwrap":false},"0.0.0":{"author":{"name":"Craig Condon"},"name":"strscanner","description":"lexical string analysis for javascript","version":"0.0.0","repository":{"type":"git","url":"git://github.com/crcn/strscan.js.git"},"main":"./lib/index.js","dependencies":{},"devDependencies":{},"_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"_id":"strscanner@0.0.0","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.19","_defaultsLoaded":true,"dist":{"shasum":"2acda868f969b31382bd54c24d36d47c3a81c591","size":10240,"noattachment":false,"key":"/strscanner/-/strscanner-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/strscanner/download/strscanner-0.0.0.tgz"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"},{"name":"crcn","email":"craig.j.condon@gmail.com"}],"directories":{},"publish_time":1339519341792,"_cnpm_publish_time":1339519341792,"_hasShrinkwrap":false}},"readme":"### Example\n\n\n```javascript\n\nvar strscan = require(\"strscan\");\n\nvar scanner = strscan(\"hello world -> \", {\n\tskipWhitespace: true\n});\n\n\nwhile(!scanner.eof()) {\n\t\n\tscanner.nextChar();\n\n\tif(scanner.isAZ()) {\n\t\tvar word = scanner.nextWord();\n\t} else \n\tif(scanner.cchar() == \"-\") {\n\t\tvar arrow = scanner.to(1);\n\t}\n}\n\n```\n\n\n\n### API\n\n\n#### .eof() \n\nreturns true if the scanner is at the end\n\n\n#### .nextChar()\n\nscans to the next character\n\n#### .cchar()\n\nreturns the current char\n\n#### .isAZ()\n\nreturns true if the current char is A-Z\n\n#### .is09()\n\nreturns true if the current char is 0-9\n\n\n#### .isAlpha()\n\nreturns true if the current char is A-Z 0-9\n\n\n#### .next(match)\n\nreturns true if the current char matches the given regular expression\n\n#### .nextWord()\n\nreturns the next word\n\n#### .to(count)\n\nscans to the given position, and returns the buffer\n\n#### .peek(count)\n\nreturns a buffer from the current position to the given count, then rewinds\n\n#### .rewind(count)\n\nrewinds N characters\n\n#### .skip(count)\n\nskips N characters\n\n\n","_attachments":{},"bugs":{"url":"https://github.com/crcn/strscan.js/issues"}}