snowball 0.1.21 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.gitignore +1 -3
- data/{lib/snowball → bin}/roll.js +0 -0
- data/lib/snowball/roller.rb +1 -1
- data/lib/snowball/version.rb +1 -1
- data/node_modules/.bin/browserify +161 -0
- data/node_modules/.bin/cake +7 -0
- data/node_modules/.bin/coffee +7 -0
- data/node_modules/.bin/jade +168 -0
- data/node_modules/browserify/.travis.yml +4 -0
- data/node_modules/browserify/LICENSE +63 -0
- data/node_modules/browserify/README.markdown +172 -0
- data/node_modules/browserify/bin/cmd.js +161 -0
- data/node_modules/browserify/builtins/__browserify_process.js +55 -0
- data/node_modules/browserify/builtins/assert.js +314 -0
- data/node_modules/browserify/builtins/child_process.js +2 -0
- data/node_modules/browserify/builtins/events.js +178 -0
- data/node_modules/browserify/builtins/fs.js +1 -0
- data/node_modules/browserify/builtins/https.js +1 -0
- data/node_modules/browserify/builtins/net.js +1 -0
- data/node_modules/browserify/builtins/path.js +175 -0
- data/node_modules/browserify/builtins/querystring.js +250 -0
- data/node_modules/browserify/builtins/stream.js +119 -0
- data/node_modules/browserify/builtins/string_decoder.js +161 -0
- data/node_modules/browserify/builtins/sys.js +1 -0
- data/node_modules/browserify/builtins/timers.js +39 -0
- data/node_modules/browserify/builtins/tls.js +1 -0
- data/node_modules/browserify/builtins/tty.js +2 -0
- data/node_modules/browserify/builtins/url.js +604 -0
- data/node_modules/browserify/builtins/util.js +351 -0
- data/node_modules/browserify/example/debug/browserify.js +219 -0
- data/node_modules/browserify/example/debug/build.sh +3 -0
- data/node_modules/browserify/example/debug/index.html +7 -0
- data/node_modules/browserify/example/debug/js/entry.js +2 -0
- data/node_modules/browserify/example/debug/js/thrower.js +3 -0
- data/node_modules/browserify/example/debug/server.js +9 -0
- data/node_modules/browserify/example/simple-build/browserify.js +368 -0
- data/node_modules/browserify/example/simple-build/build.sh +3 -0
- data/node_modules/browserify/example/simple-build/index.html +9 -0
- data/node_modules/browserify/example/simple-build/js/bar.js +3 -0
- data/node_modules/browserify/example/simple-build/js/entry.js +5 -0
- data/node_modules/browserify/example/simple-build/js/foo.js +5 -0
- data/node_modules/browserify/example/simple-build/server.js +9 -0
- data/node_modules/browserify/example/test/b.js +5 -0
- data/node_modules/browserify/example/test/bar.js +3 -0
- data/node_modules/browserify/example/test/foo.js +3 -0
- data/node_modules/browserify/example/test/m.js +3 -0
- data/node_modules/browserify/example/test/n.js +3 -0
- data/node_modules/browserify/example/using-http/bundle.js +813 -0
- data/node_modules/browserify/example/using-http/entry.js +25 -0
- data/node_modules/browserify/example/using-http/index.html +9 -0
- data/node_modules/browserify/example/using-http/server.js +28 -0
- data/node_modules/browserify/index.js +202 -0
- data/node_modules/browserify/lib/watch.js +75 -0
- data/node_modules/browserify/lib/wrap.js +580 -0
- data/node_modules/browserify/lib/wrappers.js +10 -0
- data/node_modules/browserify/node_modules/buffer-browserify/.npmignore +1 -0
- data/node_modules/browserify/node_modules/buffer-browserify/README.md +11 -0
- data/node_modules/browserify/node_modules/buffer-browserify/buffer_ieee754.js +84 -0
- data/node_modules/browserify/node_modules/buffer-browserify/index.js +1317 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/README.md +14 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/lib/b64.js +84 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/package.json +30 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/test/runner.js +50 -0
- data/node_modules/browserify/node_modules/buffer-browserify/package.json +46 -0
- data/node_modules/browserify/node_modules/buffer-browserify/test/buffer.js +218 -0
- data/node_modules/browserify/node_modules/commondir/README.markdown +45 -0
- data/node_modules/browserify/node_modules/commondir/example/base.js +3 -0
- data/node_modules/browserify/node_modules/commondir/example/dir.js +3 -0
- data/node_modules/browserify/node_modules/commondir/index.js +29 -0
- data/node_modules/browserify/node_modules/commondir/package.json +47 -0
- data/node_modules/browserify/node_modules/commondir/test/dirs.js +66 -0
- data/node_modules/browserify/node_modules/crypto-browserify/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/bundle.js +637 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/index.html +12 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/test.js +4 -0
- data/node_modules/browserify/node_modules/crypto-browserify/index.js +74 -0
- data/node_modules/browserify/node_modules/crypto-browserify/md5.js +384 -0
- data/node_modules/browserify/node_modules/crypto-browserify/package.json +33 -0
- data/node_modules/browserify/node_modules/crypto-browserify/readme.markdown +20 -0
- data/node_modules/browserify/node_modules/crypto-browserify/rng.js +37 -0
- data/node_modules/browserify/node_modules/crypto-browserify/sha.js +210 -0
- data/node_modules/browserify/node_modules/crypto-browserify/test/simple.js +35 -0
- data/node_modules/browserify/node_modules/deputy/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/deputy/README.markdown +55 -0
- data/node_modules/browserify/node_modules/deputy/example/cache.js +5 -0
- data/node_modules/browserify/node_modules/deputy/index.js +46 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.npmignore +2 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/LICENSE +21 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/examples/pow.js +6 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/index.js +82 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/package.json +34 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/readme.markdown +63 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/chmod.js +38 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/clobber.js +37 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/race.js +41 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/rel.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return.js +25 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return_sync.js +24 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/root.js +18 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/sync.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask.js +28 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/node_modules/browserify/node_modules/deputy/package.json +47 -0
- data/node_modules/browserify/node_modules/deputy/test/cache.js +58 -0
- data/node_modules/browserify/node_modules/detective/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/detective/README.markdown +66 -0
- data/node_modules/browserify/node_modules/detective/example/strings.js +6 -0
- data/node_modules/browserify/node_modules/detective/example/strings_src.js +3 -0
- data/node_modules/browserify/node_modules/detective/index.js +60 -0
- data/node_modules/browserify/node_modules/detective/node_modules/.bin/esparse +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/LICENSE.BSD +19 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/README.md +74 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/javascript.js +360 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/json2.js +487 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/style.css +164 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-min.js +12 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview.css +7 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/bin/esparse.js +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/changes +92 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/cm +696 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/checkenv.js +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.html +82 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.js +170 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.html +106 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.js +123 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.css +82 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.html +352 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/precedence.html +225 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.html +120 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.js +71 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/esprima.js +3577 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/index.html +103 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/package.json +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jslex.js +588 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/platform.js +878 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.html +58 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.js +328 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.html +140 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.js +270 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.html +40 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.js +239 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.footer.html +3 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.header.html +37 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.html +3617 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/index.html +36 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/reflect.js +403 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/run.js +66 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/test.js +16659 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/update-coverage.sh +28 -0
- data/node_modules/browserify/node_modules/detective/package.json +47 -0
- data/node_modules/browserify/node_modules/detective/test/both.js +11 -0
- data/node_modules/browserify/node_modules/detective/test/chained.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/files/both.js +4 -0
- data/node_modules/browserify/node_modules/detective/test/files/chained.js +5 -0
- data/node_modules/browserify/node_modules/detective/test/files/nested.js +22 -0
- data/node_modules/browserify/node_modules/detective/test/files/skip.js +7 -0
- data/node_modules/browserify/node_modules/detective/test/files/strings.js +13 -0
- data/node_modules/browserify/node_modules/detective/test/files/word.js +13 -0
- data/node_modules/browserify/node_modules/detective/test/nested.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/skip.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/strings.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/word.js +12 -0
- data/node_modules/browserify/node_modules/http-browserify/.npmignore +1 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/main.js +14 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/server.js +12 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/main.js +18 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/server.js +15 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/data.json +139 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/main.js +13 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.npmignore +2 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 +15 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.MIT +24 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/examples/all_docs.js +13 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js +189 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE +24 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown +11 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js +26 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +30 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +379 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json +36 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +167 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +180 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +54 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +38 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/package.json +40 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/readme.markdown +145 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/destroy_missing.js +22 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/empty.js +44 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json +4030 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fn.js +39 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js +69 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects.js +42 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js +35 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/parsejson.js +28 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify_object.js +47 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test.js +35 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test2.js +29 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/two-ways.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/server.js +10 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/main.js +16 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/server.js +19 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/main.js +16 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/server.js +21 -0
- data/node_modules/browserify/node_modules/http-browserify/index.js +59 -0
- data/node_modules/browserify/node_modules/http-browserify/lib/request.js +128 -0
- data/node_modules/browserify/node_modules/http-browserify/lib/response.js +119 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/index.js +48 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/package.json +30 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/readme.md +31 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/test.js +34 -0
- data/node_modules/browserify/node_modules/http-browserify/package.json +46 -0
- data/node_modules/browserify/node_modules/http-browserify/readme.markdown +128 -0
- data/node_modules/browserify/node_modules/nub/README.markdown +23 -0
- data/node_modules/browserify/node_modules/nub/index.js +64 -0
- data/node_modules/browserify/node_modules/nub/package.json +46 -0
- data/node_modules/browserify/node_modules/nub/test/by.js +51 -0
- data/node_modules/browserify/node_modules/nub/test/nub.js +46 -0
- data/node_modules/browserify/node_modules/resolve/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/resolve/LICENSE +18 -0
- data/node_modules/browserify/node_modules/resolve/README.markdown +47 -0
- data/node_modules/browserify/node_modules/resolve/index.js +106 -0
- data/node_modules/browserify/node_modules/resolve/package.json +45 -0
- data/node_modules/browserify/node_modules/resolve/test/core.js +12 -0
- data/node_modules/browserify/node_modules/resolve/test/filter.js +15 -0
- data/node_modules/browserify/node_modules/resolve/test/mock.js +64 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver.js +157 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/package.json +3 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/cup.coffee +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/foo.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/mug.coffee +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/mug.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- data/node_modules/browserify/node_modules/syntax-error/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/syntax-error/LICENSE +18 -0
- data/node_modules/browserify/node_modules/syntax-error/example/check.js +12 -0
- data/node_modules/browserify/node_modules/syntax-error/example/src.js +9 -0
- data/node_modules/browserify/node_modules/syntax-error/index.js +54 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/.bin/esparse +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/LICENSE.BSD +19 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/README.md +74 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/javascript.js +360 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/json2.js +487 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/style.css +164 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-min.js +12 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview.css +7 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/bin/esparse.js +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/changes +92 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/cm +696 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/checkenv.js +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.html +82 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.js +170 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.html +106 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.js +123 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.css +82 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.html +352 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/precedence.html +225 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.html +120 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.js +71 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/esprima.js +3577 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/index.html +103 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/package.json +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jslex.js +588 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/platform.js +878 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.html +58 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.js +328 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.html +140 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.js +270 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.html +40 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.js +239 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.footer.html +3 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.header.html +37 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.html +3617 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/index.html +36 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/reflect.js +403 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/run.js +66 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/test.js +16659 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/update-coverage.sh +28 -0
- data/node_modules/browserify/node_modules/syntax-error/package.json +49 -0
- data/node_modules/browserify/node_modules/syntax-error/readme.markdown +87 -0
- data/node_modules/browserify/node_modules/syntax-error/test/check.js +17 -0
- data/node_modules/browserify/node_modules/syntax-error/test/sources/check.js +9 -0
- data/node_modules/browserify/node_modules/vm-browserify/README.markdown +103 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/bundle.js +473 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/entry.js +6 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/index.html +9 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/server.js +6 -0
- data/node_modules/browserify/node_modules/vm-browserify/index.js +85 -0
- data/node_modules/browserify/node_modules/vm-browserify/package.json +43 -0
- data/node_modules/browserify/node_modules/vm-browserify/testling/run.js +22 -0
- data/node_modules/browserify/node_modules/vm-browserify/testling/test.sh +11 -0
- data/node_modules/browserify/package.json +78 -0
- data/node_modules/browserify/test/alias.js +58 -0
- data/node_modules/browserify/test/backbone.js +21 -0
- data/node_modules/browserify/test/bin.js +39 -0
- data/node_modules/browserify/test/buffer.js +99 -0
- data/node_modules/browserify/test/bundle.js +32 -0
- data/node_modules/browserify/test/cache.js +28 -0
- data/node_modules/browserify/test/coffee.js +39 -0
- data/node_modules/browserify/test/coffee/bar.js +1 -0
- data/node_modules/browserify/test/coffee/baz.coffee +1 -0
- data/node_modules/browserify/test/coffee/entry.coffee +1 -0
- data/node_modules/browserify/test/coffee/foo.coffee +1 -0
- data/node_modules/browserify/test/coffee/index.coffee +5 -0
- data/node_modules/browserify/test/coffee/nested/nested.coffee +2 -0
- data/node_modules/browserify/test/comment.js +17 -0
- data/node_modules/browserify/test/comment/main.js +2 -0
- data/node_modules/browserify/test/crypto.js +37 -0
- data/node_modules/browserify/test/dnode.js +27 -0
- data/node_modules/browserify/test/dollar.js +19 -0
- data/node_modules/browserify/test/dollar/dollar/index.js +7 -0
- data/node_modules/browserify/test/entry.js +36 -0
- data/node_modules/browserify/test/entry/main.js +1 -0
- data/node_modules/browserify/test/entry/one.js +1 -0
- data/node_modules/browserify/test/entry/two.js +1 -0
- data/node_modules/browserify/test/error_code.js +24 -0
- data/node_modules/browserify/test/error_code/src.js +2 -0
- data/node_modules/browserify/test/export.js +52 -0
- data/node_modules/browserify/test/export/entry.js +1 -0
- data/node_modules/browserify/test/field.js +64 -0
- data/node_modules/browserify/test/field/miss.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/package.json +4 -0
- data/node_modules/browserify/test/field/node_modules/z-object/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-object/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-object/package.json +6 -0
- data/node_modules/browserify/test/field/node_modules/z-string/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-string/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-string/package.json +4 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/browser/a.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/browser/b.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/package.json +4 -0
- data/node_modules/browserify/test/field/object.js +1 -0
- data/node_modules/browserify/test/field/string.js +1 -0
- data/node_modules/browserify/test/field/sub.js +1 -0
- data/node_modules/browserify/test/global.js +19 -0
- data/node_modules/browserify/test/global/main.js +2 -0
- data/node_modules/browserify/test/jade.js +35 -0
- data/node_modules/browserify/test/json.js +17 -0
- data/node_modules/browserify/test/json/beep.json +4 -0
- data/node_modules/browserify/test/json/main.js +1 -0
- data/node_modules/browserify/test/maxlisteners.js +8 -0
- data/node_modules/browserify/test/module.js +22 -0
- data/node_modules/browserify/test/multi_entry.js +20 -0
- data/node_modules/browserify/test/multi_entry/a.js +2 -0
- data/node_modules/browserify/test/multi_entry/b.js +2 -0
- data/node_modules/browserify/test/multi_entry/c.js +3 -0
- data/node_modules/browserify/test/multi_ignore.js +23 -0
- data/node_modules/browserify/test/node_modules/beep/index.js +1 -0
- data/node_modules/browserify/test/require_cache.js +18 -0
- data/node_modules/browserify/test/retarget.js +27 -0
- data/node_modules/browserify/test/seq.js +47 -0
- data/node_modules/browserify/test/subdep.js +26 -0
- data/node_modules/browserify/test/subdep/index.js +1 -0
- data/node_modules/browserify/test/subdep/package.json +6 -0
- data/node_modules/browserify/test/util.js +48 -0
- data/node_modules/browserify/test/watch.js +91 -0
- data/node_modules/browserify/test/watch/a.js +1 -0
- data/node_modules/browserify/test/wrap.js +43 -0
- data/node_modules/browserify/test/wrap/a.js +2 -0
- data/node_modules/browserify/test/wrap/c.js +1 -0
- data/node_modules/browserify/test/wrap/node_modules/b/main.js +1 -0
- data/node_modules/browserify/test/wrap/node_modules/b/package.json +3 -0
- data/node_modules/browserify/test/wrap/node_modules/skipmetoo/index.js +1 -0
- data/node_modules/browserify/test/wrap/skipme.js +1 -0
- data/node_modules/browserify/test/wrap/x.js +0 -0
- data/node_modules/browserify/testling/README.markdown +29 -0
- data/node_modules/browserify/testling/test.sh +37 -0
- data/node_modules/browserify/testling/tick.js +9 -0
- data/node_modules/browserify/testling/timers.js +50 -0
- data/node_modules/browserify/testling/util.js +24 -0
- data/node_modules/browserify/v2.markdown +41 -0
- data/node_modules/browserify/wrappers/alias.js +1 -0
- data/node_modules/browserify/wrappers/body.js +2 -0
- data/node_modules/browserify/wrappers/body_debug.js +2 -0
- data/node_modules/browserify/wrappers/entry.js +3 -0
- data/node_modules/browserify/wrappers/entry_debug.js +3 -0
- data/node_modules/browserify/wrappers/package.js +3 -0
- data/node_modules/browserify/wrappers/prelude.js +196 -0
- data/node_modules/coffee-script/.npmignore +11 -0
- data/node_modules/coffee-script/CNAME +1 -0
- data/node_modules/coffee-script/CONTRIBUTING.md +9 -0
- data/node_modules/coffee-script/LICENSE +22 -0
- data/node_modules/coffee-script/README +51 -0
- data/node_modules/coffee-script/Rakefile +78 -0
- data/node_modules/coffee-script/bin/cake +7 -0
- data/node_modules/coffee-script/bin/coffee +7 -0
- data/node_modules/coffee-script/extras/jsl.conf +44 -0
- data/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
- data/node_modules/coffee-script/lib/coffee-script/cake.js +113 -0
- data/node_modules/coffee-script/lib/coffee-script/coffee-script.js +171 -0
- data/node_modules/coffee-script/lib/coffee-script/command.js +502 -0
- data/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
- data/node_modules/coffee-script/lib/coffee-script/helpers.js +88 -0
- data/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
- data/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
- data/node_modules/coffee-script/lib/coffee-script/nodes.js +2971 -0
- data/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
- data/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
- data/node_modules/coffee-script/lib/coffee-script/repl.js +276 -0
- data/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
- data/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
- data/node_modules/coffee-script/package.json +50 -0
- data/node_modules/jade-runtime/.npmignore +15 -0
- data/node_modules/jade-runtime/README.md +8 -0
- data/node_modules/jade-runtime/globals.js +32 -0
- data/node_modules/jade-runtime/index.js +2 -0
- data/node_modules/jade-runtime/jade-runtime.js +181 -0
- data/node_modules/jade-runtime/package.json +18 -0
- data/node_modules/jade/.npmignore +14 -0
- data/node_modules/jade/LICENSE +22 -0
- data/node_modules/jade/Readme.md +1299 -0
- data/node_modules/jade/bin/jade +168 -0
- data/node_modules/jade/index.js +4 -0
- data/node_modules/jade/jade.js +3586 -0
- data/node_modules/jade/jade.md +510 -0
- data/node_modules/jade/jade.min.js +2 -0
- data/node_modules/jade/lib/compiler.js +654 -0
- data/node_modules/jade/lib/doctypes.js +18 -0
- data/node_modules/jade/lib/filters.js +97 -0
- data/node_modules/jade/lib/inline-tags.js +28 -0
- data/node_modules/jade/lib/jade.js +253 -0
- data/node_modules/jade/lib/lexer.js +774 -0
- data/node_modules/jade/lib/nodes/attrs.js +77 -0
- data/node_modules/jade/lib/nodes/block-comment.js +33 -0
- data/node_modules/jade/lib/nodes/block.js +122 -0
- data/node_modules/jade/lib/nodes/case.js +43 -0
- data/node_modules/jade/lib/nodes/code.js +35 -0
- data/node_modules/jade/lib/nodes/comment.js +32 -0
- data/node_modules/jade/lib/nodes/doctype.js +29 -0
- data/node_modules/jade/lib/nodes/each.js +35 -0
- data/node_modules/jade/lib/nodes/filter.js +35 -0
- data/node_modules/jade/lib/nodes/index.js +20 -0
- data/node_modules/jade/lib/nodes/literal.js +32 -0
- data/node_modules/jade/lib/nodes/mixin.js +36 -0
- data/node_modules/jade/lib/nodes/node.js +25 -0
- data/node_modules/jade/lib/nodes/tag.js +95 -0
- data/node_modules/jade/lib/nodes/text.js +36 -0
- data/node_modules/jade/lib/parser.js +714 -0
- data/node_modules/jade/lib/runtime.js +174 -0
- data/node_modules/jade/lib/self-closing.js +19 -0
- data/node_modules/jade/lib/utils.js +49 -0
- data/node_modules/jade/node_modules/commander/.npmignore +4 -0
- data/node_modules/jade/node_modules/commander/.travis.yml +4 -0
- data/node_modules/jade/node_modules/commander/History.md +107 -0
- data/node_modules/jade/node_modules/commander/Makefile +7 -0
- data/node_modules/jade/node_modules/commander/Readme.md +262 -0
- data/node_modules/jade/node_modules/commander/index.js +2 -0
- data/node_modules/jade/node_modules/commander/lib/commander.js +1026 -0
- data/node_modules/jade/node_modules/commander/package.json +39 -0
- data/node_modules/jade/node_modules/mkdirp/.npmignore +2 -0
- data/node_modules/jade/node_modules/mkdirp/.travis.yml +4 -0
- data/node_modules/jade/node_modules/mkdirp/LICENSE +21 -0
- data/node_modules/jade/node_modules/mkdirp/README.markdown +61 -0
- data/node_modules/jade/node_modules/mkdirp/examples/pow.js +6 -0
- data/node_modules/jade/node_modules/mkdirp/index.js +82 -0
- data/node_modules/jade/node_modules/mkdirp/package.json +37 -0
- data/node_modules/jade/node_modules/mkdirp/test/chmod.js +38 -0
- data/node_modules/jade/node_modules/mkdirp/test/clobber.js +37 -0
- data/node_modules/jade/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/node_modules/jade/node_modules/mkdirp/test/perm.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/node_modules/jade/node_modules/mkdirp/test/race.js +41 -0
- data/node_modules/jade/node_modules/mkdirp/test/rel.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/return.js +25 -0
- data/node_modules/jade/node_modules/mkdirp/test/return_sync.js +24 -0
- data/node_modules/jade/node_modules/mkdirp/test/root.js +18 -0
- data/node_modules/jade/node_modules/mkdirp/test/sync.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/umask.js +28 -0
- data/node_modules/jade/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/node_modules/jade/package.json +53 -0
- data/node_modules/jade/runtime.js +179 -0
- data/node_modules/jade/runtime.min.js +1 -0
- data/node_modules/jade/test.jade +7 -0
- data/node_modules/jade/testing/head.jade +5 -0
- data/node_modules/jade/testing/index.jade +1 -0
- data/node_modules/jade/testing/index.js +14 -0
- data/node_modules/jade/testing/layout.jade +10 -0
- data/node_modules/jade/testing/user.jade +7 -0
- data/node_modules/jade/testing/user.js +27 -0
- data/node_modules/optimist/.travis.yml +4 -0
- data/node_modules/optimist/LICENSE +21 -0
- data/node_modules/optimist/README.markdown +487 -0
- data/node_modules/optimist/example/bool.js +10 -0
- data/node_modules/optimist/example/boolean_double.js +7 -0
- data/node_modules/optimist/example/boolean_single.js +7 -0
- data/node_modules/optimist/example/default_hash.js +8 -0
- data/node_modules/optimist/example/default_singles.js +7 -0
- data/node_modules/optimist/example/divide.js +8 -0
- data/node_modules/optimist/example/line_count.js +20 -0
- data/node_modules/optimist/example/line_count_options.js +29 -0
- data/node_modules/optimist/example/line_count_wrap.js +29 -0
- data/node_modules/optimist/example/nonopt.js +4 -0
- data/node_modules/optimist/example/reflect.js +2 -0
- data/node_modules/optimist/example/short.js +3 -0
- data/node_modules/optimist/example/string.js +11 -0
- data/node_modules/optimist/example/usage-options.js +19 -0
- data/node_modules/optimist/example/xup.js +10 -0
- data/node_modules/optimist/index.js +475 -0
- data/node_modules/optimist/node_modules/wordwrap/.npmignore +1 -0
- data/node_modules/optimist/node_modules/wordwrap/README.markdown +70 -0
- data/node_modules/optimist/node_modules/wordwrap/example/center.js +10 -0
- data/node_modules/optimist/node_modules/wordwrap/example/meat.js +3 -0
- data/node_modules/optimist/node_modules/wordwrap/index.js +76 -0
- data/node_modules/optimist/node_modules/wordwrap/package.json +45 -0
- data/node_modules/optimist/node_modules/wordwrap/test/break.js +30 -0
- data/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +63 -0
- data/node_modules/optimist/node_modules/wordwrap/test/wrap.js +31 -0
- data/node_modules/optimist/package.json +55 -0
- data/node_modules/optimist/test/_.js +71 -0
- data/node_modules/optimist/test/_/argv.js +2 -0
- data/node_modules/optimist/test/_/bin.js +3 -0
- data/node_modules/optimist/test/parse.js +420 -0
- data/node_modules/optimist/test/usage.js +292 -0
- data/snowball.gemspec +1 -2
- metadata +601 -21
- data/extconf.rb +0 -9
@@ -0,0 +1,11 @@
|
|
1
|
+
This is a streaming JSON parser. For a simpler, sax-based version see this gist: https://gist.github.com/1821394
|
2
|
+
|
3
|
+
The MIT License (MIT)
|
4
|
+
Copyright (c) 2011-2012 Tim Caswell
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
7
|
+
|
8
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
9
|
+
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
11
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
var fs = require('fs'),
|
2
|
+
Parser = require('./jsonparse');
|
3
|
+
|
4
|
+
|
5
|
+
var json = fs.readFileSync("samplejson/basic.json");
|
6
|
+
|
7
|
+
|
8
|
+
while (true) {
|
9
|
+
var start = Date.now();
|
10
|
+
for (var i = 0; i < 1000; i++) {
|
11
|
+
JSON.parse(json);
|
12
|
+
}
|
13
|
+
var first = Date.now() - start;
|
14
|
+
|
15
|
+
start = Date.now();
|
16
|
+
var p = new Parser();
|
17
|
+
for (var i = 0; i < 1000; i++) {
|
18
|
+
p.write(json);
|
19
|
+
}
|
20
|
+
var second = Date.now() - start;
|
21
|
+
|
22
|
+
|
23
|
+
console.log("JSON.parse took %s", first);
|
24
|
+
console.log("streaming parser took %s", second);
|
25
|
+
console.log("streaming is %s times slower", second / first);
|
26
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
var Parser = require('../jsonparse');
|
2
|
+
var Http = require('http');
|
3
|
+
require('./colors');
|
4
|
+
var p = new Parser();
|
5
|
+
var cred = require('./credentials');
|
6
|
+
var client = Http.createClient(80, "stream.twitter.com");
|
7
|
+
var request = client.request("GET", "/1/statuses/sample.json", {
|
8
|
+
"Host": "stream.twitter.com",
|
9
|
+
"Authorization": (new Buffer(cred.username + ":" + cred.password)).toString("base64")
|
10
|
+
});
|
11
|
+
request.on('response', function (response) {
|
12
|
+
console.log(response.statusCode);
|
13
|
+
console.dir(response.headers);
|
14
|
+
response.on('data', function (chunk) {
|
15
|
+
p.write(chunk);
|
16
|
+
});
|
17
|
+
response.on('end', function () {
|
18
|
+
console.log("END");
|
19
|
+
});
|
20
|
+
});
|
21
|
+
request.end();
|
22
|
+
var text = "", name = "";
|
23
|
+
p.onValue = function (value) {
|
24
|
+
if (this.stack.length === 1 && this.key === 'text') { text = value; }
|
25
|
+
if (this.stack.length === 2 && this.key === 'name' && this.stack[1].key === 'user') { name = value; }
|
26
|
+
if (this.stack.length === 0) {
|
27
|
+
console.log(text.blue + " - " + name.yellow);
|
28
|
+
text = name = "";
|
29
|
+
}
|
30
|
+
};
|
@@ -0,0 +1,379 @@
|
|
1
|
+
/*global Buffer*/
|
2
|
+
// Named constants with unique integer values
|
3
|
+
var C = {};
|
4
|
+
// Tokens
|
5
|
+
var LEFT_BRACE = C.LEFT_BRACE = 0x1;
|
6
|
+
var RIGHT_BRACE = C.RIGHT_BRACE = 0x2;
|
7
|
+
var LEFT_BRACKET = C.LEFT_BRACKET = 0x3;
|
8
|
+
var RIGHT_BRACKET = C.RIGHT_BRACKET = 0x4;
|
9
|
+
var COLON = C.COLON = 0x5;
|
10
|
+
var COMMA = C.COMMA = 0x6;
|
11
|
+
var TRUE = C.TRUE = 0x7;
|
12
|
+
var FALSE = C.FALSE = 0x8;
|
13
|
+
var NULL = C.NULL = 0x9;
|
14
|
+
var STRING = C.STRING = 0xa;
|
15
|
+
var NUMBER = C.NUMBER = 0xb;
|
16
|
+
// Tokenizer States
|
17
|
+
var START = C.START = 0x11;
|
18
|
+
var TRUE1 = C.TRUE1 = 0x21;
|
19
|
+
var TRUE2 = C.TRUE2 = 0x22;
|
20
|
+
var TRUE3 = C.TRUE3 = 0x23;
|
21
|
+
var FALSE1 = C.FALSE1 = 0x31;
|
22
|
+
var FALSE2 = C.FALSE2 = 0x32;
|
23
|
+
var FALSE3 = C.FALSE3 = 0x33;
|
24
|
+
var FALSE4 = C.FALSE4 = 0x34;
|
25
|
+
var NULL1 = C.NULL1 = 0x41;
|
26
|
+
var NULL2 = C.NULL3 = 0x42;
|
27
|
+
var NULL3 = C.NULL2 = 0x43;
|
28
|
+
var NUMBER1 = C.NUMBER1 = 0x51;
|
29
|
+
var NUMBER2 = C.NUMBER2 = 0x52;
|
30
|
+
var NUMBER3 = C.NUMBER3 = 0x53;
|
31
|
+
var NUMBER4 = C.NUMBER4 = 0x54;
|
32
|
+
var NUMBER5 = C.NUMBER5 = 0x55;
|
33
|
+
var NUMBER6 = C.NUMBER6 = 0x56;
|
34
|
+
var NUMBER7 = C.NUMBER7 = 0x57;
|
35
|
+
var NUMBER8 = C.NUMBER8 = 0x58;
|
36
|
+
var STRING1 = C.STRING1 = 0x61;
|
37
|
+
var STRING2 = C.STRING2 = 0x62;
|
38
|
+
var STRING3 = C.STRING3 = 0x63;
|
39
|
+
var STRING4 = C.STRING4 = 0x64;
|
40
|
+
var STRING5 = C.STRING5 = 0x65;
|
41
|
+
var STRING6 = C.STRING6 = 0x66;
|
42
|
+
// Parser States
|
43
|
+
var VALUE = C.VALUE = 0x71;
|
44
|
+
var KEY = C.KEY = 0x72;
|
45
|
+
// Parser Modes
|
46
|
+
var OBJECT = C.OBJECT = 0x81;
|
47
|
+
var ARRAY = C.ARRAY = 0x82;
|
48
|
+
|
49
|
+
// Slow code to string converter (only used when throwing syntax errors)
|
50
|
+
function toknam(code) {
|
51
|
+
var keys = Object.keys(C);
|
52
|
+
for (var i = 0, l = keys.length; i < l; i++) {
|
53
|
+
var key = keys[i];
|
54
|
+
if (C[key] === code) { return key; }
|
55
|
+
}
|
56
|
+
return code && ("0x" + code.toString(16));
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
function Parser() {
|
61
|
+
this.tState = START;
|
62
|
+
this.value = undefined;
|
63
|
+
|
64
|
+
this.string = undefined; // string data
|
65
|
+
this.unicode = undefined; // unicode escapes
|
66
|
+
|
67
|
+
// For number parsing
|
68
|
+
this.negative = undefined;
|
69
|
+
this.magnatude = undefined;
|
70
|
+
this.position = undefined;
|
71
|
+
this.exponent = undefined;
|
72
|
+
this.negativeExponent = undefined;
|
73
|
+
|
74
|
+
this.key = undefined;
|
75
|
+
this.mode = undefined;
|
76
|
+
this.stack = [];
|
77
|
+
this.state = VALUE;
|
78
|
+
}
|
79
|
+
var proto = Parser.prototype;
|
80
|
+
proto.charError = function (buffer, i) {
|
81
|
+
this.onError(new Error("Unexpected " + JSON.stringify(String.fromCharCode(buffer[i])) + " at position " + i + " in state " + toknam(this.tState)));
|
82
|
+
};
|
83
|
+
proto.onError = function (err) { throw err; };
|
84
|
+
proto.write = function (buffer) {
|
85
|
+
if (typeof buffer === "string") buffer = new Buffer(buffer);
|
86
|
+
//process.stdout.write("Input: ");
|
87
|
+
//console.dir(buffer.toString());
|
88
|
+
var n;
|
89
|
+
for (var i = 0, l = buffer.length; i < l; i++) {
|
90
|
+
if (this.tState === START){
|
91
|
+
n = buffer[i];
|
92
|
+
if(n === 0x7b){ this.onToken(LEFT_BRACE, "{"); // {
|
93
|
+
}else if(n === 0x7d){ this.onToken(RIGHT_BRACE, "}"); // }
|
94
|
+
}else if(n === 0x5b){ this.onToken(LEFT_BRACKET, "["); // [
|
95
|
+
}else if(n === 0x5d){ this.onToken(RIGHT_BRACKET, "]"); // ]
|
96
|
+
}else if(n === 0x3a){ this.onToken(COLON, ":"); // :
|
97
|
+
}else if(n === 0x2c){ this.onToken(COMMA, ","); // ,
|
98
|
+
}else if(n === 0x74){ this.tState = TRUE1; // t
|
99
|
+
}else if(n === 0x66){ this.tState = FALSE1; // f
|
100
|
+
}else if(n === 0x6e){ this.tState = NULL1; // n
|
101
|
+
}else if(n === 0x22){ this.string = ""; this.tState = STRING1; // "
|
102
|
+
}else if(n === 0x2d){ this.negative = true; this.tState = NUMBER1; // -
|
103
|
+
}else if(n === 0x30){ this.magnatude = 0; this.tState = NUMBER2; // 0
|
104
|
+
}else{
|
105
|
+
if (n > 0x30 && n < 0x40) { // 1-9
|
106
|
+
this.magnatude = n - 0x30; this.tState = NUMBER3;
|
107
|
+
} else if (n === 0x20 || n === 0x09 || n === 0x0a || n === 0x0d) {
|
108
|
+
// whitespace
|
109
|
+
} else { this.charError(buffer, i); }
|
110
|
+
}
|
111
|
+
}else if (this.tState === STRING1){ // After open quote
|
112
|
+
n = buffer[i];
|
113
|
+
if (n >= 128) {
|
114
|
+
for (var j = i; buffer[j] >= 128 && j < buffer.length; j++);
|
115
|
+
this.string += buffer.slice(i, j).toString();
|
116
|
+
i = j - 1;
|
117
|
+
} else if (n === 0x22) { this.tState = START; this.onToken(STRING, this.string); this.string = undefined; }
|
118
|
+
else if (n === 0x5c) { this.tState = STRING2; }
|
119
|
+
else if (n >= 0x20) { this.string += String.fromCharCode(n); }
|
120
|
+
else { this.charError(buffer, i); }
|
121
|
+
}else if (this.tState === STRING2){ // After backslash
|
122
|
+
n = buffer[i];
|
123
|
+
if(n === 0x22){ this.string += "\""; this.tState = STRING1;
|
124
|
+
}else if(n === 0x5c){ this.string += "\\"; this.tState = STRING1;
|
125
|
+
}else if(n === 0x2f){ this.string += "\/"; this.tState = STRING1;
|
126
|
+
}else if(n === 0x62){ this.string += "\b"; this.tState = STRING1;
|
127
|
+
}else if(n === 0x66){ this.string += "\f"; this.tState = STRING1;
|
128
|
+
}else if(n === 0x6e){ this.string += "\n"; this.tState = STRING1;
|
129
|
+
}else if(n === 0x72){ this.string += "\r"; this.tState = STRING1;
|
130
|
+
}else if(n === 0x74){ this.string += "\t"; this.tState = STRING1;
|
131
|
+
}else if(n === 0x75){ this.unicode = ""; this.tState = STRING3;
|
132
|
+
}else{
|
133
|
+
this.charError(buffer, i);
|
134
|
+
}
|
135
|
+
}else if (this.tState === STRING3 || this.tState === STRING4 || this.tState === STRING5 || this.tState === STRING6){ // unicode hex codes
|
136
|
+
n = buffer[i];
|
137
|
+
// 0-9 A-F a-f
|
138
|
+
if ((n >= 0x30 && n < 0x40) || (n > 0x40 && n <= 0x46) || (n > 0x60 && n <= 0x66)) {
|
139
|
+
this.unicode += String.fromCharCode(n);
|
140
|
+
if (this.tState++ === STRING6) {
|
141
|
+
this.string += String.fromCharCode(parseInt(this.unicode, 16));
|
142
|
+
this.unicode = undefined;
|
143
|
+
this.tState = STRING1;
|
144
|
+
}
|
145
|
+
} else {
|
146
|
+
this.charError(buffer, i);
|
147
|
+
}
|
148
|
+
}else if (this.tState === NUMBER1){ // after minus
|
149
|
+
n = buffer[i];
|
150
|
+
if (n === 0x30) { this.magnatude = 0; this.tState = NUMBER2; }
|
151
|
+
else if (n > 0x30 && n < 0x40) { this.magnatude = n - 0x30; this.tState = NUMBER3; }
|
152
|
+
else { this.charError(buffer, i); }
|
153
|
+
}else if (this.tState === NUMBER2){ // * After initial zero
|
154
|
+
n = buffer[i];
|
155
|
+
if(n === 0x2e){ // .
|
156
|
+
this.position = 0.1; this.tState = NUMBER4;
|
157
|
+
}else if(n === 0x65 || n === 0x45){ // e/E
|
158
|
+
this.exponent = 0; this.tState = NUMBER6;
|
159
|
+
}else{
|
160
|
+
this.tState = START;
|
161
|
+
this.onToken(NUMBER, 0);
|
162
|
+
this.magnatude = undefined;
|
163
|
+
this.negative = undefined;
|
164
|
+
i--;
|
165
|
+
}
|
166
|
+
}else if (this.tState === NUMBER3){ // * After digit (before period)
|
167
|
+
n = buffer[i];
|
168
|
+
if(n === 0x2e){ // .
|
169
|
+
this.position = 0.1; this.tState = NUMBER4;
|
170
|
+
}else if(n === 0x65 || n === 0x45){ // e/E
|
171
|
+
this.exponent = 0; this.tState = NUMBER6;
|
172
|
+
}else{
|
173
|
+
if (n >= 0x30 && n < 0x40) { this.magnatude = this.magnatude * 10 + n - 0x30; }
|
174
|
+
else {
|
175
|
+
this.tState = START;
|
176
|
+
if (this.negative) {
|
177
|
+
this.magnatude = -this.magnatude;
|
178
|
+
this.negative = undefined;
|
179
|
+
}
|
180
|
+
this.onToken(NUMBER, this.magnatude);
|
181
|
+
this.magnatude = undefined;
|
182
|
+
i--;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}else if (this.tState === NUMBER4){ // After period
|
186
|
+
n = buffer[i];
|
187
|
+
if (n >= 0x30 && n < 0x40) { // 0-9
|
188
|
+
this.magnatude += this.position * (n - 0x30);
|
189
|
+
this.position /= 10;
|
190
|
+
this.tState = NUMBER5;
|
191
|
+
} else { this.charError(buffer, i); }
|
192
|
+
}else if (this.tState === NUMBER5){ // * After digit (after period)
|
193
|
+
n = buffer[i];
|
194
|
+
if (n >= 0x30 && n < 0x40) { // 0-9
|
195
|
+
this.magnatude += this.position * (n - 0x30);
|
196
|
+
this.position /= 10;
|
197
|
+
}
|
198
|
+
else if (n === 0x65 || n === 0x45) { this.exponent = 0; this.tState = NUMBER6; } // E/e
|
199
|
+
else {
|
200
|
+
this.tState = START;
|
201
|
+
if (this.negative) {
|
202
|
+
this.magnatude = -this.magnatude;
|
203
|
+
this.negative = undefined;
|
204
|
+
}
|
205
|
+
this.onToken(NUMBER, this.negative ? -this.magnatude : this.magnatude);
|
206
|
+
this.magnatude = undefined;
|
207
|
+
this.position = undefined;
|
208
|
+
i--;
|
209
|
+
}
|
210
|
+
}else if (this.tState === NUMBER6){ // After E
|
211
|
+
n = buffer[i];
|
212
|
+
if (n === 0x2b || n === 0x2d) { // +/-
|
213
|
+
if (n === 0x2d) { this.negativeExponent = true; }
|
214
|
+
this.tState = NUMBER7;
|
215
|
+
}
|
216
|
+
else if (n >= 0x30 && n < 0x40) {
|
217
|
+
this.exponent = this.exponent * 10 + (n - 0x30);
|
218
|
+
this.tState = NUMBER8;
|
219
|
+
}
|
220
|
+
else { this.charError(buffer, i); }
|
221
|
+
}else if (this.tState === NUMBER7){ // After +/-
|
222
|
+
n = buffer[i];
|
223
|
+
if (n >= 0x30 && n < 0x40) { // 0-9
|
224
|
+
this.exponent = this.exponent * 10 + (n - 0x30);
|
225
|
+
this.tState = NUMBER8;
|
226
|
+
}
|
227
|
+
else { this.charError(buffer, i); }
|
228
|
+
}else if (this.tState === NUMBER8){ // * After digit (after +/-)
|
229
|
+
n = buffer[i];
|
230
|
+
if (n >= 0x30 && n < 0x40) { // 0-9
|
231
|
+
this.exponent = this.exponent * 10 + (n - 0x30);
|
232
|
+
}
|
233
|
+
else {
|
234
|
+
if (this.negativeExponent) {
|
235
|
+
this.exponent = -this.exponent;
|
236
|
+
this.negativeExponent = undefined;
|
237
|
+
}
|
238
|
+
this.magnatude *= Math.pow(10, this.exponent);
|
239
|
+
this.exponent = undefined;
|
240
|
+
if (this.negative) {
|
241
|
+
this.magnatude = -this.magnatude;
|
242
|
+
this.negative = undefined;
|
243
|
+
}
|
244
|
+
this.tState = START;
|
245
|
+
this.onToken(NUMBER, this.magnatude);
|
246
|
+
this.magnatude = undefined;
|
247
|
+
i--;
|
248
|
+
}
|
249
|
+
}else if (this.tState === TRUE1){ // r
|
250
|
+
if (buffer[i] === 0x72) { this.tState = TRUE2; }
|
251
|
+
else { this.charError(buffer, i); }
|
252
|
+
}else if (this.tState === TRUE2){ // u
|
253
|
+
if (buffer[i] === 0x75) { this.tState = TRUE3; }
|
254
|
+
else { this.charError(buffer, i); }
|
255
|
+
}else if (this.tState === TRUE3){ // e
|
256
|
+
if (buffer[i] === 0x65) { this.tState = START; this.onToken(TRUE, true); }
|
257
|
+
else { this.charError(buffer, i); }
|
258
|
+
}else if (this.tState === FALSE1){ // a
|
259
|
+
if (buffer[i] === 0x61) { this.tState = FALSE2; }
|
260
|
+
else { this.charError(buffer, i); }
|
261
|
+
}else if (this.tState === FALSE2){ // l
|
262
|
+
if (buffer[i] === 0x6c) { this.tState = FALSE3; }
|
263
|
+
else { this.charError(buffer, i); }
|
264
|
+
}else if (this.tState === FALSE3){ // s
|
265
|
+
if (buffer[i] === 0x73) { this.tState = FALSE4; }
|
266
|
+
else { this.charError(buffer, i); }
|
267
|
+
}else if (this.tState === FALSE4){ // e
|
268
|
+
if (buffer[i] === 0x65) { this.tState = START; this.onToken(FALSE, false); }
|
269
|
+
else { this.charError(buffer, i); }
|
270
|
+
}else if (this.tState === NULL1){ // u
|
271
|
+
if (buffer[i] === 0x75) { this.tState = NULL2; }
|
272
|
+
else { this.charError(buffer, i); }
|
273
|
+
}else if (this.tState === NULL2){ // l
|
274
|
+
if (buffer[i] === 0x6c) { this.tState = NULL3; }
|
275
|
+
else { this.charError(buffer, i); }
|
276
|
+
}else if (this.tState === NULL3){ // l
|
277
|
+
if (buffer[i] === 0x6c) { this.tState = START; this.onToken(NULL, null); }
|
278
|
+
else { this.charError(buffer, i); }
|
279
|
+
}
|
280
|
+
}
|
281
|
+
};
|
282
|
+
proto.onToken = function (token, value) {
|
283
|
+
// Override this to get events
|
284
|
+
};
|
285
|
+
|
286
|
+
proto.parseError = function (token, value) {
|
287
|
+
this.onError(new Error("Unexpected " + toknam(token) + (value ? ("(" + JSON.stringify(value) + ")") : "") + " in state " + toknam(this.state)));
|
288
|
+
};
|
289
|
+
proto.onError = function (err) { throw err; };
|
290
|
+
proto.push = function () {
|
291
|
+
this.stack.push({value: this.value, key: this.key, mode: this.mode});
|
292
|
+
};
|
293
|
+
proto.pop = function () {
|
294
|
+
var value = this.value;
|
295
|
+
var parent = this.stack.pop();
|
296
|
+
this.value = parent.value;
|
297
|
+
this.key = parent.key;
|
298
|
+
this.mode = parent.mode;
|
299
|
+
this.emit(value);
|
300
|
+
if (!this.mode) { this.state = VALUE; }
|
301
|
+
};
|
302
|
+
proto.emit = function (value) {
|
303
|
+
if (this.mode) { this.state = COMMA; }
|
304
|
+
this.onValue(value);
|
305
|
+
};
|
306
|
+
proto.onValue = function (value) {
|
307
|
+
// Override me
|
308
|
+
};
|
309
|
+
proto.onToken = function (token, value) {
|
310
|
+
//console.log("OnToken: state=%s token=%s %s", toknam(this.state), toknam(token), value?JSON.stringify(value):"");
|
311
|
+
if(this.state === VALUE){
|
312
|
+
if(token === STRING || token === NUMBER || token === TRUE || token === FALSE || token === NULL){
|
313
|
+
if (this.value) {
|
314
|
+
this.value[this.key] = value;
|
315
|
+
}
|
316
|
+
this.emit(value);
|
317
|
+
}else if(token === LEFT_BRACE){
|
318
|
+
this.push();
|
319
|
+
if (this.value) {
|
320
|
+
this.value = this.value[this.key] = {};
|
321
|
+
} else {
|
322
|
+
this.value = {};
|
323
|
+
}
|
324
|
+
this.key = undefined;
|
325
|
+
this.state = KEY;
|
326
|
+
this.mode = OBJECT;
|
327
|
+
}else if(token === LEFT_BRACKET){
|
328
|
+
this.push();
|
329
|
+
if (this.value) {
|
330
|
+
this.value = this.value[this.key] = [];
|
331
|
+
} else {
|
332
|
+
this.value = [];
|
333
|
+
}
|
334
|
+
this.key = 0;
|
335
|
+
this.mode = ARRAY;
|
336
|
+
this.state = VALUE;
|
337
|
+
}else if(token === RIGHT_BRACE){
|
338
|
+
if (this.mode === OBJECT) {
|
339
|
+
this.pop();
|
340
|
+
} else {
|
341
|
+
this.parseError(token, value);
|
342
|
+
}
|
343
|
+
}else if(token === RIGHT_BRACKET){
|
344
|
+
if (this.mode === ARRAY) {
|
345
|
+
this.pop();
|
346
|
+
} else {
|
347
|
+
this.parseError(token, value);
|
348
|
+
}
|
349
|
+
}else{
|
350
|
+
this.parseError(token, value);
|
351
|
+
}
|
352
|
+
}else if(this.state === KEY){
|
353
|
+
if (token === STRING) {
|
354
|
+
this.key = value;
|
355
|
+
this.state = COLON;
|
356
|
+
} else if (token === RIGHT_BRACE) {
|
357
|
+
this.pop();
|
358
|
+
} else {
|
359
|
+
this.parseError(token, value);
|
360
|
+
}
|
361
|
+
}else if(this.state === COLON){
|
362
|
+
if (token === COLON) { this.state = VALUE; }
|
363
|
+
else { this.parseError(token, value); }
|
364
|
+
}else if(this.state === COMMA){
|
365
|
+
if (token === COMMA) {
|
366
|
+
if (this.mode === ARRAY) { this.key++; this.state = VALUE; }
|
367
|
+
else if (this.mode === OBJECT) { this.state = KEY; }
|
368
|
+
|
369
|
+
} else if (token === RIGHT_BRACKET && this.mode === ARRAY || token === RIGHT_BRACE && this.mode === OBJECT) {
|
370
|
+
this.pop();
|
371
|
+
} else {
|
372
|
+
this.parseError(token, value);
|
373
|
+
}
|
374
|
+
}else{
|
375
|
+
this.parseError(token, value);
|
376
|
+
}
|
377
|
+
};
|
378
|
+
|
379
|
+
module.exports = Parser;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"name": "jsonparse",
|
3
|
+
"description": "This is a pure-js JSON streaming parser for node.js",
|
4
|
+
"tags": [
|
5
|
+
"json",
|
6
|
+
"stream"
|
7
|
+
],
|
8
|
+
"version": "0.0.4",
|
9
|
+
"author": {
|
10
|
+
"name": "Tim Caswell",
|
11
|
+
"email": "tim@creationix.com"
|
12
|
+
},
|
13
|
+
"repository": {
|
14
|
+
"type": "git",
|
15
|
+
"url": "http://github.com/creationix/jsonparse.git"
|
16
|
+
},
|
17
|
+
"devDependencies": {
|
18
|
+
"tape": "~0.1.1",
|
19
|
+
"tap": "~0.3.3"
|
20
|
+
},
|
21
|
+
"scripts": {
|
22
|
+
"test": "tap test/*.js"
|
23
|
+
},
|
24
|
+
"bugs": "http://github.com/creationix/jsonparse/issues",
|
25
|
+
"engines": [
|
26
|
+
"node >= 0.2.0"
|
27
|
+
],
|
28
|
+
"license": "MIT",
|
29
|
+
"main": "jsonparse.js",
|
30
|
+
"readme": "This is a streaming JSON parser. For a simpler, sax-based version see this gist: https://gist.github.com/1821394\n\nThe MIT License (MIT)\nCopyright (c) 2011-2012 Tim Caswell\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n",
|
31
|
+
"_id": "jsonparse@0.0.4",
|
32
|
+
"dist": {
|
33
|
+
"shasum": "59dc625b80cde4562734333122ba6e759d72524e"
|
34
|
+
},
|
35
|
+
"_from": "jsonparse@~0.0.4"
|
36
|
+
}
|