sprockets-browserify 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1278) hide show
  1. checksums.yaml +14 -6
  2. data/lib/sprockets/browserify.rb +7 -3
  3. data/node_modules/browserify/README.markdown +366 -107
  4. data/node_modules/browserify/{node_modules/resolve/test/resolver/baz/doom.js → _empty.js} +0 -0
  5. data/node_modules/browserify/bin/advanced.txt +36 -0
  6. data/node_modules/browserify/bin/args.js +116 -0
  7. data/node_modules/browserify/bin/cmd.js +56 -145
  8. data/node_modules/browserify/bin/usage.txt +32 -0
  9. data/node_modules/browserify/example/api/browser/bar.js +1 -0
  10. data/node_modules/browserify/example/api/browser/foo.js +5 -0
  11. data/node_modules/browserify/example/api/browser/main.js +2 -0
  12. data/node_modules/browserify/example/api/build.js +4 -0
  13. data/node_modules/browserify/example/multiple_bundles/beep.js +2 -0
  14. data/node_modules/browserify/example/multiple_bundles/boop.js +2 -0
  15. data/node_modules/browserify/example/multiple_bundles/build.sh +4 -0
  16. data/node_modules/browserify/example/multiple_bundles/robot.js +1 -0
  17. data/node_modules/browserify/example/multiple_bundles/static/beep.html +2 -0
  18. data/node_modules/browserify/example/multiple_bundles/static/beep.js +6 -0
  19. data/node_modules/browserify/example/multiple_bundles/static/boop.html +2 -0
  20. data/node_modules/browserify/example/multiple_bundles/static/boop.js +6 -0
  21. data/node_modules/browserify/example/multiple_bundles/static/common.js +3 -0
  22. data/node_modules/browserify/example/source_maps/build.js +10 -0
  23. data/node_modules/browserify/example/source_maps/build.sh +4 -0
  24. data/node_modules/browserify/example/source_maps/index.html +11 -0
  25. data/node_modules/browserify/example/source_maps/js/foo.js +7 -0
  26. data/node_modules/browserify/example/source_maps/js/main.js +4 -0
  27. data/node_modules/browserify/example/source_maps/js/wunder/bar.js +8 -0
  28. data/node_modules/browserify/index.js +319 -156
  29. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/LICENSE.APACHE2 +0 -0
  30. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/LICENSE.MIT +0 -0
  31. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/examples/all_docs.js +0 -0
  32. data/node_modules/browserify/node_modules/JSONStream/index.js +191 -0
  33. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/LICENSE +0 -0
  34. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/README.markdown +0 -0
  35. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/bench.js +0 -0
  36. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/examples/twitterfeed.js +0 -0
  37. data/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +401 -0
  38. data/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/package.json +34 -0
  39. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/samplejson/basic.json +0 -0
  40. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/samplejson/basic2.json +0 -0
  41. data/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js +110 -0
  42. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/test/primitives.js +0 -0
  43. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/node_modules/jsonparse/test/utf8.js +0 -0
  44. data/node_modules/browserify/node_modules/JSONStream/package.json +36 -0
  45. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/readme.markdown +0 -0
  46. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/bool.js +0 -0
  47. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/destroy_missing.js +0 -0
  48. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/empty.js +0 -0
  49. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/fixtures/all_npm.json +0 -0
  50. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/fn.js +0 -0
  51. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/multiple_objects.js +0 -0
  52. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/multiple_objects_error.js +0 -0
  53. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/parsejson.js +0 -0
  54. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/stringify.js +0 -0
  55. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/stringify_object.js +0 -0
  56. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/test.js +0 -0
  57. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/test2.js +0 -0
  58. data/node_modules/{JSONStream → browserify/node_modules/JSONStream}/test/two-ways.js +0 -0
  59. data/node_modules/browserify/node_modules/{resolve → browser-pack}/LICENSE +0 -0
  60. data/node_modules/browserify/node_modules/browser-pack/cmd.js +4 -0
  61. data/node_modules/browserify/node_modules/browser-pack/example/input.json +13 -0
  62. data/node_modules/browserify/node_modules/browser-pack/example/output.js +1 -0
  63. data/node_modules/browserify/node_modules/browser-pack/example/sourcemap/input.json +15 -0
  64. data/node_modules/browserify/node_modules/browser-pack/example/sourcemap/output.js +6 -0
  65. data/node_modules/browserify/node_modules/browser-pack/index.js +79 -0
  66. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/LICENSE +23 -0
  67. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/README.md +111 -0
  68. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/example/two-files-short.js +26 -0
  69. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/example/two-files.js +47 -0
  70. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/index.js +97 -0
  71. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/LICENSE +23 -0
  72. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/README.md +85 -0
  73. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/example/comment-to-json.js +15 -0
  74. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/index.js +89 -0
  75. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/package.json +33 -0
  76. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/comment-regex.js +25 -0
  77. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/convert-source-map.js +129 -0
  78. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/LICENSE +23 -0
  79. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/README.md +88 -0
  80. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/example/foo-bar.js +8 -0
  81. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/index.js +127 -0
  82. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/CHANGELOG.md +58 -0
  83. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/LICENSE +0 -0
  84. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/Makefile.dryice.js +166 -0
  85. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/README.md +347 -0
  86. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/build/assert-shim.js +0 -0
  87. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/build/mini-require.js +0 -0
  88. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  89. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/prefix-utils.jsm +18 -0
  90. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/build/suffix-browser.js +0 -0
  91. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  92. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/suffix-utils.jsm +21 -0
  93. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/build/test-prefix.js +0 -0
  94. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/build/test-suffix.js +0 -0
  95. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/array-set.js +96 -0
  96. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/lib/source-map/base64-vlq.js +0 -0
  97. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/lib/source-map/base64.js +0 -0
  98. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/lib/source-map/binary-search.js +0 -0
  99. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
  100. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
  101. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-node.js +353 -0
  102. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/util.js +91 -0
  103. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/lib/source-map.js +0 -0
  104. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/node_modules/amdefine/LICENSE +0 -0
  105. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/README.md +119 -0
  106. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  107. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/package.json +33 -0
  108. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/package.json +74 -0
  109. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/run-tests.js +73 -0
  110. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-api.js +0 -0
  111. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-array-set.js +0 -0
  112. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-base64-vlq.js +0 -0
  113. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-base64.js +0 -0
  114. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-binary-search.js +0 -0
  115. data/node_modules/{module-deps/node_modules/detective/node_modules/escodegen → browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map}/node_modules/source-map/test/source-map/test-dog-fooding.js +0 -0
  116. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
  117. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
  118. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-node.js +282 -0
  119. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/util.js +152 -0
  120. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/package.json +42 -0
  121. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/inline-source-map.js +247 -0
  122. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/source-content.js +129 -0
  123. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/LICENSE +23 -0
  124. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/MOZILLA_LICENSE +28 -0
  125. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/README.md +35 -0
  126. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/base64-vlq.js +108 -0
  127. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/base64.js +35 -0
  128. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/example/one-to-one-mappings.js +5 -0
  129. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/index.js +82 -0
  130. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/package.json +39 -0
  131. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/test/parse-base64vlq-mappings.js +72 -0
  132. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/package.json +45 -0
  133. data/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/test/combine-source-map.js +143 -0
  134. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/README.html +1012 -0
  135. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/README.org +593 -0
  136. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/bin/uglifyjs +334 -0
  137. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/docstyle.css +75 -0
  138. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/consolidator.js +1220 -0
  139. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/parse-js.js +1369 -0
  140. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/process.js +2117 -0
  141. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/squeeze-more.js +78 -0
  142. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/package.json +28 -0
  143. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/beautify.js +28 -0
  144. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/testconsolidator.js +1391 -0
  145. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/testparser.js +409 -0
  146. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/1e21.js +1 -0
  147. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array1.js +1 -0
  148. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array2.js +1 -0
  149. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array3.js +1 -0
  150. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array4.js +1 -0
  151. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/assignment.js +1 -0
  152. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/concatstring.js +1 -0
  153. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/const.js +1 -0
  154. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/div-with-regexp.js +1 -0
  155. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js +1 -0
  156. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/forstatement.js +1 -0
  157. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/if-not.js +1 -0
  158. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/if.js +1 -0
  159. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js +1 -0
  160. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js +1 -0
  161. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/infinite.js +1 -0
  162. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue10.js +1 -0
  163. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue11.js +1 -0
  164. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue13.js +1 -0
  165. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue14.js +1 -0
  166. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue16.js +1 -0
  167. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue17.js +1 -0
  168. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue20.js +1 -0
  169. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue21.js +1 -0
  170. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue25.js +1 -0
  171. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue27.js +1 -0
  172. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue278.js +1 -0
  173. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue28.js +1 -0
  174. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue29.js +1 -0
  175. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue30.js +1 -0
  176. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue34.js +1 -0
  177. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue349.js +1 -0
  178. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue353.js +1 -0
  179. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue372.js +1 -0
  180. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue4.js +1 -0
  181. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue48.js +1 -0
  182. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue50.js +1 -0
  183. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue53.js +1 -0
  184. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js +1 -0
  185. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue68.js +1 -0
  186. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue69.js +1 -0
  187. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue9.js +1 -0
  188. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issues222_324.js +1 -0
  189. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/mangle.js +1 -0
  190. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/null_string.js +1 -0
  191. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js +1 -0
  192. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/var.js +1 -0
  193. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/whitespace.js +1 -0
  194. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/with.js +1 -0
  195. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/1e21.js +1 -0
  196. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array1.js +3 -0
  197. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array2.js +4 -0
  198. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array3.js +4 -0
  199. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array4.js +6 -0
  200. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/assignment.js +20 -0
  201. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/concatstring.js +3 -0
  202. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/const.js +5 -0
  203. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/div-with-regexp.js +1 -0
  204. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js +4 -0
  205. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/forstatement.js +10 -0
  206. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/if-not.js +1 -0
  207. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/if.js +6 -0
  208. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/ifreturn.js +9 -0
  209. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js +16 -0
  210. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/infinite.js +1 -0
  211. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue10.js +1 -0
  212. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue11.js +3 -0
  213. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue13.js +1 -0
  214. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue14.js +1 -0
  215. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue16.js +1 -0
  216. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue17.js +4 -0
  217. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue20.js +1 -0
  218. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue21.js +6 -0
  219. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue25.js +7 -0
  220. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue27.js +1 -0
  221. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue278.js +1 -0
  222. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue28.js +3 -0
  223. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue29.js +1 -0
  224. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue30.js +3 -0
  225. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue34.js +3 -0
  226. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue349.js +25 -0
  227. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue353.js +4 -0
  228. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue372.js +32 -0
  229. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue4.js +3 -0
  230. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue48.js +1 -0
  231. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue50.js +9 -0
  232. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue53.js +1 -0
  233. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +3 -0
  234. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue68.js +5 -0
  235. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue69.js +1 -0
  236. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue9.js +4 -0
  237. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issues222_324.js +82 -0
  238. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/mangle.js +5 -0
  239. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/null_string.js +1 -0
  240. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +3 -0
  241. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/var.js +3 -0
  242. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/whitespace.js +21 -0
  243. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/with.js +2 -0
  244. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/scripts.js +57 -0
  245. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/hoist.js +33 -0
  246. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/instrument.js +97 -0
  247. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/test.js +30 -0
  248. data/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/uglify-js.js +18 -0
  249. data/node_modules/browserify/node_modules/browser-pack/package.json +63 -0
  250. data/node_modules/browserify/node_modules/browser-pack/prelude.js +42 -0
  251. data/node_modules/browserify/node_modules/browser-pack/readme.markdown +85 -0
  252. data/node_modules/browserify/node_modules/browser-pack/test/comment.js +33 -0
  253. data/node_modules/browserify/node_modules/browser-pack/test/only_execute_entries.js +26 -0
  254. data/node_modules/browserify/node_modules/browser-pack/test/order.js +38 -0
  255. data/node_modules/browserify/node_modules/browser-pack/test/pack.js +28 -0
  256. data/node_modules/browserify/node_modules/browser-pack/test/raw.js +32 -0
  257. data/node_modules/browserify/node_modules/browser-pack/test/source-maps-existing.js +56 -0
  258. data/node_modules/browserify/node_modules/browser-pack/test/source-maps.js +113 -0
  259. data/node_modules/browserify/node_modules/browser-pack/test/this.js +24 -0
  260. data/node_modules/browserify/node_modules/browser-resolve/README.md +115 -0
  261. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/assert.js +0 -0
  262. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/child_process.js +0 -0
  263. data/node_modules/browserify/node_modules/{resolve/test/resolver/mug.coffee → browser-resolve/builtin/dgram.js} +0 -0
  264. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/builtin/events.js +0 -0
  265. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/fs.js +0 -0
  266. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/builtin/https.js +0 -0
  267. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/net.js +0 -0
  268. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/path.js +0 -0
  269. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/builtin/process.js +0 -0
  270. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/querystring.js +0 -0
  271. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/stream.js +0 -0
  272. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/string_decoder.js +0 -0
  273. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/sys.js +0 -0
  274. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/timers.js +0 -0
  275. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/tls.js +0 -0
  276. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/tty.js +0 -0
  277. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/url.js +0 -0
  278. data/node_modules/browserify/{builtins → node_modules/browser-resolve/builtin}/util.js +0 -0
  279. data/node_modules/browserify/node_modules/{resolve/test/resolver/mug.js → browser-resolve/empty.js} +0 -0
  280. data/node_modules/browserify/node_modules/browser-resolve/example/builtin.js +4 -0
  281. data/node_modules/browserify/node_modules/browser-resolve/example/custom/custom.js +1 -0
  282. data/node_modules/browserify/node_modules/browser-resolve/example/custom/main.js +1 -0
  283. data/node_modules/browserify/node_modules/browser-resolve/example/custom/package.json +7 -0
  284. data/node_modules/browserify/node_modules/browser-resolve/example/custom.js +5 -0
  285. data/node_modules/browserify/node_modules/browser-resolve/example/resolve.js +4 -0
  286. data/node_modules/browserify/node_modules/browser-resolve/example/skip/main.js +9 -0
  287. data/node_modules/browserify/node_modules/browser-resolve/example/skip/package.json +7 -0
  288. data/node_modules/browserify/node_modules/browser-resolve/example/skip.js +5 -0
  289. data/node_modules/browserify/node_modules/browser-resolve/index.js +170 -0
  290. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/README.md +0 -0
  291. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/buffer_ieee754.js +0 -0
  292. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/index.js +0 -0
  293. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/node_modules/base64-js/README.md +0 -0
  294. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/node_modules/base64-js/lib/b64.js +0 -0
  295. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/node_modules/base64-js/package.json +0 -0
  296. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/node_modules/base64-js/test/runner.js +0 -0
  297. data/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/package.json +42 -0
  298. data/node_modules/browserify/node_modules/{buffer-browserify → browser-resolve/node_modules/buffer-browserify}/test/buffer.js +0 -0
  299. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/LICENCE +0 -0
  300. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/README.md +0 -0
  301. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/index.js +0 -0
  302. data/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/package.json +76 -0
  303. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/test/index.js +0 -0
  304. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/test/static/index.html +0 -0
  305. data/node_modules/browserify/node_modules/{console-browserify → browser-resolve/node_modules/console-browserify}/test/static/test-adapter.js +0 -0
  306. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/example/bundle.js +0 -0
  307. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/example/index.html +0 -0
  308. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/example/test.js +0 -0
  309. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/index.js +0 -0
  310. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/md5.js +0 -0
  311. data/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/package.json +30 -0
  312. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/readme.markdown +0 -0
  313. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/rng.js +0 -0
  314. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/sha.js +0 -0
  315. data/node_modules/browserify/node_modules/{crypto-browserify → browser-resolve/node_modules/crypto-browserify}/test/simple.js +0 -0
  316. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/get/index.html +0 -0
  317. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/get/main.js +0 -0
  318. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/get/server.js +0 -0
  319. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/headers/index.html +0 -0
  320. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/headers/main.js +0 -0
  321. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/headers/server.js +0 -0
  322. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/data.json +0 -0
  323. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/index.html +0 -0
  324. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/main.js +0 -0
  325. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 +0 -0
  326. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/LICENSE.MIT +0 -0
  327. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/examples/all_docs.js +0 -0
  328. data/node_modules/{JSONStream → browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream}/index.js +0 -0
  329. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE +0 -0
  330. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown +0 -0
  331. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js +0 -0
  332. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +0 -0
  333. data/node_modules/{JSONStream → browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream}/node_modules/jsonparse/jsonparse.js +0 -0
  334. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json +0 -0
  335. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +0 -0
  336. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +0 -0
  337. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +0 -0
  338. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +0 -0
  339. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/package.json +0 -0
  340. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/readme.markdown +0 -0
  341. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/bool.js +0 -0
  342. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/destroy_missing.js +0 -0
  343. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/empty.js +0 -0
  344. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json +0 -0
  345. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/fn.js +0 -0
  346. data/node_modules/{JSONStream → browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream}/test/memory.js +0 -0
  347. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/multiple_objects.js +0 -0
  348. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js +0 -0
  349. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/parsejson.js +0 -0
  350. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/stringify.js +0 -0
  351. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/stringify_object.js +0 -0
  352. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/test.js +0 -0
  353. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/test2.js +0 -0
  354. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/node_modules/JSONStream/test/two-ways.js +0 -0
  355. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/json-stream/server.js +0 -0
  356. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/post/index.html +0 -0
  357. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/post/main.js +0 -0
  358. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/post/server.js +0 -0
  359. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/streaming/index.html +0 -0
  360. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/streaming/main.js +0 -0
  361. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/example/streaming/server.js +0 -0
  362. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/index.js +0 -0
  363. data/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/lib/request.js +131 -0
  364. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/lib/response.js +0 -0
  365. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/node_modules/concat-stream/index.js +0 -0
  366. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/node_modules/concat-stream/package.json +0 -0
  367. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/node_modules/concat-stream/readme.md +0 -0
  368. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/node_modules/concat-stream/test.js +0 -0
  369. data/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/package.json +42 -0
  370. data/node_modules/browserify/node_modules/{http-browserify → browser-resolve/node_modules/http-browserify}/readme.markdown +0 -0
  371. data/node_modules/{module-deps → browserify/node_modules/browser-resolve/node_modules/resolve}/LICENSE +0 -0
  372. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/example/async.js +0 -0
  373. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/example/sync.js +0 -0
  374. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/index.js +0 -0
  375. data/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js +131 -0
  376. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/lib/core.js +0 -0
  377. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/lib/core.json +0 -0
  378. data/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/sync.js +99 -0
  379. data/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/package.json +32 -0
  380. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/readme.markdown +0 -0
  381. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/core.js +0 -0
  382. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/filter.js +0 -0
  383. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/filter_sync.js +0 -0
  384. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/mock.js +0 -0
  385. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/mock_sync.js +0 -0
  386. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/bar/node_modules/foo/index.js +0 -0
  387. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  388. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/baz/package.json +0 -0
  389. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/baz/quux.js +0 -0
  390. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/biz/node_modules/grux/index.js +0 -0
  391. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/biz/node_modules/tiv/index.js +0 -0
  392. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/cup.coffee +0 -0
  393. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/foo.js +0 -0
  394. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/resolver/mug.coffee +0 -0
  395. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/resolver/mug.js +0 -0
  396. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/other_path/lib/other-lib.js +0 -0
  397. data/node_modules/browserify/node_modules/{resolve → browser-resolve/node_modules/resolve}/test/resolver/other_path/root.js +0 -0
  398. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/resolver.js +0 -0
  399. data/node_modules/{module-deps → browserify/node_modules/browser-resolve}/node_modules/resolve/test/resolver_sync.js +0 -0
  400. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/README.markdown +0 -0
  401. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/example/run/bundle.js +0 -0
  402. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/example/run/entry.js +0 -0
  403. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/example/run/index.html +0 -0
  404. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/example/run/server.js +0 -0
  405. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/index.js +0 -0
  406. data/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/package.json +39 -0
  407. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/testling/run.js +0 -0
  408. data/node_modules/browserify/node_modules/{vm-browserify → browser-resolve/node_modules/vm-browserify}/testling/test.sh +0 -0
  409. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/node_modules/zlib-browserify/index.js +0 -0
  410. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/node_modules/zlib-browserify/package.json +0 -0
  411. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/node_modules/zlib-browserify/readme.md +0 -0
  412. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/node_modules/zlib-browserify/test/zlib.test.js +0 -0
  413. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/node_modules/zlib-browserify/zlib.js +0 -0
  414. data/node_modules/browserify/node_modules/browser-resolve/package.json +38 -0
  415. data/node_modules/browserify/node_modules/browser-resolve/test/core.js +28 -0
  416. data/node_modules/browserify/node_modules/browser-resolve/test/false.js +24 -0
  417. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/test/fixtures/foo.js +0 -0
  418. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/test/local.js +0 -0
  419. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/test/mocha.opts +0 -0
  420. data/node_modules/{module-deps → browserify}/node_modules/browser-resolve/test/modules.js +0 -0
  421. data/node_modules/browserify/node_modules/concat-stream/index.js +50 -0
  422. data/node_modules/browserify/node_modules/concat-stream/package.json +29 -0
  423. data/node_modules/{module-deps/node_modules/browser-resolve/node_modules/http-browserify → browserify}/node_modules/concat-stream/readme.md +0 -0
  424. data/node_modules/browserify/node_modules/concat-stream/test.js +34 -0
  425. data/node_modules/{module-deps/node_modules/browser-resolve/node_modules/console-browserify → browserify/node_modules/duplexer}/LICENCE +0 -0
  426. data/node_modules/browserify/node_modules/duplexer/Makefile +4 -0
  427. data/node_modules/browserify/node_modules/duplexer/README.md +36 -0
  428. data/node_modules/browserify/node_modules/duplexer/index.js +77 -0
  429. data/node_modules/browserify/node_modules/duplexer/package.json +42 -0
  430. data/node_modules/browserify/node_modules/duplexer/test.js +27 -0
  431. data/node_modules/browserify/node_modules/inherits/README.md +51 -0
  432. data/node_modules/browserify/node_modules/inherits/inherits.js +29 -0
  433. data/node_modules/browserify/node_modules/inherits/package.json +26 -0
  434. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals}/LICENSE +0 -0
  435. data/node_modules/browserify/node_modules/insert-module-globals/bench/results.txt +18 -0
  436. data/node_modules/browserify/node_modules/insert-module-globals/bench/run.sh +2 -0
  437. data/node_modules/browserify/node_modules/insert-module-globals/bin/cmd.js +13 -0
  438. data/node_modules/browserify/node_modules/insert-module-globals/buffer.js +3863 -0
  439. data/node_modules/browserify/node_modules/insert-module-globals/bundle.sh +4 -0
  440. data/node_modules/browserify/node_modules/insert-module-globals/example/files/foo/index.js +6 -0
  441. data/node_modules/browserify/node_modules/insert-module-globals/example/files/main.js +6 -0
  442. data/node_modules/browserify/node_modules/insert-module-globals/example/insert.js +10 -0
  443. data/node_modules/browserify/node_modules/insert-module-globals/index.js +102 -0
  444. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/README.markdown +0 -0
  445. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/example/base.js +0 -0
  446. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/example/dir.js +0 -0
  447. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/index.js +0 -0
  448. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/package.json +0 -0
  449. data/node_modules/browserify/node_modules/{commondir → insert-module-globals/node_modules/commondir}/test/dirs.js +0 -0
  450. data/node_modules/{module-deps/node_modules/resolve → browserify/node_modules/insert-module-globals/node_modules/lexical-scope}/LICENSE +0 -0
  451. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/jquery.js +4 -0
  452. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/results.txt +15 -0
  453. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/run.js +7 -0
  454. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/detect.js +6 -0
  455. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/src.js +27 -0
  456. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/index.js +164 -0
  457. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/LICENSE +18 -0
  458. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/example/types.js +8 -0
  459. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/index.js +42 -0
  460. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/ChangeLog +0 -0
  461. data/node_modules/browserify/node_modules/{detective → insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/LICENSE.BSD +0 -0
  462. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/README.md +0 -0
  463. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/bin/esparse.js +0 -0
  464. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/bin/esvalidate.js +0 -0
  465. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/component.json +0 -0
  466. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/doc/index.html +0 -0
  467. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/esprima.js +0 -0
  468. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/examples/detectnestedternary.js +0 -0
  469. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/examples/findbooleantrap.js +0 -0
  470. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/examples/tokendist.js +0 -0
  471. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/index.html +0 -0
  472. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/package.json +0 -0
  473. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/benchmarks.html +0 -0
  474. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/benchmarks.js +0 -0
  475. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/compare.html +0 -0
  476. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/compare.js +0 -0
  477. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/compat.html +0 -0
  478. data/node_modules/browserify/node_modules/{detective → insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/compat.js +0 -0
  479. data/node_modules/browserify/node_modules/{detective → insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/coverage.footer.html +0 -0
  480. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/coverage.header.html +0 -0
  481. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/coverage.html +0 -0
  482. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/index.html +0 -0
  483. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/module.html +0 -0
  484. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/module.js +0 -0
  485. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/reflect.js +0 -0
  486. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/run.js +0 -0
  487. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/runner.js +0 -0
  488. data/node_modules/{module-deps/node_modules/detective → browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw}/node_modules/esprima/test/test.js +0 -0
  489. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/package.json +50 -0
  490. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/readme.markdown +52 -0
  491. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/test/parent.js +25 -0
  492. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/package.json +61 -0
  493. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/readme.markdown +99 -0
  494. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/argument.js +17 -0
  495. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/assign_implicit.js +13 -0
  496. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/detect.js +17 -0
  497. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/argument.js +6 -0
  498. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/assign_implicit.js +2 -0
  499. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/detect.js +32 -0
  500. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/labels.js +11 -0
  501. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/multiple-exports.js +6 -0
  502. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/named_arg.js +6 -0
  503. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/obj.js +1 -0
  504. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/return_hash.js +5 -0
  505. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/right_hand.js +2 -0
  506. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/labels.js +13 -0
  507. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/multiple-exports.js +18 -0
  508. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/named_arg.js +17 -0
  509. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/obj.js +16 -0
  510. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/package.json +5 -0
  511. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/return_hash.js +13 -0
  512. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/right_hand.js +16 -0
  513. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/shebang.js +19 -0
  514. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/2132fedf7e11adbdb654aea08615ffea7b84cbf0.patch +25 -0
  515. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/README.md +15 -0
  516. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js +52 -0
  517. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/index.js +2 -0
  518. data/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/package.json +26 -0
  519. data/node_modules/browserify/node_modules/insert-module-globals/package.json +52 -0
  520. data/node_modules/browserify/node_modules/insert-module-globals/readme.markdown +86 -0
  521. data/node_modules/browserify/node_modules/insert-module-globals/test/always/main.js +6 -0
  522. data/node_modules/browserify/node_modules/insert-module-globals/test/always.js +23 -0
  523. data/node_modules/browserify/node_modules/insert-module-globals/test/global/filename.js +2 -0
  524. data/node_modules/browserify/node_modules/insert-module-globals/test/global/main.js +2 -0
  525. data/node_modules/browserify/node_modules/insert-module-globals/test/global.js +49 -0
  526. data/node_modules/browserify/node_modules/insert-module-globals/test/insert/buffer.js +1 -0
  527. data/node_modules/browserify/node_modules/insert-module-globals/test/insert/foo/buf.js +4 -0
  528. data/node_modules/browserify/node_modules/insert-module-globals/test/insert/foo/index.js +4 -0
  529. data/node_modules/browserify/node_modules/insert-module-globals/test/insert/main.js +4 -0
  530. data/node_modules/browserify/node_modules/insert-module-globals/test/insert.js +35 -0
  531. data/node_modules/browserify/node_modules/module-deps/LICENSE +18 -0
  532. data/node_modules/{module-deps → browserify/node_modules/module-deps}/cmd.js +0 -0
  533. data/node_modules/{module-deps → browserify/node_modules/module-deps}/example/deps.js +0 -0
  534. data/node_modules/{module-deps → browserify/node_modules/module-deps}/example/files/bar.js +0 -0
  535. data/node_modules/{module-deps → browserify/node_modules/module-deps}/example/files/foo.js +0 -0
  536. data/node_modules/{module-deps → browserify/node_modules/module-deps}/example/files/main.js +0 -0
  537. data/node_modules/{module-deps → browserify/node_modules/module-deps}/example/files/xyz.js +0 -0
  538. data/node_modules/browserify/node_modules/module-deps/index.js +195 -0
  539. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/LICENSE +18 -0
  540. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/example/strings.js +0 -0
  541. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/example/strings_src.js +0 -0
  542. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/index.js +66 -0
  543. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/LICENSE.BSD +0 -0
  544. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/LICENSE.source-map +0 -0
  545. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/README.md +0 -0
  546. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/bin/escodegen.js +0 -0
  547. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/bin/esgenerate.js +0 -0
  548. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/escodegen.js +0 -0
  549. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/CHANGELOG.md +58 -0
  550. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/LICENSE +28 -0
  551. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/Makefile.dryice.js +166 -0
  552. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/README.md +347 -0
  553. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/assert-shim.js +56 -0
  554. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/mini-require.js +152 -0
  555. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  556. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm +18 -0
  557. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-browser.js +8 -0
  558. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  559. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm +21 -0
  560. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/test-prefix.js +8 -0
  561. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/test-suffix.js +3 -0
  562. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js +96 -0
  563. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  564. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/base64.js +42 -0
  565. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  566. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
  567. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
  568. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-node.js +353 -0
  569. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/util.js +91 -0
  570. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map.js +8 -0
  571. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  572. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/README.md +119 -0
  573. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  574. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/package.json +34 -0
  575. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/package.json +74 -0
  576. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/run-tests.js +73 -0
  577. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-api.js +26 -0
  578. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-array-set.js +71 -0
  579. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  580. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js +35 -0
  581. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  582. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
  583. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
  584. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
  585. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-node.js +282 -0
  586. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/util.js +152 -0
  587. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/escodegen/package.json +0 -0
  588. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/ChangeLog +18 -0
  589. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/esprima/LICENSE.BSD +0 -0
  590. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/README.md +73 -0
  591. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/bin/esparse.js +117 -0
  592. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/bin/esvalidate.js +177 -0
  593. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/component.json +14 -0
  594. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/doc/index.html +473 -0
  595. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/esprima.js +3895 -0
  596. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/detectnestedternary.js +106 -0
  597. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/findbooleantrap.js +173 -0
  598. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/tokendist.js +33 -0
  599. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/index.html +102 -0
  600. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/package.json +40 -0
  601. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/benchmarks.html +58 -0
  602. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/benchmarks.js +334 -0
  603. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compare.html +69 -0
  604. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compare.js +328 -0
  605. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compat.html +40 -0
  606. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/esprima/test/compat.js +0 -0
  607. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/node_modules/esprima/test/coverage.footer.html +0 -0
  608. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/coverage.header.html +37 -0
  609. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/coverage.html +4676 -0
  610. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/index.html +37 -0
  611. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/module.html +36 -0
  612. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/module.js +129 -0
  613. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/reflect.js +422 -0
  614. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/run.js +66 -0
  615. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/runner.js +387 -0
  616. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/test.js +19764 -0
  617. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/package.json +36 -0
  618. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/readme.markdown +73 -0
  619. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/both.js +26 -0
  620. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/chained.js +0 -0
  621. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/files/both.js +0 -0
  622. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/files/chained.js +0 -0
  623. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/files/nested.js +0 -0
  624. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/test/files/shebang.js +0 -0
  625. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/sparse-array.js +3 -0
  626. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/files/strings.js +0 -0
  627. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/files/word.js +0 -0
  628. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/nested.js +0 -0
  629. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/return.js +9 -0
  630. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/detective/test/shebang.js +0 -0
  631. data/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/sparse-array.js +14 -0
  632. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/strings.js +0 -0
  633. data/node_modules/browserify/node_modules/{detective → module-deps/node_modules/detective}/test/word.js +0 -0
  634. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/LICENSE +18 -0
  635. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/example/async.js +5 -0
  636. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/example/sync.js +3 -0
  637. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/index.js +5 -0
  638. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/async.js +131 -0
  639. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/core.js +4 -0
  640. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/core.json +38 -0
  641. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/sync.js +99 -0
  642. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/package.json +32 -0
  643. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/readme.markdown +134 -0
  644. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/core.js +0 -0
  645. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/filter.js +17 -0
  646. data/node_modules/browserify/node_modules/{resolve/test/filter.js → module-deps/node_modules/resolve/test/filter_sync.js} +0 -0
  647. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/mock.js +68 -0
  648. data/node_modules/browserify/node_modules/{resolve/test/mock.js → module-deps/node_modules/resolve/test/mock_sync.js} +0 -0
  649. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +0 -0
  650. data/node_modules/browserify/{test/wrap/x.js → node_modules/module-deps/node_modules/resolve/test/resolver/baz/doom.js} +0 -0
  651. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/baz/package.json +0 -0
  652. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/baz/quux.js +0 -0
  653. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +0 -0
  654. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +0 -0
  655. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/cup.coffee +0 -0
  656. data/node_modules/{module-deps → browserify/node_modules/module-deps}/node_modules/resolve/test/resolver/foo.js +0 -0
  657. data/node_modules/{module-deps/node_modules/resolve/test/resolver/other_path/lib/other-lib.js → browserify/node_modules/module-deps/node_modules/resolve/test/resolver/mug.coffee} +0 -0
  658. data/node_modules/{module-deps/node_modules/resolve/test/resolver/other_path/root.js → browserify/node_modules/module-deps/node_modules/resolve/test/resolver/mug.js} +0 -0
  659. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  660. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  661. data/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver.js +144 -0
  662. data/node_modules/browserify/node_modules/{resolve/test/resolver.js → module-deps/node_modules/resolve/test/resolver_sync.js} +0 -0
  663. data/node_modules/{through → browserify/node_modules/module-deps/node_modules/through}/LICENSE.APACHE2 +0 -0
  664. data/node_modules/{through → browserify/node_modules/module-deps/node_modules/through}/LICENSE.MIT +0 -0
  665. data/node_modules/browserify/node_modules/module-deps/node_modules/through/index.js +108 -0
  666. data/node_modules/browserify/node_modules/module-deps/node_modules/through/package.json +43 -0
  667. data/node_modules/browserify/node_modules/module-deps/node_modules/through/readme.markdown +63 -0
  668. data/node_modules/browserify/node_modules/module-deps/node_modules/through/test/auto-destroy.js +30 -0
  669. data/node_modules/browserify/node_modules/module-deps/node_modules/through/test/buffering.js +71 -0
  670. data/node_modules/browserify/node_modules/module-deps/node_modules/through/test/end.js +45 -0
  671. data/node_modules/browserify/node_modules/module-deps/node_modules/through/test/index.js +114 -0
  672. data/node_modules/browserify/node_modules/module-deps/package.json +48 -0
  673. data/node_modules/browserify/node_modules/module-deps/readme.markdown +137 -0
  674. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/bundle.js +0 -0
  675. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/deps.js +0 -0
  676. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/bar.js +0 -0
  677. data/node_modules/browserify/node_modules/module-deps/test/files/filterable.js +10 -0
  678. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/foo.js +0 -0
  679. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/main.js +0 -0
  680. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/f.js +0 -0
  681. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/main.js +0 -0
  682. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/g/index.js +0 -0
  683. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/g/node_modules/insert-ggg/index.js +0 -0
  684. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/g/package.json +0 -0
  685. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/insert-aaa/index.js +0 -0
  686. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/insert-bbb/index.js +0 -0
  687. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_module/node_modules/m/index.js +0 -0
  688. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/f.js +0 -0
  689. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/main.js +0 -0
  690. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/node_modules/g/index.js +0 -0
  691. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/node_modules/g/package.json +0 -0
  692. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/node_modules/g/tr_g.js +0 -0
  693. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/node_modules/m/index.js +0 -0
  694. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/tr_a.js +0 -0
  695. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/tr_sh/tr_b.js +0 -0
  696. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/files/xyz.js +0 -0
  697. data/node_modules/browserify/node_modules/module-deps/test/filter.js +37 -0
  698. data/node_modules/browserify/node_modules/module-deps/test/noparse.js +37 -0
  699. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/tr_fn.js +0 -0
  700. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/tr_module.js +0 -0
  701. data/node_modules/{module-deps → browserify/node_modules/module-deps}/test/tr_sh.js +0 -0
  702. data/node_modules/browserify/node_modules/optimist/README.markdown +13 -0
  703. data/node_modules/browserify/node_modules/optimist/index.js +36 -13
  704. data/node_modules/browserify/node_modules/optimist/package.json +6 -11
  705. data/node_modules/browserify/node_modules/optimist/test/dash.js +31 -0
  706. data/node_modules/browserify/node_modules/optimist/test/parse.js +13 -0
  707. data/node_modules/browserify/node_modules/optimist/test/parse_modified.js +14 -0
  708. data/node_modules/browserify/node_modules/optimist/test/short.js +16 -0
  709. data/node_modules/browserify/node_modules/optimist/test/whitespace.js +8 -0
  710. data/node_modules/browserify/node_modules/shell-quote/README.markdown +72 -0
  711. data/node_modules/browserify/node_modules/shell-quote/example/parse.js +3 -0
  712. data/node_modules/browserify/node_modules/shell-quote/example/quote.js +3 -0
  713. data/node_modules/browserify/node_modules/shell-quote/index.js +33 -0
  714. data/node_modules/browserify/node_modules/shell-quote/package.json +39 -0
  715. data/node_modules/browserify/node_modules/shell-quote/test/parse.js +14 -0
  716. data/node_modules/browserify/node_modules/shell-quote/test/quote.js +15 -0
  717. data/node_modules/browserify/node_modules/syntax-error/index.js +1 -1
  718. data/node_modules/browserify/node_modules/syntax-error/package.json +2 -2
  719. data/node_modules/browserify/node_modules/through/LICENSE.APACHE2 +15 -0
  720. data/node_modules/browserify/node_modules/through/LICENSE.MIT +24 -0
  721. data/node_modules/{through → browserify/node_modules/through}/index.js +0 -0
  722. data/node_modules/browserify/node_modules/through/package.json +43 -0
  723. data/node_modules/browserify/node_modules/through/readme.markdown +43 -0
  724. data/node_modules/browserify/node_modules/through/test/buffering.js +71 -0
  725. data/node_modules/browserify/node_modules/through/test/end.js +26 -0
  726. data/node_modules/browserify/node_modules/through/test/index.js +114 -0
  727. data/node_modules/browserify/node_modules/umd/README.md +46 -0
  728. data/node_modules/browserify/node_modules/umd/index.js +63 -0
  729. data/node_modules/browserify/node_modules/umd/node_modules/rfile/README.md +81 -0
  730. data/node_modules/browserify/node_modules/umd/node_modules/rfile/index.js +39 -0
  731. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/History.md +10 -0
  732. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/Makefile +6 -0
  733. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/Readme.md +44 -0
  734. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/index.js +10 -0
  735. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/package.json +27 -0
  736. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/LICENSE +18 -0
  737. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/example/async.js +5 -0
  738. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/example/sync.js +3 -0
  739. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/index.js +5 -0
  740. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/async.js +131 -0
  741. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/core.js +4 -0
  742. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/core.json +38 -0
  743. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/sync.js +99 -0
  744. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/package.json +32 -0
  745. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/readme.markdown +134 -0
  746. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/core.js +12 -0
  747. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/filter.js +17 -0
  748. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/filter_sync.js +15 -0
  749. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/mock.js +68 -0
  750. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/mock_sync.js +68 -0
  751. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
  752. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  753. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/package.json +3 -0
  754. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  755. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
  756. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
  757. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/cup.coffee +1 -0
  758. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/foo.js +1 -0
  759. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/mug.coffee +0 -0
  760. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/mug.js +0 -0
  761. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  762. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  763. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver.js +144 -0
  764. data/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver_sync.js +157 -0
  765. data/node_modules/browserify/node_modules/umd/node_modules/rfile/package.json +36 -0
  766. data/node_modules/browserify/node_modules/umd/node_modules/rfile/test/index.js +43 -0
  767. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/README.md +26 -0
  768. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/index.js +9 -0
  769. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/package.json +39 -0
  770. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/fixture/jquery.js +9597 -0
  771. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/fixture/jquery.min.js +3 -0
  772. data/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/index.js +8 -0
  773. data/node_modules/browserify/node_modules/umd/node_modules/through/LICENSE.APACHE2 +15 -0
  774. data/node_modules/browserify/node_modules/umd/node_modules/through/LICENSE.MIT +24 -0
  775. data/node_modules/browserify/node_modules/umd/node_modules/through/index.js +108 -0
  776. data/node_modules/browserify/node_modules/umd/node_modules/through/package.json +43 -0
  777. data/node_modules/browserify/node_modules/umd/node_modules/through/readme.markdown +63 -0
  778. data/node_modules/browserify/node_modules/umd/node_modules/through/test/auto-destroy.js +30 -0
  779. data/node_modules/browserify/node_modules/umd/node_modules/through/test/buffering.js +71 -0
  780. data/node_modules/browserify/node_modules/umd/node_modules/through/test/end.js +45 -0
  781. data/node_modules/browserify/node_modules/umd/node_modules/through/test/index.js +114 -0
  782. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/README.md +544 -0
  783. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/bin/uglifyjs +370 -0
  784. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/ast.js +964 -0
  785. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/compress.js +1968 -0
  786. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/mozilla-ast.js +265 -0
  787. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/output.js +1220 -0
  788. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/parse.js +1407 -0
  789. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/scope.js +580 -0
  790. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/sourcemap.js +81 -0
  791. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/transform.js +218 -0
  792. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/utils.js +288 -0
  793. data/node_modules/browserify/node_modules/{deputy/node_modules/mkdirp → umd/node_modules/uglify-js/node_modules/optimist}/LICENSE +0 -0
  794. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/bool.js +10 -0
  795. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/boolean_double.js +7 -0
  796. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/boolean_single.js +7 -0
  797. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/default_hash.js +8 -0
  798. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/default_singles.js +7 -0
  799. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/divide.js +8 -0
  800. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/line_count.js +20 -0
  801. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/line_count_options.js +29 -0
  802. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/line_count_wrap.js +29 -0
  803. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/nonopt.js +4 -0
  804. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/reflect.js +2 -0
  805. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/short.js +3 -0
  806. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/string.js +11 -0
  807. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/usage-options.js +19 -0
  808. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/example/xup.js +10 -0
  809. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/index.js +478 -0
  810. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/README.markdown +70 -0
  811. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/center.js +10 -0
  812. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/meat.js +3 -0
  813. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/index.js +76 -0
  814. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/package.json +41 -0
  815. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/break.js +30 -0
  816. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +63 -0
  817. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/wrap.js +31 -0
  818. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/package.json +42 -0
  819. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/readme.markdown +487 -0
  820. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/test/_/argv.js +2 -0
  821. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/test/_/bin.js +3 -0
  822. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/test/_.js +71 -0
  823. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/test/parse.js +446 -0
  824. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/optimist/test/usage.js +292 -0
  825. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md +58 -0
  826. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/LICENSE +28 -0
  827. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js +166 -0
  828. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/README.md +347 -0
  829. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js +56 -0
  830. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/mini-require.js +152 -0
  831. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  832. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm +18 -0
  833. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js +8 -0
  834. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  835. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm +21 -0
  836. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js +8 -0
  837. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js +3 -0
  838. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js +96 -0
  839. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  840. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js +42 -0
  841. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  842. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
  843. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
  844. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js +353 -0
  845. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js +91 -0
  846. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map.js +8 -0
  847. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  848. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md +119 -0
  849. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  850. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json +33 -0
  851. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/package.json +74 -0
  852. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/run-tests.js +73 -0
  853. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js +26 -0
  854. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js +71 -0
  855. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  856. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js +35 -0
  857. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  858. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
  859. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
  860. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
  861. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js +282 -0
  862. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js +152 -0
  863. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/package.json +37 -0
  864. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/arrays.js +12 -0
  865. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/blocks.js +49 -0
  866. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/conditionals.js +143 -0
  867. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/dead-code.js +89 -0
  868. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/debugger.js +24 -0
  869. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/drop-unused.js +97 -0
  870. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-105.js +17 -0
  871. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-12.js +11 -0
  872. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-22.js +17 -0
  873. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-44.js +31 -0
  874. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-59.js +30 -0
  875. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/labels.js +163 -0
  876. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/loops.js +123 -0
  877. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/properties.js +25 -0
  878. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/sequences.js +161 -0
  879. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/switch.js +210 -0
  880. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/run-tests.js +170 -0
  881. data/node_modules/browserify/node_modules/umd/node_modules/uglify-js/tools/node.js +164 -0
  882. data/node_modules/browserify/node_modules/umd/package.json +32 -0
  883. data/node_modules/browserify/node_modules/umd/template.js +33 -0
  884. data/node_modules/browserify/package.json +25 -38
  885. data/node_modules/browserify/test/args.js +15 -0
  886. data/node_modules/browserify/test/backbone.js +13 -12
  887. data/node_modules/browserify/test/bin.js +6 -14
  888. data/node_modules/browserify/test/bin_entry.js +31 -0
  889. data/node_modules/browserify/test/buffer.js +83 -64
  890. data/node_modules/browserify/test/bundle_sourcemap.js +30 -0
  891. data/node_modules/browserify/test/catch/main.js +1 -0
  892. data/node_modules/browserify/test/catch.js +22 -0
  893. data/node_modules/browserify/test/circular/a.js +3 -0
  894. data/node_modules/browserify/test/circular/b.js +1 -0
  895. data/node_modules/browserify/test/circular/main.js +1 -0
  896. data/node_modules/browserify/test/circular.js +34 -0
  897. data/node_modules/browserify/test/coffee_bin/main.coffee +2 -0
  898. data/node_modules/browserify/test/coffee_bin/x.coffee +1 -0
  899. data/node_modules/browserify/test/coffee_bin.js +36 -0
  900. data/node_modules/browserify/test/comment.js +8 -9
  901. data/node_modules/browserify/test/dep.js +31 -0
  902. data/node_modules/browserify/test/dnode.js +17 -17
  903. data/node_modules/browserify/test/dollar.js +11 -12
  904. data/node_modules/browserify/test/entry.js +11 -28
  905. data/node_modules/browserify/test/entry_exec/fail.js +1 -0
  906. data/node_modules/browserify/test/entry_exec/main.js +1 -0
  907. data/node_modules/browserify/test/entry_exec.js +15 -0
  908. data/node_modules/browserify/test/error_code.js +0 -2
  909. data/node_modules/browserify/test/export.js +22 -39
  910. data/node_modules/browserify/test/fake/fake_fs.js +1 -0
  911. data/node_modules/browserify/test/fake/main.js +2 -0
  912. data/node_modules/browserify/test/fake.js +15 -0
  913. data/node_modules/browserify/test/field/node_modules/z-object/package.json +1 -3
  914. data/node_modules/browserify/test/field.js +40 -40
  915. data/node_modules/browserify/test/file_event.js +33 -0
  916. data/node_modules/browserify/test/global/buffer.js +2 -0
  917. data/node_modules/browserify/test/global/filename.js +2 -0
  918. data/node_modules/browserify/test/global/tick.js +3 -0
  919. data/node_modules/browserify/test/global.js +45 -10
  920. data/node_modules/browserify/test/ignore/by-id.js +4 -0
  921. data/node_modules/browserify/test/ignore/main.js +1 -0
  922. data/node_modules/browserify/test/ignore/skip.js +1 -0
  923. data/node_modules/browserify/test/ignore.js +33 -0
  924. data/node_modules/browserify/test/json.js +11 -10
  925. data/node_modules/browserify/test/maxlisteners/main.js +3 -0
  926. data/node_modules/browserify/test/maxlisteners.js +9 -4
  927. data/node_modules/browserify/test/multi_bundle/a.js +2 -0
  928. data/node_modules/browserify/test/multi_bundle/b.js +5 -0
  929. data/node_modules/browserify/test/multi_bundle.js +44 -0
  930. data/node_modules/browserify/test/multi_entry/c.js +0 -1
  931. data/node_modules/browserify/test/multi_entry.js +16 -11
  932. data/node_modules/browserify/test/process/main.js +3 -0
  933. data/node_modules/browserify/test/process/one.js +1 -0
  934. data/node_modules/browserify/test/process/two.js +1 -0
  935. data/node_modules/browserify/test/process.js +20 -0
  936. data/node_modules/browserify/test/require_cache.js +13 -12
  937. data/node_modules/browserify/test/retarget.js +2 -6
  938. data/node_modules/browserify/test/reverse_multi_bundle/app.js +22 -0
  939. data/node_modules/browserify/test/reverse_multi_bundle/lazy.js +4 -0
  940. data/node_modules/browserify/test/reverse_multi_bundle/shared.js +4 -0
  941. data/node_modules/browserify/test/reverse_multi_bundle.js +43 -0
  942. data/node_modules/browserify/test/shebang/foo.js +2 -0
  943. data/node_modules/browserify/test/shebang/main.js +4 -0
  944. data/node_modules/browserify/test/shebang.js +11 -0
  945. data/node_modules/browserify/test/standalone/main.js +3 -0
  946. data/node_modules/browserify/test/standalone/one.js +1 -0
  947. data/node_modules/browserify/test/standalone/two.js +1 -0
  948. data/node_modules/browserify/test/standalone.js +73 -0
  949. data/node_modules/browserify/test/subdep.js +8 -18
  950. data/node_modules/browserify/test/tr/f.js +1 -0
  951. data/node_modules/browserify/test/tr/main.js +7 -0
  952. data/node_modules/browserify/test/tr/node_modules/g/index.js +1 -0
  953. data/node_modules/browserify/test/tr/node_modules/g/node_modules/insert-ggg/index.js +7 -0
  954. data/node_modules/browserify/test/tr/node_modules/g/package.json +6 -0
  955. data/node_modules/browserify/test/tr/node_modules/insert-aaa/index.js +7 -0
  956. data/node_modules/browserify/test/tr/node_modules/insert-bbb/index.js +7 -0
  957. data/node_modules/browserify/test/tr/node_modules/m/index.js +3 -0
  958. data/node_modules/browserify/test/tr.js +21 -0
  959. data/node_modules/browserify/test/util.js +43 -29
  960. data/package.json +2 -5
  961. metadata +931 -614
  962. data/node_modules/JSONStream/node_modules/jsonparse/package.json +0 -34
  963. data/node_modules/JSONStream/package.json +0 -38
  964. data/node_modules/browserify/builtins/__browserify_process.js +0 -55
  965. data/node_modules/browserify/builtins/events.js +0 -178
  966. data/node_modules/browserify/builtins/https.js +0 -1
  967. data/node_modules/browserify/doc/methods.markdown +0 -182
  968. data/node_modules/browserify/doc/recipes.markdown +0 -62
  969. data/node_modules/browserify/example/debug/browserify.js +0 -219
  970. data/node_modules/browserify/example/debug/build.sh +0 -3
  971. data/node_modules/browserify/example/debug/index.html +0 -7
  972. data/node_modules/browserify/example/debug/js/entry.js +0 -2
  973. data/node_modules/browserify/example/debug/js/thrower.js +0 -3
  974. data/node_modules/browserify/example/debug/server.js +0 -9
  975. data/node_modules/browserify/example/simple-build/browserify.js +0 -368
  976. data/node_modules/browserify/example/simple-build/build.sh +0 -3
  977. data/node_modules/browserify/example/simple-build/index.html +0 -9
  978. data/node_modules/browserify/example/simple-build/js/bar.js +0 -3
  979. data/node_modules/browserify/example/simple-build/js/entry.js +0 -5
  980. data/node_modules/browserify/example/simple-build/js/foo.js +0 -5
  981. data/node_modules/browserify/example/simple-build/server.js +0 -9
  982. data/node_modules/browserify/example/test/b.js +0 -5
  983. data/node_modules/browserify/example/test/bar.js +0 -3
  984. data/node_modules/browserify/example/test/foo.js +0 -3
  985. data/node_modules/browserify/example/test/m.js +0 -3
  986. data/node_modules/browserify/example/test/n.js +0 -3
  987. data/node_modules/browserify/example/using-http/bundle.js +0 -813
  988. data/node_modules/browserify/example/using-http/entry.js +0 -25
  989. data/node_modules/browserify/example/using-http/index.html +0 -9
  990. data/node_modules/browserify/example/using-http/server.js +0 -28
  991. data/node_modules/browserify/lib/watch.js +0 -75
  992. data/node_modules/browserify/lib/wrap.js +0 -583
  993. data/node_modules/browserify/lib/wrappers.js +0 -10
  994. data/node_modules/browserify/node_modules/buffer-browserify/package.json +0 -42
  995. data/node_modules/browserify/node_modules/coffee-script/CNAME +0 -1
  996. data/node_modules/browserify/node_modules/coffee-script/CONTRIBUTING.md +0 -9
  997. data/node_modules/browserify/node_modules/coffee-script/LICENSE +0 -22
  998. data/node_modules/browserify/node_modules/coffee-script/README +0 -51
  999. data/node_modules/browserify/node_modules/coffee-script/Rakefile +0 -79
  1000. data/node_modules/browserify/node_modules/coffee-script/bin/cake +0 -7
  1001. data/node_modules/browserify/node_modules/coffee-script/bin/coffee +0 -7
  1002. data/node_modules/browserify/node_modules/coffee-script/extras/jsl.conf +0 -44
  1003. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/browser.js +0 -101
  1004. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/cake.js +0 -113
  1005. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/coffee-script.js +0 -218
  1006. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/command.js +0 -506
  1007. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/grammar.js +0 -623
  1008. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/helpers.js +0 -150
  1009. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/index.js +0 -11
  1010. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/lexer.js +0 -905
  1011. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/nodes.js +0 -3088
  1012. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/optparse.js +0 -138
  1013. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/parser.js +0 -608
  1014. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/repl.js +0 -104
  1015. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/rewriter.js +0 -478
  1016. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/scope.js +0 -147
  1017. data/node_modules/browserify/node_modules/coffee-script/lib/coffee-script/sourcemap.js +0 -237
  1018. data/node_modules/browserify/node_modules/coffee-script/package.json +0 -48
  1019. data/node_modules/browserify/node_modules/console-browserify/package.json +0 -76
  1020. data/node_modules/browserify/node_modules/crypto-browserify/package.json +0 -30
  1021. data/node_modules/browserify/node_modules/deputy/README.markdown +0 -55
  1022. data/node_modules/browserify/node_modules/deputy/example/cache.js +0 -5
  1023. data/node_modules/browserify/node_modules/deputy/index.js +0 -46
  1024. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/examples/pow.js +0 -6
  1025. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/index.js +0 -82
  1026. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/package.json +0 -30
  1027. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/readme.markdown +0 -63
  1028. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/chmod.js +0 -38
  1029. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/clobber.js +0 -37
  1030. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/mkdirp.js +0 -28
  1031. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm.js +0 -32
  1032. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm_sync.js +0 -39
  1033. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/race.js +0 -41
  1034. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/rel.js +0 -32
  1035. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return.js +0 -25
  1036. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return_sync.js +0 -24
  1037. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/root.js +0 -18
  1038. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/sync.js +0 -32
  1039. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask.js +0 -28
  1040. data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask_sync.js +0 -32
  1041. data/node_modules/browserify/node_modules/deputy/package.json +0 -43
  1042. data/node_modules/browserify/node_modules/deputy/test/cache.js +0 -58
  1043. data/node_modules/browserify/node_modules/detective/README.markdown +0 -66
  1044. data/node_modules/browserify/node_modules/detective/example/strings.js +0 -6
  1045. data/node_modules/browserify/node_modules/detective/index.js +0 -60
  1046. data/node_modules/browserify/node_modules/detective/node_modules/esprima/README.md +0 -74
  1047. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.css +0 -112
  1048. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.js +0 -2972
  1049. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/javascript.js +0 -360
  1050. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/json2.js +0 -487
  1051. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/style.css +0 -164
  1052. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-min.js +0 -12
  1053. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
  1054. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview.css +0 -7
  1055. data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/yahoo-dom-event.js +0 -14
  1056. data/node_modules/browserify/node_modules/detective/node_modules/esprima/bin/esparse.js +0 -42
  1057. data/node_modules/browserify/node_modules/detective/node_modules/esprima/changes +0 -92
  1058. data/node_modules/browserify/node_modules/detective/node_modules/esprima/cm +0 -696
  1059. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/checkenv.js +0 -42
  1060. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.html +0 -82
  1061. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.js +0 -170
  1062. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.html +0 -106
  1063. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.js +0 -123
  1064. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.css +0 -82
  1065. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.html +0 -352
  1066. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/precedence.html +0 -225
  1067. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.html +0 -120
  1068. data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.js +0 -71
  1069. data/node_modules/browserify/node_modules/detective/node_modules/esprima/esprima.js +0 -3577
  1070. data/node_modules/browserify/node_modules/detective/node_modules/esprima/index.html +0 -103
  1071. data/node_modules/browserify/node_modules/detective/node_modules/esprima/package.json +0 -39
  1072. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/Tokenizer.js +0 -646
  1073. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +0 -509
  1074. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ZeParser.js +0 -2185
  1075. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +0 -1158
  1076. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/benchmark.js +0 -3261
  1077. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/escodegen.js +0 -906
  1078. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/esmorph.js +0 -240
  1079. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +0 -6579
  1080. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +0 -10255
  1081. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +0 -9046
  1082. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +0 -9266
  1083. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +0 -6951
  1084. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsdefs.js +0 -731
  1085. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jslex.js +0 -588
  1086. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsparse.js +0 -1921
  1087. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +0 -5952
  1088. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +0 -6297
  1089. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/parse-js.js +0 -1342
  1090. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/platform.js +0 -878
  1091. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +0 -4874
  1092. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +0 -6082
  1093. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +0 -981
  1094. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.html +0 -58
  1095. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.js +0 -328
  1096. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.html +0 -140
  1097. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.js +0 -270
  1098. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.html +0 -40
  1099. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.header.html +0 -37
  1100. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.html +0 -3617
  1101. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/index.html +0 -36
  1102. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/reflect.js +0 -403
  1103. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/run.js +0 -66
  1104. data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/test.js +0 -16659
  1105. data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/generate-unicode-regex.py +0 -164
  1106. data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/update-coverage.sh +0 -28
  1107. data/node_modules/browserify/node_modules/detective/package.json +0 -43
  1108. data/node_modules/browserify/node_modules/detective/test/both.js +0 -11
  1109. data/node_modules/browserify/node_modules/detective/test/files/skip.js +0 -7
  1110. data/node_modules/browserify/node_modules/detective/test/skip.js +0 -9
  1111. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js +0 -189
  1112. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +0 -379
  1113. data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js +0 -69
  1114. data/node_modules/browserify/node_modules/http-browserify/lib/request.js +0 -128
  1115. data/node_modules/browserify/node_modules/http-browserify/package.json +0 -42
  1116. data/node_modules/browserify/node_modules/nub/README.markdown +0 -23
  1117. data/node_modules/browserify/node_modules/nub/index.js +0 -64
  1118. data/node_modules/browserify/node_modules/nub/package.json +0 -42
  1119. data/node_modules/browserify/node_modules/nub/test/by.js +0 -51
  1120. data/node_modules/browserify/node_modules/nub/test/nub.js +0 -46
  1121. data/node_modules/browserify/node_modules/optimist/x.js +0 -1
  1122. data/node_modules/browserify/node_modules/resolve/README.markdown +0 -47
  1123. data/node_modules/browserify/node_modules/resolve/index.js +0 -109
  1124. data/node_modules/browserify/node_modules/resolve/package.json +0 -41
  1125. data/node_modules/browserify/node_modules/vm-browserify/package.json +0 -39
  1126. data/node_modules/browserify/test/alias.js +0 -58
  1127. data/node_modules/browserify/test/bundle.js +0 -32
  1128. data/node_modules/browserify/test/cache.js +0 -28
  1129. data/node_modules/browserify/test/coffee/bar.js +0 -1
  1130. data/node_modules/browserify/test/coffee/baz.coffee +0 -1
  1131. data/node_modules/browserify/test/coffee/entry.coffee +0 -1
  1132. data/node_modules/browserify/test/coffee/foo.coffee +0 -1
  1133. data/node_modules/browserify/test/coffee/index.coffee +0 -5
  1134. data/node_modules/browserify/test/coffee/nested/nested.coffee +0 -2
  1135. data/node_modules/browserify/test/coffee.js +0 -39
  1136. data/node_modules/browserify/test/jade.js +0 -35
  1137. data/node_modules/browserify/test/module.js +0 -22
  1138. data/node_modules/browserify/test/multi_ignore.js +0 -23
  1139. data/node_modules/browserify/test/seq.js +0 -47
  1140. data/node_modules/browserify/test/watch/a.js +0 -1
  1141. data/node_modules/browserify/test/watch.js +0 -91
  1142. data/node_modules/browserify/test/wrap/a.js +0 -2
  1143. data/node_modules/browserify/test/wrap/c.js +0 -1
  1144. data/node_modules/browserify/test/wrap/node_modules/b/main.js +0 -1
  1145. data/node_modules/browserify/test/wrap/node_modules/b/package.json +0 -3
  1146. data/node_modules/browserify/test/wrap/node_modules/skipmetoo/index.js +0 -1
  1147. data/node_modules/browserify/test/wrap/skipme.js +0 -1
  1148. data/node_modules/browserify/test/wrap.js +0 -43
  1149. data/node_modules/browserify/testling/README.markdown +0 -29
  1150. data/node_modules/browserify/testling/test.sh +0 -37
  1151. data/node_modules/browserify/testling/tick.js +0 -9
  1152. data/node_modules/browserify/testling/timers.js +0 -50
  1153. data/node_modules/browserify/testling/util.js +0 -24
  1154. data/node_modules/browserify/v2.markdown +0 -41
  1155. data/node_modules/browserify/wrappers/alias.js +0 -1
  1156. data/node_modules/browserify/wrappers/body.js +0 -2
  1157. data/node_modules/browserify/wrappers/body_debug.js +0 -2
  1158. data/node_modules/browserify/wrappers/entry.js +0 -3
  1159. data/node_modules/browserify/wrappers/entry_debug.js +0 -3
  1160. data/node_modules/browserify/wrappers/package.js +0 -3
  1161. data/node_modules/browserify/wrappers/prelude.js +0 -196
  1162. data/node_modules/module-deps/index.js +0 -142
  1163. data/node_modules/module-deps/node_modules/browser-resolve/README.md +0 -14
  1164. data/node_modules/module-deps/node_modules/browser-resolve/builtin/assert.js +0 -314
  1165. data/node_modules/module-deps/node_modules/browser-resolve/builtin/child_process.js +0 -2
  1166. data/node_modules/module-deps/node_modules/browser-resolve/builtin/fs.js +0 -1
  1167. data/node_modules/module-deps/node_modules/browser-resolve/builtin/net.js +0 -1
  1168. data/node_modules/module-deps/node_modules/browser-resolve/builtin/path.js +0 -175
  1169. data/node_modules/module-deps/node_modules/browser-resolve/builtin/querystring.js +0 -250
  1170. data/node_modules/module-deps/node_modules/browser-resolve/builtin/stream.js +0 -119
  1171. data/node_modules/module-deps/node_modules/browser-resolve/builtin/string_decoder.js +0 -161
  1172. data/node_modules/module-deps/node_modules/browser-resolve/builtin/sys.js +0 -1
  1173. data/node_modules/module-deps/node_modules/browser-resolve/builtin/timers.js +0 -39
  1174. data/node_modules/module-deps/node_modules/browser-resolve/builtin/tls.js +0 -1
  1175. data/node_modules/module-deps/node_modules/browser-resolve/builtin/tty.js +0 -2
  1176. data/node_modules/module-deps/node_modules/browser-resolve/builtin/url.js +0 -604
  1177. data/node_modules/module-deps/node_modules/browser-resolve/builtin/util.js +0 -351
  1178. data/node_modules/module-deps/node_modules/browser-resolve/index.js +0 -144
  1179. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/README.md +0 -11
  1180. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/buffer_ieee754.js +0 -84
  1181. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/index.js +0 -1282
  1182. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/README.md +0 -14
  1183. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/lib/b64.js +0 -84
  1184. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/package.json +0 -26
  1185. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/test/runner.js +0 -50
  1186. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/package.json +0 -42
  1187. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/buffer-browserify/test/buffer.js +0 -121
  1188. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/README.md +0 -32
  1189. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/index.js +0 -85
  1190. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/package.json +0 -76
  1191. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/test/index.js +0 -67
  1192. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/test/static/index.html +0 -12
  1193. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/console-browserify/test/static/test-adapter.js +0 -53
  1194. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/example/bundle.js +0 -637
  1195. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/example/index.html +0 -12
  1196. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/example/test.js +0 -4
  1197. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/index.js +0 -74
  1198. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/md5.js +0 -384
  1199. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/package.json +0 -30
  1200. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/readme.markdown +0 -20
  1201. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/rng.js +0 -37
  1202. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/sha.js +0 -210
  1203. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/crypto-browserify/test/simple.js +0 -35
  1204. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/README.markdown +0 -128
  1205. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/get/index.html +0 -9
  1206. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/get/main.js +0 -14
  1207. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/get/server.js +0 -12
  1208. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/headers/index.html +0 -9
  1209. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/headers/main.js +0 -18
  1210. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/headers/server.js +0 -15
  1211. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/post/index.html +0 -9
  1212. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/post/main.js +0 -16
  1213. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/post/server.js +0 -19
  1214. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/index.html +0 -9
  1215. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/main.js +0 -16
  1216. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/server.js +0 -21
  1217. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/index.js +0 -59
  1218. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/lib/request.js +0 -122
  1219. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/lib/response.js +0 -119
  1220. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/index.js +0 -48
  1221. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/package.json +0 -29
  1222. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/test.js +0 -34
  1223. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/package.json +0 -42
  1224. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/README.markdown +0 -103
  1225. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/example/run/bundle.js +0 -473
  1226. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/example/run/entry.js +0 -6
  1227. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/example/run/index.html +0 -9
  1228. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/example/run/server.js +0 -6
  1229. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/index.js +0 -85
  1230. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/package.json +0 -39
  1231. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/testling/run.js +0 -22
  1232. data/node_modules/module-deps/node_modules/browser-resolve/node_modules/vm-browserify/testling/test.sh +0 -11
  1233. data/node_modules/module-deps/node_modules/browser-resolve/package.json +0 -38
  1234. data/node_modules/module-deps/node_modules/browser-resolve/test/core.js +0 -20
  1235. data/node_modules/module-deps/node_modules/detective/example/strings_src.js +0 -3
  1236. data/node_modules/module-deps/node_modules/detective/index.js +0 -62
  1237. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/Makefile.dryice.js +0 -165
  1238. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/README.md +0 -268
  1239. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm +0 -20
  1240. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm +0 -18
  1241. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm +0 -6
  1242. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm +0 -20
  1243. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js +0 -107
  1244. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-consumer.js +0 -379
  1245. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-generator.js +0 -202
  1246. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-node.js +0 -199
  1247. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/util.js +0 -40
  1248. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/README.md +0 -119
  1249. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js +0 -299
  1250. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/package.json +0 -29
  1251. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/package.json +0 -38
  1252. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/run-tests.js +0 -72
  1253. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-consumer.js +0 -142
  1254. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-generator.js +0 -187
  1255. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-node.js +0 -163
  1256. data/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/util.js +0 -78
  1257. data/node_modules/module-deps/node_modules/detective/package.json +0 -36
  1258. data/node_modules/module-deps/node_modules/detective/readme.markdown +0 -70
  1259. data/node_modules/module-deps/node_modules/detective/test/both.js +0 -11
  1260. data/node_modules/module-deps/node_modules/detective/test/chained.js +0 -9
  1261. data/node_modules/module-deps/node_modules/detective/test/files/both.js +0 -4
  1262. data/node_modules/module-deps/node_modules/detective/test/files/chained.js +0 -5
  1263. data/node_modules/module-deps/node_modules/detective/test/files/nested.js +0 -22
  1264. data/node_modules/module-deps/node_modules/detective/test/files/strings.js +0 -13
  1265. data/node_modules/module-deps/node_modules/detective/test/files/word.js +0 -13
  1266. data/node_modules/module-deps/node_modules/detective/test/nested.js +0 -9
  1267. data/node_modules/module-deps/node_modules/detective/test/strings.js +0 -9
  1268. data/node_modules/module-deps/node_modules/detective/test/word.js +0 -12
  1269. data/node_modules/module-deps/node_modules/resolve/lib/async.js +0 -131
  1270. data/node_modules/module-deps/node_modules/resolve/lib/sync.js +0 -98
  1271. data/node_modules/module-deps/node_modules/resolve/package.json +0 -32
  1272. data/node_modules/module-deps/package.json +0 -47
  1273. data/node_modules/module-deps/readme.markdown +0 -128
  1274. data/node_modules/through/package.json +0 -35
  1275. data/node_modules/through/readme.markdown +0 -43
  1276. data/node_modules/through/test/buffering.js +0 -71
  1277. data/node_modules/through/test/end.js +0 -27
  1278. data/node_modules/through/test/index.js +0 -113
@@ -0,0 +1,2117 @@
1
+ /***********************************************************************
2
+
3
+ A JavaScript tokenizer / parser / beautifier / compressor.
4
+
5
+ This version is suitable for Node.js. With minimal changes (the
6
+ exports stuff) it should work on any JS platform.
7
+
8
+ This file implements some AST processors. They work on data built
9
+ by parse-js.
10
+
11
+ Exported functions:
12
+
13
+ - ast_mangle(ast, options) -- mangles the variable/function names
14
+ in the AST. Returns an AST.
15
+
16
+ - ast_squeeze(ast) -- employs various optimizations to make the
17
+ final generated code even smaller. Returns an AST.
18
+
19
+ - gen_code(ast, options) -- generates JS code from the AST. Pass
20
+ true (or an object, see the code for some options) as second
21
+ argument to get "pretty" (indented) code.
22
+
23
+ -------------------------------- (C) ---------------------------------
24
+
25
+ Author: Mihai Bazon
26
+ <mihai.bazon@gmail.com>
27
+ http://mihai.bazon.net/blog
28
+
29
+ Distributed under the BSD license:
30
+
31
+ Copyright 2010 (c) Mihai Bazon <mihai.bazon@gmail.com>
32
+
33
+ Redistribution and use in source and binary forms, with or without
34
+ modification, are permitted provided that the following conditions
35
+ are met:
36
+
37
+ * Redistributions of source code must retain the above
38
+ copyright notice, this list of conditions and the following
39
+ disclaimer.
40
+
41
+ * Redistributions in binary form must reproduce the above
42
+ copyright notice, this list of conditions and the following
43
+ disclaimer in the documentation and/or other materials
44
+ provided with the distribution.
45
+
46
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY
47
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
48
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
49
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
50
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
51
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
52
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
53
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
54
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
55
+ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
56
+ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
57
+ SUCH DAMAGE.
58
+
59
+ ***********************************************************************/
60
+
61
+ var jsp = require("./parse-js"),
62
+ curry = jsp.curry,
63
+ slice = jsp.slice,
64
+ member = jsp.member,
65
+ is_identifier_char = jsp.is_identifier_char,
66
+ PRECEDENCE = jsp.PRECEDENCE,
67
+ OPERATORS = jsp.OPERATORS;
68
+
69
+ /* -----[ helper for AST traversal ]----- */
70
+
71
+ function ast_walker() {
72
+ function _vardefs(defs) {
73
+ return [ this[0], MAP(defs, function(def){
74
+ var a = [ def[0] ];
75
+ if (def.length > 1)
76
+ a[1] = walk(def[1]);
77
+ return a;
78
+ }) ];
79
+ };
80
+ function _block(statements) {
81
+ var out = [ this[0] ];
82
+ if (statements != null)
83
+ out.push(MAP(statements, walk));
84
+ return out;
85
+ };
86
+ var walkers = {
87
+ "string": function(str) {
88
+ return [ this[0], str ];
89
+ },
90
+ "num": function(num) {
91
+ return [ this[0], num ];
92
+ },
93
+ "name": function(name) {
94
+ return [ this[0], name ];
95
+ },
96
+ "toplevel": function(statements) {
97
+ return [ this[0], MAP(statements, walk) ];
98
+ },
99
+ "block": _block,
100
+ "splice": _block,
101
+ "var": _vardefs,
102
+ "const": _vardefs,
103
+ "try": function(t, c, f) {
104
+ return [
105
+ this[0],
106
+ MAP(t, walk),
107
+ c != null ? [ c[0], MAP(c[1], walk) ] : null,
108
+ f != null ? MAP(f, walk) : null
109
+ ];
110
+ },
111
+ "throw": function(expr) {
112
+ return [ this[0], walk(expr) ];
113
+ },
114
+ "new": function(ctor, args) {
115
+ return [ this[0], walk(ctor), MAP(args, walk) ];
116
+ },
117
+ "switch": function(expr, body) {
118
+ return [ this[0], walk(expr), MAP(body, function(branch){
119
+ return [ branch[0] ? walk(branch[0]) : null,
120
+ MAP(branch[1], walk) ];
121
+ }) ];
122
+ },
123
+ "break": function(label) {
124
+ return [ this[0], label ];
125
+ },
126
+ "continue": function(label) {
127
+ return [ this[0], label ];
128
+ },
129
+ "conditional": function(cond, t, e) {
130
+ return [ this[0], walk(cond), walk(t), walk(e) ];
131
+ },
132
+ "assign": function(op, lvalue, rvalue) {
133
+ return [ this[0], op, walk(lvalue), walk(rvalue) ];
134
+ },
135
+ "dot": function(expr) {
136
+ return [ this[0], walk(expr) ].concat(slice(arguments, 1));
137
+ },
138
+ "call": function(expr, args) {
139
+ return [ this[0], walk(expr), MAP(args, walk) ];
140
+ },
141
+ "function": function(name, args, body) {
142
+ return [ this[0], name, args.slice(), MAP(body, walk) ];
143
+ },
144
+ "debugger": function() {
145
+ return [ this[0] ];
146
+ },
147
+ "defun": function(name, args, body) {
148
+ return [ this[0], name, args.slice(), MAP(body, walk) ];
149
+ },
150
+ "if": function(conditional, t, e) {
151
+ return [ this[0], walk(conditional), walk(t), walk(e) ];
152
+ },
153
+ "for": function(init, cond, step, block) {
154
+ return [ this[0], walk(init), walk(cond), walk(step), walk(block) ];
155
+ },
156
+ "for-in": function(vvar, key, hash, block) {
157
+ return [ this[0], walk(vvar), walk(key), walk(hash), walk(block) ];
158
+ },
159
+ "while": function(cond, block) {
160
+ return [ this[0], walk(cond), walk(block) ];
161
+ },
162
+ "do": function(cond, block) {
163
+ return [ this[0], walk(cond), walk(block) ];
164
+ },
165
+ "return": function(expr) {
166
+ return [ this[0], walk(expr) ];
167
+ },
168
+ "binary": function(op, left, right) {
169
+ return [ this[0], op, walk(left), walk(right) ];
170
+ },
171
+ "unary-prefix": function(op, expr) {
172
+ return [ this[0], op, walk(expr) ];
173
+ },
174
+ "unary-postfix": function(op, expr) {
175
+ return [ this[0], op, walk(expr) ];
176
+ },
177
+ "sub": function(expr, subscript) {
178
+ return [ this[0], walk(expr), walk(subscript) ];
179
+ },
180
+ "object": function(props) {
181
+ return [ this[0], MAP(props, function(p){
182
+ return p.length == 2
183
+ ? [ p[0], walk(p[1]) ]
184
+ : [ p[0], walk(p[1]), p[2] ]; // get/set-ter
185
+ }) ];
186
+ },
187
+ "regexp": function(rx, mods) {
188
+ return [ this[0], rx, mods ];
189
+ },
190
+ "array": function(elements) {
191
+ return [ this[0], MAP(elements, walk) ];
192
+ },
193
+ "stat": function(stat) {
194
+ return [ this[0], walk(stat) ];
195
+ },
196
+ "seq": function() {
197
+ return [ this[0] ].concat(MAP(slice(arguments), walk));
198
+ },
199
+ "label": function(name, block) {
200
+ return [ this[0], name, walk(block) ];
201
+ },
202
+ "with": function(expr, block) {
203
+ return [ this[0], walk(expr), walk(block) ];
204
+ },
205
+ "atom": function(name) {
206
+ return [ this[0], name ];
207
+ },
208
+ "directive": function(dir) {
209
+ return [ this[0], dir ];
210
+ }
211
+ };
212
+
213
+ var user = {};
214
+ var stack = [];
215
+ function walk(ast) {
216
+ if (ast == null)
217
+ return null;
218
+ try {
219
+ stack.push(ast);
220
+ var type = ast[0];
221
+ var gen = user[type];
222
+ if (gen) {
223
+ var ret = gen.apply(ast, ast.slice(1));
224
+ if (ret != null)
225
+ return ret;
226
+ }
227
+ gen = walkers[type];
228
+ return gen.apply(ast, ast.slice(1));
229
+ } finally {
230
+ stack.pop();
231
+ }
232
+ };
233
+
234
+ function dive(ast) {
235
+ if (ast == null)
236
+ return null;
237
+ try {
238
+ stack.push(ast);
239
+ return walkers[ast[0]].apply(ast, ast.slice(1));
240
+ } finally {
241
+ stack.pop();
242
+ }
243
+ };
244
+
245
+ function with_walkers(walkers, cont){
246
+ var save = {}, i;
247
+ for (i in walkers) if (HOP(walkers, i)) {
248
+ save[i] = user[i];
249
+ user[i] = walkers[i];
250
+ }
251
+ var ret = cont();
252
+ for (i in save) if (HOP(save, i)) {
253
+ if (!save[i]) delete user[i];
254
+ else user[i] = save[i];
255
+ }
256
+ return ret;
257
+ };
258
+
259
+ return {
260
+ walk: walk,
261
+ dive: dive,
262
+ with_walkers: with_walkers,
263
+ parent: function() {
264
+ return stack[stack.length - 2]; // last one is current node
265
+ },
266
+ stack: function() {
267
+ return stack;
268
+ }
269
+ };
270
+ };
271
+
272
+ /* -----[ Scope and mangling ]----- */
273
+
274
+ function Scope(parent) {
275
+ this.names = {}; // names defined in this scope
276
+ this.mangled = {}; // mangled names (orig.name => mangled)
277
+ this.rev_mangled = {}; // reverse lookup (mangled => orig.name)
278
+ this.cname = -1; // current mangled name
279
+ this.refs = {}; // names referenced from this scope
280
+ this.uses_with = false; // will become TRUE if with() is detected in this or any subscopes
281
+ this.uses_eval = false; // will become TRUE if eval() is detected in this or any subscopes
282
+ this.directives = []; // directives activated from this scope
283
+ this.parent = parent; // parent scope
284
+ this.children = []; // sub-scopes
285
+ if (parent) {
286
+ this.level = parent.level + 1;
287
+ parent.children.push(this);
288
+ } else {
289
+ this.level = 0;
290
+ }
291
+ };
292
+
293
+ function base54_digits() {
294
+ if (typeof DIGITS_OVERRIDE_FOR_TESTING != "undefined")
295
+ return DIGITS_OVERRIDE_FOR_TESTING;
296
+ else
297
+ return "etnrisouaflchpdvmgybwESxTNCkLAOM_DPHBjFIqRUzWXV$JKQGYZ0516372984";
298
+ }
299
+
300
+ var base54 = (function(){
301
+ var DIGITS = base54_digits();
302
+ return function(num) {
303
+ var ret = "", base = 54;
304
+ do {
305
+ ret += DIGITS.charAt(num % base);
306
+ num = Math.floor(num / base);
307
+ base = 64;
308
+ } while (num > 0);
309
+ return ret;
310
+ };
311
+ })();
312
+
313
+ Scope.prototype = {
314
+ has: function(name) {
315
+ for (var s = this; s; s = s.parent)
316
+ if (HOP(s.names, name))
317
+ return s;
318
+ },
319
+ has_mangled: function(mname) {
320
+ for (var s = this; s; s = s.parent)
321
+ if (HOP(s.rev_mangled, mname))
322
+ return s;
323
+ },
324
+ toJSON: function() {
325
+ return {
326
+ names: this.names,
327
+ uses_eval: this.uses_eval,
328
+ uses_with: this.uses_with
329
+ };
330
+ },
331
+
332
+ next_mangled: function() {
333
+ // we must be careful that the new mangled name:
334
+ //
335
+ // 1. doesn't shadow a mangled name from a parent
336
+ // scope, unless we don't reference the original
337
+ // name from this scope OR from any sub-scopes!
338
+ // This will get slow.
339
+ //
340
+ // 2. doesn't shadow an original name from a parent
341
+ // scope, in the event that the name is not mangled
342
+ // in the parent scope and we reference that name
343
+ // here OR IN ANY SUBSCOPES!
344
+ //
345
+ // 3. doesn't shadow a name that is referenced but not
346
+ // defined (possibly global defined elsewhere).
347
+ for (;;) {
348
+ var m = base54(++this.cname), prior;
349
+
350
+ // case 1.
351
+ prior = this.has_mangled(m);
352
+ if (prior && this.refs[prior.rev_mangled[m]] === prior)
353
+ continue;
354
+
355
+ // case 2.
356
+ prior = this.has(m);
357
+ if (prior && prior !== this && this.refs[m] === prior && !prior.has_mangled(m))
358
+ continue;
359
+
360
+ // case 3.
361
+ if (HOP(this.refs, m) && this.refs[m] == null)
362
+ continue;
363
+
364
+ // I got "do" once. :-/
365
+ if (!is_identifier(m))
366
+ continue;
367
+
368
+ return m;
369
+ }
370
+ },
371
+ set_mangle: function(name, m) {
372
+ this.rev_mangled[m] = name;
373
+ return this.mangled[name] = m;
374
+ },
375
+ get_mangled: function(name, newMangle) {
376
+ if (this.uses_eval || this.uses_with) return name; // no mangle if eval or with is in use
377
+ var s = this.has(name);
378
+ if (!s) return name; // not in visible scope, no mangle
379
+ if (HOP(s.mangled, name)) return s.mangled[name]; // already mangled in this scope
380
+ if (!newMangle) return name; // not found and no mangling requested
381
+ return s.set_mangle(name, s.next_mangled());
382
+ },
383
+ references: function(name) {
384
+ return name && !this.parent || this.uses_with || this.uses_eval || this.refs[name];
385
+ },
386
+ define: function(name, type) {
387
+ if (name != null) {
388
+ if (type == "var" || !HOP(this.names, name))
389
+ this.names[name] = type || "var";
390
+ return name;
391
+ }
392
+ },
393
+ active_directive: function(dir) {
394
+ return member(dir, this.directives) || this.parent && this.parent.active_directive(dir);
395
+ }
396
+ };
397
+
398
+ function ast_add_scope(ast) {
399
+
400
+ var current_scope = null;
401
+ var w = ast_walker(), walk = w.walk;
402
+ var having_eval = [];
403
+
404
+ function with_new_scope(cont) {
405
+ current_scope = new Scope(current_scope);
406
+ current_scope.labels = new Scope();
407
+ var ret = current_scope.body = cont();
408
+ ret.scope = current_scope;
409
+ current_scope = current_scope.parent;
410
+ return ret;
411
+ };
412
+
413
+ function define(name, type) {
414
+ return current_scope.define(name, type);
415
+ };
416
+
417
+ function reference(name) {
418
+ current_scope.refs[name] = true;
419
+ };
420
+
421
+ function _lambda(name, args, body) {
422
+ var is_defun = this[0] == "defun";
423
+ return [ this[0], is_defun ? define(name, "defun") : name, args, with_new_scope(function(){
424
+ if (!is_defun) define(name, "lambda");
425
+ MAP(args, function(name){ define(name, "arg") });
426
+ return MAP(body, walk);
427
+ })];
428
+ };
429
+
430
+ function _vardefs(type) {
431
+ return function(defs) {
432
+ MAP(defs, function(d){
433
+ define(d[0], type);
434
+ if (d[1]) reference(d[0]);
435
+ });
436
+ };
437
+ };
438
+
439
+ function _breacont(label) {
440
+ if (label)
441
+ current_scope.labels.refs[label] = true;
442
+ };
443
+
444
+ return with_new_scope(function(){
445
+ // process AST
446
+ var ret = w.with_walkers({
447
+ "function": _lambda,
448
+ "defun": _lambda,
449
+ "label": function(name, stat) { current_scope.labels.define(name) },
450
+ "break": _breacont,
451
+ "continue": _breacont,
452
+ "with": function(expr, block) {
453
+ for (var s = current_scope; s; s = s.parent)
454
+ s.uses_with = true;
455
+ },
456
+ "var": _vardefs("var"),
457
+ "const": _vardefs("const"),
458
+ "try": function(t, c, f) {
459
+ if (c != null) return [
460
+ this[0],
461
+ MAP(t, walk),
462
+ [ define(c[0], "catch"), MAP(c[1], walk) ],
463
+ f != null ? MAP(f, walk) : null
464
+ ];
465
+ },
466
+ "name": function(name) {
467
+ if (name == "eval")
468
+ having_eval.push(current_scope);
469
+ reference(name);
470
+ }
471
+ }, function(){
472
+ return walk(ast);
473
+ });
474
+
475
+ // the reason why we need an additional pass here is
476
+ // that names can be used prior to their definition.
477
+
478
+ // scopes where eval was detected and their parents
479
+ // are marked with uses_eval, unless they define the
480
+ // "eval" name.
481
+ MAP(having_eval, function(scope){
482
+ if (!scope.has("eval")) while (scope) {
483
+ scope.uses_eval = true;
484
+ scope = scope.parent;
485
+ }
486
+ });
487
+
488
+ // for referenced names it might be useful to know
489
+ // their origin scope. current_scope here is the
490
+ // toplevel one.
491
+ function fixrefs(scope, i) {
492
+ // do children first; order shouldn't matter
493
+ for (i = scope.children.length; --i >= 0;)
494
+ fixrefs(scope.children[i]);
495
+ for (i in scope.refs) if (HOP(scope.refs, i)) {
496
+ // find origin scope and propagate the reference to origin
497
+ for (var origin = scope.has(i), s = scope; s; s = s.parent) {
498
+ s.refs[i] = origin;
499
+ if (s === origin) break;
500
+ }
501
+ }
502
+ };
503
+ fixrefs(current_scope);
504
+
505
+ return ret;
506
+ });
507
+
508
+ };
509
+
510
+ /* -----[ mangle names ]----- */
511
+
512
+ function ast_mangle(ast, options) {
513
+ var w = ast_walker(), walk = w.walk, scope;
514
+ options = defaults(options, {
515
+ mangle : true,
516
+ toplevel : false,
517
+ defines : null,
518
+ except : null,
519
+ no_functions : false
520
+ });
521
+
522
+ function get_mangled(name, newMangle) {
523
+ if (!options.mangle) return name;
524
+ if (!options.toplevel && !scope.parent) return name; // don't mangle toplevel
525
+ if (options.except && member(name, options.except))
526
+ return name;
527
+ if (options.no_functions && HOP(scope.names, name) &&
528
+ (scope.names[name] == 'defun' || scope.names[name] == 'lambda'))
529
+ return name;
530
+ return scope.get_mangled(name, newMangle);
531
+ };
532
+
533
+ function get_define(name) {
534
+ if (options.defines) {
535
+ // we always lookup a defined symbol for the current scope FIRST, so declared
536
+ // vars trump a DEFINE symbol, but if no such var is found, then match a DEFINE value
537
+ if (!scope.has(name)) {
538
+ if (HOP(options.defines, name)) {
539
+ return options.defines[name];
540
+ }
541
+ }
542
+ return null;
543
+ }
544
+ };
545
+
546
+ function _lambda(name, args, body) {
547
+ if (!options.no_functions && options.mangle) {
548
+ var is_defun = this[0] == "defun", extra;
549
+ if (name) {
550
+ if (is_defun) name = get_mangled(name);
551
+ else if (body.scope.references(name)) {
552
+ extra = {};
553
+ if (!(scope.uses_eval || scope.uses_with))
554
+ name = extra[name] = scope.next_mangled();
555
+ else
556
+ extra[name] = name;
557
+ }
558
+ else name = null;
559
+ }
560
+ }
561
+ body = with_scope(body.scope, function(){
562
+ args = MAP(args, function(name){ return get_mangled(name) });
563
+ return MAP(body, walk);
564
+ }, extra);
565
+ return [ this[0], name, args, body ];
566
+ };
567
+
568
+ function with_scope(s, cont, extra) {
569
+ var _scope = scope;
570
+ scope = s;
571
+ if (extra) for (var i in extra) if (HOP(extra, i)) {
572
+ s.set_mangle(i, extra[i]);
573
+ }
574
+ for (var i in s.names) if (HOP(s.names, i)) {
575
+ get_mangled(i, true);
576
+ }
577
+ var ret = cont();
578
+ ret.scope = s;
579
+ scope = _scope;
580
+ return ret;
581
+ };
582
+
583
+ function _vardefs(defs) {
584
+ return [ this[0], MAP(defs, function(d){
585
+ return [ get_mangled(d[0]), walk(d[1]) ];
586
+ }) ];
587
+ };
588
+
589
+ function _breacont(label) {
590
+ if (label) return [ this[0], scope.labels.get_mangled(label) ];
591
+ };
592
+
593
+ return w.with_walkers({
594
+ "function": _lambda,
595
+ "defun": function() {
596
+ // move function declarations to the top when
597
+ // they are not in some block.
598
+ var ast = _lambda.apply(this, arguments);
599
+ switch (w.parent()[0]) {
600
+ case "toplevel":
601
+ case "function":
602
+ case "defun":
603
+ return MAP.at_top(ast);
604
+ }
605
+ return ast;
606
+ },
607
+ "label": function(label, stat) {
608
+ if (scope.labels.refs[label]) return [
609
+ this[0],
610
+ scope.labels.get_mangled(label, true),
611
+ walk(stat)
612
+ ];
613
+ return walk(stat);
614
+ },
615
+ "break": _breacont,
616
+ "continue": _breacont,
617
+ "var": _vardefs,
618
+ "const": _vardefs,
619
+ "name": function(name) {
620
+ return get_define(name) || [ this[0], get_mangled(name) ];
621
+ },
622
+ "try": function(t, c, f) {
623
+ return [ this[0],
624
+ MAP(t, walk),
625
+ c != null ? [ get_mangled(c[0]), MAP(c[1], walk) ] : null,
626
+ f != null ? MAP(f, walk) : null ];
627
+ },
628
+ "toplevel": function(body) {
629
+ var self = this;
630
+ return with_scope(self.scope, function(){
631
+ return [ self[0], MAP(body, walk) ];
632
+ });
633
+ },
634
+ "directive": function() {
635
+ return MAP.at_top(this);
636
+ }
637
+ }, function() {
638
+ return walk(ast_add_scope(ast));
639
+ });
640
+ };
641
+
642
+ /* -----[
643
+ - compress foo["bar"] into foo.bar,
644
+ - remove block brackets {} where possible
645
+ - join consecutive var declarations
646
+ - various optimizations for IFs:
647
+ - if (cond) foo(); else bar(); ==> cond?foo():bar();
648
+ - if (cond) foo(); ==> cond&&foo();
649
+ - if (foo) return bar(); else return baz(); ==> return foo?bar():baz(); // also for throw
650
+ - if (foo) return bar(); else something(); ==> {if(foo)return bar();something()}
651
+ ]----- */
652
+
653
+ var warn = function(){};
654
+
655
+ function best_of(ast1, ast2) {
656
+ return gen_code(ast1).length > gen_code(ast2[0] == "stat" ? ast2[1] : ast2).length ? ast2 : ast1;
657
+ };
658
+
659
+ function last_stat(b) {
660
+ if (b[0] == "block" && b[1] && b[1].length > 0)
661
+ return b[1][b[1].length - 1];
662
+ return b;
663
+ }
664
+
665
+ function aborts(t) {
666
+ if (t) switch (last_stat(t)[0]) {
667
+ case "return":
668
+ case "break":
669
+ case "continue":
670
+ case "throw":
671
+ return true;
672
+ }
673
+ };
674
+
675
+ function boolean_expr(expr) {
676
+ return ( (expr[0] == "unary-prefix"
677
+ && member(expr[1], [ "!", "delete" ])) ||
678
+
679
+ (expr[0] == "binary"
680
+ && member(expr[1], [ "in", "instanceof", "==", "!=", "===", "!==", "<", "<=", ">=", ">" ])) ||
681
+
682
+ (expr[0] == "binary"
683
+ && member(expr[1], [ "&&", "||" ])
684
+ && boolean_expr(expr[2])
685
+ && boolean_expr(expr[3])) ||
686
+
687
+ (expr[0] == "conditional"
688
+ && boolean_expr(expr[2])
689
+ && boolean_expr(expr[3])) ||
690
+
691
+ (expr[0] == "assign"
692
+ && expr[1] === true
693
+ && boolean_expr(expr[3])) ||
694
+
695
+ (expr[0] == "seq"
696
+ && boolean_expr(expr[expr.length - 1]))
697
+ );
698
+ };
699
+
700
+ function empty(b) {
701
+ return !b || (b[0] == "block" && (!b[1] || b[1].length == 0));
702
+ };
703
+
704
+ function is_string(node) {
705
+ return (node[0] == "string" ||
706
+ node[0] == "unary-prefix" && node[1] == "typeof" ||
707
+ node[0] == "binary" && node[1] == "+" &&
708
+ (is_string(node[2]) || is_string(node[3])));
709
+ };
710
+
711
+ var when_constant = (function(){
712
+
713
+ var $NOT_CONSTANT = {};
714
+
715
+ // this can only evaluate constant expressions. If it finds anything
716
+ // not constant, it throws $NOT_CONSTANT.
717
+ function evaluate(expr) {
718
+ switch (expr[0]) {
719
+ case "string":
720
+ case "num":
721
+ return expr[1];
722
+ case "name":
723
+ case "atom":
724
+ switch (expr[1]) {
725
+ case "true": return true;
726
+ case "false": return false;
727
+ case "null": return null;
728
+ }
729
+ break;
730
+ case "unary-prefix":
731
+ switch (expr[1]) {
732
+ case "!": return !evaluate(expr[2]);
733
+ case "typeof": return typeof evaluate(expr[2]);
734
+ case "~": return ~evaluate(expr[2]);
735
+ case "-": return -evaluate(expr[2]);
736
+ case "+": return +evaluate(expr[2]);
737
+ }
738
+ break;
739
+ case "binary":
740
+ var left = expr[2], right = expr[3];
741
+ switch (expr[1]) {
742
+ case "&&" : return evaluate(left) && evaluate(right);
743
+ case "||" : return evaluate(left) || evaluate(right);
744
+ case "|" : return evaluate(left) | evaluate(right);
745
+ case "&" : return evaluate(left) & evaluate(right);
746
+ case "^" : return evaluate(left) ^ evaluate(right);
747
+ case "+" : return evaluate(left) + evaluate(right);
748
+ case "*" : return evaluate(left) * evaluate(right);
749
+ case "/" : return evaluate(left) / evaluate(right);
750
+ case "%" : return evaluate(left) % evaluate(right);
751
+ case "-" : return evaluate(left) - evaluate(right);
752
+ case "<<" : return evaluate(left) << evaluate(right);
753
+ case ">>" : return evaluate(left) >> evaluate(right);
754
+ case ">>>" : return evaluate(left) >>> evaluate(right);
755
+ case "==" : return evaluate(left) == evaluate(right);
756
+ case "===" : return evaluate(left) === evaluate(right);
757
+ case "!=" : return evaluate(left) != evaluate(right);
758
+ case "!==" : return evaluate(left) !== evaluate(right);
759
+ case "<" : return evaluate(left) < evaluate(right);
760
+ case "<=" : return evaluate(left) <= evaluate(right);
761
+ case ">" : return evaluate(left) > evaluate(right);
762
+ case ">=" : return evaluate(left) >= evaluate(right);
763
+ case "in" : return evaluate(left) in evaluate(right);
764
+ case "instanceof" : return evaluate(left) instanceof evaluate(right);
765
+ }
766
+ }
767
+ throw $NOT_CONSTANT;
768
+ };
769
+
770
+ return function(expr, yes, no) {
771
+ try {
772
+ var val = evaluate(expr), ast;
773
+ switch (typeof val) {
774
+ case "string": ast = [ "string", val ]; break;
775
+ case "number": ast = [ "num", val ]; break;
776
+ case "boolean": ast = [ "name", String(val) ]; break;
777
+ default:
778
+ if (val === null) { ast = [ "atom", "null" ]; break; }
779
+ throw new Error("Can't handle constant of type: " + (typeof val));
780
+ }
781
+ return yes.call(expr, ast, val);
782
+ } catch(ex) {
783
+ if (ex === $NOT_CONSTANT) {
784
+ if (expr[0] == "binary"
785
+ && (expr[1] == "===" || expr[1] == "!==")
786
+ && ((is_string(expr[2]) && is_string(expr[3]))
787
+ || (boolean_expr(expr[2]) && boolean_expr(expr[3])))) {
788
+ expr[1] = expr[1].substr(0, 2);
789
+ }
790
+ else if (no && expr[0] == "binary"
791
+ && (expr[1] == "||" || expr[1] == "&&")) {
792
+ // the whole expression is not constant but the lval may be...
793
+ try {
794
+ var lval = evaluate(expr[2]);
795
+ expr = ((expr[1] == "&&" && (lval ? expr[3] : lval)) ||
796
+ (expr[1] == "||" && (lval ? lval : expr[3])) ||
797
+ expr);
798
+ } catch(ex2) {
799
+ // IGNORE... lval is not constant
800
+ }
801
+ }
802
+ return no ? no.call(expr, expr) : null;
803
+ }
804
+ else throw ex;
805
+ }
806
+ };
807
+
808
+ })();
809
+
810
+ function warn_unreachable(ast) {
811
+ if (!empty(ast))
812
+ warn("Dropping unreachable code: " + gen_code(ast, true));
813
+ };
814
+
815
+ function prepare_ifs(ast) {
816
+ var w = ast_walker(), walk = w.walk;
817
+ // In this first pass, we rewrite ifs which abort with no else with an
818
+ // if-else. For example:
819
+ //
820
+ // if (x) {
821
+ // blah();
822
+ // return y;
823
+ // }
824
+ // foobar();
825
+ //
826
+ // is rewritten into:
827
+ //
828
+ // if (x) {
829
+ // blah();
830
+ // return y;
831
+ // } else {
832
+ // foobar();
833
+ // }
834
+ function redo_if(statements) {
835
+ statements = MAP(statements, walk);
836
+
837
+ for (var i = 0; i < statements.length; ++i) {
838
+ var fi = statements[i];
839
+ if (fi[0] != "if") continue;
840
+
841
+ if (fi[3]) continue;
842
+
843
+ var t = fi[2];
844
+ if (!aborts(t)) continue;
845
+
846
+ var conditional = walk(fi[1]);
847
+
848
+ var e_body = redo_if(statements.slice(i + 1));
849
+ var e = e_body.length == 1 ? e_body[0] : [ "block", e_body ];
850
+
851
+ return statements.slice(0, i).concat([ [
852
+ fi[0], // "if"
853
+ conditional, // conditional
854
+ t, // then
855
+ e // else
856
+ ] ]);
857
+ }
858
+
859
+ return statements;
860
+ };
861
+
862
+ function redo_if_lambda(name, args, body) {
863
+ body = redo_if(body);
864
+ return [ this[0], name, args, body ];
865
+ };
866
+
867
+ function redo_if_block(statements) {
868
+ return [ this[0], statements != null ? redo_if(statements) : null ];
869
+ };
870
+
871
+ return w.with_walkers({
872
+ "defun": redo_if_lambda,
873
+ "function": redo_if_lambda,
874
+ "block": redo_if_block,
875
+ "splice": redo_if_block,
876
+ "toplevel": function(statements) {
877
+ return [ this[0], redo_if(statements) ];
878
+ },
879
+ "try": function(t, c, f) {
880
+ return [
881
+ this[0],
882
+ redo_if(t),
883
+ c != null ? [ c[0], redo_if(c[1]) ] : null,
884
+ f != null ? redo_if(f) : null
885
+ ];
886
+ }
887
+ }, function() {
888
+ return walk(ast);
889
+ });
890
+ };
891
+
892
+ function for_side_effects(ast, handler) {
893
+ var w = ast_walker(), walk = w.walk;
894
+ var $stop = {}, $restart = {};
895
+ function stop() { throw $stop };
896
+ function restart() { throw $restart };
897
+ function found(){ return handler.call(this, this, w, stop, restart) };
898
+ function unary(op) {
899
+ if (op == "++" || op == "--")
900
+ return found.apply(this, arguments);
901
+ };
902
+ function binary(op) {
903
+ if (op == "&&" || op == "||")
904
+ return found.apply(this, arguments);
905
+ };
906
+ return w.with_walkers({
907
+ "try": found,
908
+ "throw": found,
909
+ "return": found,
910
+ "new": found,
911
+ "switch": found,
912
+ "break": found,
913
+ "continue": found,
914
+ "assign": found,
915
+ "call": found,
916
+ "if": found,
917
+ "for": found,
918
+ "for-in": found,
919
+ "while": found,
920
+ "do": found,
921
+ "return": found,
922
+ "unary-prefix": unary,
923
+ "unary-postfix": unary,
924
+ "conditional": found,
925
+ "binary": binary,
926
+ "defun": found
927
+ }, function(){
928
+ while (true) try {
929
+ walk(ast);
930
+ break;
931
+ } catch(ex) {
932
+ if (ex === $stop) break;
933
+ if (ex === $restart) continue;
934
+ throw ex;
935
+ }
936
+ });
937
+ };
938
+
939
+ function ast_lift_variables(ast) {
940
+ var w = ast_walker(), walk = w.walk, scope;
941
+ function do_body(body, env) {
942
+ var _scope = scope;
943
+ scope = env;
944
+ body = MAP(body, walk);
945
+ var hash = {}, names = MAP(env.names, function(type, name){
946
+ if (type != "var") return MAP.skip;
947
+ if (!env.references(name)) return MAP.skip;
948
+ hash[name] = true;
949
+ return [ name ];
950
+ });
951
+ if (names.length > 0) {
952
+ // looking for assignments to any of these variables.
953
+ // we can save considerable space by moving the definitions
954
+ // in the var declaration.
955
+ for_side_effects([ "block", body ], function(ast, walker, stop, restart) {
956
+ if (ast[0] == "assign"
957
+ && ast[1] === true
958
+ && ast[2][0] == "name"
959
+ && HOP(hash, ast[2][1])) {
960
+ // insert the definition into the var declaration
961
+ for (var i = names.length; --i >= 0;) {
962
+ if (names[i][0] == ast[2][1]) {
963
+ if (names[i][1]) // this name already defined, we must stop
964
+ stop();
965
+ names[i][1] = ast[3]; // definition
966
+ names.push(names.splice(i, 1)[0]);
967
+ break;
968
+ }
969
+ }
970
+ // remove this assignment from the AST.
971
+ var p = walker.parent();
972
+ if (p[0] == "seq") {
973
+ var a = p[2];
974
+ a.unshift(0, p.length);
975
+ p.splice.apply(p, a);
976
+ }
977
+ else if (p[0] == "stat") {
978
+ p.splice(0, p.length, "block"); // empty statement
979
+ }
980
+ else {
981
+ stop();
982
+ }
983
+ restart();
984
+ }
985
+ stop();
986
+ });
987
+ body.unshift([ "var", names ]);
988
+ }
989
+ scope = _scope;
990
+ return body;
991
+ };
992
+ function _vardefs(defs) {
993
+ var ret = null;
994
+ for (var i = defs.length; --i >= 0;) {
995
+ var d = defs[i];
996
+ if (!d[1]) continue;
997
+ d = [ "assign", true, [ "name", d[0] ], d[1] ];
998
+ if (ret == null) ret = d;
999
+ else ret = [ "seq", d, ret ];
1000
+ }
1001
+ if (ret == null && w.parent()[0] != "for") {
1002
+ if (w.parent()[0] == "for-in")
1003
+ return [ "name", defs[0][0] ];
1004
+ return MAP.skip;
1005
+ }
1006
+ return [ "stat", ret ];
1007
+ };
1008
+ function _toplevel(body) {
1009
+ return [ this[0], do_body(body, this.scope) ];
1010
+ };
1011
+ return w.with_walkers({
1012
+ "function": function(name, args, body){
1013
+ for (var i = args.length; --i >= 0 && !body.scope.references(args[i]);)
1014
+ args.pop();
1015
+ if (!body.scope.references(name)) name = null;
1016
+ return [ this[0], name, args, do_body(body, body.scope) ];
1017
+ },
1018
+ "defun": function(name, args, body){
1019
+ if (!scope.references(name)) return MAP.skip;
1020
+ for (var i = args.length; --i >= 0 && !body.scope.references(args[i]);)
1021
+ args.pop();
1022
+ return [ this[0], name, args, do_body(body, body.scope) ];
1023
+ },
1024
+ "var": _vardefs,
1025
+ "toplevel": _toplevel
1026
+ }, function(){
1027
+ return walk(ast_add_scope(ast));
1028
+ });
1029
+ };
1030
+
1031
+ function ast_squeeze(ast, options) {
1032
+ ast = squeeze_1(ast, options);
1033
+ ast = squeeze_2(ast, options);
1034
+ return ast;
1035
+ };
1036
+
1037
+ function squeeze_1(ast, options) {
1038
+ options = defaults(options, {
1039
+ make_seqs : true,
1040
+ dead_code : true,
1041
+ no_warnings : false,
1042
+ keep_comps : true,
1043
+ unsafe : false
1044
+ });
1045
+
1046
+ var w = ast_walker(), walk = w.walk, scope;
1047
+
1048
+ function negate(c) {
1049
+ var not_c = [ "unary-prefix", "!", c ];
1050
+ switch (c[0]) {
1051
+ case "unary-prefix":
1052
+ return c[1] == "!" && boolean_expr(c[2]) ? c[2] : not_c;
1053
+ case "seq":
1054
+ c = slice(c);
1055
+ c[c.length - 1] = negate(c[c.length - 1]);
1056
+ return c;
1057
+ case "conditional":
1058
+ return best_of(not_c, [ "conditional", c[1], negate(c[2]), negate(c[3]) ]);
1059
+ case "binary":
1060
+ var op = c[1], left = c[2], right = c[3];
1061
+ if (!options.keep_comps) switch (op) {
1062
+ case "<=" : return [ "binary", ">", left, right ];
1063
+ case "<" : return [ "binary", ">=", left, right ];
1064
+ case ">=" : return [ "binary", "<", left, right ];
1065
+ case ">" : return [ "binary", "<=", left, right ];
1066
+ }
1067
+ switch (op) {
1068
+ case "==" : return [ "binary", "!=", left, right ];
1069
+ case "!=" : return [ "binary", "==", left, right ];
1070
+ case "===" : return [ "binary", "!==", left, right ];
1071
+ case "!==" : return [ "binary", "===", left, right ];
1072
+ case "&&" : return best_of(not_c, [ "binary", "||", negate(left), negate(right) ]);
1073
+ case "||" : return best_of(not_c, [ "binary", "&&", negate(left), negate(right) ]);
1074
+ }
1075
+ break;
1076
+ }
1077
+ return not_c;
1078
+ };
1079
+
1080
+ function make_conditional(c, t, e) {
1081
+ var make_real_conditional = function() {
1082
+ if (c[0] == "unary-prefix" && c[1] == "!") {
1083
+ return e ? [ "conditional", c[2], e, t ] : [ "binary", "||", c[2], t ];
1084
+ } else {
1085
+ return e ? best_of(
1086
+ [ "conditional", c, t, e ],
1087
+ [ "conditional", negate(c), e, t ]
1088
+ ) : [ "binary", "&&", c, t ];
1089
+ }
1090
+ };
1091
+ // shortcut the conditional if the expression has a constant value
1092
+ return when_constant(c, function(ast, val){
1093
+ warn_unreachable(val ? e : t);
1094
+ return (val ? t : e);
1095
+ }, make_real_conditional);
1096
+ };
1097
+
1098
+ function rmblock(block) {
1099
+ if (block != null && block[0] == "block" && block[1]) {
1100
+ if (block[1].length == 1)
1101
+ block = block[1][0];
1102
+ else if (block[1].length == 0)
1103
+ block = [ "block" ];
1104
+ }
1105
+ return block;
1106
+ };
1107
+
1108
+ function _lambda(name, args, body) {
1109
+ return [ this[0], name, args, tighten(body, "lambda") ];
1110
+ };
1111
+
1112
+ // this function does a few things:
1113
+ // 1. discard useless blocks
1114
+ // 2. join consecutive var declarations
1115
+ // 3. remove obviously dead code
1116
+ // 4. transform consecutive statements using the comma operator
1117
+ // 5. if block_type == "lambda" and it detects constructs like if(foo) return ... - rewrite like if (!foo) { ... }
1118
+ function tighten(statements, block_type) {
1119
+ statements = MAP(statements, walk);
1120
+
1121
+ statements = statements.reduce(function(a, stat){
1122
+ if (stat[0] == "block") {
1123
+ if (stat[1]) {
1124
+ a.push.apply(a, stat[1]);
1125
+ }
1126
+ } else {
1127
+ a.push(stat);
1128
+ }
1129
+ return a;
1130
+ }, []);
1131
+
1132
+ statements = (function(a, prev){
1133
+ statements.forEach(function(cur){
1134
+ if (prev && ((cur[0] == "var" && prev[0] == "var") ||
1135
+ (cur[0] == "const" && prev[0] == "const"))) {
1136
+ prev[1] = prev[1].concat(cur[1]);
1137
+ } else {
1138
+ a.push(cur);
1139
+ prev = cur;
1140
+ }
1141
+ });
1142
+ return a;
1143
+ })([]);
1144
+
1145
+ if (options.dead_code) statements = (function(a, has_quit){
1146
+ statements.forEach(function(st){
1147
+ if (has_quit) {
1148
+ if (st[0] == "function" || st[0] == "defun") {
1149
+ a.push(st);
1150
+ }
1151
+ else if (st[0] == "var" || st[0] == "const") {
1152
+ if (!options.no_warnings)
1153
+ warn("Variables declared in unreachable code");
1154
+ st[1] = MAP(st[1], function(def){
1155
+ if (def[1] && !options.no_warnings)
1156
+ warn_unreachable([ "assign", true, [ "name", def[0] ], def[1] ]);
1157
+ return [ def[0] ];
1158
+ });
1159
+ a.push(st);
1160
+ }
1161
+ else if (!options.no_warnings)
1162
+ warn_unreachable(st);
1163
+ }
1164
+ else {
1165
+ a.push(st);
1166
+ if (member(st[0], [ "return", "throw", "break", "continue" ]))
1167
+ has_quit = true;
1168
+ }
1169
+ });
1170
+ return a;
1171
+ })([]);
1172
+
1173
+ if (options.make_seqs) statements = (function(a, prev) {
1174
+ statements.forEach(function(cur){
1175
+ if (prev && prev[0] == "stat" && cur[0] == "stat") {
1176
+ prev[1] = [ "seq", prev[1], cur[1] ];
1177
+ } else {
1178
+ a.push(cur);
1179
+ prev = cur;
1180
+ }
1181
+ });
1182
+ if (a.length >= 2
1183
+ && a[a.length-2][0] == "stat"
1184
+ && (a[a.length-1][0] == "return" || a[a.length-1][0] == "throw")
1185
+ && a[a.length-1][1])
1186
+ {
1187
+ a.splice(a.length - 2, 2,
1188
+ [ a[a.length-1][0],
1189
+ [ "seq", a[a.length-2][1], a[a.length-1][1] ]]);
1190
+ }
1191
+ return a;
1192
+ })([]);
1193
+
1194
+ // this increases jQuery by 1K. Probably not such a good idea after all..
1195
+ // part of this is done in prepare_ifs anyway.
1196
+ // if (block_type == "lambda") statements = (function(i, a, stat){
1197
+ // while (i < statements.length) {
1198
+ // stat = statements[i++];
1199
+ // if (stat[0] == "if" && !stat[3]) {
1200
+ // if (stat[2][0] == "return" && stat[2][1] == null) {
1201
+ // a.push(make_if(negate(stat[1]), [ "block", statements.slice(i) ]));
1202
+ // break;
1203
+ // }
1204
+ // var last = last_stat(stat[2]);
1205
+ // if (last[0] == "return" && last[1] == null) {
1206
+ // a.push(make_if(stat[1], [ "block", stat[2][1].slice(0, -1) ], [ "block", statements.slice(i) ]));
1207
+ // break;
1208
+ // }
1209
+ // }
1210
+ // a.push(stat);
1211
+ // }
1212
+ // return a;
1213
+ // })(0, []);
1214
+
1215
+ return statements;
1216
+ };
1217
+
1218
+ function make_if(c, t, e) {
1219
+ return when_constant(c, function(ast, val){
1220
+ if (val) {
1221
+ t = walk(t);
1222
+ warn_unreachable(e);
1223
+ return t || [ "block" ];
1224
+ } else {
1225
+ e = walk(e);
1226
+ warn_unreachable(t);
1227
+ return e || [ "block" ];
1228
+ }
1229
+ }, function() {
1230
+ return make_real_if(c, t, e);
1231
+ });
1232
+ };
1233
+
1234
+ function abort_else(c, t, e) {
1235
+ var ret = [ [ "if", negate(c), e ] ];
1236
+ if (t[0] == "block") {
1237
+ if (t[1]) ret = ret.concat(t[1]);
1238
+ } else {
1239
+ ret.push(t);
1240
+ }
1241
+ return walk([ "block", ret ]);
1242
+ };
1243
+
1244
+ function make_real_if(c, t, e) {
1245
+ c = walk(c);
1246
+ t = walk(t);
1247
+ e = walk(e);
1248
+
1249
+ if (empty(e) && empty(t))
1250
+ return [ "stat", c ];
1251
+
1252
+ if (empty(t)) {
1253
+ c = negate(c);
1254
+ t = e;
1255
+ e = null;
1256
+ } else if (empty(e)) {
1257
+ e = null;
1258
+ } else {
1259
+ // if we have both else and then, maybe it makes sense to switch them?
1260
+ (function(){
1261
+ var a = gen_code(c);
1262
+ var n = negate(c);
1263
+ var b = gen_code(n);
1264
+ if (b.length < a.length) {
1265
+ var tmp = t;
1266
+ t = e;
1267
+ e = tmp;
1268
+ c = n;
1269
+ }
1270
+ })();
1271
+ }
1272
+ var ret = [ "if", c, t, e ];
1273
+ if (t[0] == "if" && empty(t[3]) && empty(e)) {
1274
+ ret = best_of(ret, walk([ "if", [ "binary", "&&", c, t[1] ], t[2] ]));
1275
+ }
1276
+ else if (t[0] == "stat") {
1277
+ if (e) {
1278
+ if (e[0] == "stat")
1279
+ ret = best_of(ret, [ "stat", make_conditional(c, t[1], e[1]) ]);
1280
+ else if (aborts(e))
1281
+ ret = abort_else(c, t, e);
1282
+ }
1283
+ else {
1284
+ ret = best_of(ret, [ "stat", make_conditional(c, t[1]) ]);
1285
+ }
1286
+ }
1287
+ else if (e && t[0] == e[0] && (t[0] == "return" || t[0] == "throw") && t[1] && e[1]) {
1288
+ ret = best_of(ret, [ t[0], make_conditional(c, t[1], e[1] ) ]);
1289
+ }
1290
+ else if (e && aborts(t)) {
1291
+ ret = [ [ "if", c, t ] ];
1292
+ if (e[0] == "block") {
1293
+ if (e[1]) ret = ret.concat(e[1]);
1294
+ }
1295
+ else {
1296
+ ret.push(e);
1297
+ }
1298
+ ret = walk([ "block", ret ]);
1299
+ }
1300
+ else if (t && aborts(e)) {
1301
+ ret = abort_else(c, t, e);
1302
+ }
1303
+ return ret;
1304
+ };
1305
+
1306
+ function _do_while(cond, body) {
1307
+ return when_constant(cond, function(cond, val){
1308
+ if (!val) {
1309
+ warn_unreachable(body);
1310
+ return [ "block" ];
1311
+ } else {
1312
+ return [ "for", null, null, null, walk(body) ];
1313
+ }
1314
+ });
1315
+ };
1316
+
1317
+ return w.with_walkers({
1318
+ "sub": function(expr, subscript) {
1319
+ if (subscript[0] == "string") {
1320
+ var name = subscript[1];
1321
+ if (is_identifier(name))
1322
+ return [ "dot", walk(expr), name ];
1323
+ else if (/^[1-9][0-9]*$/.test(name) || name === "0")
1324
+ return [ "sub", walk(expr), [ "num", parseInt(name, 10) ] ];
1325
+ }
1326
+ },
1327
+ "if": make_if,
1328
+ "toplevel": function(body) {
1329
+ return [ "toplevel", tighten(body) ];
1330
+ },
1331
+ "switch": function(expr, body) {
1332
+ var last = body.length - 1;
1333
+ return [ "switch", walk(expr), MAP(body, function(branch, i){
1334
+ var block = tighten(branch[1]);
1335
+ if (i == last && block.length > 0) {
1336
+ var node = block[block.length - 1];
1337
+ if (node[0] == "break" && !node[1])
1338
+ block.pop();
1339
+ }
1340
+ return [ branch[0] ? walk(branch[0]) : null, block ];
1341
+ }) ];
1342
+ },
1343
+ "function": _lambda,
1344
+ "defun": _lambda,
1345
+ "block": function(body) {
1346
+ if (body) return rmblock([ "block", tighten(body) ]);
1347
+ },
1348
+ "binary": function(op, left, right) {
1349
+ return when_constant([ "binary", op, walk(left), walk(right) ], function yes(c){
1350
+ return best_of(walk(c), this);
1351
+ }, function no() {
1352
+ return function(){
1353
+ if(op != "==" && op != "!=") return;
1354
+ var l = walk(left), r = walk(right);
1355
+ if(l && l[0] == "unary-prefix" && l[1] == "!" && l[2][0] == "num")
1356
+ left = ['num', +!l[2][1]];
1357
+ else if (r && r[0] == "unary-prefix" && r[1] == "!" && r[2][0] == "num")
1358
+ right = ['num', +!r[2][1]];
1359
+ return ["binary", op, left, right];
1360
+ }() || this;
1361
+ });
1362
+ },
1363
+ "conditional": function(c, t, e) {
1364
+ return make_conditional(walk(c), walk(t), walk(e));
1365
+ },
1366
+ "try": function(t, c, f) {
1367
+ return [
1368
+ "try",
1369
+ tighten(t),
1370
+ c != null ? [ c[0], tighten(c[1]) ] : null,
1371
+ f != null ? tighten(f) : null
1372
+ ];
1373
+ },
1374
+ "unary-prefix": function(op, expr) {
1375
+ expr = walk(expr);
1376
+ var ret = [ "unary-prefix", op, expr ];
1377
+ if (op == "!")
1378
+ ret = best_of(ret, negate(expr));
1379
+ return when_constant(ret, function(ast, val){
1380
+ return walk(ast); // it's either true or false, so minifies to !0 or !1
1381
+ }, function() { return ret });
1382
+ },
1383
+ "name": function(name) {
1384
+ switch (name) {
1385
+ case "true": return [ "unary-prefix", "!", [ "num", 0 ]];
1386
+ case "false": return [ "unary-prefix", "!", [ "num", 1 ]];
1387
+ }
1388
+ },
1389
+ "while": _do_while,
1390
+ "assign": function(op, lvalue, rvalue) {
1391
+ lvalue = walk(lvalue);
1392
+ rvalue = walk(rvalue);
1393
+ var okOps = [ '+', '-', '/', '*', '%', '>>', '<<', '>>>', '|', '^', '&' ];
1394
+ if (op === true && lvalue[0] === "name" && rvalue[0] === "binary" &&
1395
+ ~okOps.indexOf(rvalue[1]) && rvalue[2][0] === "name" &&
1396
+ rvalue[2][1] === lvalue[1]) {
1397
+ return [ this[0], rvalue[1], lvalue, rvalue[3] ]
1398
+ }
1399
+ return [ this[0], op, lvalue, rvalue ];
1400
+ },
1401
+ "call": function(expr, args) {
1402
+ expr = walk(expr);
1403
+ if (options.unsafe && expr[0] == "dot" && expr[1][0] == "string" && expr[2] == "toString") {
1404
+ return expr[1];
1405
+ }
1406
+ return [ this[0], expr, MAP(args, walk) ];
1407
+ },
1408
+ "num": function (num) {
1409
+ if (!isFinite(num))
1410
+ return [ "binary", "/", num === 1 / 0
1411
+ ? [ "num", 1 ] : num === -1 / 0
1412
+ ? [ "unary-prefix", "-", [ "num", 1 ] ]
1413
+ : [ "num", 0 ], [ "num", 0 ] ];
1414
+
1415
+ return [ this[0], num ];
1416
+ }
1417
+ }, function() {
1418
+ return walk(prepare_ifs(walk(prepare_ifs(ast))));
1419
+ });
1420
+ };
1421
+
1422
+ function squeeze_2(ast, options) {
1423
+ var w = ast_walker(), walk = w.walk, scope;
1424
+ function with_scope(s, cont) {
1425
+ var save = scope, ret;
1426
+ scope = s;
1427
+ ret = cont();
1428
+ scope = save;
1429
+ return ret;
1430
+ };
1431
+ function lambda(name, args, body) {
1432
+ return [ this[0], name, args, with_scope(body.scope, curry(MAP, body, walk)) ];
1433
+ };
1434
+ return w.with_walkers({
1435
+ "directive": function(dir) {
1436
+ if (scope.active_directive(dir))
1437
+ return [ "block" ];
1438
+ scope.directives.push(dir);
1439
+ },
1440
+ "toplevel": function(body) {
1441
+ return [ this[0], with_scope(this.scope, curry(MAP, body, walk)) ];
1442
+ },
1443
+ "function": lambda,
1444
+ "defun": lambda
1445
+ }, function(){
1446
+ return walk(ast_add_scope(ast));
1447
+ });
1448
+ };
1449
+
1450
+ /* -----[ re-generate code from the AST ]----- */
1451
+
1452
+ var DOT_CALL_NO_PARENS = jsp.array_to_hash([
1453
+ "name",
1454
+ "array",
1455
+ "object",
1456
+ "string",
1457
+ "dot",
1458
+ "sub",
1459
+ "call",
1460
+ "regexp",
1461
+ "defun"
1462
+ ]);
1463
+
1464
+ function make_string(str, ascii_only) {
1465
+ var dq = 0, sq = 0;
1466
+ str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g, function(s){
1467
+ switch (s) {
1468
+ case "\\": return "\\\\";
1469
+ case "\b": return "\\b";
1470
+ case "\f": return "\\f";
1471
+ case "\n": return "\\n";
1472
+ case "\r": return "\\r";
1473
+ case "\u2028": return "\\u2028";
1474
+ case "\u2029": return "\\u2029";
1475
+ case '"': ++dq; return '"';
1476
+ case "'": ++sq; return "'";
1477
+ case "\0": return "\\0";
1478
+ }
1479
+ return s;
1480
+ });
1481
+ if (ascii_only) str = to_ascii(str);
1482
+ if (dq > sq) return "'" + str.replace(/\x27/g, "\\'") + "'";
1483
+ else return '"' + str.replace(/\x22/g, '\\"') + '"';
1484
+ };
1485
+
1486
+ function to_ascii(str) {
1487
+ return str.replace(/[\u0080-\uffff]/g, function(ch) {
1488
+ var code = ch.charCodeAt(0).toString(16);
1489
+ while (code.length < 4) code = "0" + code;
1490
+ return "\\u" + code;
1491
+ });
1492
+ };
1493
+
1494
+ var SPLICE_NEEDS_BRACKETS = jsp.array_to_hash([ "if", "while", "do", "for", "for-in", "with" ]);
1495
+
1496
+ function gen_code(ast, options) {
1497
+ options = defaults(options, {
1498
+ indent_start : 0,
1499
+ indent_level : 4,
1500
+ quote_keys : false,
1501
+ space_colon : false,
1502
+ beautify : false,
1503
+ ascii_only : false,
1504
+ inline_script: false
1505
+ });
1506
+ var beautify = !!options.beautify;
1507
+ var indentation = 0,
1508
+ newline = beautify ? "\n" : "",
1509
+ space = beautify ? " " : "";
1510
+
1511
+ function encode_string(str) {
1512
+ var ret = make_string(str, options.ascii_only);
1513
+ if (options.inline_script)
1514
+ ret = ret.replace(/<\x2fscript([>\/\t\n\f\r ])/gi, "<\\/script$1");
1515
+ return ret;
1516
+ };
1517
+
1518
+ function make_name(name) {
1519
+ name = name.toString();
1520
+ if (options.ascii_only)
1521
+ name = to_ascii(name);
1522
+ return name;
1523
+ };
1524
+
1525
+ function indent(line) {
1526
+ if (line == null)
1527
+ line = "";
1528
+ if (beautify)
1529
+ line = repeat_string(" ", options.indent_start + indentation * options.indent_level) + line;
1530
+ return line;
1531
+ };
1532
+
1533
+ function with_indent(cont, incr) {
1534
+ if (incr == null) incr = 1;
1535
+ indentation += incr;
1536
+ try { return cont.apply(null, slice(arguments, 1)); }
1537
+ finally { indentation -= incr; }
1538
+ };
1539
+
1540
+ function last_char(str) {
1541
+ str = str.toString();
1542
+ return str.charAt(str.length - 1);
1543
+ };
1544
+
1545
+ function first_char(str) {
1546
+ return str.toString().charAt(0);
1547
+ };
1548
+
1549
+ function add_spaces(a) {
1550
+ if (beautify)
1551
+ return a.join(" ");
1552
+ var b = [];
1553
+ for (var i = 0; i < a.length; ++i) {
1554
+ var next = a[i + 1];
1555
+ b.push(a[i]);
1556
+ if (next &&
1557
+ ((is_identifier_char(last_char(a[i])) && (is_identifier_char(first_char(next))
1558
+ || first_char(next) == "\\")) ||
1559
+ (/[\+\-]$/.test(a[i].toString()) && /^[\+\-]/.test(next.toString()) ||
1560
+ last_char(a[i]) == "/" && first_char(next) == "/"))) {
1561
+ b.push(" ");
1562
+ }
1563
+ }
1564
+ return b.join("");
1565
+ };
1566
+
1567
+ function add_commas(a) {
1568
+ return a.join("," + space);
1569
+ };
1570
+
1571
+ function parenthesize(expr) {
1572
+ var gen = make(expr);
1573
+ for (var i = 1; i < arguments.length; ++i) {
1574
+ var el = arguments[i];
1575
+ if ((el instanceof Function && el(expr)) || expr[0] == el)
1576
+ return "(" + gen + ")";
1577
+ }
1578
+ return gen;
1579
+ };
1580
+
1581
+ function best_of(a) {
1582
+ if (a.length == 1) {
1583
+ return a[0];
1584
+ }
1585
+ if (a.length == 2) {
1586
+ var b = a[1];
1587
+ a = a[0];
1588
+ return a.length <= b.length ? a : b;
1589
+ }
1590
+ return best_of([ a[0], best_of(a.slice(1)) ]);
1591
+ };
1592
+
1593
+ function needs_parens(expr) {
1594
+ if (expr[0] == "function" || expr[0] == "object") {
1595
+ // dot/call on a literal function requires the
1596
+ // function literal itself to be parenthesized
1597
+ // only if it's the first "thing" in a
1598
+ // statement. This means that the parent is
1599
+ // "stat", but it could also be a "seq" and
1600
+ // we're the first in this "seq" and the
1601
+ // parent is "stat", and so on. Messy stuff,
1602
+ // but it worths the trouble.
1603
+ var a = slice(w.stack()), self = a.pop(), p = a.pop();
1604
+ while (p) {
1605
+ if (p[0] == "stat") return true;
1606
+ if (((p[0] == "seq" || p[0] == "call" || p[0] == "dot" || p[0] == "sub" || p[0] == "conditional") && p[1] === self) ||
1607
+ ((p[0] == "binary" || p[0] == "assign" || p[0] == "unary-postfix") && p[2] === self)) {
1608
+ self = p;
1609
+ p = a.pop();
1610
+ } else {
1611
+ return false;
1612
+ }
1613
+ }
1614
+ }
1615
+ return !HOP(DOT_CALL_NO_PARENS, expr[0]);
1616
+ };
1617
+
1618
+ function make_num(num) {
1619
+ var str = num.toString(10), a = [ str.replace(/^0\./, ".").replace('e+', 'e') ], m;
1620
+ if (Math.floor(num) === num) {
1621
+ if (num >= 0) {
1622
+ a.push("0x" + num.toString(16).toLowerCase(), // probably pointless
1623
+ "0" + num.toString(8)); // same.
1624
+ } else {
1625
+ a.push("-0x" + (-num).toString(16).toLowerCase(), // probably pointless
1626
+ "-0" + (-num).toString(8)); // same.
1627
+ }
1628
+ if ((m = /^(.*?)(0+)$/.exec(num))) {
1629
+ a.push(m[1] + "e" + m[2].length);
1630
+ }
1631
+ } else if ((m = /^0?\.(0+)(.*)$/.exec(num))) {
1632
+ a.push(m[2] + "e-" + (m[1].length + m[2].length),
1633
+ str.substr(str.indexOf(".")));
1634
+ }
1635
+ return best_of(a);
1636
+ };
1637
+
1638
+ var w = ast_walker();
1639
+ var make = w.walk;
1640
+ return w.with_walkers({
1641
+ "string": encode_string,
1642
+ "num": make_num,
1643
+ "name": make_name,
1644
+ "debugger": function(){ return "debugger;" },
1645
+ "toplevel": function(statements) {
1646
+ return make_block_statements(statements)
1647
+ .join(newline + newline);
1648
+ },
1649
+ "splice": function(statements) {
1650
+ var parent = w.parent();
1651
+ if (HOP(SPLICE_NEEDS_BRACKETS, parent)) {
1652
+ // we need block brackets in this case
1653
+ return make_block.apply(this, arguments);
1654
+ } else {
1655
+ return MAP(make_block_statements(statements, true),
1656
+ function(line, i) {
1657
+ // the first line is already indented
1658
+ return i > 0 ? indent(line) : line;
1659
+ }).join(newline);
1660
+ }
1661
+ },
1662
+ "block": make_block,
1663
+ "var": function(defs) {
1664
+ return "var " + add_commas(MAP(defs, make_1vardef)) + ";";
1665
+ },
1666
+ "const": function(defs) {
1667
+ return "const " + add_commas(MAP(defs, make_1vardef)) + ";";
1668
+ },
1669
+ "try": function(tr, ca, fi) {
1670
+ var out = [ "try", make_block(tr) ];
1671
+ if (ca) out.push("catch", "(" + ca[0] + ")", make_block(ca[1]));
1672
+ if (fi) out.push("finally", make_block(fi));
1673
+ return add_spaces(out);
1674
+ },
1675
+ "throw": function(expr) {
1676
+ return add_spaces([ "throw", make(expr) ]) + ";";
1677
+ },
1678
+ "new": function(ctor, args) {
1679
+ args = args.length > 0 ? "(" + add_commas(MAP(args, function(expr){
1680
+ return parenthesize(expr, "seq");
1681
+ })) + ")" : "";
1682
+ return add_spaces([ "new", parenthesize(ctor, "seq", "binary", "conditional", "assign", function(expr){
1683
+ var w = ast_walker(), has_call = {};
1684
+ try {
1685
+ w.with_walkers({
1686
+ "call": function() { throw has_call },
1687
+ "function": function() { return this }
1688
+ }, function(){
1689
+ w.walk(expr);
1690
+ });
1691
+ } catch(ex) {
1692
+ if (ex === has_call)
1693
+ return true;
1694
+ throw ex;
1695
+ }
1696
+ }) + args ]);
1697
+ },
1698
+ "switch": function(expr, body) {
1699
+ return add_spaces([ "switch", "(" + make(expr) + ")", make_switch_block(body) ]);
1700
+ },
1701
+ "break": function(label) {
1702
+ var out = "break";
1703
+ if (label != null)
1704
+ out += " " + make_name(label);
1705
+ return out + ";";
1706
+ },
1707
+ "continue": function(label) {
1708
+ var out = "continue";
1709
+ if (label != null)
1710
+ out += " " + make_name(label);
1711
+ return out + ";";
1712
+ },
1713
+ "conditional": function(co, th, el) {
1714
+ return add_spaces([ parenthesize(co, "assign", "seq", "conditional"), "?",
1715
+ parenthesize(th, "seq"), ":",
1716
+ parenthesize(el, "seq") ]);
1717
+ },
1718
+ "assign": function(op, lvalue, rvalue) {
1719
+ if (op && op !== true) op += "=";
1720
+ else op = "=";
1721
+ return add_spaces([ make(lvalue), op, parenthesize(rvalue, "seq") ]);
1722
+ },
1723
+ "dot": function(expr) {
1724
+ var out = make(expr), i = 1;
1725
+ if (expr[0] == "num") {
1726
+ if (!/[a-f.]/i.test(out))
1727
+ out += ".";
1728
+ } else if (expr[0] != "function" && needs_parens(expr))
1729
+ out = "(" + out + ")";
1730
+ while (i < arguments.length)
1731
+ out += "." + make_name(arguments[i++]);
1732
+ return out;
1733
+ },
1734
+ "call": function(func, args) {
1735
+ var f = make(func);
1736
+ if (f.charAt(0) != "(" && needs_parens(func))
1737
+ f = "(" + f + ")";
1738
+ return f + "(" + add_commas(MAP(args, function(expr){
1739
+ return parenthesize(expr, "seq");
1740
+ })) + ")";
1741
+ },
1742
+ "function": make_function,
1743
+ "defun": make_function,
1744
+ "if": function(co, th, el) {
1745
+ var out = [ "if", "(" + make(co) + ")", el ? make_then(th) : make(th) ];
1746
+ if (el) {
1747
+ out.push("else", make(el));
1748
+ }
1749
+ return add_spaces(out);
1750
+ },
1751
+ "for": function(init, cond, step, block) {
1752
+ var out = [ "for" ];
1753
+ init = (init != null ? make(init) : "").replace(/;*\s*$/, ";" + space);
1754
+ cond = (cond != null ? make(cond) : "").replace(/;*\s*$/, ";" + space);
1755
+ step = (step != null ? make(step) : "").replace(/;*\s*$/, "");
1756
+ var args = init + cond + step;
1757
+ if (args == "; ; ") args = ";;";
1758
+ out.push("(" + args + ")", make(block));
1759
+ return add_spaces(out);
1760
+ },
1761
+ "for-in": function(vvar, key, hash, block) {
1762
+ return add_spaces([ "for", "(" +
1763
+ (vvar ? make(vvar).replace(/;+$/, "") : make(key)),
1764
+ "in",
1765
+ make(hash) + ")", make(block) ]);
1766
+ },
1767
+ "while": function(condition, block) {
1768
+ return add_spaces([ "while", "(" + make(condition) + ")", make(block) ]);
1769
+ },
1770
+ "do": function(condition, block) {
1771
+ return add_spaces([ "do", make(block), "while", "(" + make(condition) + ")" ]) + ";";
1772
+ },
1773
+ "return": function(expr) {
1774
+ var out = [ "return" ];
1775
+ if (expr != null) out.push(make(expr));
1776
+ return add_spaces(out) + ";";
1777
+ },
1778
+ "binary": function(operator, lvalue, rvalue) {
1779
+ var left = make(lvalue), right = make(rvalue);
1780
+ // XXX: I'm pretty sure other cases will bite here.
1781
+ // we need to be smarter.
1782
+ // adding parens all the time is the safest bet.
1783
+ if (member(lvalue[0], [ "assign", "conditional", "seq" ]) ||
1784
+ lvalue[0] == "binary" && PRECEDENCE[operator] > PRECEDENCE[lvalue[1]] ||
1785
+ lvalue[0] == "function" && needs_parens(this)) {
1786
+ left = "(" + left + ")";
1787
+ }
1788
+ if (member(rvalue[0], [ "assign", "conditional", "seq" ]) ||
1789
+ rvalue[0] == "binary" && PRECEDENCE[operator] >= PRECEDENCE[rvalue[1]] &&
1790
+ !(rvalue[1] == operator && member(operator, [ "&&", "||", "*" ]))) {
1791
+ right = "(" + right + ")";
1792
+ }
1793
+ else if (!beautify && options.inline_script && (operator == "<" || operator == "<<")
1794
+ && rvalue[0] == "regexp" && /^script/i.test(rvalue[1])) {
1795
+ right = " " + right;
1796
+ }
1797
+ return add_spaces([ left, operator, right ]);
1798
+ },
1799
+ "unary-prefix": function(operator, expr) {
1800
+ var val = make(expr);
1801
+ if (!(expr[0] == "num" || (expr[0] == "unary-prefix" && !HOP(OPERATORS, operator + expr[1])) || !needs_parens(expr)))
1802
+ val = "(" + val + ")";
1803
+ return operator + (jsp.is_alphanumeric_char(operator.charAt(0)) ? " " : "") + val;
1804
+ },
1805
+ "unary-postfix": function(operator, expr) {
1806
+ var val = make(expr);
1807
+ if (!(expr[0] == "num" || (expr[0] == "unary-postfix" && !HOP(OPERATORS, operator + expr[1])) || !needs_parens(expr)))
1808
+ val = "(" + val + ")";
1809
+ return val + operator;
1810
+ },
1811
+ "sub": function(expr, subscript) {
1812
+ var hash = make(expr);
1813
+ if (needs_parens(expr))
1814
+ hash = "(" + hash + ")";
1815
+ return hash + "[" + make(subscript) + "]";
1816
+ },
1817
+ "object": function(props) {
1818
+ var obj_needs_parens = needs_parens(this);
1819
+ if (props.length == 0)
1820
+ return obj_needs_parens ? "({})" : "{}";
1821
+ var out = "{" + newline + with_indent(function(){
1822
+ return MAP(props, function(p){
1823
+ if (p.length == 3) {
1824
+ // getter/setter. The name is in p[0], the arg.list in p[1][2], the
1825
+ // body in p[1][3] and type ("get" / "set") in p[2].
1826
+ return indent(make_function(p[0], p[1][2], p[1][3], p[2], true));
1827
+ }
1828
+ var key = p[0], val = parenthesize(p[1], "seq");
1829
+ if (options.quote_keys) {
1830
+ key = encode_string(key);
1831
+ } else if ((typeof key == "number" || !beautify && +key + "" == key)
1832
+ && parseFloat(key) >= 0) {
1833
+ key = make_num(+key);
1834
+ } else if (!is_identifier(key)) {
1835
+ key = encode_string(key);
1836
+ }
1837
+ return indent(add_spaces(beautify && options.space_colon
1838
+ ? [ key, ":", val ]
1839
+ : [ key + ":", val ]));
1840
+ }).join("," + newline);
1841
+ }) + newline + indent("}");
1842
+ return obj_needs_parens ? "(" + out + ")" : out;
1843
+ },
1844
+ "regexp": function(rx, mods) {
1845
+ if (options.ascii_only) rx = to_ascii(rx);
1846
+ return "/" + rx + "/" + mods;
1847
+ },
1848
+ "array": function(elements) {
1849
+ if (elements.length == 0) return "[]";
1850
+ return add_spaces([ "[", add_commas(MAP(elements, function(el, i){
1851
+ if (!beautify && el[0] == "atom" && el[1] == "undefined") return i === elements.length - 1 ? "," : "";
1852
+ return parenthesize(el, "seq");
1853
+ })), "]" ]);
1854
+ },
1855
+ "stat": function(stmt) {
1856
+ return stmt != null
1857
+ ? make(stmt).replace(/;*\s*$/, ";")
1858
+ : ";";
1859
+ },
1860
+ "seq": function() {
1861
+ return add_commas(MAP(slice(arguments), make));
1862
+ },
1863
+ "label": function(name, block) {
1864
+ return add_spaces([ make_name(name), ":", make(block) ]);
1865
+ },
1866
+ "with": function(expr, block) {
1867
+ return add_spaces([ "with", "(" + make(expr) + ")", make(block) ]);
1868
+ },
1869
+ "atom": function(name) {
1870
+ return make_name(name);
1871
+ },
1872
+ "directive": function(dir) {
1873
+ return make_string(dir) + ";";
1874
+ }
1875
+ }, function(){ return make(ast) });
1876
+
1877
+ // The squeezer replaces "block"-s that contain only a single
1878
+ // statement with the statement itself; technically, the AST
1879
+ // is correct, but this can create problems when we output an
1880
+ // IF having an ELSE clause where the THEN clause ends in an
1881
+ // IF *without* an ELSE block (then the outer ELSE would refer
1882
+ // to the inner IF). This function checks for this case and
1883
+ // adds the block brackets if needed.
1884
+ function make_then(th) {
1885
+ if (th == null) return ";";
1886
+ if (th[0] == "do") {
1887
+ // https://github.com/mishoo/UglifyJS/issues/#issue/57
1888
+ // IE croaks with "syntax error" on code like this:
1889
+ // if (foo) do ... while(cond); else ...
1890
+ // we need block brackets around do/while
1891
+ return make_block([ th ]);
1892
+ }
1893
+ var b = th;
1894
+ while (true) {
1895
+ var type = b[0];
1896
+ if (type == "if") {
1897
+ if (!b[3])
1898
+ // no else, we must add the block
1899
+ return make([ "block", [ th ]]);
1900
+ b = b[3];
1901
+ }
1902
+ else if (type == "while" || type == "do") b = b[2];
1903
+ else if (type == "for" || type == "for-in") b = b[4];
1904
+ else break;
1905
+ }
1906
+ return make(th);
1907
+ };
1908
+
1909
+ function make_function(name, args, body, keyword, no_parens) {
1910
+ var out = keyword || "function";
1911
+ if (name) {
1912
+ out += " " + make_name(name);
1913
+ }
1914
+ out += "(" + add_commas(MAP(args, make_name)) + ")";
1915
+ out = add_spaces([ out, make_block(body) ]);
1916
+ return (!no_parens && needs_parens(this)) ? "(" + out + ")" : out;
1917
+ };
1918
+
1919
+ function must_has_semicolon(node) {
1920
+ switch (node[0]) {
1921
+ case "with":
1922
+ case "while":
1923
+ return empty(node[2]) || must_has_semicolon(node[2]);
1924
+ case "for":
1925
+ case "for-in":
1926
+ return empty(node[4]) || must_has_semicolon(node[4]);
1927
+ case "if":
1928
+ if (empty(node[2]) && !node[3]) return true; // `if' with empty `then' and no `else'
1929
+ if (node[3]) {
1930
+ if (empty(node[3])) return true; // `else' present but empty
1931
+ return must_has_semicolon(node[3]); // dive into the `else' branch
1932
+ }
1933
+ return must_has_semicolon(node[2]); // dive into the `then' branch
1934
+ case "directive":
1935
+ return true;
1936
+ }
1937
+ };
1938
+
1939
+ function make_block_statements(statements, noindent) {
1940
+ for (var a = [], last = statements.length - 1, i = 0; i <= last; ++i) {
1941
+ var stat = statements[i];
1942
+ var code = make(stat);
1943
+ if (code != ";") {
1944
+ if (!beautify && i == last && !must_has_semicolon(stat)) {
1945
+ code = code.replace(/;+\s*$/, "");
1946
+ }
1947
+ a.push(code);
1948
+ }
1949
+ }
1950
+ return noindent ? a : MAP(a, indent);
1951
+ };
1952
+
1953
+ function make_switch_block(body) {
1954
+ var n = body.length;
1955
+ if (n == 0) return "{}";
1956
+ return "{" + newline + MAP(body, function(branch, i){
1957
+ var has_body = branch[1].length > 0, code = with_indent(function(){
1958
+ return indent(branch[0]
1959
+ ? add_spaces([ "case", make(branch[0]) + ":" ])
1960
+ : "default:");
1961
+ }, 0.5) + (has_body ? newline + with_indent(function(){
1962
+ return make_block_statements(branch[1]).join(newline);
1963
+ }) : "");
1964
+ if (!beautify && has_body && i < n - 1)
1965
+ code += ";";
1966
+ return code;
1967
+ }).join(newline) + newline + indent("}");
1968
+ };
1969
+
1970
+ function make_block(statements) {
1971
+ if (!statements) return ";";
1972
+ if (statements.length == 0) return "{}";
1973
+ return "{" + newline + with_indent(function(){
1974
+ return make_block_statements(statements).join(newline);
1975
+ }) + newline + indent("}");
1976
+ };
1977
+
1978
+ function make_1vardef(def) {
1979
+ var name = def[0], val = def[1];
1980
+ if (val != null)
1981
+ name = add_spaces([ make_name(name), "=", parenthesize(val, "seq") ]);
1982
+ return name;
1983
+ };
1984
+
1985
+ };
1986
+
1987
+ function split_lines(code, max_line_length) {
1988
+ var splits = [ 0 ];
1989
+ jsp.parse(function(){
1990
+ var next_token = jsp.tokenizer(code);
1991
+ var last_split = 0;
1992
+ var prev_token;
1993
+ function current_length(tok) {
1994
+ return tok.pos - last_split;
1995
+ };
1996
+ function split_here(tok) {
1997
+ last_split = tok.pos;
1998
+ splits.push(last_split);
1999
+ };
2000
+ function custom(){
2001
+ var tok = next_token.apply(this, arguments);
2002
+ out: {
2003
+ if (prev_token) {
2004
+ if (prev_token.type == "keyword") break out;
2005
+ }
2006
+ if (current_length(tok) > max_line_length) {
2007
+ switch (tok.type) {
2008
+ case "keyword":
2009
+ case "atom":
2010
+ case "name":
2011
+ case "punc":
2012
+ split_here(tok);
2013
+ break out;
2014
+ }
2015
+ }
2016
+ }
2017
+ prev_token = tok;
2018
+ return tok;
2019
+ };
2020
+ custom.context = function() {
2021
+ return next_token.context.apply(this, arguments);
2022
+ };
2023
+ return custom;
2024
+ }());
2025
+ return splits.map(function(pos, i){
2026
+ return code.substring(pos, splits[i + 1] || code.length);
2027
+ }).join("\n");
2028
+ };
2029
+
2030
+ /* -----[ Utilities ]----- */
2031
+
2032
+ function repeat_string(str, i) {
2033
+ if (i <= 0) return "";
2034
+ if (i == 1) return str;
2035
+ var d = repeat_string(str, i >> 1);
2036
+ d += d;
2037
+ if (i & 1) d += str;
2038
+ return d;
2039
+ };
2040
+
2041
+ function defaults(args, defs) {
2042
+ var ret = {};
2043
+ if (args === true)
2044
+ args = {};
2045
+ for (var i in defs) if (HOP(defs, i)) {
2046
+ ret[i] = (args && HOP(args, i)) ? args[i] : defs[i];
2047
+ }
2048
+ return ret;
2049
+ };
2050
+
2051
+ function is_identifier(name) {
2052
+ return /^[a-z_$][a-z0-9_$]*$/i.test(name)
2053
+ && name != "this"
2054
+ && !HOP(jsp.KEYWORDS_ATOM, name)
2055
+ && !HOP(jsp.RESERVED_WORDS, name)
2056
+ && !HOP(jsp.KEYWORDS, name);
2057
+ };
2058
+
2059
+ function HOP(obj, prop) {
2060
+ return Object.prototype.hasOwnProperty.call(obj, prop);
2061
+ };
2062
+
2063
+ // some utilities
2064
+
2065
+ var MAP;
2066
+
2067
+ (function(){
2068
+ MAP = function(a, f, o) {
2069
+ var ret = [], top = [], i;
2070
+ function doit() {
2071
+ var val = f.call(o, a[i], i);
2072
+ if (val instanceof AtTop) {
2073
+ val = val.v;
2074
+ if (val instanceof Splice) {
2075
+ top.push.apply(top, val.v);
2076
+ } else {
2077
+ top.push(val);
2078
+ }
2079
+ }
2080
+ else if (val != skip) {
2081
+ if (val instanceof Splice) {
2082
+ ret.push.apply(ret, val.v);
2083
+ } else {
2084
+ ret.push(val);
2085
+ }
2086
+ }
2087
+ };
2088
+ if (a instanceof Array) for (i = 0; i < a.length; ++i) doit();
2089
+ else for (i in a) if (HOP(a, i)) doit();
2090
+ return top.concat(ret);
2091
+ };
2092
+ MAP.at_top = function(val) { return new AtTop(val) };
2093
+ MAP.splice = function(val) { return new Splice(val) };
2094
+ var skip = MAP.skip = {};
2095
+ function AtTop(val) { this.v = val };
2096
+ function Splice(val) { this.v = val };
2097
+ })();
2098
+
2099
+ /* -----[ Exports ]----- */
2100
+
2101
+ exports.ast_walker = ast_walker;
2102
+ exports.ast_mangle = ast_mangle;
2103
+ exports.ast_squeeze = ast_squeeze;
2104
+ exports.ast_lift_variables = ast_lift_variables;
2105
+ exports.gen_code = gen_code;
2106
+ exports.ast_add_scope = ast_add_scope;
2107
+ exports.set_logger = function(logger) { warn = logger };
2108
+ exports.make_string = make_string;
2109
+ exports.split_lines = split_lines;
2110
+ exports.MAP = MAP;
2111
+
2112
+ // keep this last!
2113
+ exports.ast_squeeze_more = require("./squeeze-more").ast_squeeze_more;
2114
+
2115
+ // Local variables:
2116
+ // js-indent-level: 4
2117
+ // End: