Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

all the examples

  • Loading branch information...
commit 7a80afa6993afdeb78f45dccb2f2f53d230a4f70 0 parents
James Halliday authored October 15, 2012

Showing 302 changed files with 43,317 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  JSONStream/000_title.js
  2. 1  JSONStream/005.js
  3. 3  JSONStream/010.js
  4. 3  JSONStream/020.js
  5. 3  JSONStream/030.js
  6. 3  JSONStream/040.js
  7. 3  JSONStream/050.js
  8. 7  JSONStream/060.js
  9. 10  JSONStream/070.js
  10. 10  JSONStream/080.js
  11. 2  JSONStream/090.js
  12. 7  JSONStream/100.js
  13. 11  JSONStream/110.js
  14. 8  JSONStream/120_html.js
  15. 5  JSONStream/130.js
  16. 12  JSONStream/140.js
  17. 12  JSONStream/150.js
  18. 14  JSONStream/160.js
  19. 15  JSONStream/170.js
  20. 2  JSONStream/run1.sh
  21. 3  JSONStream/run2.sh
  22. 6  JSONStream/run3.sh
  23. 6  JSONStream/run4.sh
  24. 6  JSONStream/run5.sh
  25. 300  JSONStream/static/bundle.js
  26. 5  JSONStream/static/index.html
  27. 7  ast/000_title.js
  28. 5  ast/010_transform.js
  29. 10  ast/020_transform.js
  30. 14  ast/030_transform.js
  31. 14  ast/040_transform.js
  32. 5  ast/050_server.js
  33. 20  ast/060_transform.js
  34. 7  ast/run1.sh
  35. 7  ast/run2.sh
  36. 4,081  ast/static/bundle.js
  37. 7  ast/static/index.html
  38. 15  ast/transform.js
  39. 5  bundle/000_foo.js
  40. 5  bundle/010_main.js
  41. 5  bundle/020_files/foo.js
  42. 5  bundle/020_files/main.js
  43. 4  bundle/020_server.js
  44. 5  bundle/030_files/foo.js
  45. 5  bundle/030_files/main.js
  46. 5  bundle/030_main.js
  47. 7  bundle/040_files/foo.js
  48. 5  bundle/040_files/main.js
  49. 7  bundle/040_foo.js
  50. 5  bundle/run1.sh
  51. 3  bundle/run2.sh
  52. 5  bundle/run3.sh
  53. 406  bundle/static/bundle.js
  54. 7  bundle/static/index.html
  55. 5  dnode_shoe/000_title.js
  56. 5  dnode_shoe/010_server.js
  57. 10  dnode_shoe/020_server.js
  58. 11  dnode_shoe/030_server.js
  59. 16  dnode_shoe/040_server.js
  60. 19  dnode_shoe/050_server.js
  61. 2  dnode_shoe/110_client.js
  62. 6  dnode_shoe/120_client.js
  63. 9  dnode_shoe/130_client.js
  64. 11  dnode_shoe/140_client.js
  65. 13  dnode_shoe/150_client.js
  66. 7  dnode_shoe/run1.sh
  67. 4,579  dnode_shoe/static/bundle.js
  68. 5  dnode_shoe/static/index.html
  69. 7  emit-stream/000_title.js
  70. 2  emit-stream/005.js
  71. 5  emit-stream/010.js
  72. 9  emit-stream/020.js
  73. 11  emit-stream/030.js
  74. 12  emit-stream/040.js
  75. 14  emit-stream/050.js
  76. 14  emit-stream/060.js
  77. 23  emit-stream/070.js
  78. 5  emit-stream/080_client.js
  79. 4  emit-stream/090_client.js
  80. 5  emit-stream/100_client.js
  81. 6  emit-stream/110_client.js
  82. 12  emit-stream/120_client.js
  83. 14  emit-stream/130_browser.js
  84. 3  emit-stream/run1.sh
  85. 4  emit-stream/run2.sh
  86. 7  emit-stream/run3.sh
  87. 7  emit-stream/run4.sh
  88. 7  emit-stream/run5.sh
  89. 4,368  emit-stream/static/bundle.js
  90. 5  emit-stream/static/index.html
  91. 9  order.txt
  92. 7  roll_your_own_socketio/000_title.js
  93. 4  roll_your_own_socketio/001_server.js
  94. 1  roll_your_own_socketio/005_server.js
  95. 6  roll_your_own_socketio/010_server.js
  96. 12  roll_your_own_socketio/020_server.js
  97. 15  roll_your_own_socketio/030_server.js
  98. 1  roll_your_own_socketio/040_browser.js
  99. 2  roll_your_own_socketio/050_browser.js
  100. 8  roll_your_own_socketio/060_browser.js
  101. 16  roll_your_own_socketio/070_server.js
  102. 18  roll_your_own_socketio/080_server.js
  103. 18  roll_your_own_socketio/090_server.js
  104. 20  roll_your_own_socketio/100_server.js
  105. 22  roll_your_own_socketio/110_server.js
  106. 24  roll_your_own_socketio/120_server.js
  107. 33  roll_your_own_socketio/130_server.js
  108. 7  roll_your_own_socketio/140_browser.js
  109. 9  roll_your_own_socketio/150_browser.js
  110. 10  roll_your_own_socketio/160_browser.js
  111. 10  roll_your_own_socketio/170_browser.js
  112. 15  roll_your_own_socketio/180_browser.js
  113. 21  roll_your_own_socketio/190_browser.js
  114. 2  roll_your_own_socketio/node_modules/JSONStream/.npmignore
  115. 4  roll_your_own_socketio/node_modules/JSONStream/.travis.yml
  116. 15  roll_your_own_socketio/node_modules/JSONStream/LICENSE.APACHE2
  117. 24  roll_your_own_socketio/node_modules/JSONStream/LICENSE.MIT
  118. 13  roll_your_own_socketio/node_modules/JSONStream/examples/all_docs.js
  119. 171  roll_your_own_socketio/node_modules/JSONStream/index.js
  120. 414  roll_your_own_socketio/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js
  121. 25  roll_your_own_socketio/node_modules/JSONStream/node_modules/jsonparse/package.json
  122. 35  roll_your_own_socketio/node_modules/JSONStream/package.json
  123. 145  roll_your_own_socketio/node_modules/JSONStream/readme.markdown
  124. 41  roll_your_own_socketio/node_modules/JSONStream/test/bool.js
  125. 4,030  roll_your_own_socketio/node_modules/JSONStream/test/fixtures/all_npm.json
  126. 39  roll_your_own_socketio/node_modules/JSONStream/test/fn.js
  127. 28  roll_your_own_socketio/node_modules/JSONStream/test/parsejson.js
  128. 41  roll_your_own_socketio/node_modules/JSONStream/test/stringify.js
  129. 47  roll_your_own_socketio/node_modules/JSONStream/test/stringify_object.js
  130. 35  roll_your_own_socketio/node_modules/JSONStream/test/test.js
  131. 29  roll_your_own_socketio/node_modules/JSONStream/test/test2.js
  132. 41  roll_your_own_socketio/node_modules/JSONStream/test/two-ways.js
  133. 82  roll_your_own_socketio/node_modules/ecstatic/README.md
  134. 6  roll_your_own_socketio/node_modules/ecstatic/example/core.js
  135. 8  roll_your_own_socketio/node_modules/ecstatic/example/express.js
  136. 1  roll_your_own_socketio/node_modules/ecstatic/example/public/beep/index.html
  137. 1  roll_your_own_socketio/node_modules/ecstatic/example/public/hello.txt
  138. 1  roll_your_own_socketio/node_modules/ecstatic/example/public/subdir/world.txt
  139. BIN  roll_your_own_socketio/node_modules/ecstatic/example/public/turtle.png
  140. 10  roll_your_own_socketio/node_modules/ecstatic/example/union.js
  141. 132  roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic.js
  142. 3  roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/etag.js
  143. 22  roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/opts.js
  144. 113  roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/showdir.js
  145. 47  roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/status-handlers.js
  146. 19  roll_your_own_socketio/node_modules/ecstatic/lib/templates/showdir.html
  147. 1  roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/.npmignore
  148. 35  roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/README.markdown
  149. 255  roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/entities.json
  150. 3  roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/examples/simple.js
  151. 65  roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/index.js
  152. 33  roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/package.json
  153. 56  roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/test/codes.js
  154. 19  roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/LICENSE
  155. 63  roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/README.md
  156. 93  roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/mime.js
  157. 31  roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/package.json
  158. 53  roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/test.js
  159. 1,510  roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/types/mime.types
  160. 48  roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/types/node.types
  161. 43  roll_your_own_socketio/node_modules/ecstatic/package.json
  162. 85  roll_your_own_socketio/node_modules/ecstatic/test/express.js
  163. 1  roll_your_own_socketio/node_modules/ecstatic/test/express/a.txt
  164. 1  roll_your_own_socketio/node_modules/ecstatic/test/express/b.txt
  165. 1  roll_your_own_socketio/node_modules/ecstatic/test/express/c.js
  166. 1  roll_your_own_socketio/node_modules/ecstatic/test/express/subdir/e.html
  167. 1  roll_your_own_socketio/node_modules/ecstatic/test/express/subdir/index.html
  168. 4  roll_your_own_socketio/node_modules/emit-stream/.travis.yml
  169. 18  roll_your_own_socketio/node_modules/emit-stream/LICENSE
  170. 16  roll_your_own_socketio/node_modules/emit-stream/example/client-server/client.js
  171. 30  roll_your_own_socketio/node_modules/emit-stream/example/client-server/server.js
  172. 45  roll_your_own_socketio/node_modules/emit-stream/example/emit.js
  173. 49  roll_your_own_socketio/node_modules/emit-stream/index.js
  174. 41  roll_your_own_socketio/node_modules/emit-stream/package.json
  175. 117  roll_your_own_socketio/node_modules/emit-stream/readme.markdown
  176. 73  roll_your_own_socketio/node_modules/emit-stream/test/emit.js
  177. 1  roll_your_own_socketio/node_modules/shoe/.npmignore
  178. 18  roll_your_own_socketio/node_modules/shoe/LICENSE
  179. 207  roll_your_own_socketio/node_modules/shoe/README.markdown
  180. 66  roll_your_own_socketio/node_modules/shoe/browser.js
  181. 2  roll_your_own_socketio/node_modules/shoe/example/dnode/Makefile
  182. 16  roll_your_own_socketio/node_modules/shoe/example/dnode/client.js
  183. 11  roll_your_own_socketio/node_modules/shoe/example/dnode/package.json
  184. 19  roll_your_own_socketio/node_modules/shoe/example/dnode/server.js
  185. 4,579  roll_your_own_socketio/node_modules/shoe/example/dnode/static/bundle.js
  186. 2  roll_your_own_socketio/node_modules/shoe/example/dnode/static/index.html
  187. 2  roll_your_own_socketio/node_modules/shoe/example/invert/Makefile
  188. 14  roll_your_own_socketio/node_modules/shoe/example/invert/client.js
  189. 11  roll_your_own_socketio/node_modules/shoe/example/invert/package.json
  190. 19  roll_your_own_socketio/node_modules/shoe/example/invert/server.js
  191. 4,103  roll_your_own_socketio/node_modules/shoe/example/invert/static/bundle.js
  192. 2  roll_your_own_socketio/node_modules/shoe/example/invert/static/index.html
  193. 36  roll_your_own_socketio/node_modules/shoe/index.js
  194. 3  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/.npmignore
  195. 11  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/COPYING
  196. 128  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/Changelog
  197. 19  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/LICENSE-MIT-SockJS
  198. 107  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/Makefile
  199. 379  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/README.md
  200. 17  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/VERSION-GEN
  201. 111  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/bin/render.coffee
  202. 135  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/bin/run_testling.sh
  203. 9  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/all.js
  204. 205  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/dom.js
  205. 191  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/dom2.js
  206. 31  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/eventemitter.js
  207. 41  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/index.js
  208. 114  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/info.js
  209. 1  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/json2.min.js
  210. 55  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/reventtarget.js
  211. 28  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/simpleevent.js
  212. 261  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/sockjs.js
  213. 16  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/test-hooks.js
  214. 29  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-iframe-eventsource.js
  215. 35  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-iframe-htmlfile.js
  216. 94  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-iframe-within.js
  217. 30  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-iframe-xhr-polling.js
  218. 93  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-iframe.js
  219. 85  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-jsonp-polling.js
  220. 114  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-jsonp-receiver.js
  221. 44  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-polling.js
  222. 41  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-receiver-eventsource.js
  223. 65  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-receiver-htmlfile.js
  224. 42  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-receiver-xhr.js
  225. 135  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-sender.js
  226. 60  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-websocket.js
  227. 89  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-xhr.js
  228. 325  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/utils.js
  229. 30  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/package.json
  230. 2,323  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/sockjs.js
  231. 1  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/version
  232. 5  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/.npmignore
  233. 6  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/COPYING
  234. 126  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/Changelog
  235. 19  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/LICENSE-MIT-SockJS
  236. 55  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/Makefile
  237. 429  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/README.md
  238. 15  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/echo/README.md
  239. 71  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/echo/index.html
  240. 8  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/echo/package.json
  241. 30  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/echo/server.js
  242. 71  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express-3.x/index.html
  243. 8  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express-3.x/package.json
  244. 26  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express-3.x/server.js
  245. 71  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express/index.html
  246. 8  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express/package.json
  247. 23  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express/server.js
  248. 42  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/haproxy.cfg
  249. 26  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/multiplex/README.md
  250. 96  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/multiplex/index.html
  251. 9  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/multiplex/package.json
  252. 52  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/multiplex/server.js
  253. 30  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/test_server/README.md
  254. 9  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/test_server/config.js
  255. 7  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/test_server/package.json
  256. 19  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/test_server/server.js
  257. 85  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/test_server/sockjs_app.js
  258. 1  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/index.js
  259. 73  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/chunking-test.js
  260. 29  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/iframe.js
  261. 217  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/sockjs.js
  262. 40  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/trans-eventsource.js
  263. 58  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/trans-htmlfile.js
  264. 104  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/trans-jsonp.js
  265. 207  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/trans-websocket.js
  266. 116  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/trans-xhr.js
  267. 372  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/transport.js
  268. 169  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/utils.js
  269. 283  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/webjs.js
  270. 40  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/CHANGELOG.txt
  271. 248  ...your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/README.markdown
  272. 40  ...ketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/autobahn_client.js
  273. 22  ...r_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/client.js
  274. 21  ...wn_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/haproxy.conf
  275. 70  ...r_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/server.js
  276. 39  ...ur_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/sse.html
  277. 44  ...our_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/ws.html
  278. 104  ..._socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/eventsource.js
  279. 91  ...wn_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket.js
  280. 83  ...ocketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/api.js
  281. 21  ...o/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/api/event.js
  282. 47  ...modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/api/event_target.js
  283. 83  ...etio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/client.js
  284. 98  ...e_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/draft75_parser.js
  285. 99  ...e_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/draft76_parser.js
  286. 354  ...node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/hybi_parser.js
  287. 91  ...es/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/hybi_parser/handshake.js
  288. 43  ...hoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/hybi_parser/stream_reader.js
  289. 41  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/package.json
  290. 162  ...ode_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/faye/websocket/client_spec.js
  291. 72  ...ules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/faye/websocket/draft75parser_spec.js
  292. 28  ...ules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/faye/websocket/draft76parser_spec.js
  293. 157  ...odules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/faye/websocket/hybi_parser_spec.js
  294. 54  ..._your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/runner.js
  295. 15  ...your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/server.crt
  296. 15  ...your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/server.key
  297. 2  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/.npmignore
  298. 3  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/LICENSE.md
  299. 199  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/README.md
  300. 53  ..._your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/benchmark/README.md
  301. 174  ..._your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/benchmark/bench.gnu
6  JSONStream/000_title.js
... ...
@@ -0,0 +1,6 @@
  1
+/*
  2
+    JSONStream
  3
+    
  4
+        - parse JSON incrementally from a stream
  5
+
  6
+*/
1  JSONStream/005.js
... ...
@@ -0,0 +1 @@
  1
+var JSONStream = require('JSONStream');
3  JSONStream/010.js
... ...
@@ -0,0 +1,3 @@
  1
+var JSONStream = require('JSONStream');
  2
+
  3
+var parser = JSONStream.parse([ ... ]);
3  JSONStream/020.js
... ...
@@ -0,0 +1,3 @@
  1
+var JSONStream = require('JSONStream');
  2
+
  3
+var parser = JSONStream.parse([ 'features', ]);
3  JSONStream/030.js
... ...
@@ -0,0 +1,3 @@
  1
+var JSONStream = require('JSONStream');
  2
+
  3
+var parser = JSONStream.parse([ 'features', true, ]);
3  JSONStream/040.js
... ...
@@ -0,0 +1,3 @@
  1
+var JSONStream = require('JSONStream');
  2
+
  3
+var parser = JSONStream.parse([ 'features', true, 'geometry', ]);
3  JSONStream/050.js
... ...
@@ -0,0 +1,3 @@
  1
+var JSONStream = require('JSONStream');
  2
+
  3
+var parser = JSONStream.parse([ 'features', true, 'geometry', 'coordinates' ]);
7  JSONStream/060.js
... ...
@@ -0,0 +1,7 @@
  1
+var JSONStream = require('JSONStream');
  2
+
  3
+var parser = JSONStream.parse([ 'features', true, 'geometry', 'coordinates' ]);
  4
+
  5
+parser.on('data', function (coords) {
  6
+    console.dir(coords);
  7
+});
10  JSONStream/070.js
... ...
@@ -0,0 +1,10 @@
  1
+var JSONStream = require('JSONStream');
  2
+var fs = require('fs');
  3
+
  4
+var parser = JSONStream.parse([ 'features', true, 'geometry', 'coordinates' ]);
  5
+
  6
+parser.on('data', function (coords) {
  7
+    console.dir(coords);
  8
+});
  9
+
  10
+fs.createReadStream('citylots.json').pipe(parser);
10  JSONStream/080.js
... ...
@@ -0,0 +1,10 @@
  1
+var JSONStream = require('JSONStream');
  2
+var request = require('request');
  3
+
  4
+var parser = JSONStream.parse([ 'features', true, 'geometry', 'coordinates' ]);
  5
+
  6
+parser.on('data', function (coords) {
  7
+    console.dir(coords);
  8
+});
  9
+
  10
+request('http://localhost:8005').pipe(parser);
2  JSONStream/090.js
... ...
@@ -0,0 +1,2 @@
  1
+var fs = require('fs');
  2
+fs.createReadStream('citylots.json');
7  JSONStream/100.js
... ...
@@ -0,0 +1,7 @@
  1
+var http = require('http');
  2
+var fs = require('fs');
  3
+
  4
+var server = http.createServer(function (req, res) {
  5
+    fs.createReadStream('citylots.json').pipe(res);
  6
+});
  7
+server.listen(8005);
11  JSONStream/110.js
... ...
@@ -0,0 +1,11 @@
  1
+var http = require('http');
  2
+var fs = require('fs');
  3
+var ecstatic = require('ecstatic')(__dirname + '/static');
  4
+
  5
+var server = http.createServer(function (req, res) {
  6
+    if (req.url === '/data') {
  7
+        fs.createReadStream('citylots.json').pipe(res);
  8
+    }
  9
+    else ecstatic(req, res);
  10
+});
  11
+server.listen(8005);
8  JSONStream/120_html.js
... ...
@@ -0,0 +1,8 @@
  1
+/* throw down an index.html:
  2
+
  3
+    <html>
  4
+    <body>
  5
+    <script src="bundle.js"></script>
  6
+    </body>
  7
+    </html>
  8
+*/
5  JSONStream/130.js
... ...
@@ -0,0 +1,5 @@
  1
+/*
  2
+
  3
+    now let's use JSONStream in the browser!
  4
+
  5
+*/
12  JSONStream/140.js
... ...
@@ -0,0 +1,12 @@
  1
+// server version
  2
+
  3
+var JSONStream = require('JSONStream');
  4
+var request = require('request');
  5
+
  6
+var parser = JSONStream.parse([ 'features', true, 'geometry', 'coordinates' ]);
  7
+
  8
+parser.on('data', function (coords) {
  9
+    console.dir(coords);
  10
+});
  11
+
  12
+request('http://localhost:8005/data').pipe(parser);
12  JSONStream/150.js
... ...
@@ -0,0 +1,12 @@
  1
+// browser version
  2
+
  3
+var JSONStream = require('JSONStream');
  4
+var request = require('request');
  5
+
  6
+var parser = JSONStream.parse([ 'features', true, 'geometry', 'coordinates' ]);
  7
+
  8
+parser.on('data', function (coords) {
  9
+    console.dir(coords);
  10
+});
  11
+
  12
+request('http://localhost:8005/data').pipe(parser);
14  JSONStream/160.js
... ...
@@ -0,0 +1,14 @@
  1
+// browser version
  2
+
  3
+var JSONStream = require('JSONStream');
  4
+var request = require('request');
  5
+
  6
+var parser = JSONStream.parse([ 'features', true, 'geometry', 'coordinates' ]);
  7
+
  8
+parser.on('data', function (coords) {
  9
+    var div = document.createElement('div');
  10
+    div.textContent = JSON.stringify(coords);
  11
+    document.body.appendChild(div);
  12
+});
  13
+
  14
+request('http://localhost:8005/data').pipe(parser);
15  JSONStream/170.js
... ...
@@ -0,0 +1,15 @@
  1
+var http = require('http');
  2
+var fs = require('fs');
  3
+var ecstatic = require('ecstatic')(__dirname + '/static');
  4
+var brake = require('brake');
  5
+
  6
+var server = http.createServer(function (req, res) {
  7
+    if (req.url === '/data') {
  8
+        fs.createReadStream('citylots.json')
  9
+            .pipe(brake(1500))
  10
+            .pipe(res)
  11
+        ;
  12
+    }
  13
+    else ecstatic(req, res);
  14
+});
  15
+server.listen(8005);
2  JSONStream/run1.sh
... ...
@@ -0,0 +1,2 @@
  1
+#!/bin/bash
  2
+node 070.js
3  JSONStream/run2.sh
... ...
@@ -0,0 +1,3 @@
  1
+#!/bin/bash
  2
+echo curl -sS http://localhost:8005
  3
+node 100.js
6  JSONStream/run3.sh
... ...
@@ -0,0 +1,6 @@
  1
+#!/bin/bash
  2
+echo '#' browserify 150.js -o static/bundle.js
  3
+browserify 150.js -o static/bundle.js --debug
  4
+
  5
+echo '#' now visit http://localhost:8005
  6
+node 110.js
6  JSONStream/run4.sh
... ...
@@ -0,0 +1,6 @@
  1
+#!/bin/bash
  2
+echo '#' browserify 160.js -o static/bundle.js
  3
+browserify 160.js -o static/bundle.js --debug
  4
+
  5
+echo '#' now visit http://localhost:8005
  6
+node 110.js
6  JSONStream/run5.sh
... ...
@@ -0,0 +1,6 @@
  1
+#!/bin/bash
  2
+echo '#' browserify 160.js -o static/bundle.js
  3
+browserify 160.js -o static/bundle.js --debug
  4
+
  5
+echo '#' now visit http://localhost:8005
  6
+node 170.js
300  JSONStream/static/bundle.js
300 additions, 0 deletions not shown
5  JSONStream/static/index.html
... ...
@@ -0,0 +1,5 @@
  1
+<html>
  2
+<body>
  3
+<script src="bundle.js"></script>
  4
+</body>
  5
+</html>
7  ast/000_title.js
... ...
@@ -0,0 +1,7 @@
  1
+/*
  2
+
  3
+    falafel
  4
+ 
  5
+        - walk the ast
  6
+
  7
+*/
5  ast/010_transform.js
... ...
@@ -0,0 +1,5 @@
  1
+var src = '(' + function () {
  2
+    var x = 2 + 3 * 6;
  3
+    var y = Math.pow(x, 2);
  4
+    console.log(x + y);
  5
+} + ')()';
10  ast/020_transform.js
... ...
@@ -0,0 +1,10 @@
  1
+var src = '(' + function () {
  2
+    var x = 2 + 3 * 6;
  3
+    var y = Math.pow(x, 2);
  4
+    console.log(x + y);
  5
+} + ')()';
  6
+
  7
+var falafel = require('falafel');
  8
+var out = falafel(src, function (node) {
  9
+    // ...
  10
+});
14  ast/030_transform.js
... ...
@@ -0,0 +1,14 @@
  1
+var src = '(' + function () {
  2
+    var x = 2 + 3 * 6;
  3
+    var y = Math.pow(x, 2);
  4
+    console.log(x + y);
  5
+} + ')()';
  6
+
  7
+var falafel = require('falafel');
  8
+var out = falafel(src, function (node) {
  9
+    // ...
  10
+});
  11
+
  12
+var div = document.createElement('div');
  13
+div.textContent = out;
  14
