webpack_rails 0.3.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (353) hide show
  1. checksums.yaml +4 -4
  2. data/lib/webpack_rails/ErrorMessagePlugin.js +37 -0
  3. data/lib/webpack_rails/engine.rb +6 -5
  4. data/lib/webpack_rails/node_modules/cors/CONTRIBUTING.md +35 -0
  5. data/lib/webpack_rails/node_modules/cors/LICENSE +9 -0
  6. data/lib/webpack_rails/node_modules/cors/README.md +192 -0
  7. data/lib/webpack_rails/node_modules/cors/lib/index.js +242 -0
  8. data/lib/webpack_rails/node_modules/cors/node_modules/vary/HISTORY.md +29 -0
  9. data/lib/webpack_rails/node_modules/cors/node_modules/vary/LICENSE +22 -0
  10. data/lib/webpack_rails/node_modules/cors/node_modules/vary/README.md +91 -0
  11. data/lib/webpack_rails/node_modules/cors/node_modules/vary/index.js +124 -0
  12. data/lib/webpack_rails/node_modules/cors/node_modules/vary/package.json +72 -0
  13. data/lib/webpack_rails/node_modules/cors/package.json +79 -0
  14. data/lib/webpack_rails/node_modules/cors/test/basic-auth.js +40 -0
  15. data/lib/webpack_rails/node_modules/cors/test/body-events.js +81 -0
  16. data/lib/webpack_rails/node_modules/cors/test/cors.js +652 -0
  17. data/lib/webpack_rails/node_modules/cors/test/error-response.js +77 -0
  18. data/lib/webpack_rails/node_modules/cors/test/example-app.js +98 -0
  19. data/lib/webpack_rails/node_modules/cors/test/issue-2.js +56 -0
  20. data/lib/webpack_rails/node_modules/cors/test/issue-31.js +58 -0
  21. data/lib/webpack_rails/node_modules/cors/test/mocha.opts +3 -0
  22. data/lib/webpack_rails/node_modules/express/History.md +3025 -0
  23. data/lib/webpack_rails/node_modules/express/LICENSE +24 -0
  24. data/lib/webpack_rails/node_modules/express/Readme.md +138 -0
  25. data/lib/webpack_rails/node_modules/express/index.js +11 -0
  26. data/lib/webpack_rails/node_modules/express/lib/application.js +643 -0
  27. data/lib/webpack_rails/node_modules/express/lib/express.js +103 -0
  28. data/lib/webpack_rails/node_modules/express/lib/middleware/init.js +36 -0
  29. data/lib/webpack_rails/node_modules/express/lib/middleware/query.js +51 -0
  30. data/lib/webpack_rails/node_modules/express/lib/request.js +489 -0
  31. data/lib/webpack_rails/node_modules/express/lib/response.js +1053 -0
  32. data/lib/webpack_rails/node_modules/express/lib/router/index.js +645 -0
  33. data/lib/webpack_rails/node_modules/express/lib/router/layer.js +176 -0
  34. data/lib/webpack_rails/node_modules/express/lib/router/route.js +210 -0
  35. data/lib/webpack_rails/node_modules/express/lib/utils.js +300 -0
  36. data/lib/webpack_rails/node_modules/express/lib/view.js +173 -0
  37. data/lib/webpack_rails/node_modules/express/node_modules/accepts/HISTORY.md +170 -0
  38. data/lib/webpack_rails/node_modules/express/node_modules/accepts/LICENSE +23 -0
  39. data/lib/webpack_rails/node_modules/express/node_modules/accepts/README.md +135 -0
  40. data/lib/webpack_rails/node_modules/express/node_modules/accepts/index.js +231 -0
  41. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md +171 -0
  42. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE +23 -0
  43. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md +103 -0
  44. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js +188 -0
  45. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md +274 -0
  46. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE +22 -0
  47. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md +82 -0
  48. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json +6474 -0
  49. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js +11 -0
  50. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json +94 -0
  51. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json +84 -0
  52. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md +76 -0
  53. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE +24 -0
  54. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md +203 -0
  55. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js +62 -0
  56. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js +102 -0
  57. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js +118 -0
  58. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js +112 -0
  59. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js +179 -0
  60. data/lib/webpack_rails/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json +86 -0
  61. data/lib/webpack_rails/node_modules/express/node_modules/accepts/package.json +98 -0
  62. data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/LICENSE +21 -0
  63. data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/README.md +43 -0
  64. data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/array-flatten.js +64 -0
  65. data/lib/webpack_rails/node_modules/express/node_modules/array-flatten/package.json +62 -0
  66. data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/HISTORY.md +40 -0
  67. data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/LICENSE +22 -0
  68. data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/README.md +141 -0
  69. data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/index.js +443 -0
  70. data/lib/webpack_rails/node_modules/express/node_modules/content-disposition/package.json +66 -0
  71. data/lib/webpack_rails/node_modules/express/node_modules/content-type/HISTORY.md +9 -0
  72. data/lib/webpack_rails/node_modules/express/node_modules/content-type/LICENSE +22 -0
  73. data/lib/webpack_rails/node_modules/express/node_modules/content-type/README.md +92 -0
  74. data/lib/webpack_rails/node_modules/express/node_modules/content-type/index.js +214 -0
  75. data/lib/webpack_rails/node_modules/express/node_modules/content-type/package.json +65 -0
  76. data/lib/webpack_rails/node_modules/express/node_modules/cookie/LICENSE +23 -0
  77. data/lib/webpack_rails/node_modules/express/node_modules/cookie/README.md +64 -0
  78. data/lib/webpack_rails/node_modules/express/node_modules/cookie/index.js +116 -0
  79. data/lib/webpack_rails/node_modules/express/node_modules/cookie/package.json +68 -0
  80. data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/History.md +38 -0
  81. data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/Readme.md +42 -0
  82. data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/index.js +51 -0
  83. data/lib/webpack_rails/node_modules/express/node_modules/cookie-signature/package.json +59 -0
  84. data/lib/webpack_rails/node_modules/express/node_modules/debug/History.md +195 -0
  85. data/lib/webpack_rails/node_modules/express/node_modules/debug/Makefile +36 -0
  86. data/lib/webpack_rails/node_modules/express/node_modules/debug/Readme.md +188 -0
  87. data/lib/webpack_rails/node_modules/express/node_modules/debug/bower.json +28 -0
  88. data/lib/webpack_rails/node_modules/express/node_modules/debug/browser.js +168 -0
  89. data/lib/webpack_rails/node_modules/express/node_modules/debug/component.json +19 -0
  90. data/lib/webpack_rails/node_modules/express/node_modules/debug/debug.js +197 -0
  91. data/lib/webpack_rails/node_modules/express/node_modules/debug/node.js +209 -0
  92. data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/History.md +66 -0
  93. data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/LICENSE +20 -0
  94. data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/README.md +35 -0
  95. data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/index.js +125 -0
  96. data/lib/webpack_rails/node_modules/express/node_modules/debug/node_modules/ms/package.json +47 -0
  97. data/lib/webpack_rails/node_modules/express/node_modules/debug/package.json +73 -0
  98. data/lib/webpack_rails/node_modules/express/node_modules/depd/History.md +75 -0
  99. data/lib/webpack_rails/node_modules/express/node_modules/depd/LICENSE +22 -0
  100. data/lib/webpack_rails/node_modules/express/node_modules/depd/Readme.md +274 -0
  101. data/lib/webpack_rails/node_modules/express/node_modules/depd/index.js +529 -0
  102. data/lib/webpack_rails/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js +33 -0
  103. data/lib/webpack_rails/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js +101 -0
  104. data/lib/webpack_rails/node_modules/express/node_modules/depd/lib/compat/index.js +69 -0
  105. data/lib/webpack_rails/node_modules/express/node_modules/depd/package.json +66 -0
  106. data/lib/webpack_rails/node_modules/express/node_modules/escape-html/LICENSE +22 -0
  107. data/lib/webpack_rails/node_modules/express/node_modules/escape-html/Readme.md +15 -0
  108. data/lib/webpack_rails/node_modules/express/node_modules/escape-html/index.js +29 -0
  109. data/lib/webpack_rails/node_modules/express/node_modules/escape-html/package.json +51 -0
  110. data/lib/webpack_rails/node_modules/express/node_modules/etag/HISTORY.md +71 -0
  111. data/lib/webpack_rails/node_modules/express/node_modules/etag/LICENSE +22 -0
  112. data/lib/webpack_rails/node_modules/express/node_modules/etag/README.md +165 -0
  113. data/lib/webpack_rails/node_modules/express/node_modules/etag/index.js +132 -0
  114. data/lib/webpack_rails/node_modules/express/node_modules/etag/package.json +73 -0
  115. data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/HISTORY.md +90 -0
  116. data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/LICENSE +22 -0
  117. data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/README.md +133 -0
  118. data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/index.js +151 -0
  119. data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/HISTORY.md +4 -0
  120. data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/LICENSE +22 -0
  121. data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/README.md +43 -0
  122. data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/index.js +69 -0
  123. data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/node_modules/unpipe/package.json +59 -0
  124. data/lib/webpack_rails/node_modules/express/node_modules/finalhandler/package.json +81 -0
  125. data/lib/webpack_rails/node_modules/express/node_modules/fresh/HISTORY.md +38 -0
  126. data/lib/webpack_rails/node_modules/express/node_modules/fresh/LICENSE +22 -0
  127. data/lib/webpack_rails/node_modules/express/node_modules/fresh/README.md +58 -0
  128. data/lib/webpack_rails/node_modules/express/node_modules/fresh/index.js +57 -0
  129. data/lib/webpack_rails/node_modules/express/node_modules/fresh/package.json +87 -0
  130. data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/LICENSE +22 -0
  131. data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/README.md +34 -0
  132. data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/index.js +57 -0
  133. data/lib/webpack_rails/node_modules/express/node_modules/merge-descriptors/package.json +125 -0
  134. data/lib/webpack_rails/node_modules/express/node_modules/methods/HISTORY.md +24 -0
  135. data/lib/webpack_rails/node_modules/express/node_modules/methods/LICENSE +23 -0
  136. data/lib/webpack_rails/node_modules/express/node_modules/methods/README.md +41 -0
  137. data/lib/webpack_rails/node_modules/express/node_modules/methods/index.js +42 -0
  138. data/lib/webpack_rails/node_modules/express/node_modules/methods/package.json +88 -0
  139. data/lib/webpack_rails/node_modules/express/node_modules/on-finished/HISTORY.md +88 -0
  140. data/lib/webpack_rails/node_modules/express/node_modules/on-finished/LICENSE +23 -0
  141. data/lib/webpack_rails/node_modules/express/node_modules/on-finished/README.md +154 -0
  142. data/lib/webpack_rails/node_modules/express/node_modules/on-finished/index.js +196 -0
  143. data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE +22 -0
  144. data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md +80 -0
  145. data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js +95 -0
  146. data/lib/webpack_rails/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json +64 -0
  147. data/lib/webpack_rails/node_modules/express/node_modules/on-finished/package.json +71 -0
  148. data/lib/webpack_rails/node_modules/express/node_modules/parseurl/HISTORY.md +42 -0
  149. data/lib/webpack_rails/node_modules/express/node_modules/parseurl/LICENSE +24 -0
  150. data/lib/webpack_rails/node_modules/express/node_modules/parseurl/README.md +107 -0
  151. data/lib/webpack_rails/node_modules/express/node_modules/parseurl/index.js +136 -0
  152. data/lib/webpack_rails/node_modules/express/node_modules/parseurl/package.json +80 -0
  153. data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/History.md +36 -0
  154. data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/LICENSE +21 -0
  155. data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/Readme.md +35 -0
  156. data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/index.js +129 -0
  157. data/lib/webpack_rails/node_modules/express/node_modules/path-to-regexp/package.json +184 -0
  158. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/HISTORY.md +66 -0
  159. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/LICENSE +22 -0
  160. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/README.md +137 -0
  161. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/index.js +345 -0
  162. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md +4 -0
  163. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE +22 -0
  164. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md +53 -0
  165. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js +35 -0
  166. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json +65 -0
  167. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile +18 -0
  168. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE +19 -0
  169. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md +161 -0
  170. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js +1 -0
  171. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js +439 -0
  172. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json +60 -0
  173. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee +374 -0
  174. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee +262 -0
  175. data/lib/webpack_rails/node_modules/express/node_modules/proxy-addr/package.json +90 -0
  176. data/lib/webpack_rails/node_modules/express/node_modules/qs/CHANGELOG.md +88 -0
  177. data/lib/webpack_rails/node_modules/express/node_modules/qs/CONTRIBUTING.md +1 -0
  178. data/lib/webpack_rails/node_modules/express/node_modules/qs/LICENSE +28 -0
  179. data/lib/webpack_rails/node_modules/express/node_modules/qs/README.md +317 -0
  180. data/lib/webpack_rails/node_modules/express/node_modules/qs/bower.json +22 -0
  181. data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/index.js +15 -0
  182. data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/parse.js +186 -0
  183. data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/stringify.js +121 -0
  184. data/lib/webpack_rails/node_modules/express/node_modules/qs/lib/utils.js +190 -0
  185. data/lib/webpack_rails/node_modules/express/node_modules/qs/package.json +56 -0
  186. data/lib/webpack_rails/node_modules/express/node_modules/qs/test/parse.js +478 -0
  187. data/lib/webpack_rails/node_modules/express/node_modules/qs/test/stringify.js +259 -0
  188. data/lib/webpack_rails/node_modules/express/node_modules/qs/test/utils.js +28 -0
  189. data/lib/webpack_rails/node_modules/express/node_modules/range-parser/HISTORY.md +35 -0
  190. data/lib/webpack_rails/node_modules/express/node_modules/range-parser/LICENSE +22 -0
  191. data/lib/webpack_rails/node_modules/express/node_modules/range-parser/README.md +48 -0
  192. data/lib/webpack_rails/node_modules/express/node_modules/range-parser/index.js +49 -0
  193. data/lib/webpack_rails/node_modules/express/node_modules/range-parser/package.json +76 -0
  194. data/lib/webpack_rails/node_modules/express/node_modules/send/HISTORY.md +295 -0
  195. data/lib/webpack_rails/node_modules/express/node_modules/send/LICENSE +23 -0
  196. data/lib/webpack_rails/node_modules/express/node_modules/send/README.md +195 -0
  197. data/lib/webpack_rails/node_modules/express/node_modules/send/index.js +820 -0
  198. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/destroy/README.md +38 -0
  199. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/destroy/index.js +36 -0
  200. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/destroy/package.json +67 -0
  201. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/HISTORY.md +76 -0
  202. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/LICENSE +22 -0
  203. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/README.md +63 -0
  204. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/index.js +120 -0
  205. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/LICENSE +16 -0
  206. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/README.md +42 -0
  207. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits.js +1 -0
  208. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits_browser.js +23 -0
  209. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/package.json +50 -0
  210. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/test.js +25 -0
  211. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/http-errors/package.json +85 -0
  212. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/LICENSE +19 -0
  213. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/README.md +90 -0
  214. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/build/build.js +11 -0
  215. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/build/test.js +57 -0
  216. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/cli.js +8 -0
  217. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/mime.js +108 -0
  218. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/package.json +73 -0
  219. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/mime/types.json +1 -0
  220. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/History.md +66 -0
  221. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/LICENSE +20 -0
  222. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/README.md +35 -0
  223. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/index.js +125 -0
  224. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/ms/package.json +47 -0
  225. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/LICENSE +22 -0
  226. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/README.md +114 -0
  227. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/codes.json +64 -0
  228. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/index.js +60 -0
  229. data/lib/webpack_rails/node_modules/express/node_modules/send/node_modules/statuses/package.json +84 -0
  230. data/lib/webpack_rails/node_modules/express/node_modules/send/package.json +89 -0
  231. data/lib/webpack_rails/node_modules/express/node_modules/serve-static/HISTORY.md +284 -0
  232. data/lib/webpack_rails/node_modules/express/node_modules/serve-static/LICENSE +25 -0
  233. data/lib/webpack_rails/node_modules/express/node_modules/serve-static/README.md +235 -0
  234. data/lib/webpack_rails/node_modules/express/node_modules/serve-static/index.js +187 -0
  235. data/lib/webpack_rails/node_modules/express/node_modules/serve-static/package.json +83 -0
  236. data/lib/webpack_rails/node_modules/express/node_modules/type-is/HISTORY.md +180 -0
  237. data/lib/webpack_rails/node_modules/express/node_modules/type-is/LICENSE +23 -0
  238. data/lib/webpack_rails/node_modules/express/node_modules/type-is/README.md +132 -0
  239. data/lib/webpack_rails/node_modules/express/node_modules/type-is/index.js +262 -0
  240. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/HISTORY.md +22 -0
  241. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/LICENSE +22 -0
  242. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/README.md +81 -0
  243. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/index.js +270 -0
  244. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/media-typer/package.json +58 -0
  245. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md +171 -0
  246. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE +23 -0
  247. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md +103 -0
  248. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js +188 -0
  249. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md +274 -0
  250. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE +22 -0
  251. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md +82 -0
  252. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json +6474 -0
  253. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js +11 -0
  254. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json +94 -0
  255. data/lib/webpack_rails/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json +84 -0
  256. data/lib/webpack_rails/node_modules/express/node_modules/type-is/package.json +93 -0
  257. data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/LICENSE +20 -0
  258. data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/README.md +34 -0
  259. data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/index.js +23 -0
  260. data/lib/webpack_rails/node_modules/express/node_modules/utils-merge/package.json +58 -0
  261. data/lib/webpack_rails/node_modules/express/node_modules/vary/HISTORY.md +23 -0
  262. data/lib/webpack_rails/node_modules/express/node_modules/vary/LICENSE +22 -0
  263. data/lib/webpack_rails/node_modules/express/node_modules/vary/README.md +91 -0
  264. data/lib/webpack_rails/node_modules/express/node_modules/vary/index.js +117 -0
  265. data/lib/webpack_rails/node_modules/express/node_modules/vary/package.json +72 -0
  266. data/lib/webpack_rails/node_modules/express/package.json +167 -0
  267. data/lib/webpack_rails/node_modules/is-array/History.md +11 -0
  268. data/lib/webpack_rails/node_modules/is-array/Makefile +11 -0
  269. data/lib/webpack_rails/node_modules/is-array/Readme.md +27 -0
  270. data/lib/webpack_rails/node_modules/is-array/component.json +13 -0
  271. data/lib/webpack_rails/node_modules/is-array/index.js +33 -0
  272. data/lib/webpack_rails/node_modules/is-array/package.json +41 -0
  273. data/lib/webpack_rails/node_modules/is-array/test/test.html +46 -0
  274. data/lib/webpack_rails/node_modules/is-object/LICENSE +19 -0
  275. data/lib/webpack_rails/node_modules/is-object/README.md +55 -0
  276. data/lib/webpack_rails/node_modules/is-object/index.js +5 -0
  277. data/lib/webpack_rails/node_modules/is-object/package.json +91 -0
  278. data/lib/webpack_rails/node_modules/is-object/test/index.js +23 -0
  279. data/lib/webpack_rails/node_modules/is-string/CHANGELOG.md +19 -0
  280. data/lib/webpack_rails/node_modules/is-string/LICENSE +22 -0
  281. data/lib/webpack_rails/node_modules/is-string/Makefile +61 -0
  282. data/lib/webpack_rails/node_modules/is-string/README.md +57 -0
  283. data/lib/webpack_rails/node_modules/is-string/index.js +20 -0
  284. data/lib/webpack_rails/node_modules/is-string/package.json +93 -0
  285. data/lib/webpack_rails/node_modules/is-string/test.js +36 -0
  286. data/lib/webpack_rails/node_modules/js-string-escape/CHANGELOG.md +9 -0
  287. data/lib/webpack_rails/node_modules/js-string-escape/LICENSE +21 -0
  288. data/lib/webpack_rails/node_modules/js-string-escape/README.md +44 -0
  289. data/lib/webpack_rails/node_modules/js-string-escape/index.js +22 -0
  290. data/lib/webpack_rails/node_modules/js-string-escape/package.json +63 -0
  291. data/lib/webpack_rails/node_modules/js-string-escape/test/test.js +43 -0
  292. data/lib/webpack_rails/node_modules/strip-ansi/index.js +6 -0
  293. data/lib/webpack_rails/node_modules/strip-ansi/license +21 -0
  294. data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/index.js +4 -0
  295. data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/license +21 -0
  296. data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/package.json +86 -0
  297. data/lib/webpack_rails/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +31 -0
  298. data/lib/webpack_rails/node_modules/strip-ansi/package.json +85 -0
  299. data/lib/webpack_rails/node_modules/strip-ansi/readme.md +33 -0
  300. data/lib/webpack_rails/node_modules/webpack-hot-middleware/README.md +109 -0
  301. data/lib/webpack_rails/node_modules/webpack-hot-middleware/client-overlay.js +35 -0
  302. data/lib/webpack_rails/node_modules/webpack-hot-middleware/client.js +131 -0
  303. data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/README.md +15 -0
  304. data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/client.js +30 -0
  305. data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/index.html +18 -0
  306. data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/package.json +14 -0
  307. data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/server.js +41 -0
  308. data/lib/webpack_rails/node_modules/webpack-hot-middleware/example/webpack.config.js +22 -0
  309. data/lib/webpack_rails/node_modules/webpack-hot-middleware/helpers.js +8 -0
  310. data/lib/webpack_rails/node_modules/webpack-hot-middleware/middleware.js +83 -0
  311. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/History.md +20 -0
  312. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/License.md +19 -0
  313. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/Readme.md +15 -0
  314. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/decode.js +80 -0
  315. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/encode.js +64 -0
  316. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/index.js +4 -0
  317. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/package.json +96 -0
  318. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/test/common-index.js +3 -0
  319. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/test/index.js +210 -0
  320. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/querystring/test/tap-index.js +3 -0
  321. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/cli.js +47 -0
  322. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/index.js +6 -0
  323. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/index.js +4 -0
  324. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/license +21 -0
  325. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/package.json +86 -0
  326. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +33 -0
  327. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/package.json +89 -0
  328. data/lib/webpack_rails/node_modules/webpack-hot-middleware/node_modules/strip-ansi/readme.md +43 -0
  329. data/lib/webpack_rails/node_modules/webpack-hot-middleware/package.json +58 -0
  330. data/lib/webpack_rails/node_modules/webpack-hot-middleware/process-update.js +105 -0
  331. data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/client-test.js +81 -0
  332. data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/helpers-test.js +22 -0
  333. data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/middleware-test.js +188 -0
  334. data/lib/webpack_rails/node_modules/webpack-hot-middleware/test/mocha.opts +1 -0
  335. data/lib/webpack_rails/node_modules/xtend/LICENCE +19 -0
  336. data/lib/webpack_rails/node_modules/xtend/Makefile +4 -0
  337. data/lib/webpack_rails/node_modules/xtend/README.md +32 -0
  338. data/lib/webpack_rails/node_modules/xtend/immutable.js +17 -0
  339. data/lib/webpack_rails/node_modules/xtend/mutable.js +15 -0
  340. data/lib/webpack_rails/node_modules/xtend/package.json +88 -0
  341. data/lib/webpack_rails/node_modules/xtend/test.js +63 -0
  342. data/lib/webpack_rails/package.json +22 -0
  343. data/lib/webpack_rails/processor.rb +28 -9
  344. data/lib/webpack_rails/require_directive_processor.rb +51 -0
  345. data/lib/webpack_rails/sprockets_environment.rb +45 -0
  346. data/lib/webpack_rails/task.rb +51 -22
  347. data/lib/webpack_rails/webpack-task-dev-server.js +122 -0
  348. data/lib/webpack_rails/{webpack-task.js → webpack-task-watch.js} +0 -0
  349. data/lib/webpack_rails/webpack.rake +5 -5
  350. data/lib/webpack_rails.rb +1 -3
  351. metadata +346 -5
  352. data/lib/webpack_rails/sprockets_base_webpack.rb +0 -14
  353. data/lib/webpack_rails/sprockets_index_webpack.rb +0 -15