+document.body.appendChild(div);
14  ast/040_transform.js
... ...
@@ -0,0 +1,14 @@
  1
+var src = '(' + function () {
  2
+    var x = 2 + 3 * 6;
  3
+    var y = Math.pow(x, 2);
  4
+    console.log(x + y);
  5
+} + ')()';
  6
+
  7
+var falafel = require('falafel');
  8
+var out = falafel(src, function (node) {
  9
+    if (node.type === 'CallExpression') {
  10
+        node.update('fff(' + node.source() + ')');
  11
+    }
  12
+});
  13
+
  14
+document.querySelector('pre').textContent = out;
5  ast/050_server.js
... ...
@@ -0,0 +1,5 @@
  1
+var http = require('http');
  2
+var ecstatic = require('ecstatic')(__dirname + '/static');
  3
+http.createServer(ecstatic).listen(8005);
  4
+
  5
+// ./run1.sh
20  ast/060_transform.js
... ...
@@ -0,0 +1,20 @@
  1
+var src = '(' + function () {
  2
+    var x = 2 + 3 * 6;
  3
+    var y = Math.pow(x, 2);
  4
+    console.log(x + y);
  5
+} + ')()';
  6
+
  7
+var falafel = require('falafel');
  8
+var out = falafel(src, function (node) {
  9
+    if (node.type === 'CallExpression') {
  10
+        node.update('fff(' + node.source() + ')');
  11
+    }
  12
+});
  13
+
  14
+var original = false;
  15
+setInterval(function () {
  16
+    document.querySelector('pre').textContent = original ? src : out;
  17
+    original = !original;
  18
+}, 1000);
  19
+
  20
+// ./run2.sh
7  ast/run1.sh
... ...
@@ -0,0 +1,7 @@
  1
+#!/bin/bash
  2
+
  3
+echo '#' browserify 040_transform.js -o static/bundle.js
  4
+browserify 040_transform.js -o static/bundle.js
  5
+
  6
+echo http://localhost:8005
  7
+node 050_server.js
7  ast/run2.sh
... ...
@@ -0,0 +1,7 @@
  1
+#!/bin/bash
  2
+
  3
+echo '#' browserify 060_transform.js -o static/bundle.js
  4
+browserify 060_transform.js -o static/bundle.js
  5
+
  6
+echo http://localhost:8005
  7
+node 050_server.js
4,081  ast/static/bundle.js
4081 additions, 0 deletions not shown
7  ast/static/index.html
... ...
@@ -0,0 +1,7 @@
  1
+<html>
  2
+<body>
  3
+<style> pre { font-size: 72px; } </style>
  4
+<pre></pre>
  5
+</body>
  6
+<script src="/bundle.js"></script>
  7
+</html>
15  ast/transform.js
... ...
@@ -0,0 +1,15 @@
  1
+var falafel = require('falafel');
  2
+var src = '(' + function () {
  3
+    var x = 2 + 3 * 6;
  4
+    var y = Math.pow(x, 2);
  5
+    console.log(x + y);
  6
+} + ')()';
  7
+
  8
+var out = falafel(src, function (node) {
  9
+    if (node.type === 'CallExpression') {
  10
+        node.update('fff(' + node.source() + ')');
  11
+    }
  12
+});
  13
+
  14
+var $ = require('jquery-browserify');
  15
+$('pre').text(out);
5  bundle/000_foo.js
... ...
@@ -0,0 +1,5 @@
  1
+// foo.js
  2
+
  3
+module.exports = function (n) {
  4
+    return n * 111;
  5
+};
5  bundle/010_main.js
... ...
@@ -0,0 +1,5 @@
  1
+// main.js
  2
+
  3
+var foo = require('./foo');
  4
+
  5
+document.querySelector('pre').textContent = foo(5);
5  bundle/020_files/foo.js
... ...
@@ -0,0 +1,5 @@
  1
+// foo.js
  2
+
  3
+module.exports = function (n) {
  4
+    return n * 111;
  5
+};
5  bundle/020_files/main.js
... ...
@@ -0,0 +1,5 @@
  1
+// main.js
  2
+
  3
+var foo = require('./foo');
  4
+
  5
+document.querySelector('pre').textContent = foo(5);
4  bundle/020_server.js
... ...
@@ -0,0 +1,4 @@
  1
+var http = require('http');
  2
+var ecstatic = require('ecstatic')(__dirname + '/static');
  3
+http.createServer(ecstatic).listen(8005);
  4
+console.log('http://localhost:8005');
5  bundle/030_files/foo.js
... ...
@@ -0,0 +1,5 @@
  1
+// foo.js
  2
+
  3
+module.exports = function (n) {
  4
+    return n * 111;
  5
+};
5  bundle/030_files/main.js
... ...
@@ -0,0 +1,5 @@
  1
+// main.js
  2
+
  3
+var foo = require('./foo');
  4
+
  5
+document.querySelector('pre').textContent = foo(5);
5  bundle/030_main.js
... ...
@@ -0,0 +1,5 @@
  1
+// main.js
  2
+
  3
+var foo = require('./foo');
  4
+
  5
+document.querySelector('pre').textContent = foo(5);
7  bundle/040_files/foo.js
... ...
@@ -0,0 +1,7 @@
  1
+// foo.js
  2
+
  3
+module.exports = function (n) {
  4
+    beep.boop();
  5
+    
  6
+    return n * 111;
  7
+};
5  bundle/040_files/main.js
... ...
@@ -0,0 +1,5 @@
  1
+// main.js
  2
+
  3
+var foo = require('./foo');
  4
+
  5
+document.querySelector('pre').textContent = foo(5);
7  bundle/040_foo.js
... ...
@@ -0,0 +1,7 @@
  1
+// foo.js
  2
+
  3
+module.exports = function (n) {
  4
+    beep.boop();
  5
+    
  6
+    return n * 111;
  7
+};
5  bundle/run1.sh
... ...
@@ -0,0 +1,5 @@
  1
+#!/bin/bash
  2
+echo browserify main.js -o static/bundle.js
  3
+browserify 020_files/main.js -o static/bundle.js
  4
+
  5
+node 020_server.js
3  bundle/run2.sh
... ...
@@ -0,0 +1,3 @@
  1
+#!/bin/bash
  2
+echo '#' browserify main.js -o static/bundle.js --watch -v
  3
+browserify 030_files/main.js -o static/bundle.js --watch -v
5  bundle/run3.sh
... ...
@@ -0,0 +1,5 @@
  1
+#!/bin/bash
  2
+echo browserify main.js -o static/bundle.js --debug
  3
+browserify 040_files/main.js -o static/bundle.js --debug
  4
+
  5
+node 020_server.js
406  bundle/static/bundle.js
... ...
@@ -0,0 +1,406 @@
  1
+(function(){var require = function (file, cwd) {
  2
+    var resolved = require.resolve(file, cwd || '/');
  3
+    var mod = require.modules[resolved];
  4
+    if (!mod) throw new Error(
  5
+        'Failed to resolve module ' + file + ', tried ' + resolved
  6
+    );
  7
+    var cached = require.cache[resolved];
  8
+    var res = cached? cached.exports : mod();
  9
+    return res;
  10
+};
  11
+
  12
+require.paths = [];
  13
+require.modules = {};
  14
+require.cache = {};
  15
+require.extensions = [".js",".coffee",".json"];
  16
+
  17
+require._core = {
  18
+    'assert': true,
  19
+    'events': true,
  20
+    'fs': true,
  21
+    'path': true,
  22
+    'vm': true
  23
+};
  24
+
  25
+require.resolve = (function () {
  26
+    return function (x, cwd) {
  27
+        if (!cwd) cwd = '/';
  28
+        
  29
+        if (require._core[x]) return x;
  30
+        var path = require.modules.path();
  31
+        cwd = path.resolve('/', cwd);
  32
+        var y = cwd || '/';
  33
+        
  34
+        if (x.match(/^(?:\.\.?\/|\/)/)) {
  35
+            var m = loadAsFileSync(path.resolve(y, x))
  36
+                || loadAsDirectorySync(path.resolve(y, x));
  37
+            if (m) return m;
  38
+        }
  39
+        
  40
+        var n = loadNodeModulesSync(x, y);
  41
+        if (n) return n;
  42
+        
  43
+        throw new Error("Cannot find module '" + x + "'");
  44
+        
  45
+        function loadAsFileSync (x) {
  46
+            x = path.normalize(x);
  47
+            if (require.modules[x]) {
  48
+                return x;
  49
+            }
  50
+            
  51
+            for (var i = 0; i < require.extensions.length; i++) {
  52
+                var ext = require.extensions[i];
  53
+                if (require.modules[x + ext]) return x + ext;
  54
+            }
  55
+        }
  56
+        
  57
+        function loadAsDirectorySync (x) {
  58
+            x = x.replace(/\/+$/, '');
  59
+            var pkgfile = path.normalize(x + '/package.json');
  60
+            if (require.modules[pkgfile]) {
  61
+                var pkg = require.modules[pkgfile]();
  62
+                var b = pkg.browserify;
  63
+                if (typeof b === 'object' && b.main) {
  64
+                    var m = loadAsFileSync(path.resolve(x, b.main));
  65
+                    if (m) return m;
  66
+                }
  67
+                else if (typeof b === 'string') {
  68
+                    var m = loadAsFileSync(path.resolve(x, b));
  69
+                    if (m) return m;
  70
+                }
  71
+                else if (pkg.main) {
  72
+                    var m = loadAsFileSync(path.resolve(x, pkg.main));
  73
+                    if (m) return m;
  74
+                }
  75
+            }
  76
+            
  77
+            return loadAsFileSync(x + '/index');
  78
+        }
  79
+        
  80
+        function loadNodeModulesSync (x, start) {
  81
+            var dirs = nodeModulesPathsSync(start);
  82
+            for (var i = 0; i < dirs.length; i++) {
  83
+                var dir = dirs[i];
  84
+                var m = loadAsFileSync(dir + '/' + x);
  85
+                if (m) return m;
  86
+                var n = loadAsDirectorySync(dir + '/' + x);
  87
+                if (n) return n;
  88
+            }
  89
+            
  90
+            var m = loadAsFileSync(x);
  91
+            if (m) return m;
  92
+        }
  93
+        
  94
+        function nodeModulesPathsSync (start) {
  95
+            var parts;
  96
+            if (start === '/') parts = [ '' ];
  97
+            else parts = path.normalize(start).split('/');
  98
+            
  99
+            var dirs = [];
  100
+            for (var i = parts.length - 1; i >= 0; i--) {
  101
+                if (parts[i] === 'node_modules') continue;
  102
+                var dir = parts.slice(0, i + 1).join('/') + '/node_modules';
  103
+                dirs.push(dir);
  104
+            }
  105
+            
  106
+            return dirs;
  107
+        }
  108
+    };
  109
+})();
  110
+
  111
+require.alias = function (from, to) {
  112
+    var path = require.modules.path();
  113
+    var res = null;
  114
+    try {
  115
+        res = require.resolve(from + '/package.json', '/');
  116
+    }
  117
+    catch (err) {
  118
+        res = require.resolve(from, '/');
  119
+    }
  120
+    var basedir = path.dirname(res);
  121
+    
  122
+    var keys = (Object.keys || function (obj) {
  123
+        var res = [];
  124
+        for (var key in obj) res.push(key);
  125
+        return res;
  126
+    })(require.modules);
  127
+    
  128
+    for (var i = 0; i < keys.length; i++) {
  129
+        var key = keys[i];
  130
+        if (key.slice(0, basedir.length + 1) === basedir + '/') {
  131
+            var f = key.slice(basedir.length);
  132
+            require.modules[to + f] = require.modules[basedir + f];
  133
+        }
  134
+        else if (key === basedir) {
  135
+            require.modules[to] = require.modules[basedir];
  136
+        }
  137
+    }
  138
+};
  139
+
  140
+(function () {
  141
+    var process = {};
  142
+    
  143
+    require.define = function (filename, fn) {
  144
+        if (require.modules.__browserify_process) {
  145
+            process = require.modules.__browserify_process();
  146
+        }
  147
+        
  148
+        var dirname = require._core[filename]
  149
+            ? ''
  150
+            : require.modules.path().dirname(filename)
  151
+        ;
  152
+        
  153
+        var require_ = function (file) {
  154
+            var requiredModule = require(file, dirname);
  155
+            var cached = require.cache[require.resolve(file, dirname)];
  156
+
  157
+            if (cached && cached.parent === null) {
  158
+                cached.parent = module_;
  159
+            }
  160
+
  161
+            return requiredModule;
  162
+        };
  163
+        require_.resolve = function (name) {
  164
+            return require.resolve(name, dirname);
  165
+        };
  166
+        require_.modules = require.modules;
  167
+        require_.define = require.define;
  168
+        require_.cache = require.cache;
  169
+        var module_ = {
  170
+            id : filename,
  171
+            filename: filename,
  172
+            exports : {},
  173
+            loaded : false,
  174
+            parent: null
  175
+        };
  176
+        
  177
+        require.modules[filename] = function () {
  178
+            require.cache[filename] = module_;
  179
+            fn.call(
  180
+                module_.exports,
  181
+                require_,
  182
+                module_,
  183
+                module_.exports,
  184
+                dirname,
  185
+                filename,
  186
+                process
  187
+            );
  188
+            module_.loaded = true;
  189
+            return module_.exports;
  190
+        };
  191
+    };
  192
+})();
  193
+
  194
+
  195
+require.define("path",function(require,module,exports,__dirname,__filename,process){function filter (xs, fn) {
  196
+    var res = [];
  197
+    for (var i = 0; i < xs.length; i++) {
  198
+        if (fn(xs[i], i, xs)) res.push(xs[i]);
  199
+    }
  200
+    return res;
  201
+}
  202
+
  203
+// resolves . and .. elements in a path array with directory names there
  204
+// must be no slashes, empty elements, or device names (c:\) in the array
  205
+// (so also no leading and trailing slashes - it does not distinguish
  206
+// relative and absolute paths)
  207
+function normalizeArray(parts, allowAboveRoot) {
  208
+  // if the path tries to go above the root, `up` ends up > 0
  209
+  var up = 0;
  210
+  for (var i = parts.length; i >= 0; i--) {
  211
+    var last = parts[i];
  212
+    if (last == '.') {
  213
+      parts.splice(i, 1);
  214
+    } else if (last === '..') {
  215
+      parts.splice(i, 1);
  216
+      up++;
  217
+    } else if (up) {
  218
+      parts.splice(i, 1);
  219
+      up--;
  220
+    }
  221
+  }
  222
+
  223
+  // if the path is allowed to go above the root, restore leading ..s
  224
+  if (allowAboveRoot) {
  225
+    for (; up--; up) {
  226
+      parts.unshift('..');
  227
+    }
  228
+  }
  229
+
  230
+  return parts;
  231
+}
  232
+
  233
+// Regex to split a filename into [*, dir, basename, ext]
  234
+// posix version
  235
+var splitPathRe = /^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;
  236
+
  237
+// path.resolve([from ...], to)
  238
+// posix version
  239
+exports.resolve = function() {
  240
+var resolvedPath = '',
  241
+    resolvedAbsolute = false;
  242
+
  243
+for (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) {
  244
+  var path = (i >= 0)
  245
+      ? arguments[i]
  246
+      : process.cwd();
  247
+
  248
+  // Skip empty and invalid entries
  249
+  if (typeof path !== 'string' || !path) {
  250
+    continue;
  251
+  }
  252
+
  253
+  resolvedPath = path + '/' + resolvedPath;
  254
+  resolvedAbsolute = path.charAt(0) === '/';
  255
+}
  256
+
  257
+// At this point the path should be resolved to a full absolute path, but
  258
+// handle relative paths to be safe (might happen when process.cwd() fails)
  259
+
  260
+// Normalize the path
  261
+resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  262
+    return !!p;
  263
+  }), !resolvedAbsolute).join('/');
  264
+
  265
+  return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  266
+};
  267
+
  268
+// path.normalize(path)
  269
+// posix version
  270
+exports.normalize = function(path) {
  271
+var isAbsolute = path.charAt(0) === '/',
  272
+    trailingSlash = path.slice(-1) === '/';
  273
+
  274
+// Normalize the path
  275
+path = normalizeArray(filter(path.split('/'), function(p) {
  276
+    return !!p;
  277
+  }), !isAbsolute).join('/');
  278
+
  279
+  if (!path && !isAbsolute) {
  280
+    path = '.';
  281
+  }
  282
+  if (path && trailingSlash) {
  283
+    path += '/';
  284
+  }
  285
+  
  286
+  return (isAbsolute ? '/' : '') + path;
  287
+};
  288
+
  289
+
  290
+// posix version
  291
+exports.join = function() {
  292
+  var paths = Array.prototype.slice.call(arguments, 0);
  293
+  return exports.normalize(filter(paths, function(p, index) {
  294
+    return p && typeof p === 'string';
  295
+  }).join('/'));
  296
+};
  297
+
  298
+
  299
+exports.dirname = function(path) {
  300
+  var dir = splitPathRe.exec(path)[1] || '';
  301
+  var isWindows = false;
  302
+  if (!dir) {
  303
+    // No dirname
  304
+    return '.';
  305
+  } else if (dir.length === 1 ||
  306
+      (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) {
  307
+    // It is just a slash or a drive letter with a slash
  308
+    return dir;
  309
+  } else {
  310
+    // It is a full dirname, strip trailing slash
  311
+    return dir.substring(0, dir.length - 1);
  312
+  }
  313
+};
  314
+
  315
+
  316
+exports.basename = function(path, ext) {
  317
+  var f = splitPathRe.exec(path)[2] || '';
  318
+  // TODO: make this comparison case-insensitive on windows?
  319
+  if (ext && f.substr(-1 * ext.length) === ext) {
  320
+    f = f.substr(0, f.length - ext.length);
  321
+  }
  322
+  return f;
  323
+};
  324
+
  325
+
  326
+exports.extname = function(path) {
  327
+  return splitPathRe.exec(path)[3] || '';
  328
+};
  329
+
  330
+});
  331