@@ -0,0 +1,118 @@
1
+ module.exports = preferredEncodings;
2
+ preferredEncodings.preferredEncodings = preferredEncodings;
3
+
4
+ function parseAcceptEncoding(accept) {
5
+ var accepts = accept.split(',');
6
+ var hasIdentity = false;
7
+ var minQuality = 1;
8
+
9
+ for (var i = 0, j = 0; i < accepts.length; i++) {
10
+ var encoding = parseEncoding(accepts[i].trim(), i);
11
+
12
+ if (encoding) {
13
+ accepts[j++] = encoding;
14
+ hasIdentity = hasIdentity || specify('identity', encoding);
15
+ minQuality = Math.min(minQuality, encoding.q || 1);
16
+ }
17
+ }
18
+
19
+ if (!hasIdentity) {
20
+ /*
21
+ * If identity doesn't explicitly appear in the accept-encoding header,
22
+ * it's added to the list of acceptable encoding with the lowest q
23
+ */
24
+ accepts[j++] = {
25
+ encoding: 'identity',
26
+ q: minQuality,
27
+ i: i
28
+ };
29
+ }
30
+
31
+ // trim accepts
32
+ accepts.length = j;
33
+
34
+ return accepts;
35
+ }
36
+
37
+ function parseEncoding(s, i) {
38
+ var match = s.match(/^\s*(\S+?)\s*(?:;(.*))?$/);
39
+
40
+ if (!match) return null;
41
+
42
+ var encoding = match[1];
43
+ var q = 1;
44
+ if (match[2]) {
45
+ var params = match[2].split(';');
46
+ for (var i = 0; i < params.length; i ++) {
47
+ var p = params[i].trim().split('=');
48
+ if (p[0] === 'q') {
49
+ q = parseFloat(p[1]);
50
+ break;
51
+ }
52
+ }
53
+ }
54
+
55
+ return {
56
+ encoding: encoding,
57
+ q: q,
58
+ i: i
59
+ };
60
+ }
61
+
62
+ function getEncodingPriority(encoding, accepted, index) {
63
+ var priority = {o: -1, q: 0, s: 0};
64
+
65
+ for (var i = 0; i < accepted.length; i++) {
66
+ var spec = specify(encoding, accepted[i], index);
67
+
68
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
69
+ priority = spec;
70
+ }
71
+ }
72
+
73
+ return priority;
74
+ }
75
+
76
+ function specify(encoding, spec, index) {
77
+ var s = 0;
78
+ if(spec.encoding.toLowerCase() === encoding.toLowerCase()){
79
+ s |= 1;
80
+ } else if (spec.encoding !== '*' ) {
81
+ return null
82
+ }
83
+
84
+ return {
85
+ i: index,
86
+ o: spec.i,
87
+ q: spec.q,
88
+ s: s
89
+ }
90
+ };
91
+
92
+ function preferredEncodings(accept, provided) {
93
+ var accepts = parseAcceptEncoding(accept || '');
94
+
95
+ if (!provided) {
96
+ // sorted list of all encodings
97
+ return accepts.filter(isQuality).sort(compareSpecs).map(function getEncoding(spec) {
98
+ return spec.encoding;
99
+ });
100
+ }
101
+
102
+ var priorities = provided.map(function getPriority(type, index) {
103
+ return getEncodingPriority(type, accepts, index);
104
+ });
105
+
106
+ // sorted list of accepted encodings
107
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) {
108
+ return provided[priorities.indexOf(priority)];
109
+ });
110
+ }
111
+
112
+ function compareSpecs(a, b) {
113
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
114
+ }
115
+
116
+ function isQuality(spec) {
117
+ return spec.q > 0;
118
+ }
@@ -0,0 +1,112 @@
1
+ module.exports = preferredLanguages;
2
+ preferredLanguages.preferredLanguages = preferredLanguages;
3
+
4
+ function parseAcceptLanguage(accept) {
5
+ var accepts = accept.split(',');
6
+
7
+ for (var i = 0, j = 0; i < accepts.length; i++) {
8
+ var langauge = parseLanguage(accepts[i].trim(), i);
9
+
10
+ if (langauge) {
11
+ accepts[j++] = langauge;
12
+ }
13
+ }
14
+
15
+ // trim accepts
16
+ accepts.length = j;
17
+
18
+ return accepts;
19
+ }
20
+
21
+ function parseLanguage(s, i) {
22
+ var match = s.match(/^\s*(\S+?)(?:-(\S+?))?\s*(?:;(.*))?$/);
23
+ if (!match) return null;
24
+
25
+ var prefix = match[1],
26
+ suffix = match[2],
27
+ full = prefix;
28
+
29
+ if (suffix) full += "-" + suffix;
30
+
31
+ var q = 1;
32
+ if (match[3]) {
33
+ var params = match[3].split(';')
34
+ for (var i = 0; i < params.length; i ++) {
35
+ var p = params[i].split('=');
36
+ if (p[0] === 'q') q = parseFloat(p[1]);
37
+ }
38
+ }
39
+
40
+ return {
41
+ prefix: prefix,
42
+ suffix: suffix,
43
+ q: q,
44
+ i: i,
45
+ full: full
46
+ };
47
+ }
48
+
49
+ function getLanguagePriority(language, accepted, index) {
50
+ var priority = {o: -1, q: 0, s: 0};
51
+
52
+ for (var i = 0; i < accepted.length; i++) {
53
+ var spec = specify(language, accepted[i], index);
54
+
55
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
56
+ priority = spec;
57
+ }
58
+ }
59
+
60
+ return priority;
61
+ }
62
+
63
+ function specify(language, spec, index) {
64
+ var p = parseLanguage(language)
65
+ if (!p) return null;
66
+ var s = 0;
67
+ if(spec.full.toLowerCase() === p.full.toLowerCase()){
68
+ s |= 4;
69
+ } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) {
70
+ s |= 2;
71
+ } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) {
72
+ s |= 1;
73
+ } else if (spec.full !== '*' ) {
74
+ return null
75
+ }
76
+
77
+ return {
78
+ i: index,
79
+ o: spec.i,
80
+ q: spec.q,
81
+ s: s
82
+ }
83
+ };
84
+
85
+ function preferredLanguages(accept, provided) {
86
+ // RFC 2616 sec 14.4: no header = *
87
+ var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');
88
+
89
+ if (!provided) {
90
+ // sorted list of all languages
91
+ return accepts.filter(isQuality).sort(compareSpecs).map(function getLanguage(spec) {
92
+ return spec.full;
93
+ });
94
+ }
95
+
96
+ var priorities = provided.map(function getPriority(type, index) {
97
+ return getLanguagePriority(type, accepts, index);
98
+ });
99
+
100
+ // sorted list of accepted languages
101
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {
102
+ return provided[priorities.indexOf(priority)];
103
+ });
104
+ }
105
+
106
+ function compareSpecs(a, b) {
107
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
108
+ }
109
+
110
+ function isQuality(spec) {
111
+ return spec.q > 0;
112
+ }
@@ -0,0 +1,179 @@
1
+ /**
2
+ * negotiator
3
+ * Copyright(c) 2012 Isaac Z. Schlueter
4
+ * Copyright(c) 2014 Federico Romero
5
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
6
+ * MIT Licensed
7
+ */
8
+
9
+ module.exports = preferredMediaTypes;
10
+ preferredMediaTypes.preferredMediaTypes = preferredMediaTypes;
11
+
12
+ function parseAccept(accept) {
13
+ var accepts = splitMediaTypes(accept);
14
+
15
+ for (var i = 0, j = 0; i < accepts.length; i++) {
16
+ var mediaType = parseMediaType(accepts[i].trim(), i);
17
+
18
+ if (mediaType) {
19
+ accepts[j++] = mediaType;
20
+ }
21
+ }
22
+
23
+ // trim accepts
24
+ accepts.length = j;
25
+
26
+ return accepts;
27
+ };
28
+
29
+ function parseMediaType(s, i) {
30
+ var match = s.match(/\s*(\S+?)\/([^;\s]+)\s*(?:;(.*))?/);
31
+ if (!match) return null;
32
+
33
+ var type = match[1],
34
+ subtype = match[2],
35
+ full = "" + type + "/" + subtype,
36
+ params = {},
37
+ q = 1;
38
+
39
+ if (match[3]) {
40
+ params = match[3].split(';').map(function(s) {
41
+ return s.trim().split('=');
42
+ }).reduce(function (set, p) {
43
+ var name = p[0].toLowerCase();
44
+ var value = p[1];
45
+
46
+ set[name] = value && value[0] === '"' && value[value.length - 1] === '"'
47
+ ? value.substr(1, value.length - 2)
48
+ : value;
49
+
50
+ return set;
51
+ }, params);
52
+
53
+ if (params.q != null) {
54
+ q = parseFloat(params.q);
55
+ delete params.q;
56
+ }
57
+ }
58
+
59
+ return {
60
+ type: type,
61
+ subtype: subtype,
62
+ params: params,
63
+ q: q,
64
+ i: i,
65
+ full: full
66
+ };
67
+ }
68
+
69
+ function getMediaTypePriority(type, accepted, index) {
70
+ var priority = {o: -1, q: 0, s: 0};
71
+
72
+ for (var i = 0; i < accepted.length; i++) {
73
+ var spec = specify(type, accepted[i], index);
74
+
75
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
76
+ priority = spec;
77
+ }
78
+ }
79
+
80
+ return priority;
81
+ }
82
+
83
+ function specify(type, spec, index) {
84
+ var p = parseMediaType(type);
85
+ var s = 0;
86
+
87
+ if (!p) {
88
+ return null;
89
+ }
90
+
91
+ if(spec.type.toLowerCase() == p.type.toLowerCase()) {
92
+ s |= 4
93
+ } else if(spec.type != '*') {
94
+ return null;
95
+ }
96
+
97
+ if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) {
98
+ s |= 2
99
+ } else if(spec.subtype != '*') {
100
+ return null;
101
+ }
102
+
103
+ var keys = Object.keys(spec.params);
104
+ if (keys.length > 0) {
105
+ if (keys.every(function (k) {
106
+ return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase();
107
+ })) {
108
+ s |= 1
109
+ } else {
110
+ return null
111
+ }
112
+ }
113
+
114
+ return {
115
+ i: index,
116
+ o: spec.i,
117
+ q: spec.q,
118
+ s: s,
119
+ }
120
+
121
+ }
122
+
123
+ function preferredMediaTypes(accept, provided) {
124
+ // RFC 2616 sec 14.2: no header = */*
125
+ var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');
126
+
127
+ if (!provided) {
128
+ // sorted list of all types
129
+ return accepts.filter(isQuality).sort(compareSpecs).map(function getType(spec) {
130
+ return spec.full;
131
+ });
132
+ }
133
+
134
+ var priorities = provided.map(function getPriority(type, index) {
135
+ return getMediaTypePriority(type, accepts, index);
136
+ });
137
+
138
+ // sorted list of accepted types
139
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {
140
+ return provided[priorities.indexOf(priority)];
141
+ });
142
+ }
143
+
144
+ function compareSpecs(a, b) {
145
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
146
+ }
147
+
148
+ function isQuality(spec) {
149
+ return spec.q > 0;
150
+ }
151
+
152
+ function quoteCount(string) {
153
+ var count = 0;
154
+ var index = 0;
155
+
156
+ while ((index = string.indexOf('"', index)) !== -1) {
157
+ count++;
158
+ index++;
159
+ }
160
+
161
+ return count;
162
+ }
163
+
164
+ function splitMediaTypes(accept) {
165
+ var accepts = accept.split(',');
166
+
167
+ for (var i = 1, j = 0; i < accepts.length; i++) {
168
+ if (quoteCount(accepts[j]) % 2 == 0) {
169
+ accepts[++j] = accepts[i];
170
+ } else {
171
+ accepts[j] += ',' + accepts[i];
172
+ }
173
+ }
174
+
175
+ // trim accepts
176
+ accepts.length = j + 1;
177
+
178
+ return accepts;
179
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "negotiator",
3
+ "description": "HTTP content negotiation",
4
+ "version": "0.5.3",
5
+ "contributors": [
6
+ {
7
+ "name": "Douglas Christopher Wilson",
8
+ "email": "doug@somethingdoug.com"
9
+ },
10
+ {
11
+ "name": "Federico Romero",
12
+ "email": "federico.romero@outboxlabs.com"
13
+ },
14
+ {
15
+ "name": "Isaac Z. Schlueter",
16
+ "email": "i@izs.me",
17
+ "url": "http://blog.izs.me/"
18
+ }
19
+ ],
20
+ "license": "MIT",
21
+ "keywords": [
22
+ "http",
23
+ "content negotiation",
24
+ "accept",
25
+ "accept-language",
26
+ "accept-encoding",
27
+ "accept-charset"
28
+ ],
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/jshttp/negotiator.git"
32
+ },
33
+ "devDependencies": {
34
+ "istanbul": "0.3.9",
35
+ "mocha": "~1.21.5"
36
+ },
37
+ "files": [
38
+ "lib/",
39
+ "HISTORY.md",
40
+ "LICENSE",
41
+ "index.js",
42
+ "README.md"
43
+ ],
44
+ "engines": {
45
+ "node": ">= 0.6"
46
+ },
47
+ "scripts": {
48
+ "test": "mocha --reporter spec --check-leaks --bail test/",
49
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
50
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
51
+ },
52
+ "gitHead": "cbb717b3f164f25820f90b160cda6d0166b9d922",
53
+ "bugs": {
54
+ "url": "https://github.com/jshttp/negotiator/issues"
55
+ },
56
+ "homepage": "https://github.com/jshttp/negotiator",
57
+ "_id": "negotiator@0.5.3",
58
+ "_shasum": "269d5c476810ec92edbe7b6c2f28316384f9a7e8",
59
+ "_from": "negotiator@0.5.3",
60
+ "_npmVersion": "1.4.28",
61
+ "_npmUser": {
62
+ "name": "dougwilson",
63
+ "email": "doug@somethingdoug.com"
64
+ },
65
+ "maintainers": [
66
+ {
67
+ "name": "federomero",
68
+ "email": "federomero@gmail.com"
69
+ },
70
+ {
71
+ "name": "dougwilson",
72
+ "email": "doug@somethingdoug.com"
73
+ },
74
+ {
75
+ "name": "jongleberry",
76
+ "email": "jonathanrichardong@gmail.com"
77
+ }
78
+ ],
79
+ "dist": {
80
+ "shasum": "269d5c476810ec92edbe7b6c2f28316384f9a7e8",
81
+ "tarball": "http://registry.npmjs.org/negotiator/-/negotiator-0.5.3.tgz"
82
+ },
83
+ "directories": {},
84
+ "_resolved": "http://registry.npmjs.org/negotiator/-/negotiator-0.5.3.tgz",
85
+ "readme": "ERROR: No README data found!"
86
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "name": "accepts",
3
+ "description": "Higher-level content negotiation",
4
+ "version": "1.2.13",
5
+ "contributors": [
6
+ {
7
+ "name": "Douglas Christopher Wilson",
8
+ "email": "doug@somethingdoug.com"
9
+ },
10
+ {
11
+ "name": "Jonathan Ong",
12
+ "email": "me@jongleberry.com",
13
+ "url": "http://jongleberry.com"
14
+ }
15
+ ],
16
+ "license": "MIT",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/jshttp/accepts.git"
20
+ },
21
+ "dependencies": {
22
+ "mime-types": "~2.1.6",
23
+ "negotiator": "0.5.3"
24
+ },
25
+ "devDependencies": {
26
+ "istanbul": "0.3.19",
27
+ "mocha": "~1.21.5"
28
+ },
29
+ "files": [
30
+ "LICENSE",
31
+ "HISTORY.md",
32
+ "index.js"
33
+ ],
34
+ "engines": {
35
+ "node": ">= 0.6"
36
+ },
37
+ "scripts": {
38
+ "test": "mocha --reporter spec --check-leaks --bail test/",
39
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
40
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
41
+ },
42
+ "keywords": [
43
+ "content",
44
+ "negotiation",
45
+ "accept",
46
+ "accepts"
47
+ ],
48
+ "gitHead": "b7e15ecb25dacc0b2133ed0553d64f8a79537e01",
49
+ "bugs": {
50
+ "url": "https://github.com/jshttp/accepts/issues"
51
+ },
52
+ "homepage": "https://github.com/jshttp/accepts",
53
+ "_id": "accepts@1.2.13",
54
+ "_shasum": "e5f1f3928c6d95fd96558c36ec3d9d0de4a6ecea",
55
+ "_from": "accepts@>=1.2.12 <1.3.0",
56
+ "_npmVersion": "1.4.28",
57
+ "_npmUser": {
58
+ "name": "dougwilson",
59
+ "email": "doug@somethingdoug.com"
60
+ },
61
+ "maintainers": [
62
+ {
63
+ "name": "jongleberry",
64
+ "email": "jonathanrichardong@gmail.com"
65
+ },
66
+ {
67
+ "name": "federomero",
68
+ "email": "federomero@gmail.com"
69
+ },
70
+ {
71
+ "name": "dougwilson",
72
+ "email": "doug@somethingdoug.com"
73
+ },
74
+ {
75
+ "name": "fishrock123",
76
+ "email": "fishrock123@rocketmail.com"
77
+ },
78
+ {
79
+ "name": "tjholowaychuk",
80
+ "email": "tj@vision-media.ca"
81
+ },
82
+ {
83
+ "name": "mscdex",
84
+ "email": "mscdex@mscdex.net"
85
+ },
86
+ {
87
+ "name": "defunctzombie",
88
+ "email": "shtylman@gmail.com"
89
+ }
90
+ ],
91
+ "dist": {
92
+ "shasum": "e5f1f3928c6d95fd96558c36ec3d9d0de4a6ecea",
93
+ "tarball": "http://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz"
94
+ },
95
+ "directories": {},
96
+ "_resolved": "http://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz",
97
+ "readme": "ERROR: No README data found!"
98
+ }
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,43 @@
1
+ # Array Flatten
2
+
3
+ [![NPM version][npm-image]][npm-url]
4
+ [![NPM downloads][downloads-image]][downloads-url]
5
+ [![Build status][travis-image]][travis-url]
6
+ [![Test coverage][coveralls-image]][coveralls-url]
7
+
8
+ > Flatten an array of nested arrays into a single flat array. Accepts an optional depth.
9
+
10
+ ## Installation
11
+
12
+ ```
13
+ npm install array-flatten --save
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```javascript
19
+ var flatten = require('array-flatten')
20
+
21
+ flatten([1, [2, [3, [4, [5], 6], 7], 8], 9])
22
+ //=> [1, 2, 3, 4, 5, 6, 7, 8, 9]
23
+
24
+ flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2)
25
+ //=> [1, 2, 3, [4, [5], 6], 7, 8, 9]
26
+
27
+ (function () {
28
+ flatten(arguments) //=> [1, 2, 3]
29
+ })(1, [2, 3])
30
+ ```
31
+
32
+ ## License
33
+
34
+ MIT
35
+
36
+ [npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat
37
+ [npm-url]: https://npmjs.org/package/array-flatten
38
+ [downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat
39
+ [downloads-url]: https://npmjs.org/package/array-flatten
40
+ [travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat
41
+ [travis-url]: https://travis-ci.org/blakeembrey/array-flatten
42
+ [coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat
43
+ [coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master