+
  332
+require.define("__browserify_process",function(require,module,exports,__dirname,__filename,process){var process = module.exports = {};
  333
+
  334
+process.nextTick = (function () {
  335
+    var canSetImmediate = typeof window !== 'undefined'
  336
+        && window.setImmediate;
  337
+    var canPost = typeof window !== 'undefined'
  338
+        && window.postMessage && window.addEventListener
  339
+    ;
  340
+
  341
+    if (canSetImmediate) {
  342
+        return window.setImmediate;
  343
+    }
  344
+
  345
+    if (canPost) {
  346
+        var queue = [];
  347
+        window.addEventListener('message', function (ev) {
  348
+            if (ev.source === window && ev.data === 'browserify-tick') {
  349
+                ev.stopPropagation();
  350
+                if (queue.length > 0) {
  351
+                    var fn = queue.shift();
  352
+                    fn();
  353
+                }
  354
+            }
  355
+        }, true);
  356
+
  357
+        return function nextTick(fn) {
  358
+            queue.push(fn);
  359
+            window.postMessage('browserify-tick', '*');
  360
+        };
  361
+    }
  362
+
  363
+    return function nextTick(fn) {
  364
+        setTimeout(fn, 0);
  365
+    };
  366
+})();
  367
+
  368
+process.title = 'browser';
  369
+process.browser = true;
  370
+process.env = {};
  371
+process.argv = [];
  372
+
  373
+process.binding = function (name) {
  374
+    if (name === 'evals') return (require)('vm')
  375
+    else throw new Error('No such module. (Possibly not yet loaded)')
  376
+};
  377
+
  378
+(function () {
  379
+    var cwd = '/';
  380
+    var path;
  381
+    process.cwd = function () { return cwd };
  382
+    process.chdir = function (dir) {
  383
+        if (!path) path = require('path');
  384
+        cwd = path.resolve(dir, cwd);
  385
+    };
  386
+})();
  387
+
  388
+});
  389
+
  390
+require.define("/foo.js",function(require,module,exports,__dirname,__filename,process){// foo.js
  391
+
  392
+module.exports = function (n) {
  393
+    return n * 111;
  394
+};
  395
+
  396
+});
  397
+
  398
+require.define("/main.js",function(require,module,exports,__dirname,__filename,process){// main.js
  399
+
  400
+var foo = require('./foo');
  401
+
  402
+document.querySelector('pre').textContent = foo(5);
  403
+
  404
+});
  405
+require("/main.js");
  406
+})();
7  bundle/static/index.html
... ...
@@ -0,0 +1,7 @@
  1
+<html>
  2
+<body>
  3
+<style> pre { font-size: 72px; } </style>
  4
+<pre></pre>
  5
+</body>
  6
+<script src="/bundle.js"></script>
  7
+</html>
5  dnode_shoe/000_title.js
... ...
@@ -0,0 +1,5 @@
  1
+/*
  2
+
  3
+    using dnode in shoe
  4
+
  5
+*/
5  dnode_shoe/010_server.js
... ...
@@ -0,0 +1,5 @@
  1
+var http = require('http');
  2
+var ecstatic = require('ecstatic')(__dirname + '/static');
  3
+
  4
+var server = http.createServer(ecstatic);
  5
+server.listen(8005);
10  dnode_shoe/020_server.js
... ...
@@ -0,0 +1,10 @@
  1
+var http = require('http');
  2
+var ecstatic = require('ecstatic')(__dirname + '/static');
  3
+
  4
+var server = http.createServer(ecstatic);
  5
+server.listen(8005);
  6
+
  7
+var shoe = require('shoe');
  8
+var sock = shoe(function (stream) {
  9
+    // ...
  10
+});
11  dnode_shoe/030_server.js
... ...
@@ -0,0 +1,11 @@
  1
+var http = require('http');
  2
+var ecstatic = require('ecstatic')(__dirname + '/static');
  3
+
  4
+var server = http.createServer(ecstatic);
  5
+server.listen(8005);
  6
+
  7
+var shoe = require('shoe');
  8
+var sock = shoe(function (stream) {
  9
+    // ...
  10
+});
  11
+sock.install(server, '/dnode');
16  dnode_shoe/040_server.js
... ...
@@ -0,0 +1,16 @@
  1
+var http = require('http');
  2
+var ecstatic = require('ecstatic')(__dirname + '/static');
  3
+
  4
+var server = http.createServer(ecstatic);
  5
+server.listen(8005);
  6
+
  7
+var shoe = require('shoe');
  8
+var dnode = require('dnode');
  9
+
  10
+var sock = shoe(function (stream) {
  11
+    var d = dnode({
  12
+        // ...
  13
+    });
  14
+    d.pipe(stream).pipe(d);
  15
+});
  16
+sock.install(server, '/dnode');
19  dnode_shoe/050_server.js
... ...
@@ -0,0 +1,19 @@
  1
+var http = require('http');
  2
+var ecstatic = require('ecstatic')(__dirname + '/static');
  3
+
  4
+var server = http.createServer(ecstatic);
  5
+server.listen(8005);
  6
+
  7
+var shoe = require('shoe');
  8
+var dnode = require('dnode');
  9
+
  10
+var sock = shoe(function (stream) {
  11
+    var d = dnode({
  12
+        transform : function (s, cb) {
  13
+            var res = s.replace(/[aeiou]{2,}/, 'oo').toUpperCase();
  14
+            cb(res);
  15
+        }
  16
+    });
  17
+    d.pipe(stream).pipe(d);
  18
+});
  19
+sock.install(server, '/dnode');
2  dnode_shoe/110_client.js
... ...
@@ -0,0 +1,2 @@
  1
+var shoe = require('shoe');
  2
+var stream = shoe('/dnode');
6  dnode_shoe/120_client.js
... ...
@@ -0,0 +1,6 @@
  1
+var shoe = require('shoe');
  2
+var dnode = require('dnode');
  3
+var stream = shoe('/dnode');
  4
+
  5
+var d = dnode();
  6
+d.pipe(stream).pipe(d);
9  dnode_shoe/130_client.js
... ...
@@ -0,0 +1,9 @@
  1
+var shoe = require('shoe');
  2
+var dnode = require('dnode');
  3
+var stream = shoe('/dnode');
  4
+
  5
+var d = dnode();
  6
+d.on('remote', function (remote) {
  7
+    // ..
  8
+});
  9
+d.pipe(stream).pipe(d);
11  dnode_shoe/140_client.js
... ...
@@ -0,0 +1,11 @@
  1
+var shoe = require('shoe');
  2
+var dnode = require('dnode');
  3
+var stream = shoe('/dnode');
  4
+
  5
+var d = dnode();
  6
+d.on('remote', function (remote) {
  7
+    remote.transform('beep', function (s) {
  8
+        // ...
  9
+    });
  10
+});
  11
+d.pipe(stream).pipe(d);
13  dnode_shoe/150_client.js
... ...
@@ -0,0 +1,13 @@
  1
+var shoe = require('shoe');
  2
+var dnode = require('dnode');
  3
+var stream = shoe('/dnode');
  4
+