cssesc-source 0.1.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (908) hide show
  1. checksums.yaml +5 -13
  2. data/vendor/LICENSE-MIT.txt +1 -1
  3. data/vendor/README.md +44 -50
  4. data/vendor/bin/cssesc +103 -109
  5. data/vendor/cssesc.js +114 -161
  6. data/vendor/man/cssesc.1 +2 -2
  7. data/vendor/package-lock.json +1664 -0
  8. data/vendor/package.json +47 -54
  9. metadata +9 -908
  10. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/MIT-LICENSE.txt +0 -21
  11. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/README.md +0 -43
  12. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/bin/stripcolorcodes.js +0 -18
  13. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/index.js +0 -3
  14. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/package.json +0 -42
  15. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/fixture/with-colors +0 -2
  16. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/fixture/without-colors +0 -2
  17. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/stripcolorcodes-test.js +0 -20
  18. data/vendor/node_modules/grunt-shell/package.json +0 -53
  19. data/vendor/node_modules/grunt-shell/readme.md +0 -221
  20. data/vendor/node_modules/grunt-shell/tasks/shell.js +0 -54
  21. data/vendor/node_modules/grunt-template/LICENSE-MIT.txt +0 -20
  22. data/vendor/node_modules/grunt-template/README.md +0 -123
  23. data/vendor/node_modules/grunt-template/package.json +0 -50
  24. data/vendor/node_modules/grunt-template/tasks/template.js +0 -44
  25. data/vendor/node_modules/grunt/CONTRIBUTING.md +0 -1
  26. data/vendor/node_modules/grunt/LICENSE-MIT +0 -22
  27. data/vendor/node_modules/grunt/README.md +0 -16
  28. data/vendor/node_modules/grunt/internal-tasks/bump.js +0 -151
  29. data/vendor/node_modules/grunt/internal-tasks/subgrunt.js +0 -34
  30. data/vendor/node_modules/grunt/lib/grunt.js +0 -156
  31. data/vendor/node_modules/grunt/lib/grunt/cli.js +0 -128
  32. data/vendor/node_modules/grunt/lib/grunt/config.js +0 -118
  33. data/vendor/node_modules/grunt/lib/grunt/event.js +0 -16
  34. data/vendor/node_modules/grunt/lib/grunt/fail.js +0 -84
  35. data/vendor/node_modules/grunt/lib/grunt/file.js +0 -440
  36. data/vendor/node_modules/grunt/lib/grunt/help.js +0 -129
  37. data/vendor/node_modules/grunt/lib/grunt/log.js +0 -352
  38. data/vendor/node_modules/grunt/lib/grunt/option.js +0 -42
  39. data/vendor/node_modules/grunt/lib/grunt/task.js +0 -451
  40. data/vendor/node_modules/grunt/lib/grunt/template.js +0 -95
  41. data/vendor/node_modules/grunt/lib/grunt/util.js +0 -188
  42. data/vendor/node_modules/grunt/lib/util/task.js +0 -323
  43. data/vendor/node_modules/grunt/node_modules/async/LICENSE +0 -19
  44. data/vendor/node_modules/grunt/node_modules/async/Makefile +0 -25
  45. data/vendor/node_modules/grunt/node_modules/async/README.md +0 -1021
  46. data/vendor/node_modules/grunt/node_modules/async/index.js +0 -3
  47. data/vendor/node_modules/grunt/node_modules/async/lib/async.js +0 -692
  48. data/vendor/node_modules/grunt/node_modules/async/package.json +0 -32
  49. data/vendor/node_modules/grunt/node_modules/coffee-script/CNAME +0 -1
  50. data/vendor/node_modules/grunt/node_modules/coffee-script/LICENSE +0 -22
  51. data/vendor/node_modules/grunt/node_modules/coffee-script/README +0 -51
  52. data/vendor/node_modules/grunt/node_modules/coffee-script/Rakefile +0 -78
  53. data/vendor/node_modules/grunt/node_modules/coffee-script/bin/cake +0 -7
  54. data/vendor/node_modules/grunt/node_modules/coffee-script/bin/coffee +0 -7
  55. data/vendor/node_modules/grunt/node_modules/coffee-script/extras/jsl.conf +0 -44
  56. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/browser.js +0 -92
  57. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/cake.js +0 -111
  58. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js +0 -167
  59. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/command.js +0 -500
  60. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/grammar.js +0 -606
  61. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/helpers.js +0 -77
  62. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/index.js +0 -11
  63. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/lexer.js +0 -788
  64. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/nodes.js +0 -2986
  65. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/optparse.js +0 -138
  66. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/parser.js +0 -683
  67. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/repl.js +0 -261
  68. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/rewriter.js +0 -349
  69. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/scope.js +0 -146
  70. data/vendor/node_modules/grunt/node_modules/coffee-script/package.json +0 -47
  71. data/vendor/node_modules/grunt/node_modules/colors/MIT-LICENSE.txt +0 -22
  72. data/vendor/node_modules/grunt/node_modules/colors/ReadMe.md +0 -77
  73. data/vendor/node_modules/grunt/node_modules/colors/colors.js +0 -342
  74. data/vendor/node_modules/grunt/node_modules/colors/example.html +0 -76
  75. data/vendor/node_modules/grunt/node_modules/colors/example.js +0 -77
  76. data/vendor/node_modules/grunt/node_modules/colors/package.json +0 -29
  77. data/vendor/node_modules/grunt/node_modules/colors/test.js +0 -70
  78. data/vendor/node_modules/grunt/node_modules/colors/themes/winston-dark.js +0 -12
  79. data/vendor/node_modules/grunt/node_modules/colors/themes/winston-light.js +0 -12
  80. data/vendor/node_modules/grunt/node_modules/dateformat/Readme.md +0 -67
  81. data/vendor/node_modules/grunt/node_modules/dateformat/lib/dateformat.js +0 -165
  82. data/vendor/node_modules/grunt/node_modules/dateformat/package.json +0 -20
  83. data/vendor/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.js +0 -4
  84. data/vendor/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.sh +0 -27
  85. data/vendor/node_modules/grunt/node_modules/eventemitter2/README.md +0 -212
  86. data/vendor/node_modules/grunt/node_modules/eventemitter2/index.js +0 -1
  87. data/vendor/node_modules/grunt/node_modules/eventemitter2/lib/eventemitter2.js +0 -561
  88. data/vendor/node_modules/grunt/node_modules/eventemitter2/package.json +0 -62
  89. data/vendor/node_modules/grunt/node_modules/exit/Gruntfile.js +0 -48
  90. data/vendor/node_modules/grunt/node_modules/exit/LICENSE-MIT +0 -22
  91. data/vendor/node_modules/grunt/node_modules/exit/README.md +0 -75
  92. data/vendor/node_modules/grunt/node_modules/exit/lib/exit.js +0 -41
  93. data/vendor/node_modules/grunt/node_modules/exit/package.json +0 -51
  94. data/vendor/node_modules/grunt/node_modules/exit/test/exit_test.js +0 -121
  95. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stderr.txt +0 -10
  96. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout-stderr.txt +0 -20
  97. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout.txt +0 -10
  98. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stderr.txt +0 -100
  99. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stdout-stderr.txt +0 -200
  100. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stdout.txt +0 -100
  101. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stderr.txt +0 -1000
  102. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout-stderr.txt +0 -2000
  103. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout.txt +0 -1000
  104. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/create-files.sh +0 -8
  105. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/log-broken.js +0 -23
  106. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/log.js +0 -25
  107. data/vendor/node_modules/grunt/node_modules/findup-sync/Gruntfile.js +0 -25
  108. data/vendor/node_modules/grunt/node_modules/findup-sync/LICENSE-MIT +0 -22
  109. data/vendor/node_modules/grunt/node_modules/findup-sync/README.md +0 -44
  110. data/vendor/node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js +0 -46
  111. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/README.md +0 -164
  112. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.js +0 -5152
  113. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.min.js +0 -42
  114. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.js +0 -4983
  115. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.min.js +0 -40
  116. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.js +0 -4307
  117. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.min.js +0 -34
  118. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/package.json +0 -62
  119. data/vendor/node_modules/grunt/node_modules/findup-sync/package.json +0 -48
  120. data/vendor/node_modules/grunt/node_modules/findup-sync/test/findup-sync_test.js +0 -48
  121. data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a.txt +0 -0
  122. data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/b/bar.txt +0 -0
  123. data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/foo.txt +0 -0
  124. data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt +0 -0
  125. data/vendor/node_modules/grunt/node_modules/getobject/Gruntfile.js +0 -48
  126. data/vendor/node_modules/grunt/node_modules/getobject/LICENSE-MIT +0 -22
  127. data/vendor/node_modules/grunt/node_modules/getobject/README.md +0 -20
  128. data/vendor/node_modules/grunt/node_modules/getobject/lib/getobject.js +0 -60
  129. data/vendor/node_modules/grunt/node_modules/getobject/package.json +0 -48
  130. data/vendor/node_modules/grunt/node_modules/getobject/test/namespace_test.js +0 -51
  131. data/vendor/node_modules/grunt/node_modules/glob/LICENSE +0 -27
  132. data/vendor/node_modules/grunt/node_modules/glob/README.md +0 -233
  133. data/vendor/node_modules/grunt/node_modules/glob/examples/g.js +0 -9
  134. data/vendor/node_modules/grunt/node_modules/glob/examples/usr-local.js +0 -9
  135. data/vendor/node_modules/grunt/node_modules/glob/glob.js +0 -643
  136. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/LICENSE +0 -27
  137. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/README.md +0 -33
  138. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/graceful-fs.js +0 -442
  139. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/package.json +0 -49
  140. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/open.js +0 -46
  141. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/ulimit.js +0 -158
  142. data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/README.md +0 -51
  143. data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/inherits.js +0 -29
  144. data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/package.json +0 -30
  145. data/vendor/node_modules/grunt/node_modules/glob/package.json +0 -40
  146. data/vendor/node_modules/grunt/node_modules/glob/test/00-setup.js +0 -176
  147. data/vendor/node_modules/grunt/node_modules/glob/test/bash-comparison.js +0 -63
  148. data/vendor/node_modules/grunt/node_modules/glob/test/bash-results.json +0 -348
  149. data/vendor/node_modules/grunt/node_modules/glob/test/cwd-test.js +0 -55
  150. data/vendor/node_modules/grunt/node_modules/glob/test/mark.js +0 -74
  151. data/vendor/node_modules/grunt/node_modules/glob/test/nocase-nomagic.js +0 -113
  152. data/vendor/node_modules/grunt/node_modules/glob/test/pause-resume.js +0 -73
  153. data/vendor/node_modules/grunt/node_modules/glob/test/root-nomount.js +0 -39
  154. data/vendor/node_modules/grunt/node_modules/glob/test/root.js +0 -46
  155. data/vendor/node_modules/grunt/node_modules/glob/test/zz-cleanup.js +0 -11
  156. data/vendor/node_modules/grunt/node_modules/hooker/LICENSE-MIT +0 -22
  157. data/vendor/node_modules/grunt/node_modules/hooker/README.md +0 -186
  158. data/vendor/node_modules/grunt/node_modules/hooker/child.js +0 -101
  159. data/vendor/node_modules/grunt/node_modules/hooker/dist/ba-hooker.js +0 -169
  160. data/vendor/node_modules/grunt/node_modules/hooker/dist/ba-hooker.min.js +0 -4
  161. data/vendor/node_modules/grunt/node_modules/hooker/grunt.js +0 -47
  162. data/vendor/node_modules/grunt/node_modules/hooker/lib/hooker.js +0 -174
  163. data/vendor/node_modules/grunt/node_modules/hooker/package.json +0 -45
  164. data/vendor/node_modules/grunt/node_modules/hooker/parent.js +0 -17
  165. data/vendor/node_modules/grunt/node_modules/hooker/test/hooker_test.js +0 -435
  166. data/vendor/node_modules/grunt/node_modules/iconv-lite/LICENSE +0 -21
  167. data/vendor/node_modules/grunt/node_modules/iconv-lite/README.md +0 -72
  168. data/vendor/node_modules/grunt/node_modules/iconv-lite/README.md~ +0 -54
  169. data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/big5.js +0 -9
  170. data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/gbk.js +0 -9
  171. data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/singlebyte.js +0 -340
  172. data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/table/big5.js +0 -1
  173. data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/table/gbk.js +0 -1
  174. data/vendor/node_modules/grunt/node_modules/iconv-lite/generation/generate-big5-table.js +0 -25
  175. data/vendor/node_modules/grunt/node_modules/iconv-lite/generation/generate-singlebyte.js +0 -142
  176. data/vendor/node_modules/grunt/node_modules/iconv-lite/index.js +0 -231
  177. data/vendor/node_modules/grunt/node_modules/iconv-lite/package.json +0 -80
  178. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/big5-test.js +0 -36
  179. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/big5File.txt +0 -13
  180. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/cyrillic-test.js +0 -86
  181. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/gbk-test.js +0 -38
  182. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/gbkFile.txt +0 -14
  183. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/greek-test.js +0 -79
  184. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/main-test.js +0 -55
  185. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/performance.js +0 -67
  186. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/turkish-test.js +0 -90
  187. data/vendor/node_modules/grunt/node_modules/js-yaml/HISTORY.md +0 -155
  188. data/vendor/node_modules/grunt/node_modules/js-yaml/LICENSE +0 -21
  189. data/vendor/node_modules/grunt/node_modules/js-yaml/README.md +0 -249
  190. data/vendor/node_modules/grunt/node_modules/js-yaml/bin/js-yaml.js +0 -125
  191. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/custom_types.js +0 -104
  192. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/custom_types.yaml +0 -18
  193. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/dumper.js +0 -31
  194. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/dumper.json +0 -22
  195. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/sample_document.js +0 -15
  196. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/sample_document.yaml +0 -197
  197. data/vendor/node_modules/grunt/node_modules/js-yaml/index.js +0 -1
  198. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml.js +0 -33
  199. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/common.js +0 -60
  200. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/dumper.js +0 -437
  201. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/exception.js +0 -25
  202. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/loader.js +0 -1549
  203. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/mark.js +0 -78
  204. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/require.js +0 -23
  205. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema.js +0 -103
  206. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/default.js +0 -16
  207. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/minimal.js +0 -13
  208. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/safe.js +0 -25
  209. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type.js +0 -82
  210. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/binary.js +0 -118
  211. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/bool.js +0 -74
  212. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/float.js +0 -102
  213. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/int.js +0 -85
  214. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/function.js +0 -56
  215. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +0 -56
  216. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +0 -28
  217. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/map.js +0 -11
  218. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/merge.js +0 -18
  219. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/null.js +0 -36
  220. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/omap.js +0 -53
  221. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/pairs.js +0 -41
  222. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/seq.js +0 -11
  223. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/set.js +0 -31
  224. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/str.js +0 -11
  225. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +0 -91
  226. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/HISTORY.md +0 -109
  227. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/LICENSE +0 -21
  228. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/README.md +0 -239
  229. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/arguments.js +0 -36
  230. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js +0 -22
  231. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/constants.js +0 -59
  232. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/help.js +0 -13
  233. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/nargs.js +0 -33
  234. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/parents.js +0 -28
  235. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js +0 -23
  236. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js +0 -49
  237. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sum.js +0 -35
  238. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js +0 -270
  239. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/index.js +0 -1
  240. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action.js +0 -146
  241. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append.js +0 -55
  242. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js +0 -47
  243. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/count.js +0 -40
  244. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/help.js +0 -48
  245. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store.js +0 -50
  246. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js +0 -43
  247. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js +0 -27
  248. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js +0 -26
  249. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js +0 -148
  250. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/version.js +0 -50
  251. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js +0 -481
  252. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argparse.js +0 -14
  253. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js +0 -50
  254. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js +0 -54
  255. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js +0 -75
  256. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js +0 -1165
  257. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/const.js +0 -18
  258. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js +0 -88
  259. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js +0 -803
  260. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/namespace.js +0 -77
  261. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile +0 -4
  262. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock +0 -17
  263. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown +0 -814
  264. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile +0 -23
  265. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json +0 -11
  266. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js +0 -1
  267. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js +0 -673
  268. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log +0 -0
  269. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json +0 -73
  270. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js +0 -45
  271. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js +0 -148
  272. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js +0 -685
  273. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings_standalone.js +0 -12
  274. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test.html +0 -31
  275. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html +0 -18
  276. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js +0 -200
  277. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js +0 -59
  278. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js +0 -426
  279. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js +0 -259
  280. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html +0 -45
  281. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js +0 -548
  282. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js +0 -75
  283. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js +0 -249
  284. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jquery.js +0 -9404
  285. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js +0 -670
  286. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.css +0 -235
  287. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.js +0 -1977
  288. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/underscore.js +0 -1201
  289. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CNAME +0 -1
  290. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CONTRIBUTING.md +0 -9
  291. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/LICENSE +0 -22
  292. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/README.md +0 -19
  293. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/favicon.ico +0 -0
  294. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html +0 -2467
  295. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.js +0 -1
  296. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/package.json +0 -35
  297. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore-min.js +0 -1
  298. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore.js +0 -1226
  299. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/package.json +0 -50
  300. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/README.md +0 -73
  301. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esparse.js +0 -117
  302. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js +0 -177
  303. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/esprima.js +0 -3908
  304. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/package.json +0 -59
  305. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/compat.js +0 -239
  306. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/reflect.js +0 -422
  307. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/run.js +0 -66
  308. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/runner.js +0 -387
  309. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/test.js +0 -20238
  310. data/vendor/node_modules/grunt/node_modules/js-yaml/package.json +0 -60
  311. data/vendor/node_modules/grunt/node_modules/lodash/README.md +0 -140
  312. data/vendor/node_modules/grunt/node_modules/lodash/lodash.js +0 -4258
  313. data/vendor/node_modules/grunt/node_modules/lodash/lodash.min.js +0 -35
  314. data/vendor/node_modules/grunt/node_modules/lodash/lodash.underscore.js +0 -3688
  315. data/vendor/node_modules/grunt/node_modules/lodash/lodash.underscore.min.js +0 -28
  316. data/vendor/node_modules/grunt/node_modules/lodash/package.json +0 -62
  317. data/vendor/node_modules/grunt/node_modules/minimatch/LICENSE +0 -23
  318. data/vendor/node_modules/grunt/node_modules/minimatch/README.md +0 -218
  319. data/vendor/node_modules/grunt/node_modules/minimatch/minimatch.js +0 -1055
  320. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +0 -14
  321. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/LICENSE +0 -23
  322. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/README.md +0 -97
  323. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +0 -252
  324. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json +0 -33
  325. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/basic.js +0 -369
  326. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +0 -52
  327. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +0 -50
  328. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/LICENSE +0 -27
  329. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/README.md +0 -53
  330. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/bench.js +0 -283
  331. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/package.json +0 -42
  332. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/sigmund.js +0 -39
  333. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/test/basic.js +0 -24
  334. data/vendor/node_modules/grunt/node_modules/minimatch/package.json +0 -40
  335. data/vendor/node_modules/grunt/node_modules/minimatch/test/basic.js +0 -399
  336. data/vendor/node_modules/grunt/node_modules/minimatch/test/brace-expand.js +0 -33
  337. data/vendor/node_modules/grunt/node_modules/minimatch/test/caching.js +0 -14
  338. data/vendor/node_modules/grunt/node_modules/minimatch/test/defaults.js +0 -274
  339. data/vendor/node_modules/grunt/node_modules/minimatch/test/extglob-ending-with-state-char.js +0 -8
  340. data/vendor/node_modules/grunt/node_modules/nopt/LICENSE +0 -23
  341. data/vendor/node_modules/grunt/node_modules/nopt/README.md +0 -208
  342. data/vendor/node_modules/grunt/node_modules/nopt/bin/nopt.js +0 -44
  343. data/vendor/node_modules/grunt/node_modules/nopt/examples/my-program.js +0 -30
  344. data/vendor/node_modules/grunt/node_modules/nopt/lib/nopt.js +0 -552
  345. data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/LICENSE +0 -23
  346. data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/README.md +0 -23
  347. data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/lib/abbrev.js +0 -111
  348. data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/package.json +0 -29
  349. data/vendor/node_modules/grunt/node_modules/nopt/package.json +0 -36
  350. data/vendor/node_modules/grunt/node_modules/rimraf/AUTHORS +0 -6
  351. data/vendor/node_modules/grunt/node_modules/rimraf/LICENSE +0 -23
  352. data/vendor/node_modules/grunt/node_modules/rimraf/README.md +0 -21
  353. data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/LICENSE +0 -23
  354. data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/README.md +0 -5
  355. data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js +0 -312
  356. data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/package.json +0 -40
  357. data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/test/open.js +0 -41
  358. data/vendor/node_modules/grunt/node_modules/rimraf/package.json +0 -59
  359. data/vendor/node_modules/grunt/node_modules/rimraf/rimraf.js +0 -161
  360. data/vendor/node_modules/grunt/node_modules/rimraf/test/run.sh +0 -10
  361. data/vendor/node_modules/grunt/node_modules/rimraf/test/setup.sh +0 -47
  362. data/vendor/node_modules/grunt/node_modules/rimraf/test/test-async.js +0 -5
  363. data/vendor/node_modules/grunt/node_modules/rimraf/test/test-fiber.js +0 -0
  364. data/vendor/node_modules/grunt/node_modules/rimraf/test/test-sync.js +0 -3
  365. data/vendor/node_modules/grunt/node_modules/underscore.string/Gemfile +0 -5
  366. data/vendor/node_modules/grunt/node_modules/underscore.string/Gemfile.lock +0 -34
  367. data/vendor/node_modules/grunt/node_modules/underscore.string/README.markdown +0 -668
  368. data/vendor/node_modules/grunt/node_modules/underscore.string/Rakefile +0 -28
  369. data/vendor/node_modules/grunt/node_modules/underscore.string/dist/underscore.string.min.js +0 -1
  370. data/vendor/node_modules/grunt/node_modules/underscore.string/lib/underscore.string.js +0 -525
  371. data/vendor/node_modules/grunt/node_modules/underscore.string/package.json +0 -72
  372. data/vendor/node_modules/grunt/node_modules/underscore.string/test/run-qunit.js +0 -44
  373. data/vendor/node_modules/grunt/node_modules/underscore.string/test/speed.js +0 -138
  374. data/vendor/node_modules/grunt/node_modules/underscore.string/test/strings.js +0 -438
  375. data/vendor/node_modules/grunt/node_modules/underscore.string/test/strings_standalone.js +0 -12
  376. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test.html +0 -31
  377. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_standalone.html +0 -18
  378. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/arrays.js +0 -166
  379. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/chaining.js +0 -59
  380. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/collections.js +0 -270
  381. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/functions.js +0 -198
  382. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/objects.js +0 -535
  383. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/speed.js +0 -70
  384. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp.js +0 -27
  385. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp_tests.html +0 -19
  386. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/test.html +0 -43
  387. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/utility.js +0 -155
  388. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jquery.js +0 -19
  389. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js +0 -670
  390. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.css +0 -196
  391. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.js +0 -2360
  392. data/vendor/node_modules/grunt/node_modules/underscore.string/test/underscore.js +0 -999
  393. data/vendor/node_modules/grunt/node_modules/which/LICENSE +0 -23
  394. data/vendor/node_modules/grunt/node_modules/which/README.md +0 -5
  395. data/vendor/node_modules/grunt/node_modules/which/bin/which +0 -14
  396. data/vendor/node_modules/grunt/node_modules/which/package.json +0 -31
  397. data/vendor/node_modules/grunt/node_modules/which/which.js +0 -104
  398. data/vendor/node_modules/grunt/package.json +0 -82
  399. data/vendor/node_modules/istanbul/CHANGELOG.md +0 -57
  400. data/vendor/node_modules/istanbul/LICENSE +0 -24
  401. data/vendor/node_modules/istanbul/README.md +0 -205
  402. data/vendor/node_modules/istanbul/index.js +0 -115
  403. data/vendor/node_modules/istanbul/lib/cli.js +0 -74
  404. data/vendor/node_modules/istanbul/lib/collector.js +0 -121
  405. data/vendor/node_modules/istanbul/lib/command/check-coverage.js +0 -115
  406. data/vendor/node_modules/istanbul/lib/command/common/run-with-cover.js +0 -199
  407. data/vendor/node_modules/istanbul/lib/command/cover.js +0 -33
  408. data/vendor/node_modules/istanbul/lib/command/help.js +0 -58
  409. data/vendor/node_modules/istanbul/lib/command/index.js +0 -33
  410. data/vendor/node_modules/istanbul/lib/command/instrument.js +0 -244
  411. data/vendor/node_modules/istanbul/lib/command/report.js +0 -97
  412. data/vendor/node_modules/istanbul/lib/command/test.js +0 -31
  413. data/vendor/node_modules/istanbul/lib/hook.js +0 -187
  414. data/vendor/node_modules/istanbul/lib/instrumenter.js +0 -759
  415. data/vendor/node_modules/istanbul/lib/object-utils.js +0 -341
  416. data/vendor/node_modules/istanbul/lib/register-plugins.js +0 -15
  417. data/vendor/node_modules/istanbul/lib/report/cobertura.js +0 -207
  418. data/vendor/node_modules/istanbul/lib/report/html.js +0 -517
  419. data/vendor/node_modules/istanbul/lib/report/index.js +0 -60
  420. data/vendor/node_modules/istanbul/lib/report/json.js +0 -55
  421. data/vendor/node_modules/istanbul/lib/report/lcov.js +0 -49
  422. data/vendor/node_modules/istanbul/lib/report/lcovonly.js +0 -93
  423. data/vendor/node_modules/istanbul/lib/report/none.js +0 -20
  424. data/vendor/node_modules/istanbul/lib/report/teamcity.js +0 -82
  425. data/vendor/node_modules/istanbul/lib/report/templates/foot.txt +0 -102
  426. data/vendor/node_modules/istanbul/lib/report/templates/head.txt +0 -200
  427. data/vendor/node_modules/istanbul/lib/report/text-summary.js +0 -72
  428. data/vendor/node_modules/istanbul/lib/report/text.js +0 -210
  429. data/vendor/node_modules/istanbul/lib/store/fslookup.js +0 -60
  430. data/vendor/node_modules/istanbul/lib/store/index.js +0 -122
  431. data/vendor/node_modules/istanbul/lib/store/memory.js +0 -55
  432. data/vendor/node_modules/istanbul/lib/store/tmp.js +0 -80
  433. data/vendor/node_modules/istanbul/lib/util/factory.js +0 -88
  434. data/vendor/node_modules/istanbul/lib/util/file-matcher.js +0 -60
  435. data/vendor/node_modules/istanbul/lib/util/file-writer.js +0 -131
  436. data/vendor/node_modules/istanbul/lib/util/flow-control.js +0 -26
  437. data/vendor/node_modules/istanbul/lib/util/help-formatter.js +0 -24
  438. data/vendor/node_modules/istanbul/lib/util/input-error.js +0 -12
  439. data/vendor/node_modules/istanbul/lib/util/insertion-text.js +0 -109
  440. data/vendor/node_modules/istanbul/lib/util/meta.js +0 -13
  441. data/vendor/node_modules/istanbul/lib/util/tree-summarizer.js +0 -213
  442. data/vendor/node_modules/istanbul/lib/util/writer.js +0 -56
  443. data/vendor/node_modules/istanbul/lib/util/yui-load-hook.js +0 -49
  444. data/vendor/node_modules/istanbul/lib/vendor/prettify.css +0 -1
  445. data/vendor/node_modules/istanbul/lib/vendor/prettify.js +0 -1
  446. data/vendor/node_modules/istanbul/node_modules/abbrev/LICENSE +0 -23
  447. data/vendor/node_modules/istanbul/node_modules/abbrev/README.md +0 -23
  448. data/vendor/node_modules/istanbul/node_modules/abbrev/lib/abbrev.js +0 -111
  449. data/vendor/node_modules/istanbul/node_modules/abbrev/package.json +0 -29
  450. data/vendor/node_modules/istanbul/node_modules/async/LICENSE +0 -19
  451. data/vendor/node_modules/istanbul/node_modules/async/README.md +0 -1414
  452. data/vendor/node_modules/istanbul/node_modules/async/component.json +0 -11
  453. data/vendor/node_modules/istanbul/node_modules/async/lib/async.js +0 -955
  454. data/vendor/node_modules/istanbul/node_modules/async/package.json +0 -43
  455. data/vendor/node_modules/istanbul/node_modules/escodegen/LICENSE.BSD +0 -19
  456. data/vendor/node_modules/istanbul/node_modules/escodegen/LICENSE.source-map +0 -27
  457. data/vendor/node_modules/istanbul/node_modules/escodegen/README.md +0 -99
  458. data/vendor/node_modules/istanbul/node_modules/escodegen/bin/escodegen.js +0 -45
  459. data/vendor/node_modules/istanbul/node_modules/escodegen/bin/esgenerate.js +0 -45
  460. data/vendor/node_modules/istanbul/node_modules/escodegen/component.json +0 -48
  461. data/vendor/node_modules/istanbul/node_modules/escodegen/escodegen.browser.js +0 -3072
  462. data/vendor/node_modules/istanbul/node_modules/escodegen/escodegen.js +0 -2275
  463. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD +0 -19
  464. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/README.md +0 -29
  465. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/estraverse.js +0 -315
  466. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/package.json +0 -41
  467. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/CHANGELOG.md +0 -112
  468. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/LICENSE +0 -28
  469. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/Makefile.dryice.js +0 -166
  470. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/README.md +0 -434
  471. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/assert-shim.js +0 -56
  472. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/mini-require.js +0 -152
  473. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm +0 -20
  474. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm +0 -18
  475. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-browser.js +0 -8
  476. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm +0 -6
  477. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm +0 -21
  478. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/test-prefix.js +0 -8
  479. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/test-suffix.js +0 -3
  480. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map.js +0 -8
  481. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js +0 -97
  482. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/base64-vlq.js +0 -144
  483. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/base64.js +0 -42
  484. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/binary-search.js +0 -81
  485. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-consumer.js +0 -477
  486. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-generator.js +0 -380
  487. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-node.js +0 -371
  488. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/util.js +0 -205
  489. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/LICENSE +0 -58
  490. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/README.md +0 -171
  491. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js +0 -299
  492. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/intercept.js +0 -36
  493. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/package.json +0 -36
  494. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/package.json +0 -110
  495. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/run-tests.js +0 -71
  496. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-api.js +0 -26
  497. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-array-set.js +0 -104
  498. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64-vlq.js +0 -24
  499. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js +0 -35
  500. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-binary-search.js +0 -54
  501. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-dog-fooding.js +0 -72
  502. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-consumer.js +0 -451
  503. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-generator.js +0 -417
  504. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-node.js +0 -365
  505. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/util.js +0 -161
  506. data/vendor/node_modules/istanbul/node_modules/escodegen/package.json +0 -58
  507. data/vendor/node_modules/istanbul/node_modules/esprima/README.md +0 -73
  508. data/vendor/node_modules/istanbul/node_modules/esprima/bin/esparse.js +0 -117
  509. data/vendor/node_modules/istanbul/node_modules/esprima/bin/esvalidate.js +0 -177
  510. data/vendor/node_modules/istanbul/node_modules/esprima/esprima.js +0 -3908
  511. data/vendor/node_modules/istanbul/node_modules/esprima/package.json +0 -59
  512. data/vendor/node_modules/istanbul/node_modules/esprima/test/compat.js +0 -239
  513. data/vendor/node_modules/istanbul/node_modules/esprima/test/reflect.js +0 -422
  514. data/vendor/node_modules/istanbul/node_modules/esprima/test/run.js +0 -66
  515. data/vendor/node_modules/istanbul/node_modules/esprima/test/runner.js +0 -387
  516. data/vendor/node_modules/istanbul/node_modules/esprima/test/test.js +0 -20238
  517. data/vendor/node_modules/istanbul/node_modules/fileset/LICENSE-MIT +0 -22
  518. data/vendor/node_modules/istanbul/node_modules/fileset/README.md +0 -87
  519. data/vendor/node_modules/istanbul/node_modules/fileset/lib/fileset.js +0 -64
  520. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/LICENSE +0 -27
  521. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/README.md +0 -250
  522. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/examples/g.js +0 -9
  523. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/examples/usr-local.js +0 -9
  524. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/glob.js +0 -680
  525. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/LICENSE +0 -16
  526. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/README.md +0 -42
  527. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits.js +0 -1
  528. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits_browser.js +0 -23
  529. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/package.json +0 -33
  530. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/test.js +0 -25
  531. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/package.json +0 -39
  532. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/00-setup.js +0 -176
  533. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/bash-comparison.js +0 -63
  534. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/bash-results.json +0 -350
  535. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/cwd-test.js +0 -55
  536. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/globstar-match.js +0 -19
  537. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/mark.js +0 -74
  538. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/new-glob-optional-options.js +0 -10
  539. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/nocase-nomagic.js +0 -113
  540. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/pause-resume.js +0 -73
  541. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/root-nomount.js +0 -39
  542. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/root.js +0 -46
  543. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/stat.js +0 -32
  544. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/zz-cleanup.js +0 -11
  545. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/LICENSE +0 -23
  546. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/README.md +0 -218
  547. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/minimatch.js +0 -1055
  548. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +0 -14
  549. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/LICENSE +0 -23
  550. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/README.md +0 -97
  551. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +0 -252
  552. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/package.json +0 -33
  553. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/basic.js +0 -369
  554. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +0 -52
  555. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +0 -50
  556. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/LICENSE +0 -27
  557. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/README.md +0 -53
  558. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/bench.js +0 -283
  559. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/package.json +0 -42
  560. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/sigmund.js +0 -39
  561. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/test/basic.js +0 -24
  562. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/package.json +0 -40
  563. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/basic.js +0 -399
  564. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/brace-expand.js +0 -33
  565. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/caching.js +0 -14
  566. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/defaults.js +0 -274
  567. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/extglob-ending-with-state-char.js +0 -8
  568. data/vendor/node_modules/istanbul/node_modules/fileset/package.json +0 -34
  569. data/vendor/node_modules/istanbul/node_modules/fileset/tests/fixtures/an (odd) filename.js +0 -1
  570. data/vendor/node_modules/istanbul/node_modules/fileset/tests/helper.js +0 -61
  571. data/vendor/node_modules/istanbul/node_modules/fileset/tests/test.js +0 -133
  572. data/vendor/node_modules/istanbul/node_modules/handlebars/LICENSE +0 -19
  573. data/vendor/node_modules/istanbul/node_modules/handlebars/README.markdown +0 -391
  574. data/vendor/node_modules/istanbul/node_modules/handlebars/bin/handlebars +0 -213
  575. data/vendor/node_modules/istanbul/node_modules/handlebars/bower.json +0 -9
  576. data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.js +0 -2278
  577. data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.min.js +0 -2
  578. data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.runtime.js +0 -362
  579. data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.runtime.min.js +0 -1
  580. data/vendor/node_modules/istanbul/node_modules/handlebars/global-test.js +0 -18
  581. data/vendor/node_modules/istanbul/node_modules/handlebars/global.js +0 -4
  582. data/vendor/node_modules/istanbul/node_modules/handlebars/handlebars-source.gemspec +0 -21
  583. data/vendor/node_modules/istanbul/node_modules/handlebars/handlebars.js.nuspec +0 -17
  584. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars.js +0 -43
  585. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/base.js +0 -166
  586. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/browser-prefix.js +0 -3
  587. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/browser-suffix.js +0 -1
  588. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/ast.js +0 -138
  589. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/base.js +0 -21
  590. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/compiler.js +0 -1305
  591. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/index.js +0 -16
  592. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/parser.js +0 -483
  593. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/printer.js +0 -138
  594. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/visitor.js +0 -18
  595. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/runtime.js +0 -106
  596. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/source.rb +0 -11
  597. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/utils.js +0 -83
  598. data/vendor/node_modules/istanbul/node_modules/handlebars/min.sh +0 -11
  599. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/LICENSE +0 -21
  600. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/bool.js +0 -10
  601. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/boolean_double.js +0 -7
  602. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/boolean_single.js +0 -7
  603. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/default_hash.js +0 -8
  604. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/default_singles.js +0 -7
  605. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/divide.js +0 -8
  606. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count.js +0 -20
  607. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count_options.js +0 -29
  608. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count_wrap.js +0 -29
  609. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/nonopt.js +0 -4
  610. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/reflect.js +0 -2
  611. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/short.js +0 -3
  612. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/string.js +0 -11
  613. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/usage-options.js +0 -19
  614. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/xup.js +0 -10
  615. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/index.js +0 -478
  616. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/package.json +0 -46
  617. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/readme.markdown +0 -487
  618. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_.js +0 -71
  619. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_/argv.js +0 -2
  620. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_/bin.js +0 -3
  621. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/parse.js +0 -446
  622. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/usage.js +0 -292
  623. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/LICENSE +0 -29
  624. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/README.md +0 -588
  625. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/bin/uglifyjs +0 -402
  626. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/ast.js +0 -985
  627. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/compress.js +0 -2028
  628. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/mozilla-ast.js +0 -267
  629. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/output.js +0 -1229
  630. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/parse.js +0 -1410
  631. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/scope.js +0 -581
  632. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/sourcemap.js +0 -81
  633. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/transform.js +0 -217
  634. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/utils.js +0 -295
  635. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md +0 -112
  636. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/LICENSE +0 -28
  637. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js +0 -166
  638. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/README.md +0 -434
  639. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js +0 -56
  640. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/mini-require.js +0 -152
  641. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm +0 -20
  642. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm +0 -18
  643. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js +0 -8
  644. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm +0 -6
  645. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm +0 -21
  646. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js +0 -8
  647. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js +0 -3
  648. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map.js +0 -8
  649. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js +0 -97
  650. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js +0 -144
  651. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js +0 -42
  652. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js +0 -81
  653. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js +0 -477
  654. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js +0 -380
  655. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js +0 -371
  656. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js +0 -205
  657. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE +0 -58
  658. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md +0 -171
  659. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js +0 -299
  660. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/intercept.js +0 -36
  661. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json +0 -37
  662. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/package.json +0 -110
  663. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/run-tests.js +0 -71
  664. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js +0 -26
  665. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js +0 -104
  666. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js +0 -24
  667. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js +0 -35
  668. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js +0 -54
  669. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js +0 -72
  670. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js +0 -451
  671. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js +0 -417
  672. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js +0 -365
  673. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js +0 -161
  674. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/package.json +0 -39
  675. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/arrays.js +0 -12
  676. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/blocks.js +0 -49
  677. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/conditionals.js +0 -143
  678. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/dead-code.js +0 -89
  679. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/debugger.js +0 -24
  680. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/drop-unused.js +0 -97
  681. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-105.js +0 -25
  682. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-12.js +0 -11
  683. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js +0 -48
  684. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-22.js +0 -17
  685. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-44.js +0 -31
  686. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-59.js +0 -30
  687. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/labels.js +0 -163
  688. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/loops.js +0 -123
  689. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/properties.js +0 -54
  690. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/sequences.js +0 -161
  691. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/switch.js +0 -260
  692. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/typeof.js +0 -25
  693. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/run-tests.js +0 -170
  694. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/tools/node.js +0 -165
  695. data/vendor/node_modules/istanbul/node_modules/handlebars/package.json +0 -42
  696. data/vendor/node_modules/istanbul/node_modules/handlebars/release-notes.md +0 -93
  697. data/vendor/node_modules/istanbul/node_modules/handlebars/test.js +0 -20
  698. data/vendor/node_modules/istanbul/node_modules/mkdirp/LICENSE +0 -21
  699. data/vendor/node_modules/istanbul/node_modules/mkdirp/examples/pow.js +0 -6
  700. data/vendor/node_modules/istanbul/node_modules/mkdirp/index.js +0 -82
  701. data/vendor/node_modules/istanbul/node_modules/mkdirp/package.json +0 -34
  702. data/vendor/node_modules/istanbul/node_modules/mkdirp/readme.markdown +0 -63
  703. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/chmod.js +0 -38
  704. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/clobber.js +0 -37
  705. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/mkdirp.js +0 -28
  706. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/perm.js +0 -32
  707. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/perm_sync.js +0 -39
  708. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/race.js +0 -41
  709. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/rel.js +0 -32
  710. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/return.js +0 -25
  711. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/return_sync.js +0 -24
  712. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/root.js +0 -18
  713. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/sync.js +0 -32
  714. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/umask.js +0 -28
  715. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/umask_sync.js +0 -32
  716. data/vendor/node_modules/istanbul/node_modules/nopt/LICENSE +0 -23
  717. data/vendor/node_modules/istanbul/node_modules/nopt/README.md +0 -210
  718. data/vendor/node_modules/istanbul/node_modules/nopt/bin/nopt.js +0 -51
  719. data/vendor/node_modules/istanbul/node_modules/nopt/examples/my-program.js +0 -30
  720. data/vendor/node_modules/istanbul/node_modules/nopt/lib/nopt.js +0 -612
  721. data/vendor/node_modules/istanbul/node_modules/nopt/package.json +0 -36
  722. data/vendor/node_modules/istanbul/node_modules/resolve/LICENSE +0 -18
  723. data/vendor/node_modules/istanbul/node_modules/resolve/example/async.js +0 -5
  724. data/vendor/node_modules/istanbul/node_modules/resolve/example/sync.js +0 -3
  725. data/vendor/node_modules/istanbul/node_modules/resolve/index.js +0 -5
  726. data/vendor/node_modules/istanbul/node_modules/resolve/lib/async.js +0 -125
  727. data/vendor/node_modules/istanbul/node_modules/resolve/lib/caller.js +0 -8
  728. data/vendor/node_modules/istanbul/node_modules/resolve/lib/core.js +0 -4
  729. data/vendor/node_modules/istanbul/node_modules/resolve/lib/core.json +0 -38
  730. data/vendor/node_modules/istanbul/node_modules/resolve/lib/node-modules-paths.js +0 -25
  731. data/vendor/node_modules/istanbul/node_modules/resolve/lib/sync.js +0 -80
  732. data/vendor/node_modules/istanbul/node_modules/resolve/package.json +0 -36
  733. data/vendor/node_modules/istanbul/node_modules/resolve/readme.markdown +0 -144
  734. data/vendor/node_modules/istanbul/node_modules/resolve/test/core.js +0 -12
  735. data/vendor/node_modules/istanbul/node_modules/resolve/test/filter.js +0 -18
  736. data/vendor/node_modules/istanbul/node_modules/resolve/test/filter_sync.js +0 -15
  737. data/vendor/node_modules/istanbul/node_modules/resolve/test/mock.js +0 -142
  738. data/vendor/node_modules/istanbul/node_modules/resolve/test/mock_sync.js +0 -68
  739. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver.js +0 -270
  740. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +0 -1
  741. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  742. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/package.json +0 -3
  743. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/quux.js +0 -1
  744. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js +0 -1
  745. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json +0 -3
  746. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +0 -1
  747. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +0 -1
  748. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/cup.coffee +0 -1
  749. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/foo.js +0 -1
  750. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/incorrect_main/index.js +0 -2
  751. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/incorrect_main/package.json +0 -3
  752. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/mug.coffee +0 -0
  753. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/mug.js +0 -0
  754. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  755. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  756. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/quux/foo/index.js +0 -1
  757. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/without_basedir/main.js +0 -6
  758. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js +0 -1
  759. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver_sync.js +0 -170
  760. data/vendor/node_modules/istanbul/node_modules/which/LICENSE +0 -23
  761. data/vendor/node_modules/istanbul/node_modules/which/README.md +0 -5
  762. data/vendor/node_modules/istanbul/node_modules/which/bin/which +0 -14
  763. data/vendor/node_modules/istanbul/node_modules/which/package.json +0 -32
  764. data/vendor/node_modules/istanbul/node_modules/which/which.js +0 -104
  765. data/vendor/node_modules/istanbul/node_modules/wordwrap/README.markdown +0 -70
  766. data/vendor/node_modules/istanbul/node_modules/wordwrap/example/center.js +0 -10
  767. data/vendor/node_modules/istanbul/node_modules/wordwrap/example/meat.js +0 -3
  768. data/vendor/node_modules/istanbul/node_modules/wordwrap/index.js +0 -76
  769. data/vendor/node_modules/istanbul/node_modules/wordwrap/package.json +0 -45
  770. data/vendor/node_modules/istanbul/node_modules/wordwrap/test/break.js +0 -30
  771. data/vendor/node_modules/istanbul/node_modules/wordwrap/test/idleness.txt +0 -63
  772. data/vendor/node_modules/istanbul/node_modules/wordwrap/test/wrap.js +0 -31
  773. data/vendor/node_modules/istanbul/package.json +0 -117
  774. data/vendor/node_modules/istanbul/test/browser/support/index.html +0 -153
  775. data/vendor/node_modules/istanbul/test/browser/support/phantom-test.client.js +0 -49
  776. data/vendor/node_modules/istanbul/test/browser/support/server.js +0 -154
  777. data/vendor/node_modules/istanbul/test/browser/test-browser-instrumentation.js +0 -94
  778. data/vendor/node_modules/istanbul/test/cli-helper.js +0 -219
  779. data/vendor/node_modules/istanbul/test/cli/package.json +0 -8
  780. data/vendor/node_modules/istanbul/test/cli/sample-project/amd/ipsum.js +0 -11
  781. data/vendor/node_modules/istanbul/test/cli/sample-project/amd/lorem.js +0 -7
  782. data/vendor/node_modules/istanbul/test/cli/sample-project/lib/bar.js +0 -13
  783. data/vendor/node_modules/istanbul/test/cli/sample-project/lib/foo.js +0 -12
  784. data/vendor/node_modules/istanbul/test/cli/sample-project/lib/util/bad.js +0 -1
  785. data/vendor/node_modules/istanbul/test/cli/sample-project/lib/util/generate-names.js +0 -5
  786. data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/dependency/index.js +0 -9
  787. data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/post-require/hook.js +0 -11
  788. data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/post-require/package.json +0 -5
  789. data/vendor/node_modules/istanbul/test/cli/sample-project/test/amd-run.js +0 -16
  790. data/vendor/node_modules/istanbul/test/cli/sample-project/test/global-leak.js +0 -30
  791. data/vendor/node_modules/istanbul/test/cli/sample-project/test/run.js +0 -25
  792. data/vendor/node_modules/istanbul/test/cli/sample-project/vendor/dummy_vendor_lib.js +0 -9
  793. data/vendor/node_modules/istanbul/test/cli/test-base-cli.js +0 -39
  794. data/vendor/node_modules/istanbul/test/cli/test-check-coverage-command.js +0 -97
  795. data/vendor/node_modules/istanbul/test/cli/test-cobertura-report.js +0 -54
  796. data/vendor/node_modules/istanbul/test/cli/test-cover-command.js +0 -170
  797. data/vendor/node_modules/istanbul/test/cli/test-html-report.js +0 -125
  798. data/vendor/node_modules/istanbul/test/cli/test-instrument-command.js +0 -167
  799. data/vendor/node_modules/istanbul/test/cli/test-json-report.js +0 -60
  800. data/vendor/node_modules/istanbul/test/cli/test-lcov-report.js +0 -58
  801. data/vendor/node_modules/istanbul/test/cli/test-lcovonly-report.js +0 -61
  802. data/vendor/node_modules/istanbul/test/cli/test-lots-of-files.js +0 -87
  803. data/vendor/node_modules/istanbul/test/cli/test-none-report.js +0 -17
  804. data/vendor/node_modules/istanbul/test/cli/test-report-command.js +0 -65
  805. data/vendor/node_modules/istanbul/test/cli/test-teamcity-report.js +0 -54
  806. data/vendor/node_modules/istanbul/test/cli/test-test-command.js +0 -43
  807. data/vendor/node_modules/istanbul/test/common.js +0 -19
  808. data/vendor/node_modules/istanbul/test/helper.js +0 -122
  809. data/vendor/node_modules/istanbul/test/instrumentation/test-do.js +0 -53
  810. data/vendor/node_modules/istanbul/test/instrumentation/test-expressions.js +0 -70
  811. data/vendor/node_modules/istanbul/test/instrumentation/test-for.js +0 -206
  812. data/vendor/node_modules/istanbul/test/instrumentation/test-forin.js +0 -50
  813. data/vendor/node_modules/istanbul/test/instrumentation/test-functions.js +0 -102
  814. data/vendor/node_modules/istanbul/test/instrumentation/test-if.js +0 -393
  815. data/vendor/node_modules/istanbul/test/instrumentation/test-misc.js +0 -35
  816. data/vendor/node_modules/istanbul/test/instrumentation/test-statement.js +0 -182
  817. data/vendor/node_modules/istanbul/test/instrumentation/test-strict.js +0 -121
  818. data/vendor/node_modules/istanbul/test/instrumentation/test-switch.js +0 -155
  819. data/vendor/node_modules/istanbul/test/instrumentation/test-while.js +0 -104
  820. data/vendor/node_modules/istanbul/test/loader.js +0 -38
  821. data/vendor/node_modules/istanbul/test/other/data-complete-copy/baz.js +0 -3
  822. data/vendor/node_modules/istanbul/test/other/data-complete-copy/fixture.xml +0 -1
  823. data/vendor/node_modules/istanbul/test/other/data-complete-copy/foo.js +0 -4
  824. data/vendor/node_modules/istanbul/test/other/data-complete-copy/myfile1 +0 -0
  825. data/vendor/node_modules/istanbul/test/other/data-complete-copy/myfile2 +0 -1
  826. data/vendor/node_modules/istanbul/test/other/data-complete-copy/subdir/x.css +0 -3
  827. data/vendor/node_modules/istanbul/test/other/data/baz.js +0 -3
  828. data/vendor/node_modules/istanbul/test/other/data/foo.js +0 -4
  829. data/vendor/node_modules/istanbul/test/other/data/matcher/general/general.js +0 -2
  830. data/vendor/node_modules/istanbul/test/other/data/matcher/general/node_modules/mod-file.js +0 -2
  831. data/vendor/node_modules/istanbul/test/other/data/matcher/lib/lib-top.js +0 -2
  832. data/vendor/node_modules/istanbul/test/other/data/matcher/node_modules/dep/mod-file.js +0 -2
  833. data/vendor/node_modules/istanbul/test/other/data/matcher/node_modules/mod-file.js +0 -2
  834. data/vendor/node_modules/istanbul/test/other/data/matcher/top.js +0 -2
  835. data/vendor/node_modules/istanbul/test/other/test-collector.js +0 -85
  836. data/vendor/node_modules/istanbul/test/other/test-command-xface.js +0 -35
  837. data/vendor/node_modules/istanbul/test/other/test-file-writer.js +0 -71
  838. data/vendor/node_modules/istanbul/test/other/test-help-formatter.js +0 -31
  839. data/vendor/node_modules/istanbul/test/other/test-hook.js +0 -87
  840. data/vendor/node_modules/istanbul/test/other/test-index-xface.js +0 -17
  841. data/vendor/node_modules/istanbul/test/other/test-input-error.js +0 -10
  842. data/vendor/node_modules/istanbul/test/other/test-insertion-text.js +0 -102
  843. data/vendor/node_modules/istanbul/test/other/test-matcher.js +0 -93
  844. data/vendor/node_modules/istanbul/test/other/test-object-utils.js +0 -201
  845. data/vendor/node_modules/istanbul/test/other/test-store.js +0 -129
  846. data/vendor/node_modules/istanbul/test/other/test-summarizer.js +0 -172
  847. data/vendor/node_modules/istanbul/test/run-again.js +0 -19
  848. data/vendor/node_modules/istanbul/test/run.js +0 -108
  849. data/vendor/node_modules/istanbul/yui-coverage-comparison.md +0 -85
  850. data/vendor/node_modules/qunit-clib/LICENSE.txt +0 -20
  851. data/vendor/node_modules/qunit-clib/README.md +0 -2
  852. data/vendor/node_modules/qunit-clib/package.json +0 -36
  853. data/vendor/node_modules/qunit-clib/qunit-clib.js +0 -570
  854. data/vendor/node_modules/qunitjs/AUTHORS.txt +0 -55
  855. data/vendor/node_modules/qunitjs/History.md +0 -496
  856. data/vendor/node_modules/qunitjs/README.md +0 -62
  857. data/vendor/node_modules/qunitjs/addons/canvas/README.md +0 -17
  858. data/vendor/node_modules/qunitjs/addons/canvas/canvas-test.js +0 -76
  859. data/vendor/node_modules/qunitjs/addons/canvas/canvas.html +0 -15
  860. data/vendor/node_modules/qunitjs/addons/canvas/qunit-canvas.js +0 -6
  861. data/vendor/node_modules/qunitjs/addons/close-enough/README.md +0 -18
  862. data/vendor/node_modules/qunitjs/addons/close-enough/close-enough-test.js +0 -35
  863. data/vendor/node_modules/qunitjs/addons/close-enough/close-enough.html +0 -14
  864. data/vendor/node_modules/qunitjs/addons/close-enough/qunit-close-enough.js +0 -32
  865. data/vendor/node_modules/qunitjs/addons/composite/README.md +0 -26
  866. data/vendor/node_modules/qunitjs/addons/composite/composite-demo-test.html +0 -24
  867. data/vendor/node_modules/qunitjs/addons/composite/index.html +0 -34
  868. data/vendor/node_modules/qunitjs/addons/composite/qunit-composite.css +0 -13
  869. data/vendor/node_modules/qunitjs/addons/composite/qunit-composite.js +0 -112
  870. data/vendor/node_modules/qunitjs/addons/junitlogger/README.md +0 -18
  871. data/vendor/node_modules/qunitjs/addons/junitlogger/index.html +0 -44
  872. data/vendor/node_modules/qunitjs/addons/junitlogger/junitlogger.js +0 -306
  873. data/vendor/node_modules/qunitjs/addons/phantomjs/README.md +0 -16
  874. data/vendor/node_modules/qunitjs/addons/phantomjs/runner.js +0 -127
  875. data/vendor/node_modules/qunitjs/addons/step/README.md +0 -20
  876. data/vendor/node_modules/qunitjs/addons/step/qunit-step.js +0 -26
  877. data/vendor/node_modules/qunitjs/addons/step/step-test.js +0 -15
  878. data/vendor/node_modules/qunitjs/addons/step/step.html +0 -14
  879. data/vendor/node_modules/qunitjs/addons/themes/README.md +0 -6
  880. data/vendor/node_modules/qunitjs/addons/themes/gabe.css +0 -371
  881. data/vendor/node_modules/qunitjs/addons/themes/gabe.html +0 -15
  882. data/vendor/node_modules/qunitjs/addons/themes/ninja.css +0 -196
  883. data/vendor/node_modules/qunitjs/addons/themes/ninja.html +0 -15
  884. data/vendor/node_modules/qunitjs/addons/themes/nv.css +0 -217
  885. data/vendor/node_modules/qunitjs/addons/themes/nv.html +0 -15
  886. data/vendor/node_modules/qunitjs/grunt.js +0 -101
  887. data/vendor/node_modules/qunitjs/package.json +0 -49
  888. data/vendor/node_modules/qunitjs/qunit/qunit.css +0 -244
  889. data/vendor/node_modules/qunitjs/qunit/qunit.js +0 -2152
  890. data/vendor/node_modules/qunitjs/test/async.html +0 -26
  891. data/vendor/node_modules/qunitjs/test/async.js +0 -6
  892. data/vendor/node_modules/qunitjs/test/deepEqual.js +0 -1438
  893. data/vendor/node_modules/qunitjs/test/headless.html +0 -28
  894. data/vendor/node_modules/qunitjs/test/index.html +0 -16
  895. data/vendor/node_modules/qunitjs/test/logs.html +0 -14
  896. data/vendor/node_modules/qunitjs/test/logs.js +0 -184
  897. data/vendor/node_modules/qunitjs/test/narwhal-test.js +0 -22
  898. data/vendor/node_modules/qunitjs/test/node-test.js +0 -22
  899. data/vendor/node_modules/qunitjs/test/swarminject.js +0 -10
  900. data/vendor/node_modules/qunitjs/test/test.js +0 -804
  901. data/vendor/node_modules/regenerate/LICENSE-MIT.txt +0 -20
  902. data/vendor/node_modules/regenerate/README.md +0 -467
  903. data/vendor/node_modules/regenerate/package.json +0 -50
  904. data/vendor/node_modules/regenerate/regenerate.js +0 -617
  905. data/vendor/node_modules/requirejs/README.md +0 -9
  906. data/vendor/node_modules/requirejs/bin/r.js +0 -26059
  907. data/vendor/node_modules/requirejs/package.json +0 -39
  908. data/vendor/node_modules/requirejs/require.js +0 -2054
@@ -1,35 +0,0 @@
1
- /*!
2
- Lo-Dash 0.9.2 lodash.com/license
3
- Underscore.js 1.4.2 underscorejs.org/LICENSE
4
- */
5
- ;(function(n,t){function r(n){return n&&n.__wrapped__?n:this instanceof r?(this.__wrapped__=n,void 0):new r(n)}function e(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||nt);if(u)for(var o={},r=t-1;++r<e;){var i=n[r]+"";(bt.call(o,i)?o[i]:o[i]=[]).push(n[r])}return function(r){if(u){var e=r+"";return bt.call(o,e)&&-1<D(o[e],r)}return-1<D(n,r,t)}}function u(n){return n.charCodeAt(0)}function o(n,r){var e=n.b,u=r.b,n=n.a,r=r.a;if(n!==r){if(n>r||n===t)return 1;if(n<r||r===t)return-1}return e<u?-1:1}function i(n,t,r){function e(){var a=arguments,c=o?this:t;
6
- return u||(n=t[i]),r.length&&(a=a.length?r.concat(kt.call(a)):r),this instanceof e?(s.prototype=n.prototype,c=new s,a=n.apply(c,a),w(a)?a:c):n.apply(c,a)}var u=b(n),o=!r,i=n;return o&&(r=t),e}function a(n,r){return n?typeof n!="function"?function(t){return t[n]}:r!==t?function(t,e,u){return n.call(r,t,e,u)}:n:L}function c(){for(var n,t={b:"",c:"",e:Q,f:Qt,g:"",h:Lt,i:Gt,j:gt,k:"",l:V},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r="var h,v,k="+t.d+",s="+t.d+";if(!"+t.d+")return s;"+t.k+";",t.b?(r+="var l=k.length;h=-1;if(typeof l=='number'){",t.i&&(r+="if(j(k)){k=k.split('')}"),r+="while(++h<l){v=k[h];"+t.b+"}}else {"):t.h&&(r+="var l=k.length;h=-1;if(l&&i(k)){while(++h<l){v=k[h+=''];"+t.g+"}}else {"),t.e||(r+="var t=typeof k=='function'&&r.call(k,'prototype');"),t.f&&t.l?(r+="var p=-1,q=o[typeof k]?m(k):[],l=q.length;while(++p<l){h=q[p];",t.e||(r+="if(!(t&&h=='prototype')){"),r+="v=k[h];"+t.g,t.e||(r+="}")):(r+="for(h in k){",(!t.e||t.l)&&(r+="if(",t.e||(r+="!(t&&h=='prototype')"),!t.e&&t.l&&(r+="&&"),t.l&&(r+="g.call(k,h)"),r+="){"),r+="v=k[h];"+t.g+";",(!t.e||t.l)&&(r+="}")),r+="}",t.e)for(r+="var f=k.constructor;",e=0;7>e;e++)r+="h='"+t.j[e]+"';if(","constructor"==t.j[e]&&(r+="!(f&&f.prototype===k)&&"),r+="g.call(k,h)){v=k[h];"+t.g+"}";
7
- return(t.b||t.h)&&(r+="}"),r+=t.c+";return s",Function("e,g,i,j,o,m,r","return function("+n+"){"+r+"}")(a,bt,h,j,Xt,$t,jt)}function f(n){return"\\"+Yt[n]}function l(n){return ur[n]}function s(){}function p(n){return or[n]}function h(n){return xt.call(n)==It}function v(n){var t=H;if(!n||typeof n!="object"||h(n))return t;var r=n.constructor;return Ht&&typeof n.toString!="function"&&typeof(n+"")=="string"||b(r)&&!(r instanceof r)?t:W?(rr(n,function(n,r,e){return t=!bt.call(e,r),H}),t===H):(rr(n,function(n,r){t=r
8
- }),t===H||bt.call(n,t))}function g(n){var t=[];return er(n,function(n,r){t.push(r)}),t}function _(n,t,r,e,u){if(n==G)return n;if(r&&(t=H),r=w(n)){var o=xt.call(n);if(!Wt[o]||Ut&&h(n))return n;var i=o==Rt,r=i||(o==Mt?fr(n):r)}if(!r||!t)return r?i?kt.call(n):ar({},n):n;switch(r=n.constructor,o){case Tt:case Bt:return new r(+n);case Dt:case zt:return new r(n);case Pt:return r(n.source,at.exec(n))}for(e||(e=[]),u||(u=[]),o=e.length;o--;)if(e[o]==n)return u[o];var a=i?r(n.length):{};return e.push(n),u.push(a),(i?sr:er)(n,function(n,r){a[r]=_(n,t,G,e,u)
9
- }),a}function y(n){var t=[];return rr(n,function(n,r){b(n)&&t.push(r)}),t.sort()}function m(n){var t={};return er(n,function(n,r){t[n]=r}),t}function d(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(n==G||t==G)return n===t;var u=xt.call(n);if(u!=xt.call(t))return H;switch(u){case Tt:case Bt:return+n==+t;case Dt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case Pt:case zt:return n==t+""}var o=u==Rt||u==It;if(Ut&&!o&&(o=h(n))&&!h(t))return H;if(!o){if(n.__wrapped__||t.__wrapped__)return d(n.__wrapped__||n,t.__wrapped__||t);
10
- if(u!=Mt||Ht&&(typeof n.toString!="function"&&typeof(n+"")=="string"||typeof t.toString!="function"&&typeof(t+"")=="string"))return H;var u=n.constructor,i=t.constructor;if(u!=i&&(!b(u)||!(u instanceof u&&b(i)&&i instanceof i)))return H}for(r||(r=[]),e||(e=[]),u=r.length;u--;)if(r[u]==n)return e[u]==t;var u=-1,i=V,a=0;if(r.push(n),e.push(t),o){if(a=n.length,i=a==t.length)for(;a--&&(i=d(n[a],t[a],r,e)););return i}for(var c in n)if(bt.call(n,c)&&(a++,!bt.call(t,c)||!d(n[c],t[c],r,e)))return H;for(c in t)if(bt.call(t,c)&&!a--)return H;
11
- if(Q)for(;7>++u;)if(c=gt[u],bt.call(n,c)&&(!bt.call(t,c)||!d(n[c],t[c],r,e)))return H;return V}function b(n){return typeof n=="function"}function w(n){return n?Xt[typeof n]:H}function j(n){return xt.call(n)==zt}function k(n,t,r){var e=arguments,u=0,o=2,i=e[3],a=e[4];for(r!==Y&&(i=[],a=[],o=e.length);++u<o;)er(e[u],function(t,r){var e,u,o;if(t&&((u=cr(t))||fr(t))){for(var c=i.length;c--&&!(e=i[c]==t););e?n[r]=a[c]:(i.push(t),a.push((o=n[r],o=u?cr(o)?o:[]:fr(o)?o:{})),n[r]=k(o,t,Y,i,a))}else t!=G&&(n[r]=t)
12
- });return n}function x(n){var t=[];return er(n,function(n){t.push(n)}),t}function O(n,t,r){var e=-1,u=n?n.length:0,r=(0>r?qt(0,u+r):r)||0;return typeof u=="number"?-1<(j(n)?n.indexOf(t,r):D(n,t,r)):R(n,function(n){return++e>=r&&n===t})}function A(n,t,r){var e=V,t=a(t,r);if(cr(n))for(var r=-1,u=n.length;++r<u&&(e=!!t(n[r],r,n)););else sr(n,function(n,r,u){return e=!!t(n,r,u)});return e}function S(n,t,r){var e=[],t=a(t,r);return sr(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e}function E(n,t,r){var e,t=a(t,r);
13
- return sr(n,function(n,r,u){return t(n,r,u)?(e=n,H):void 0}),e}function $(n,t,r){var e=-1,u=n?n.length:0,o=Array(typeof u=="number"?u:0),t=a(t,r);if(cr(n))for(;++e<u;)o[e]=t(n[e],e,n);else sr(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function q(n,t,r){var e=-1/0,o=-1,i=n?n.length:0,c=e;if(t||!cr(n))t=!t&&j(n)?u:a(t,r),sr(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,c=n)});else for(;++o<i;)n[o]>c&&(c=n[o]);return c}function N(n,t){var r=[];return sr(n,function(n){r.push(n[t])}),r}function F(n,t,r,e){var u=3>arguments.length,t=a(t,e);
14
- return sr(n,function(n,e,o){r=u?(u=H,n):t(r,n,e,o)}),r}function I(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var a=lr(n),o=a.length;else Gt&&j(n)&&(u=n.split(""));return sr(n,function(n,c,f){c=a?a[--o]:--o,r=i?(i=H,u[c]):t.call(e,r,u[c],c,f)}),r}function R(n,t,r){var e,t=a(t,r);if(cr(n))for(var r=-1,u=n.length;++r<u&&!(e=t(n[r],r,n)););else sr(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function T(n,t,r){return n?t==G||r?n[0]:kt.call(n,0,t):void 0}function B(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];
15
- cr(o)?wt.apply(u,t?o:B(o)):u.push(o)}return u}function D(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?qt(0,u+r):r||0)-1;else if(r)return e=P(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function M(n,t,r){return n?kt.call(n,t==G||r?1:t):[]}function P(n,t,r,e){for(var u=0,o=n?n.length:u,r=r?a(r,e):L,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function z(n,t,r,e){var u=-1,o=n?n.length:0,i=[],c=i;typeof t=="function"&&(e=r,r=t,t=H);var f=!t&&74<o;if(f)var l={};for(r&&(c=[],r=a(r,e));++u<o;){var e=n[u],s=r?r(e,u,n):e;
16
- f&&(c=bt.call(l,s+"")?l[s]:l[s]=[]),(t?!u||c[c.length-1]!==s:0>D(c,s))&&((r||f)&&c.push(s),i.push(e))}return i}function C(n,t){return Kt||Ot&&2<arguments.length?Ot.call.apply(Ot,arguments):i(n,t,kt.call(arguments,2))}function L(n){return n}function U(n){sr(y(n),function(t){var e=r[t]=n[t];r.prototype[t]=function(){var n=[this.__wrapped__];return wt.apply(n,arguments),n=e.apply(r,n),this.__chain__&&(n=new r(n),n.__chain__=V),n}})}var V=!0,G=null,H=!1,J=typeof exports=="object"&&exports,K=typeof global=="object"&&global;
17
- K.global===K&&(n=K);var Q,W,X=[],Y=new function(){},Z=0,nt=30,tt=n._,rt=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,et=/&(?:amp|lt|gt|quot|#x27);/g,ut=/\b__p\+='';/g,ot=/\b(__p\+=)''\+/g,it=/(__e\(.*?\)|\b__t\))\+'';/g,at=/\w*$/,ct=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,ft=RegExp("^"+(Y.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),lt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,st=/<%=([\s\S]+?)%>/g,pt=/($^)/,ht=/[&<>"']/g,vt=/['\n\r\t\u2028\u2029\\]/g,gt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),_t=Math.ceil,yt=X.concat,mt=Math.floor,dt=ft.test(dt=Object.getPrototypeOf)&&dt,bt=Y.hasOwnProperty,wt=X.push,jt=Y.propertyIsEnumerable,kt=X.slice,xt=Y.toString,Ot=ft.test(Ot=kt.bind)&&Ot,At=ft.test(At=Array.isArray)&&At,St=n.isFinite,Et=n.isNaN,$t=ft.test($t=Object.keys)&&$t,qt=Math.max,Nt=Math.min,Ft=Math.random,It="[object Arguments]",Rt="[object Array]",Tt="[object Boolean]",Bt="[object Date]",Dt="[object Number]",Mt="[object Object]",Pt="[object RegExp]",zt="[object String]",Ct=(Ct={0:1,length:1},X.splice.call(Ct,0,1),Ct[0]),Lt=V;
18
- (function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var r in new n)t.push(r);for(r in arguments)Lt=!r;Q=!/valueOf/.test(t),W="x"!=t[0]})(1);var Ut=!h(arguments),Vt="x"!=kt.call("x")[0],Gt="xx"!="x"[0]+Object("x")[0];try{var Ht=xt.call(n.document||0)==Mt}catch(Jt){}var Kt=Ot&&/\n|Opera/.test(Ot+xt.call(n.opera)),Qt=$t&&/^.+$|true/.test($t+!!n.attachEvent),Wt={};Wt[It]=Wt["[object Function]"]=H,Wt[Rt]=Wt[Tt]=Wt[Bt]=Wt[Dt]=Wt[Mt]=Wt[Pt]=Wt[zt]=V;var Xt={"boolean":H,"function":V,object:V,number:H,string:H,undefined:H},Yt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};
19
- r.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:st,variable:""};var Zt={a:"d,c,u",k:"c=e(c,u)",b:"if(c(v,h,d)===false)return s",g:"if(c(v,h,d)===false)return s"},nr={l:H,a:"n",k:"for(var a=1,b=arguments.length;a<b;a++){if(k=arguments[a]){",g:"s[h]=v",c:"}}"},tr={b:G};Ut&&(h=function(n){return n?bt.call(n,"callee"):H});var rr=c(Zt,tr,{l:H}),er=c(Zt,tr),ur={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},or=m(ur),ir=c(nr,{g:"if(s[h]==null)"+nr.g}),ar=c(nr),cr=At||function(n){return xt.call(n)==Rt
20
- };b(/x/)&&(b=function(n){return"[object Function]"==xt.call(n)});var fr=dt?function(n){if(!n||typeof n!="object")return H;var t=n.valueOf,r=typeof t=="function"&&(r=dt(t))&&dt(r);return r?n==r||dt(n)==r&&!h(n):v(n)}:v,lr=$t?function(n){return typeof n=="function"&&jt.call(n,"prototype")?g(n):w(n)?$t(n):[]}:g,sr=c(Zt);r.VERSION="0.9.2",r.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},r.bind=C,r.bindAll=function(n){for(var t=arguments,r=1<t.length?0:(t=y(n),-1),e=t.length;++r<e;){var u=t[r];
21
- n[u]=C(n[u],n)}return n},r.chain=function(n){return n=new r(n),n.__chain__=V,n},r.clone=_,r.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},r.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},r.contains=O,r.countBy=function(n,t,r){var e={},t=a(t,r);return sr(n,function(n,r,u){r=t(n,r,u),bt.call(e,r)?e[r]++:e[r]=1}),e},r.debounce=function(n,t,r){function e(){a=G,r||(o=n.apply(i,u))
22
- }var u,o,i,a;return function(){var c=r&&!a;return u=arguments,i=this,clearTimeout(a),a=setTimeout(e,t),c&&(o=n.apply(i,u)),o}},r.defaults=ir,r.defer=function(n){var r=kt.call(arguments,1);return setTimeout(function(){n.apply(t,r)},1)},r.delay=function(n,r){var e=kt.call(arguments,2);return setTimeout(function(){n.apply(t,e)},r)},r.difference=function(n){for(var t=-1,r=n?n.length:0,u=yt.apply(X,arguments),u=e(u,r),o=[];++t<r;){var i=n[t];u(i)||o.push(i)}return o},r.escape=function(n){return n==G?"":(n+"").replace(ht,l)
23
- },r.every=A,r.extend=ar,r.filter=S,r.find=E,r.first=T,r.flatten=B,r.forEach=sr,r.forIn=rr,r.forOwn=er,r.functions=y,r.groupBy=function(n,t,r){var e={},t=a(t,r);return sr(n,function(n,r,u){r=t(n,r,u),(bt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},r.has=function(n,t){return n?bt.call(n,t):H},r.identity=L,r.indexOf=D,r.initial=function(n,t,r){return n?kt.call(n,0,-(t==G||r?1:t)):[]},r.intersection=function(n){var t=arguments,r=t.length,u={},o=[];return sr(n,function(n){if(0>D(o,n)){for(var i=r;--i;)if(!(u[i]||(u[i]=e(t[i])))(n))return;
24
- o.push(n)}}),o},r.invert=m,r.invoke=function(n,t){var r=kt.call(arguments,2),e=typeof t=="function",u=[];return sr(n,function(n){u.push((e?t:n[t]).apply(n,r))}),u},r.isArguments=h,r.isArray=cr,r.isBoolean=function(n){return n===V||n===H||xt.call(n)==Tt},r.isDate=function(n){return xt.call(n)==Bt},r.isElement=function(n){return n?1===n.nodeType:H},r.isEmpty=function(n){var t=V;if(!n)return t;var r=xt.call(n),e=n.length;return r==Rt||r==zt||r==It||Ut&&h(n)||r==Mt&&typeof e=="number"&&b(n.splice)?!e:(er(n,function(){return t=H
25
- }),t)},r.isEqual=d,r.isFinite=function(n){return St(n)&&!Et(parseFloat(n))},r.isFunction=b,r.isNaN=function(n){return xt.call(n)==Dt&&n!=+n},r.isNull=function(n){return n===G},r.isNumber=function(n){return xt.call(n)==Dt},r.isObject=w,r.isPlainObject=fr,r.isRegExp=function(n){return xt.call(n)==Pt},r.isString=j,r.isUndefined=function(n){return n===t},r.keys=lr,r.last=function(n,t,r){if(n){var e=n.length;return t==G||r?n[e-1]:kt.call(n,-t||e)}},r.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?qt(0,e+r):Nt(r,e-1))+1);e--;)if(n[e]===t)return e;
26
- return-1},r.lateBind=function(n,t){return i(t,n,kt.call(arguments,2))},r.map=$,r.max=q,r.memoize=function(n,t){var r={};return function(){var e=t?t.apply(this,arguments):arguments[0];return bt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},r.merge=k,r.min=function(n,t,r){var e=1/0,o=-1,i=n?n.length:0,c=e;if(t||!cr(n))t=!t&&j(n)?u:a(t,r),sr(n,function(n,r,u){r=t(n,r,u),r<e&&(e=r,c=n)});else for(;++o<i;)n[o]<c&&(c=n[o]);return c},r.mixin=U,r.noConflict=function(){return n._=tt,this},r.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];
27
- t?u[o]=t[r]:u[o[0]]=o[1]}return u},r.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=a(t,r);else var o=yt.apply(X,arguments);return rr(n,function(n,r,i){(e?!t(n,r,i):0>D(o,r,1))&&(u[r]=n)}),u},r.once=function(n){var t,r=H;return function(){return r?t:(r=V,t=n.apply(this,arguments),n=G,t)}},r.pairs=function(n){var t=[];return er(n,function(n,r){t.push([r,n])}),t},r.partial=function(n){return i(n,kt.call(arguments,1))},r.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=yt.apply(X,arguments),i=o.length;++u<i;){var c=o[u];
28
- c in n&&(e[c]=n[c])}else t=a(t,r),rr(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},r.pluck=N,r.random=function(n,t){return n==G&&t==G&&(t=1),n=+n||0,t==G&&(t=n,n=0),n+mt(Ft()*((+t||0)-n+1))},r.range=function(n,t,r){n=+n||0,r=+r||1,t==G&&(t=n,n=0);for(var e=-1,t=qt(0,_t((t-n)/r)),u=Array(t);++e<t;)u[e]=n,n+=r;return u},r.reduce=F,r.reduceRight=I,r.reject=function(n,t,r){return t=a(t,r),S(n,function(n,r,e){return!t(n,r,e)})},r.rest=M,r.result=function(n,t){var r=n?n[t]:G;return b(r)?n[t]():r},r.shuffle=function(n){var t=-1,r=Array(n?n.length:0);
29
- return sr(n,function(n){var e=mt(Ft()*(++t+1));r[t]=r[e],r[e]=n}),r},r.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:lr(n).length},r.some=R,r.sortBy=function(n,t,r){var e=[],t=a(t,r);for(sr(n,function(n,r,u){e.push({a:t(n,r,u),b:r,c:n})}),n=e.length,e.sort(o);n--;)e[n]=e[n].c;return e},r.sortedIndex=P,r.tap=function(n,t){return t(n),n},r.template=function(n,t,e){n||(n=""),e||(e={});var u,o,i=r.templateSettings,a=0,c=e.interpolate||i.interpolate||pt,l="__p += '",s=e.variable||i.variable,p=s;
30
- n.replace(RegExp((e.escape||i.escape||pt).source+"|"+c.source+"|"+(c===st?lt:pt).source+"|"+(e.evaluate||i.evaluate||pt).source+"|$","g"),function(t,r,e,o,i,c){e||(e=o),l+=n.slice(a,c).replace(vt,f),l+=r?"'+__e("+r+")+'":i?"';"+i+";__p+='":e?"'+((__t=("+e+"))==null?'':__t)+'":"",u||(u=i||rt.test(r||e)),a=c+t.length}),l+="';",p||(s="obj",u?l="with("+s+"){"+l+"}":(e=RegExp("(\\(\\s*)"+s+"\\."+s+"\\b","g"),l=l.replace(ct,"$&"+s+".").replace(e,"$1__d"))),l=(u?l.replace(ut,""):l).replace(ot,"$1").replace(it,"$1;"),l="function("+s+"){"+(p?"":s+"||("+s+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(p?"":",__d="+s+"."+s+"||"+s)+";")+l+"return __p}";
31
- try{o=Function("_","return "+l)(r)}catch(h){throw h.source=l,h}return t?o(t):(o.source=l,o)},r.throttle=function(n,t){function r(){a=new Date,i=G,u=n.apply(o,e)}var e,u,o,i,a=0;return function(){var c=new Date,f=t-(c-a);return e=arguments,o=this,0<f?i||(i=setTimeout(r,f)):(clearTimeout(i),a=c,u=n.apply(o,e)),u}},r.times=function(n,t,r){for(var n=+n||0,e=-1,u=Array(n);++e<n;)u[e]=t.call(r,e);return u},r.toArray=function(n){return n&&typeof n.length=="number"?(Vt?j(n):typeof n=="string")?n.split(""):kt.call(n):x(n)
32
- },r.unescape=function(n){return n==G?"":(n+"").replace(et,p)},r.union=function(){return z(yt.apply(X,arguments))},r.uniq=z,r.uniqueId=function(n){var t=Z++;return n?n+t:t},r.values=x,r.where=function(n,t){var r=[];return rr(t,function(n,t){r.push(t)}),S(n,function(n){for(var e=r.length;e--;){var u=n[r[e]]===t[r[e]];if(!u)break}return!!u})},r.without=function(n){for(var t=-1,r=n?n.length:0,u=e(arguments,1,20),o=[];++t<r;){var i=n[t];u(i)||o.push(i)}return o},r.wrap=function(n,t){return function(){var r=[n];
33
- return wt.apply(r,arguments),t.apply(this,r)}},r.zip=function(n){for(var t=-1,r=n?q(N(arguments,"length")):0,e=Array(r);++t<r;)e[t]=N(arguments,t);return e},r.all=A,r.any=R,r.collect=$,r.detect=E,r.drop=M,r.each=sr,r.foldl=F,r.foldr=I,r.head=T,r.include=O,r.inject=F,r.methods=y,r.select=S,r.tail=M,r.take=T,r.unique=z,U(r),r.prototype.chain=function(){return this.__chain__=V,this},r.prototype.value=function(){return this.__wrapped__},sr("pop push reverse shift sort splice unshift".split(" "),function(n){var t=X[n];
34
- r.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),Ct&&0===n.length&&delete n[0],this.__chain__&&(n=new r(n),n.__chain__=V),n}}),sr(["concat","join","slice"],function(n){var t=X[n];r.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new r(n),n.__chain__=V),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=r,define(function(){return r})):J?typeof module=="object"&&module&&module.exports==J?(module.exports=r)._=r:J._=r:n._=r
35
- })(this);
@@ -1,3688 +0,0 @@
1
- /*!
2
- * Lo-Dash v0.9.2 <http://lodash.com>
3
- * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
4
- * Based on Underscore.js 1.4.2 <http://underscorejs.org>
5
- * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
6
- * Available under MIT license <http://lodash.com/license>
7
- */
8
- ;(function(window, undefined) {
9
-
10
- /** Detect free variable `exports` */
11
- var freeExports = typeof exports == 'object' && exports;
12
-
13
- /** Detect free variable `global` and use it as `window` */
14
- var freeGlobal = typeof global == 'object' && global;
15
- if (freeGlobal.global === freeGlobal) {
16
- window = freeGlobal;
17
- }
18
-
19
- /** Used for array and object method references */
20
- var arrayRef = [],
21
- // avoid a Closure Compiler bug by creatively creating an object
22
- objectRef = new function(){};
23
-
24
- /** Used to generate unique IDs */
25
- var idCounter = 0;
26
-
27
- /** Used internally to indicate various things */
28
- var indicatorObject = objectRef;
29
-
30
- /** Used to restore the original `_` reference in `noConflict` */
31
- var oldDash = window._;
32
-
33
- /** Used to match HTML entities */
34
- var reEscapedHtml = /&(?:amp|lt|gt|quot|#x27);/g;
35
-
36
- /** Used to match regexp flags from their coerced string values */
37
- var reFlags = /\w*$/;
38
-
39
- /** Used to detect if a method is native */
40
- var reNative = RegExp('^' +
41
- (objectRef.valueOf + '')
42
- .replace(/[.*+?^=!:${}()|[\]\/\\]/g, '\\$&')
43
- .replace(/valueOf|for [^\]]+/g, '.+?') + '$'
44
- );
45
-
46
- /**
47
- * Used to match ES6 template delimiters
48
- * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
49
- */
50
- var reEsTemplate = /\$\{((?:(?=\\?)\\?[\s\S])*?)}/g;
51
-
52
- /** Used to match "interpolate" template delimiters */
53
- var reInterpolate = /<%=([\s\S]+?)%>/g;
54
-
55
- /** Used to ensure capturing order of template delimiters */
56
- var reNoMatch = /($^)/;
57
-
58
- /** Used to match HTML characters */
59
- var reUnescapedHtml = /[&<>"']/g;
60
-
61
- /** Used to match unescaped characters in compiled string literals */
62
- var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g;
63
-
64
- /** Used to fix the JScript [[DontEnum]] bug */
65
- var shadowed = [
66
- 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',
67
- 'toLocaleString', 'toString', 'valueOf'
68
- ];
69
-
70
- /** Used to make template sourceURLs easier to identify */
71
- var templateCounter = 0;
72
-
73
- /** Native method shortcuts */
74
- var ceil = Math.ceil,
75
- concat = arrayRef.concat,
76
- floor = Math.floor,
77
- getPrototypeOf = reNative.test(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
78
- hasOwnProperty = objectRef.hasOwnProperty,
79
- push = arrayRef.push,
80
- propertyIsEnumerable = objectRef.propertyIsEnumerable,
81
- slice = arrayRef.slice,
82
- toString = objectRef.toString;
83
-
84
- /* Native method shortcuts for methods with the same name as other `lodash` methods */
85
- var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind,
86
- nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
87
- nativeIsFinite = window.isFinite,
88
- nativeIsNaN = window.isNaN,
89
- nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
90
- nativeMax = Math.max,
91
- nativeMin = Math.min,
92
- nativeRandom = Math.random;
93
-
94
- /** `Object#toString` result shortcuts */
95
- var argsClass = '[object Arguments]',
96
- arrayClass = '[object Array]',
97
- boolClass = '[object Boolean]',
98
- dateClass = '[object Date]',
99
- funcClass = '[object Function]',
100
- numberClass = '[object Number]',
101
- objectClass = '[object Object]',
102
- regexpClass = '[object RegExp]',
103
- stringClass = '[object String]';
104
-
105
- /**
106
- * Detect if `Array#shift` and `Array#splice` augment array-like objects
107
- * incorrectly:
108
- *
109
- * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()`
110
- * and `splice()` functions that fail to remove the last element, `value[0]`,
111
- * of array-like objects even though the `length` property is set to `0`.
112
- * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()`
113
- * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9.
114
- */
115
- var hasObjectSpliceBug = (hasObjectSpliceBug = { '0': 1, 'length': 1 },
116
- arrayRef.splice.call(hasObjectSpliceBug, 0, 1), hasObjectSpliceBug[0]);
117
-
118
-
119
- /* Detect if `Function#bind` exists and is inferred to be fast (all but V8) */
120
- var isBindFast = nativeBind && /\n|Opera/.test(nativeBind + toString.call(window.opera));
121
-
122
- /**
123
- * Detect if sourceURL syntax is usable without erroring:
124
- *
125
- * The JS engine in Adobe products, like InDesign, will throw a syntax error
126
- * when it encounters a single line comment beginning with the `@` symbol.
127
- *
128
- * The JS engine in Narwhal will generate the function `function anonymous(){//}`
129
- * and throw a syntax error.
130
- *
131
- * Avoid comments beginning `@` symbols in IE because they are part of its
132
- * non-standard conditional compilation support.
133
- * http://msdn.microsoft.com/en-us/library/121hztk3(v=vs.94).aspx
134
- */
135
- try {
136
- var useSourceURL = (Function('//@')(), !window.attachEvent);
137
- } catch(e) { }
138
-
139
- /** Used to determine if values are of the language type Object */
140
- var objectTypes = {
141
- 'boolean': false,
142
- 'function': true,
143
- 'object': true,
144
- 'number': false,
145
- 'string': false,
146
- 'undefined': false
147
- };
148
-
149
- /** Used to escape characters for inclusion in compiled string literals */
150
- var stringEscapes = {
151
- '\\': '\\',
152
- "'": "'",
153
- '\n': 'n',
154
- '\r': 'r',
155
- '\t': 't',
156
- '\u2028': 'u2028',
157
- '\u2029': 'u2029'
158
- };
159
-
160
- /*--------------------------------------------------------------------------*/
161
-
162
- /**
163
- * The `lodash` function.
164
- *
165
- * @name _
166
- * @constructor
167
- * @category Chaining
168
- * @param {Mixed} value The value to wrap in a `lodash` instance.
169
- * @returns {Object} Returns a `lodash` instance.
170
- */
171
- function lodash(value) {
172
- // exit early if already wrapped
173
- if (value && value.__wrapped__) {
174
- return value;
175
- }
176
- // allow invoking `lodash` without the `new` operator
177
- if (!(this instanceof lodash)) {
178
- return new lodash(value);
179
- }
180
- this.__wrapped__ = value;
181
- }
182
-
183
- /**
184
- * By default, the template delimiters used by Lo-Dash are similar to those in
185
- * embedded Ruby (ERB). Change the following template settings to use alternative
186
- * delimiters.
187
- *
188
- * @static
189
- * @memberOf _
190
- * @type Object
191
- */
192
- lodash.templateSettings = {
193
-
194
- /**
195
- * Used to detect `data` property values to be HTML-escaped.
196
- *
197
- * @static
198
- * @memberOf _.templateSettings
199
- * @type RegExp
200
- */
201
- 'escape': /<%-([\s\S]+?)%>/g,
202
-
203
- /**
204
- * Used to detect code to be evaluated.
205
- *
206
- * @static
207
- * @memberOf _.templateSettings
208
- * @type RegExp
209
- */
210
- 'evaluate': /<%([\s\S]+?)%>/g,
211
-
212
- /**
213
- * Used to detect `data` property values to inject.
214
- *
215
- * @static
216
- * @memberOf _.templateSettings
217
- * @type RegExp
218
- */
219
- 'interpolate': reInterpolate,
220
-
221
- /**
222
- * Used to reference the data object in the template text.
223
- *
224
- * @static
225
- * @memberOf _.templateSettings
226
- * @type String
227
- */
228
- 'variable': ''
229
- };
230
-
231
- /*--------------------------------------------------------------------------*/
232
-
233
- /**
234
- * Reusable iterator options shared by `forEach`, `forIn`, and `forOwn`.
235
- */
236
- var forEachIteratorOptions = {
237
- 'args': 'collection, callback, thisArg',
238
- 'top': 'callback = createCallback(callback, thisArg)',
239
- 'arrayLoop': 'if (callback(value, index, collection) === false) return result',
240
- 'objectLoop': 'if (callback(value, index, collection) === false) return result'
241
- };
242
-
243
- /** Reusable iterator options for `forIn` and `forOwn` */
244
- var forOwnIteratorOptions = {
245
- 'arrayLoop': null
246
- };
247
-
248
- /*--------------------------------------------------------------------------*/
249
-
250
- /**
251
- * Used by `_.max` and `_.min` as the default `callback` when a given
252
- * `collection` is a string value.
253
- *
254
- * @private
255
- * @param {String} value The character to inspect.
256
- * @returns {Number} Returns the code unit of given character.
257
- */
258
- function charAtCallback(value) {
259
- return value.charCodeAt(0);
260
- }
261
-
262
- /**
263
- * Used by `sortBy` to compare transformed `collection` values, stable sorting
264
- * them in ascending order.
265
- *
266
- * @private
267
- * @param {Object} a The object to compare to `b`.
268
- * @param {Object} b The object to compare to `a`.
269
- * @returns {Number} Returns the sort order indicator of `1` or `-1`.
270
- */
271
- function compareAscending(a, b) {
272
- var ai = a.index,
273
- bi = b.index;
274
-
275
- a = a.criteria;
276
- b = b.criteria;
277
-
278
- // ensure a stable sort in V8 and other engines
279
- // http://code.google.com/p/v8/issues/detail?id=90
280
- if (a !== b) {
281
- if (a > b || a === undefined) {
282
- return 1;
283
- }
284
- if (a < b || b === undefined) {
285
- return -1;
286
- }
287
- }
288
- return ai < bi ? -1 : 1;
289
- }
290
-
291
- /**
292
- * Creates a function that, when called, invokes `func` with the `this`
293
- * binding of `thisArg` and prepends any `partailArgs` to the arguments passed
294
- * to the bound function.
295
- *
296
- * @private
297
- * @param {Function|String} func The function to bind or the method name.
298
- * @param {Mixed} [thisArg] The `this` binding of `func`.
299
- * @param {Array} partialArgs An array of arguments to be partially applied.
300
- * @returns {Function} Returns the new bound function.
301
- */
302
- function createBound(func, thisArg, partialArgs) {
303
- function bound() {
304
- // `Function#bind` spec
305
- // http://es5.github.com/#x15.3.4.5
306
- var args = arguments,
307
- thisBinding = thisArg;
308
-
309
- if (partialArgs.length) {
310
- args = args.length
311
- ? partialArgs.concat(slice.call(args))
312
- : partialArgs;
313
- }
314
- if (this instanceof bound) {
315
- // get `func` instance if `bound` is invoked in a `new` expression
316
- noop.prototype = func.prototype;
317
- thisBinding = new noop;
318
-
319
- // mimic the constructor's `return` behavior
320
- // http://es5.github.com/#x13.2.2
321
- var result = func.apply(thisBinding, args);
322
- return isObject(result)
323
- ? result
324
- : thisBinding
325
- }
326
- return func.apply(thisBinding, args);
327
- }
328
- return bound;
329
- }
330
-
331
- /**
332
- * Produces an iteration callback bound to an optional `thisArg`. If `func` is
333
- * a property name, the callback will return the property value for a given element.
334
- *
335
- * @private
336
- * @param {Function|String} [func=identity|property] The function called per
337
- * iteration or property name to query.
338
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
339
- * @returns {Function} Returns a callback function.
340
- */
341
- function createCallback(func, thisArg) {
342
- if (!func) {
343
- return identity;
344
- }
345
- if (typeof func != 'function') {
346
- return function(object) {
347
- return object[func];
348
- };
349
- }
350
- if (thisArg !== undefined) {
351
- return function(value, index, object) {
352
- return func.call(thisArg, value, index, object);
353
- };
354
- }
355
- return func;
356
- }
357
-
358
- /**
359
- * Creates compiled iteration functions.
360
- *
361
- * @private
362
- * @param {Object} [options1, options2, ...] The compile options object(s).
363
- * useHas - A boolean to specify using `hasOwnProperty` checks in the object loop.
364
- * args - A string of comma separated arguments the iteration function will accept.
365
- * top - A string of code to execute before the iteration branches.
366
- * arrayLoop - A string of code to execute in the array loop.
367
- * objectLoop - A string of code to execute in the object loop.
368
- * bottom - A string of code to execute after the iteration branches.
369
- *
370
- * @returns {Function} Returns the compiled function.
371
- */
372
- function createIterator() {
373
- var data = {
374
- 'arrayLoop': '',
375
- 'bottom': '',
376
- 'hasDontEnumBug': hasDontEnumBug,
377
- 'objectLoop': '',
378
- 'noArgsEnum': noArgsEnum,
379
- 'noCharByIndex': noCharByIndex,
380
- 'shadowed': shadowed,
381
- 'top': '',
382
- 'useHas': true
383
- };
384
-
385
- // merge options into a template data object
386
- for (var object, index = 0; object = arguments[index]; index++) {
387
- for (var key in object) {
388
- data[key] = object[key];
389
- }
390
- }
391
- var args = data.args;
392
- data.firstArg = /^[^,]+/.exec(args)[0];
393
-
394
- // create the function factory
395
- var factory = Function(
396
- 'createCallback, hasOwnProperty, isString, objectTypes, ' +
397
- 'nativeKeys, propertyIsEnumerable',
398
- 'return function(' + args + ') {\n' + (data) + '\n}'
399
- );
400
- // return the compiled function
401
- return factory(
402
- createCallback, hasOwnProperty, isString, objectTypes,
403
- nativeKeys, propertyIsEnumerable
404
- );
405
- }
406
-
407
- /**
408
- * Used by `template` to escape characters for inclusion in compiled
409
- * string literals.
410
- *
411
- * @private
412
- * @param {String} match The matched character to escape.
413
- * @returns {String} Returns the escaped character.
414
- */
415
- function escapeStringChar(match) {
416
- return '\\' + stringEscapes[match];
417
- }
418
-
419
- /**
420
- * Used by `escape` to convert characters to HTML entities.
421
- *
422
- * @private
423
- * @param {String} match The matched character to escape.
424
- * @returns {String} Returns the escaped character.
425
- */
426
- function escapeHtmlChar(match) {
427
- return htmlEscapes[match];
428
- }
429
-
430
- /**
431
- * A no-operation function.
432
- *
433
- * @private
434
- */
435
- function noop() {
436
- // no operation performed
437
- }
438
-
439
- /**
440
- * Used by `unescape` to convert HTML entities to characters.
441
- *
442
- * @private
443
- * @param {String} match The matched character to unescape.
444
- * @returns {String} Returns the unescaped character.
445
- */
446
- function unescapeHtmlChar(match) {
447
- return htmlUnescapes[match];
448
- }
449
-
450
- /*--------------------------------------------------------------------------*/
451
- /**
452
- * Checks if `value` is an `arguments` object.
453
- *
454
- * @static
455
- * @memberOf _
456
- * @category Objects
457
- * @param {Mixed} value The value to check.
458
- * @returns {Boolean} Returns `true` if the `value` is an `arguments` object, else `false`.
459
- * @example
460
- *
461
- * (function() { return _.isArguments(arguments); })(1, 2, 3);
462
- * // => true
463
- *
464
- * _.isArguments([1, 2, 3]);
465
- * // => false
466
- */
467
- lodash.isArguments = function(value) {
468
- return toString.call(value) == argsClass;
469
- }
470
-
471
-
472
- // fallback for browsers that can't detect `arguments` objects by [[Class]]
473
- if (!lodash.isArguments(arguments)) {
474
- lodash.isArguments = function(value) {
475
- return value ? hasOwnProperty.call(value, 'callee') : false;
476
- };
477
- }
478
-
479
- /**
480
- * Iterates over `object`'s own and inherited enumerable properties, executing
481
- * the `callback` for each property. The `callback` is bound to `thisArg` and
482
- * invoked with three arguments; (value, key, object). Callbacks may exit iteration
483
- * early by explicitly returning `false`.
484
- *
485
- * @static
486
- * @memberOf _
487
- * @category Objects
488
- * @param {Object} object The object to iterate over.
489
- * @param {Function} callback The function called per iteration.
490
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
491
- * @returns {Object} Returns `object`.
492
- * @example
493
- *
494
- * function Dog(name) {
495
- * this.name = name;
496
- * }
497
- *
498
- * Dog.prototype.bark = function() {
499
- * alert('Woof, woof!');
500
- * };
501
- *
502
- * _.forIn(new Dog('Dagny'), function(value, key) {
503
- * alert(key);
504
- * });
505
- * // => alerts 'name' and 'bark' (order is not guaranteed)
506
- */
507
- var forIn = function (collection, callback) {
508
- var index, value, iteratee = collection, result = collection;
509
- if (!collection) return result;
510
- callback = createCallback(callback);
511
-
512
- for (index in iteratee) {
513
- value = iteratee[index];
514
- if (callback(value, index, collection) === indicatorObject) return result;
515
- }
516
- ;
517
- return result
518
- };
519
-
520
- /**
521
- * Iterates over `object`'s own enumerable properties, executing the `callback`
522
- * for each property. The `callback` is bound to `thisArg` and invoked with three
523
- * arguments; (value, key, object). Callbacks may exit iteration early by explicitly
524
- * returning `false`.
525
- *
526
- * @static
527
- * @memberOf _
528
- * @category Objects
529
- * @param {Object} object The object to iterate over.
530
- * @param {Function} callback The function called per iteration.
531
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
532
- * @returns {Object} Returns `object`.
533
- * @example
534
- *
535
- * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
536
- * alert(key);
537
- * });
538
- * // => alerts '0', '1', and 'length' (order is not guaranteed)
539
- */
540
- var forOwn = function (collection, callback) {
541
- var index, value, iteratee = collection, result = collection;
542
- if (!collection) return result;
543
- callback = createCallback(callback);
544
-
545
- for (index in iteratee) {
546
- if (hasOwnProperty.call(iteratee, index)) {
547
- value = iteratee[index];
548
- if (callback(value, index, collection) === indicatorObject) return result;
549
- }
550
- }
551
- ;
552
- return result
553
- };
554
-
555
- /**
556
- * A fallback implementation of `isPlainObject` that checks if a given `value`
557
- * is an object created by the `Object` constructor, assuming objects created
558
- * by the `Object` constructor have no inherited enumerable properties and that
559
- * there are no `Object.prototype` extensions.
560
- *
561
- * @private
562
- * @param {Mixed} value The value to check.
563
- * @returns {Boolean} Returns `true` if `value` is a plain object, else `false`.
564
- */
565
- function shimIsPlainObject(value) {
566
- // avoid non-objects and false positives for `arguments` objects
567
- var result = false;
568
- if (!(value && typeof value == 'object') || isArguments(value)) {
569
- return result;
570
- }
571
- // IE < 9 presents DOM nodes as `Object` objects except they have `toString`
572
- // methods that are `typeof` "string" and still can coerce nodes to strings.
573
- // Also check that the constructor is `Object` (i.e. `Object instanceof Object`)
574
- var ctor = value.constructor;
575
- if (
576
- (!isFunction(ctor) || ctor instanceof ctor)) {
577
- // In most environments an object's own properties are iterated before
578
- // its inherited properties. If the last iterated property is an object's
579
- // own property then there are no inherited enumerable properties.
580
- forIn(value, function(value, key) {
581
- result = key;
582
- });
583
- return result === false || hasOwnProperty.call(value, result);
584
- }
585
- return result;
586
- }
587
-
588
- /**
589
- * A fallback implementation of `Object.keys` that produces an array of the
590
- * given object's own enumerable property names.
591
- *
592
- * @private
593
- * @param {Object} object The object to inspect.
594
- * @returns {Array} Returns a new array of property names.
595
- */
596
- function shimKeys(object) {
597
- var result = [];
598
- forOwn(object, function(value, key) {
599
- result.push(key);
600
- });
601
- return result;
602
- }
603
-
604
- /**
605
- * Used to convert characters to HTML entities:
606
- *
607
- * Though the `>` character is escaped for symmetry, characters like `>` and `/`
608
- * don't require escaping in HTML and have no special meaning unless they're part
609
- * of a tag or an unquoted attribute value.
610
- * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact")
611
- */
612
- var htmlEscapes = {
613
- '&': '&amp;',
614
- '<': '&lt;',
615
- '>': '&gt;',
616
- '"': '&quot;',
617
- "'": '&#x27;'
618
- };
619
-
620
- /** Used to convert HTML entities to characters */
621
- var htmlUnescapes = invert(htmlEscapes);
622
-
623
- /*--------------------------------------------------------------------------*/
624
-
625
- /**
626
- * Creates a clone of `value`. If `deep` is `true`, all nested objects will
627
- * also be cloned otherwise they will be assigned by reference. Functions, DOM
628
- * nodes, `arguments` objects, and objects created by constructors other than
629
- * `Object` are **not** cloned.
630
- *
631
- * @static
632
- * @memberOf _
633
- * @category Objects
634
- * @param {Mixed} value The value to clone.
635
- * @param {Boolean} deep A flag to indicate a deep clone.
636
- * @param- {Object} [guard] Internally used to allow this method to work with
637
- * others like `_.map` without using their callback `index` argument for `deep`.
638
- * @param- {Array} [stackA=[]] Internally used to track traversed source objects.
639
- * @param- {Array} [stackB=[]] Internally used to associate clones with their
640
- * source counterparts.
641
- * @returns {Mixed} Returns the cloned `value`.
642
- * @example
643
- *
644
- * var stooges = [
645
- * { 'name': 'moe', 'age': 40 },
646
- * { 'name': 'larry', 'age': 50 },
647
- * { 'name': 'curly', 'age': 60 }
648
- * ];
649
- *
650
- * _.clone({ 'name': 'moe' });
651
- * // => { 'name': 'moe' }
652
- *
653
- * var shallow = _.clone(stooges);
654
- * shallow[0] === stooges[0];
655
- * // => true
656
- *
657
- * var deep = _.clone(stooges, true);
658
- * shallow[0] === stooges[0];
659
- * // => false
660
- */
661
- function clone(value) {
662
- return value && objectTypes[typeof value]
663
- ? (isArray(value) ? slice.call(value) : extend({}, value))
664
- : value
665
- }
666
-
667
- /**
668
- * Assigns enumerable properties of the default object(s) to the `destination`
669
- * object for all `destination` properties that resolve to `null`/`undefined`.
670
- * Once a property is set, additional defaults of the same property will be
671
- * ignored.
672
- *
673
- * @static
674
- * @memberOf _
675
- * @category Objects
676
- * @param {Object} object The destination object.
677
- * @param {Object} [default1, default2, ...] The default objects.
678
- * @returns {Object} Returns the destination object.
679
- * @example
680
- *
681
- * var iceCream = { 'flavor': 'chocolate' };
682
- * _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'rainbow' });
683
- * // => { 'flavor': 'chocolate', 'sprinkles': 'rainbow' }
684
- */
685
- var defaults = function (object) {
686
- var index, value, iteratee = object, result = object;
687
- if (!object) return result;
688
- for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) {
689
- if (iteratee = arguments[argsIndex]) {;
690
-
691
- for (index in iteratee) {
692
- value = iteratee[index];
693
- if (result[index] == null) result[index] = value;
694
- }
695
- }
696
- };
697
- return result
698
- };
699
-
700
- /**
701
- * Assigns enumerable properties of the source object(s) to the `destination`
702
- * object. Subsequent sources will overwrite propery assignments of previous
703
- * sources.
704
- *
705
- * @static
706
- * @memberOf _
707
- * @category Objects
708
- * @param {Object} object The destination object.
709
- * @param {Object} [source1, source2, ...] The source objects.
710
- * @returns {Object} Returns the destination object.
711
- * @example
712
- *
713
- * _.extend({ 'name': 'moe' }, { 'age': 40 });
714
- * // => { 'name': 'moe', 'age': 40 }
715
- */
716
- var extend = function (object) {
717
- var index, value, iteratee = object, result = object;
718
- if (!object) return result;
719
- for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) {
720
- if (iteratee = arguments[argsIndex]) {;
721
-
722
- for (index in iteratee) {
723
- value = iteratee[index];
724
- result[index] = value;
725
- }
726
- }
727
- };
728
- return result
729
- };
730
-
731
- /**
732
- * Creates a sorted array of all enumerable properties, own and inherited,
733
- * of `object` that have function values.
734
- *
735
- * @static
736
- * @memberOf _
737
- * @alias methods
738
- * @category Objects
739
- * @param {Object} object The object to inspect.
740
- * @returns {Array} Returns a new array of property names that have function values.
741
- * @example
742
- *
743
- * _.functions(_);
744
- * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...]
745
- */
746
- function functions(object) {
747
- var result = [];
748
- forIn(object, function(value, key) {
749
- if (isFunction(value)) {
750
- result.push(key);
751
- }
752
- });
753
- return result.sort();
754
- }
755
-
756
- /**
757
- * Checks if the specified object `property` exists and is a direct property,
758
- * instead of an inherited property.
759
- *
760
- * @static
761
- * @memberOf _
762
- * @category Objects
763
- * @param {Object} object The object to check.
764
- * @param {String} property The property to check for.
765
- * @returns {Boolean} Returns `true` if key is a direct property, else `false`.
766
- * @example
767
- *
768
- * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
769
- * // => true
770
- */
771
- function has(object, property) {
772
- return object ? hasOwnProperty.call(object, property) : false;
773
- }
774
-
775
- /**
776
- * Creates an object composed of the inverted keys and values of the given `object`.
777
- *
778
- * @static
779
- * @memberOf _
780
- * @category Objects
781
- * @param {Object} object The object to invert.
782
- * @returns {Object} Returns the created inverted object.
783
- * @example
784
- *
785
- * _.invert({ 'first': 'Moe', 'second': 'Larry', 'third': 'Curly' });
786
- * // => { 'Moe': 'first', 'Larry': 'second', 'Curly': 'third' } (order is not guaranteed)
787
- */
788
- function invert(object) {
789
- var result = {};
790
- forOwn(object, function(value, key) {
791
- result[value] = key;
792
- });
793
- return result;
794
- }
795
-
796
- /**
797
- * Checks if `value` is an array.
798
- *
799
- * @static
800
- * @memberOf _
801
- * @category Objects
802
- * @param {Mixed} value The value to check.
803
- * @returns {Boolean} Returns `true` if the `value` is an array, else `false`.
804
- * @example
805
- *
806
- * (function() { return _.isArray(arguments); })();
807
- * // => false
808
- *
809
- * _.isArray([1, 2, 3]);
810
- * // => true
811
- */
812
- var isArray = nativeIsArray || function(value) {
813
- return toString.call(value) == arrayClass;
814
- };
815
-
816
- /**
817
- * Checks if `value` is a boolean (`true` or `false`) value.
818
- *
819
- * @static
820
- * @memberOf _
821
- * @category Objects
822
- * @param {Mixed} value The value to check.
823
- * @returns {Boolean} Returns `true` if the `value` is a boolean value, else `false`.
824
- * @example
825
- *
826
- * _.isBoolean(null);
827
- * // => false
828
- */
829
- function isBoolean(value) {
830
- return value === true || value === false || toString.call(value) == boolClass;
831
- }
832
-
833
- /**
834
- * Checks if `value` is a date.
835
- *
836
- * @static
837
- * @memberOf _
838
- * @category Objects
839
- * @param {Mixed} value The value to check.
840
- * @returns {Boolean} Returns `true` if the `value` is a date, else `false`.
841
- * @example
842
- *
843
- * _.isDate(new Date);
844
- * // => true
845
- */
846
- function isDate(value) {
847
- return toString.call(value) == dateClass;
848
- }
849
-
850
- /**
851
- * Checks if `value` is a DOM element.
852
- *
853
- * @static
854
- * @memberOf _
855
- * @category Objects
856
- * @param {Mixed} value The value to check.
857
- * @returns {Boolean} Returns `true` if the `value` is a DOM element, else `false`.
858
- * @example
859
- *
860
- * _.isElement(document.body);
861
- * // => true
862
- */
863
- function isElement(value) {
864
- return value ? value.nodeType === 1 : false;
865
- }
866
-
867
- /**
868
- * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a
869
- * length of `0` and objects with no own enumerable properties are considered
870
- * "empty".
871
- *
872
- * @static
873
- * @memberOf _
874
- * @category Objects
875
- * @param {Array|Object|String} value The value to inspect.
876
- * @returns {Boolean} Returns `true` if the `value` is empty, else `false`.
877
- * @example
878
- *
879
- * _.isEmpty([1, 2, 3]);
880
- * // => false
881
- *
882
- * _.isEmpty({});
883
- * // => true
884
- *
885
- * _.isEmpty('');
886
- * // => true
887
- */
888
- function isEmpty(value) {
889
- if (!value) {
890
- return true;
891
- }
892
- if (isArray(value) || isString(value)) {
893
- return !value.length;
894
- }
895
- for (var key in value) {
896
- if (hasOwnProperty.call(value, key)) {
897
- return false;
898
- }
899
- }
900
- return true;
901
- }
902
-
903
- /**
904
- * Performs a deep comparison between two values to determine if they are
905
- * equivalent to each other.
906
- *
907
- * @static
908
- * @memberOf _
909
- * @category Objects
910
- * @param {Mixed} a The value to compare.
911
- * @param {Mixed} b The other value to compare.
912
- * @param- {Object} [stackA=[]] Internally used track traversed `a` objects.
913
- * @param- {Object} [stackB=[]] Internally used track traversed `b` objects.
914
- * @returns {Boolean} Returns `true` if the values are equvalent, else `false`.
915
- * @example
916
- *
917
- * var moe = { 'name': 'moe', 'luckyNumbers': [13, 27, 34] };
918
- * var clone = { 'name': 'moe', 'luckyNumbers': [13, 27, 34] };
919
- *
920
- * moe == clone;
921
- * // => false
922
- *
923
- * _.isEqual(moe, clone);
924
- * // => true
925
- */
926
- function isEqual(a, b, stackA, stackB) {
927
- // exit early for identical values
928
- if (a === b) {
929
- // treat `+0` vs. `-0` as not equal
930
- return a !== 0 || (1 / a == 1 / b);
931
- }
932
- // a strict comparison is necessary because `null == undefined`
933
- if (a == null || b == null) {
934
- return a === b;
935
- }
936
- // compare [[Class]] names
937
- var className = toString.call(a);
938
- if (className != toString.call(b)) {
939
- return false;
940
- }
941
- switch (className) {
942
- case boolClass:
943
- case dateClass:
944
- // coerce dates and booleans to numbers, dates to milliseconds and booleans
945
- // to `1` or `0`, treating invalid dates coerced to `NaN` as not equal
946
- return +a == +b;
947
-
948
- case numberClass:
949
- // treat `NaN` vs. `NaN` as equal
950
- return a != +a
951
- ? b != +b
952
- // but treat `+0` vs. `-0` as not equal
953
- : (a == 0 ? (1 / a == 1 / b) : a == +b);
954
-
955
- case regexpClass:
956
- case stringClass:
957
- // coerce regexes to strings (http://es5.github.com/#x15.10.6.4)
958
- // treat string primitives and their corresponding object instances as equal
959
- return a == b + '';
960
- }
961
- // exit early, in older browsers, if `a` is array-like but not `b`
962
- var isArr = className == arrayClass;
963
-
964
- if (!isArr) {
965
- // unwrap any `lodash` wrapped values
966
- if (a.__wrapped__ || b.__wrapped__) {
967
- return isEqual(a.__wrapped__ || a, b.__wrapped__ || b);
968
- }
969
- // exit for functions and DOM nodes
970
- if (className != objectClass) {
971
- return false;
972
- }
973
- var ctorA = a.constructor,
974
- ctorB = b.constructor;
975
-
976
- // non `Object` object instances with different constructors are not equal
977
- if (ctorA != ctorB && !(
978
- isFunction(ctorA) && ctorA instanceof ctorA &&
979
- isFunction(ctorB) && ctorB instanceof ctorB
980
- )) {
981
- return false;
982
- }
983
- }
984
- // assume cyclic structures are equal
985
- // the algorithm for detecting cyclic structures is adapted from ES 5.1
986
- // section 15.12.3, abstract operation `JO` (http://es5.github.com/#x15.12.3)
987
- stackA || (stackA = []);
988
- stackB || (stackB = []);
989
-
990
- var length = stackA.length;
991
- while (length--) {
992
- if (stackA[length] == a) {
993
- return stackB[length] == b;
994
- }
995
- }
996
-
997
- var index = -1,
998
- result = true,
999
- size = 0;
1000
-
1001
- // add `a` and `b` to the stack of traversed objects
1002
- stackA.push(a);
1003
- stackB.push(b);
1004
-
1005
- // recursively compare objects and arrays (susceptible to call stack limits)
1006
- if (isArr) {
1007
- // compare lengths to determine if a deep comparison is necessary
1008
- size = a.length;
1009
- result = size == b.length;
1010
-
1011
- if (result) {
1012
- // deep compare the contents, ignoring non-numeric properties
1013
- while (size--) {
1014
- if (!(result = isEqual(a[size], b[size], stackA, stackB))) {
1015
- break;
1016
- }
1017
- }
1018
- }
1019
- return result;
1020
- }
1021
- // deep compare objects
1022
- for (var key in a) {
1023
- if (hasOwnProperty.call(a, key)) {
1024
- // count the number of properties.
1025
- size++;
1026
- // deep compare each property value.
1027
- if (!(hasOwnProperty.call(b, key) && isEqual(a[key], b[key], stackA, stackB))) {
1028
- return false;
1029
- }
1030
- }
1031
- }
1032
- // ensure both objects have the same number of properties
1033
- for (key in b) {
1034
- // The JS engine in Adobe products, like InDesign, has a bug that causes
1035
- // `!size--` to throw an error so it must be wrapped in parentheses.
1036
- // https://github.com/documentcloud/underscore/issues/355
1037
- if (hasOwnProperty.call(b, key) && !(size--)) {
1038
- // `size` will be `-1` if `b` has more properties than `a`
1039
- return false;
1040
- }
1041
- }
1042
- return true;
1043
- }
1044
-
1045
- /**
1046
- * Checks if `value` is, or can be coerced to, a finite number.
1047
- *
1048
- * Note: This is not the same as native `isFinite`, which will return true for
1049
- * booleans and empty strings. See http://es5.github.com/#x15.1.2.5.
1050
- *
1051
- * @deprecated
1052
- * @static
1053
- * @memberOf _
1054
- * @category Objects
1055
- * @param {Mixed} value The value to check.
1056
- * @returns {Boolean} Returns `true` if the `value` is a finite number, else `false`.
1057
- * @example
1058
- *
1059
- * _.isFinite(-101);
1060
- * // => true
1061
- *
1062
- * _.isFinite('10');
1063
- * // => true
1064
- *
1065
- * _.isFinite(true);
1066
- * // => false
1067
- *
1068
- * _.isFinite('');
1069
- * // => false
1070
- *
1071
- * _.isFinite(Infinity);
1072
- * // => false
1073
- */
1074
- function isFinite(value) {
1075
- return nativeIsFinite(value) && toString.call(value) == numberClass;
1076
- }
1077
-
1078
- /**
1079
- * Checks if `value` is a function.
1080
- *
1081
- * @static
1082
- * @memberOf _
1083
- * @category Objects
1084
- * @param {Mixed} value The value to check.
1085
- * @returns {Boolean} Returns `true` if the `value` is a function, else `false`.
1086
- * @example
1087
- *
1088
- * _.isFunction(_);
1089
- * // => true
1090
- */
1091
- function isFunction(value) {
1092
- return typeof value == 'function';
1093
- }
1094
- // fallback for older versions of Chrome and Safari
1095
- if (isFunction(/x/)) {
1096
- isFunction = function(value) {
1097
- return toString.call(value) == funcClass;
1098
- };
1099
- }
1100
-
1101
- /**
1102
- * Checks if `value` is the language type of Object.
1103
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1104
- *
1105
- * @static
1106
- * @memberOf _
1107
- * @category Objects
1108
- * @param {Mixed} value The value to check.
1109
- * @returns {Boolean} Returns `true` if the `value` is an object, else `false`.
1110
- * @example
1111
- *
1112
- * _.isObject({});
1113
- * // => true
1114
- *
1115
- * _.isObject([1, 2, 3]);
1116
- * // => true
1117
- *
1118
- * _.isObject(1);
1119
- * // => false
1120
- */
1121
- function isObject(value) {
1122
- // check if the value is the ECMAScript language type of Object
1123
- // http://es5.github.com/#x8
1124
- // and avoid a V8 bug
1125
- // http://code.google.com/p/v8/issues/detail?id=2291
1126
- return value ? objectTypes[typeof value] : false;
1127
- }
1128
-
1129
- /**
1130
- * Checks if `value` is `NaN`.
1131
- *
1132
- * Note: This is not the same as native `isNaN`, which will return true for
1133
- * `undefined` and other values. See http://es5.github.com/#x15.1.2.4.
1134
- *
1135
- * @deprecated
1136
- * @static
1137
- * @memberOf _
1138
- * @category Objects
1139
- * @param {Mixed} value The value to check.
1140
- * @returns {Boolean} Returns `true` if the `value` is `NaN`, else `false`.
1141
- * @example
1142
- *
1143
- * _.isNaN(NaN);
1144
- * // => true
1145
- *
1146
- * _.isNaN(new Number(NaN));
1147
- * // => true
1148
- *
1149
- * isNaN(undefined);
1150
- * // => true
1151
- *
1152
- * _.isNaN(undefined);
1153
- * // => false
1154
- */
1155
- function isNaN(value) {
1156
- // `NaN` as a primitive is the only value that is not equal to itself
1157
- // (perform the [[Class]] check first to avoid errors with some host objects in IE)
1158
- return toString.call(value) == numberClass && value != +value
1159
- }
1160
-
1161
- /**
1162
- * Checks if `value` is `null`.
1163
- *
1164
- * @deprecated
1165
- * @static
1166
- * @memberOf _
1167
- * @category Objects
1168
- * @param {Mixed} value The value to check.
1169
- * @returns {Boolean} Returns `true` if the `value` is `null`, else `false`.
1170
- * @example
1171
- *
1172
- * _.isNull(null);
1173
- * // => true
1174
- *
1175
- * _.isNull(undefined);
1176
- * // => false
1177
- */
1178
- function isNull(value) {
1179
- return value === null;
1180
- }
1181
-
1182
- /**
1183
- * Checks if `value` is a number.
1184
- *
1185
- * @static
1186
- * @memberOf _
1187
- * @category Objects
1188
- * @param {Mixed} value The value to check.
1189
- * @returns {Boolean} Returns `true` if the `value` is a number, else `false`.
1190
- * @example
1191
- *
1192
- * _.isNumber(8.4 * 5);
1193
- * // => true
1194
- */
1195
- function isNumber(value) {
1196
- return toString.call(value) == numberClass;
1197
- }
1198
-
1199
- /**
1200
- * Checks if `value` is a regular expression.
1201
- *
1202
- * @static
1203
- * @memberOf _
1204
- * @category Objects
1205
- * @param {Mixed} value The value to check.
1206
- * @returns {Boolean} Returns `true` if the `value` is a regular expression, else `false`.
1207
- * @example
1208
- *
1209
- * _.isRegExp(/moe/);
1210
- * // => true
1211
- */
1212
- function isRegExp(value) {
1213
- return toString.call(value) == regexpClass;
1214
- }
1215
-
1216
- /**
1217
- * Checks if `value` is a string.
1218
- *
1219
- * @static
1220
- * @memberOf _
1221
- * @category Objects
1222
- * @param {Mixed} value The value to check.
1223
- * @returns {Boolean} Returns `true` if the `value` is a string, else `false`.
1224
- * @example
1225
- *
1226
- * _.isString('moe');
1227
- * // => true
1228
- */
1229
- function isString(value) {
1230
- return toString.call(value) == stringClass;
1231
- }
1232
-
1233
- /**
1234
- * Checks if `value` is `undefined`.
1235
- *
1236
- * @deprecated
1237
- * @static
1238
- * @memberOf _
1239
- * @category Objects
1240
- * @param {Mixed} value The value to check.
1241
- * @returns {Boolean} Returns `true` if the `value` is `undefined`, else `false`.
1242
- * @example
1243
- *
1244
- * _.isUndefined(void 0);
1245
- * // => true
1246
- */
1247
- function isUndefined(value) {
1248
- return value === undefined;
1249
- }
1250
-
1251
- /**
1252
- * Creates an array composed of the own enumerable property names of `object`.
1253
- *
1254
- * @static
1255
- * @memberOf _
1256
- * @category Objects
1257
- * @param {Object} object The object to inspect.
1258
- * @returns {Array} Returns a new array of property names.
1259
- * @example
1260
- *
1261
- * _.keys({ 'one': 1, 'two': 2, 'three': 3 });
1262
- * // => ['one', 'two', 'three'] (order is not guaranteed)
1263
- */
1264
- var keys = !nativeKeys ? shimKeys : function(object) {
1265
- return (isObject(object) ? nativeKeys(object) : []);
1266
- };
1267
-
1268
- /**
1269
- * Creates a shallow clone of `object` excluding the specified properties.
1270
- * Property names may be specified as individual arguments or as arrays of
1271
- * property names. If `callback` is passed, it will be executed for each property
1272
- * in the `object`, omitting the properties `callback` returns truthy for. The
1273
- * `callback` is bound to `thisArg` and invoked with three arguments; (value, key, object).
1274
- *
1275
- * @static
1276
- * @memberOf _
1277
- * @category Objects
1278
- * @param {Object} object The source object.
1279
- * @param {Function|String} callback|[prop1, prop2, ...] The properties to omit
1280
- * or the function called per iteration.
1281
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1282
- * @returns {Object} Returns an object without the omitted properties.
1283
- * @example
1284
- *
1285
- * _.omit({ 'name': 'moe', 'age': 40, 'userid': 'moe1' }, 'userid');
1286
- * // => { 'name': 'moe', 'age': 40 }
1287
- *
1288
- * _.omit({ 'name': 'moe', '_hint': 'knucklehead', '_seed': '96c4eb' }, function(value, key) {
1289
- * return key.charAt(0) == '_';
1290
- * });
1291
- * // => { 'name': 'moe' }
1292
- */
1293
- function omit(object) {
1294
- var props = concat.apply(arrayRef, arguments),
1295
- result = {};
1296
-
1297
- forIn(object, function(value, key) {
1298
- if (indexOf(props, key, 1) < 0) {
1299
- result[key] = value;
1300
- }
1301
- });
1302
- return result;
1303
- }
1304
-
1305
- /**
1306
- * Creates a two dimensional array of the given object's key-value pairs,
1307
- * i.e. `[[key1, value1], [key2, value2]]`.
1308
- *
1309
- * @static
1310
- * @memberOf _
1311
- * @category Objects
1312
- * @param {Object} object The object to inspect.
1313
- * @returns {Array} Returns new array of key-value pairs.
1314
- * @example
1315
- *
1316
- * _.pairs({ 'moe': 30, 'larry': 40, 'curly': 50 });
1317
- * // => [['moe', 30], ['larry', 40], ['curly', 50]] (order is not guaranteed)
1318
- */
1319
- function pairs(object) {
1320
- var result = [];
1321
- forOwn(object, function(value, key) {
1322
- result.push([key, value]);
1323
- });
1324
- return result;
1325
- }
1326
-
1327
- /**
1328
- * Creates a shallow clone of `object` composed of the specified properties.
1329
- * Property names may be specified as individual arguments or as arrays of
1330
- * property names. If `callback` is passed, it will be executed for each property
1331
- * in the `object`, picking the properties `callback` returns truthy for. The
1332
- * `callback` is bound to `thisArg` and invoked with three arguments; (value, key, object).
1333
- *
1334
- * @static
1335
- * @memberOf _
1336
- * @category Objects
1337
- * @param {Object} object The source object.
1338
- * @param {Function|String} callback|[prop1, prop2, ...] The properties to pick
1339
- * or the function called per iteration.
1340
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1341
- * @returns {Object} Returns an object composed of the picked properties.
1342
- * @example
1343
- *
1344
- * _.pick({ 'name': 'moe', 'age': 40, 'userid': 'moe1' }, 'name', 'age');
1345
- * // => { 'name': 'moe', 'age': 40 }
1346
- *
1347
- * _.pick({ 'name': 'moe', '_hint': 'knucklehead', '_seed': '96c4eb' }, function(value, key) {
1348
- * return key.charAt(0) != '_';
1349
- * });
1350
- * // => { 'name': 'moe' }
1351
- */
1352
- function pick(object) {
1353
- var index = 0,
1354
- props = concat.apply(arrayRef, arguments),
1355
- length = props.length,
1356
- result = {};
1357
-
1358
- while (++index < length) {
1359
- var prop = props[index];
1360
- if (prop in object) {
1361
- result[prop] = object[prop];
1362
- }
1363
- }
1364
- return result;
1365
- }
1366
-
1367
- /**
1368
- * Creates an array composed of the own enumerable property values of `object`.
1369
- *
1370
- * @static
1371
- * @memberOf _
1372
- * @category Objects
1373
- * @param {Object} object The object to inspect.
1374
- * @returns {Array} Returns a new array of property values.
1375
- * @example
1376
- *
1377
- * _.values({ 'one': 1, 'two': 2, 'three': 3 });
1378
- * // => [1, 2, 3]
1379
- */
1380
- function values(object) {
1381
- var result = [];
1382
- forOwn(object, function(value) {
1383
- result.push(value);
1384
- });
1385
- return result;
1386
- }
1387
-
1388
- /*--------------------------------------------------------------------------*/
1389
-
1390
- /**
1391
- * Checks if a given `target` element is present in a `collection` using strict
1392
- * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used
1393
- * as the offset from the end of the collection.
1394
- *
1395
- * @static
1396
- * @memberOf _
1397
- * @alias include
1398
- * @category Collections
1399
- * @param {Array|Object|String} collection The collection to iterate over.
1400
- * @param {Mixed} target The value to check for.
1401
- * @param {Number} [fromIndex=0] The index to search from.
1402
- * @returns {Boolean} Returns `true` if the `target` element is found, else `false`.
1403
- * @example
1404
- *
1405
- * _.contains([1, 2, 3], 1);
1406
- * // => true
1407
- *
1408
- * _.contains([1, 2, 3], 1, 2);
1409
- * // => false
1410
- *
1411
- * _.contains({ 'name': 'moe', 'age': 40 }, 'moe');
1412
- * // => true
1413
- *
1414
- * _.contains('curly', 'ur');
1415
- * // => true
1416
- */
1417
- function contains(collection, target) {
1418
- var length = collection ? collection.length : 0;
1419
- return typeof length == 'number'
1420
- ? indexOf(collection, target) > -1
1421
- : some(collection, function(value) { return value === target; });
1422
- }
1423
-
1424
- /**
1425
- * Creates an object composed of keys returned from running each element of
1426
- * `collection` through a `callback`. The corresponding value of each key is
1427
- * the number of times the key was returned by `callback`. The `callback` is
1428
- * bound to `thisArg` and invoked with three arguments; (value, index|key, collection).
1429
- * The `callback` argument may also be the name of a property to count by (e.g. 'length').
1430
- *
1431
- * @static
1432
- * @memberOf _
1433
- * @category Collections
1434
- * @param {Array|Object|String} collection The collection to iterate over.
1435
- * @param {Function|String} callback|property The function called per iteration
1436
- * or property name to count by.
1437
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1438
- * @returns {Object} Returns the composed aggregate object.
1439
- * @example
1440
- *
1441
- * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); });
1442
- * // => { '4': 1, '6': 2 }
1443
- *
1444
- * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math);
1445
- * // => { '4': 1, '6': 2 }
1446
- *
1447
- * _.countBy(['one', 'two', 'three'], 'length');
1448
- * // => { '3': 2, '5': 1 }
1449
- */
1450
- function countBy(collection, callback, thisArg) {
1451
- var result = {};
1452
- callback = createCallback(callback, thisArg);
1453
- forEach(collection, function(value, key, collection) {
1454
- key = callback(value, key, collection);
1455
- (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1);
1456
- });
1457
- return result;
1458
- }
1459
-
1460
- /**
1461
- * Checks if the `callback` returns a truthy value for **all** elements of a
1462
- * `collection`. The `callback` is bound to `thisArg` and invoked with three
1463
- * arguments; (value, index|key, collection).
1464
- *
1465
- * @static
1466
- * @memberOf _
1467
- * @alias all
1468
- * @category Collections
1469
- * @param {Array|Object|String} collection The collection to iterate over.
1470
- * @param {Function} [callback=identity] The function called per iteration.
1471
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1472
- * @returns {Boolean} Returns `true` if all elements pass the callback check,
1473
- * else `false`.
1474
- * @example
1475
- *
1476
- * _.every([true, 1, null, 'yes'], Boolean);
1477
- * // => false
1478
- */
1479
- function every(collection, callback, thisArg) {
1480
- var result = true;
1481
- callback = createCallback(callback, thisArg);
1482
-
1483
- if (isArray(collection)) {
1484
- var index = -1,
1485
- length = collection.length;
1486
-
1487
- while (++index < length) {
1488
- if (!(result = !!callback(collection[index], index, collection))) {
1489
- break;
1490
- }
1491
- }
1492
- } else {
1493
- forEach(collection, function(value, index, collection) {
1494
- return !(result = !!callback(value, index, collection)) && indicatorObject;
1495
- });
1496
- }
1497
- return result;
1498
- }
1499
-
1500
- /**
1501
- * Examines each element in a `collection`, returning an array of all elements
1502
- * the `callback` returns truthy for. The `callback` is bound to `thisArg` and
1503
- * invoked with three arguments; (value, index|key, collection).
1504
- *
1505
- * @static
1506
- * @memberOf _
1507
- * @alias select
1508
- * @category Collections
1509
- * @param {Array|Object|String} collection The collection to iterate over.
1510
- * @param {Function} [callback=identity] The function called per iteration.
1511
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1512
- * @returns {Array} Returns a new array of elements that passed the callback check.
1513
- * @example
1514
- *
1515
- * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
1516
- * // => [2, 4, 6]
1517
- */
1518
- function filter(collection, callback, thisArg) {
1519
- var result = [];
1520
- callback = createCallback(callback, thisArg);
1521
- forEach(collection, function(value, index, collection) {
1522
- if (callback(value, index, collection)) {
1523
- result.push(value);
1524
- }
1525
- });
1526
- return result;
1527
- }
1528
-
1529
- /**
1530
- * Examines each element in a `collection`, returning the first one the `callback`
1531
- * returns truthy for. The function returns as soon as it finds an acceptable
1532
- * element, and does not iterate over the entire `collection`. The `callback` is
1533
- * bound to `thisArg` and invoked with three arguments; (value, index|key, collection).
1534
- *
1535
- * @static
1536
- * @memberOf _
1537
- * @alias detect
1538
- * @category Collections
1539
- * @param {Array|Object|String} collection The collection to iterate over.
1540
- * @param {Function} callback The function called per iteration.
1541
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1542
- * @returns {Mixed} Returns the element that passed the callback check,
1543
- * else `undefined`.
1544
- * @example
1545
- *
1546
- * var even = _.find([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
1547
- * // => 2
1548
- */
1549
- function find(collection, callback, thisArg) {
1550
- var result;
1551
- callback = createCallback(callback, thisArg);
1552
- forEach(collection, function(value, index, collection) {
1553
- if (callback(value, index, collection)) {
1554
- result = value;
1555
- return false;
1556
- }
1557
- });
1558
- return result;
1559
- }
1560
-
1561
- /**
1562
- * Iterates over a `collection`, executing the `callback` for each element in
1563
- * the `collection`. The `callback` is bound to `thisArg` and invoked with three
1564
- * arguments; (value, index|key, collection). Callbacks may exit iteration early
1565
- * by explicitly returning `false`.
1566
- *
1567
- * @static
1568
- * @memberOf _
1569
- * @alias each
1570
- * @category Collections
1571
- * @param {Array|Object|String} collection The collection to iterate over.
1572
- * @param {Function} callback The function called per iteration.
1573
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1574
- * @returns {Array|Object|String} Returns `collection`.
1575
- * @example
1576
- *
1577
- * _([1, 2, 3]).forEach(alert).join(',');
1578
- * // => alerts each number and returns '1,2,3'
1579
- *
1580
- * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
1581
- * // => alerts each number (order is not guaranteed)
1582
- */
1583
- var forEach = function (collection, callback, thisArg) {
1584
- var index, value, iteratee = collection, result = collection;
1585
- if (!collection) return result;
1586
- callback = createCallback(callback, thisArg);
1587
- var length = iteratee.length; index = -1;
1588
- if (typeof length == 'number') {
1589
- while (++index < length) {
1590
- value = iteratee[index];
1591
- if (callback(value, index, collection) === indicatorObject) return result
1592
- }
1593
- }
1594
- else {
1595
- for (index in iteratee) {
1596
- if (hasOwnProperty.call(iteratee, index)) {
1597
- value = iteratee[index];
1598
- if (callback(value, index, collection) === indicatorObject) return result;
1599
- }
1600
- }
1601
- }
1602
- ;
1603
-
1604
- };
1605
-
1606
- /**
1607
- * Creates an object composed of keys returned from running each element of
1608
- * `collection` through a `callback`. The corresponding value of each key is an
1609
- * array of elements passed to `callback` that returned the key. The `callback`
1610
- * is bound to `thisArg` and invoked with three arguments; (value, index|key, collection).
1611
- * The `callback` argument may also be the name of a property to group by (e.g. 'length').
1612
- *
1613
- * @static
1614
- * @memberOf _
1615
- * @category Collections
1616
- * @param {Array|Object|String} collection The collection to iterate over.
1617
- * @param {Function|String} callback|property The function called per iteration
1618
- * or property name to group by.
1619
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1620
- * @returns {Object} Returns the composed aggregate object.
1621
- * @example
1622
- *
1623
- * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); });
1624
- * // => { '4': [4.2], '6': [6.1, 6.4] }
1625
- *
1626
- * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math);
1627
- * // => { '4': [4.2], '6': [6.1, 6.4] }
1628
- *
1629
- * _.groupBy(['one', 'two', 'three'], 'length');
1630
- * // => { '3': ['one', 'two'], '5': ['three'] }
1631
- */
1632
- function groupBy(collection, callback, thisArg) {
1633
- var result = {};
1634
- callback = createCallback(callback, thisArg);
1635
- forEach(collection, function(value, key, collection) {
1636
- key = callback(value, key, collection);
1637
- (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value);
1638
- });
1639
- return result;
1640
- }
1641
-
1642
- /**
1643
- * Invokes the method named by `methodName` on each element in the `collection`,
1644
- * returning an array of the results of each invoked method. Additional arguments
1645
- * will be passed to each invoked method. If `methodName` is a function it will
1646
- * be invoked for, and `this` bound to, each element in the `collection`.
1647
- *
1648
- * @static
1649
- * @memberOf _
1650
- * @category Collections
1651
- * @param {Array|Object|String} collection The collection to iterate over.
1652
- * @param {Function|String} methodName The name of the method to invoke or
1653
- * the function invoked per iteration.
1654
- * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with.
1655
- * @returns {Array} Returns a new array of the results of each invoked method.
1656
- * @example
1657
- *
1658
- * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
1659
- * // => [[1, 5, 7], [1, 2, 3]]
1660
- *
1661
- * _.invoke([123, 456], String.prototype.split, '');
1662
- * // => [['1', '2', '3'], ['4', '5', '6']]
1663
- */
1664
- function invoke(collection, methodName) {
1665
- var args = slice.call(arguments, 2),
1666
- isFunc = typeof methodName == 'function',
1667
- result = [];
1668
-
1669
- forEach(collection, function(value) {
1670
- result.push((isFunc ? methodName : value[methodName]).apply(value, args));
1671
- });
1672
- return result;
1673
- }
1674
-
1675
- /**
1676
- * Creates an array of values by running each element in the `collection`
1677
- * through a `callback`. The `callback` is bound to `thisArg` and invoked with
1678
- * three arguments; (value, index|key, collection).
1679
- *
1680
- * @static
1681
- * @memberOf _
1682
- * @alias collect
1683
- * @category Collections
1684
- * @param {Array|Object|String} collection The collection to iterate over.
1685
- * @param {Function} [callback=identity] The function called per iteration.
1686
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1687
- * @returns {Array} Returns a new array of the results of each `callback` execution.
1688
- * @example
1689
- *
1690
- * _.map([1, 2, 3], function(num) { return num * 3; });
1691
- * // => [3, 6, 9]
1692
- *
1693
- * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
1694
- * // => [3, 6, 9] (order is not guaranteed)
1695
- */
1696
- function map(collection, callback, thisArg) {
1697
- var index = -1,
1698
- length = collection ? collection.length : 0,
1699
- result = Array(typeof length == 'number' ? length : 0);
1700
-
1701
- callback = createCallback(callback, thisArg);
1702
- if (isArray(collection)) {
1703
- while (++index < length) {
1704
- result[index] = callback(collection[index], index, collection);
1705
- }
1706
- } else {
1707
- forEach(collection, function(value, key, collection) {
1708
- result[++index] = callback(value, key, collection);
1709
- });
1710
- }
1711
- return result;
1712
- }
1713
-
1714
- /**
1715
- * Retrieves the maximum value of an `array`. If `callback` is passed,
1716
- * it will be executed for each value in the `array` to generate the
1717
- * criterion by which the value is ranked. The `callback` is bound to
1718
- * `thisArg` and invoked with three arguments; (value, index, collection).
1719
- *
1720
- * @static
1721
- * @memberOf _
1722
- * @category Collections
1723
- * @param {Array|Object|String} collection The collection to iterate over.
1724
- * @param {Function} [callback] The function called per iteration.
1725
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1726
- * @returns {Mixed} Returns the maximum value.
1727
- * @example
1728
- *
1729
- * var stooges = [
1730
- * { 'name': 'moe', 'age': 40 },
1731
- * { 'name': 'larry', 'age': 50 },
1732
- * { 'name': 'curly', 'age': 60 }
1733
- * ];
1734
- *
1735
- * _.max(stooges, function(stooge) { return stooge.age; });
1736
- * // => { 'name': 'curly', 'age': 60 };
1737
- */
1738
- function max(collection, callback, thisArg) {
1739
- var computed = -Infinity,
1740
- index = -1,
1741
- length = collection ? collection.length : 0,
1742
- result = computed;
1743
-
1744
- if (callback || !isArray(collection)) {
1745
- callback = createCallback(callback, thisArg);
1746
-
1747
- forEach(collection, function(value, index, collection) {
1748
- var current = callback(value, index, collection);
1749
- if (current > computed) {
1750
- computed = current;
1751
- result = value;
1752
- }
1753
- });
1754
- } else {
1755
- while (++index < length) {
1756
- if (collection[index] > result) {
1757
- result = collection[index];
1758
- }
1759
- }
1760
- }
1761
- return result;
1762
- }
1763
-
1764
- /**
1765
- * Retrieves the minimum value of an `array`. If `callback` is passed,
1766
- * it will be executed for each value in the `array` to generate the
1767
- * criterion by which the value is ranked. The `callback` is bound to `thisArg`
1768
- * and invoked with three arguments; (value, index, collection).
1769
- *
1770
- * @static
1771
- * @memberOf _
1772
- * @category Collections
1773
- * @param {Array|Object|String} collection The collection to iterate over.
1774
- * @param {Function} [callback] The function called per iteration.
1775
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1776
- * @returns {Mixed} Returns the minimum value.
1777
- * @example
1778
- *
1779
- * _.min([10, 5, 100, 2, 1000]);
1780
- * // => 2
1781
- */
1782
- function min(collection, callback, thisArg) {
1783
- var computed = Infinity,
1784
- index = -1,
1785
- length = collection ? collection.length : 0,
1786
- result = computed;
1787
-
1788
- if (callback || !isArray(collection)) {
1789
- callback = createCallback(callback, thisArg);
1790
-
1791
- forEach(collection, function(value, index, collection) {
1792
- var current = callback(value, index, collection);
1793
- if (current < computed) {
1794
- computed = current;
1795
- result = value;
1796
- }
1797
- });
1798
- } else {
1799
- while (++index < length) {
1800
- if (collection[index] < result) {
1801
- result = collection[index];
1802
- }
1803
- }
1804
- }
1805
- return result;
1806
- }
1807
-
1808
- /**
1809
- * Retrieves the value of a specified property from all elements in
1810
- * the `collection`.
1811
- *
1812
- * @static
1813
- * @memberOf _
1814
- * @category Collections
1815
- * @param {Array|Object|String} collection The collection to iterate over.
1816
- * @param {String} property The property to pluck.
1817
- * @returns {Array} Returns a new array of property values.
1818
- * @example
1819
- *
1820
- * var stooges = [
1821
- * { 'name': 'moe', 'age': 40 },
1822
- * { 'name': 'larry', 'age': 50 },
1823
- * { 'name': 'curly', 'age': 60 }
1824
- * ];
1825
- *
1826
- * _.pluck(stooges, 'name');
1827
- * // => ['moe', 'larry', 'curly']
1828
- */
1829
- function pluck(collection, property) {
1830
- var result = [];
1831
- forEach(collection, function(value) {
1832
- result.push(value[property]);
1833
- });
1834
- return result;
1835
- }
1836
-
1837
- /**
1838
- * Boils down a `collection` to a single value. The initial state of the
1839
- * reduction is `accumulator` and each successive step of it should be returned
1840
- * by the `callback`. The `callback` is bound to `thisArg` and invoked with 4
1841
- * arguments; for arrays they are (accumulator, value, index|key, collection).
1842
- *
1843
- * @static
1844
- * @memberOf _
1845
- * @alias foldl, inject
1846
- * @category Collections
1847
- * @param {Array|Object|String} collection The collection to iterate over.
1848
- * @param {Function} callback The function called per iteration.
1849
- * @param {Mixed} [accumulator] Initial value of the accumulator.
1850
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1851
- * @returns {Mixed} Returns the accumulated value.
1852
- * @example
1853
- *
1854
- * var sum = _.reduce([1, 2, 3], function(memo, num) { return memo + num; });
1855
- * // => 6
1856
- */
1857
- function reduce(collection, callback, accumulator, thisArg) {
1858
- var noaccum = arguments.length < 3;
1859
- callback = createCallback(callback, thisArg);
1860
- forEach(collection, function(value, index, collection) {
1861
- accumulator = noaccum
1862
- ? (noaccum = false, value)
1863
- : callback(accumulator, value, index, collection)
1864
- });
1865
- return accumulator;
1866
- }
1867
-
1868
- /**
1869
- * The right-associative version of `_.reduce`.
1870
- *
1871
- * @static
1872
- * @memberOf _
1873
- * @alias foldr
1874
- * @category Collections
1875
- * @param {Array|Object|String} collection The collection to iterate over.
1876
- * @param {Function} callback The function called per iteration.
1877
- * @param {Mixed} [accumulator] Initial value of the accumulator.
1878
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1879
- * @returns {Mixed} Returns the accumulated value.
1880
- * @example
1881
- *
1882
- * var list = [[0, 1], [2, 3], [4, 5]];
1883
- * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
1884
- * // => [4, 5, 2, 3, 0, 1]
1885
- */
1886
- function reduceRight(collection, callback, accumulator, thisArg) {
1887
- var iteratee = collection,
1888
- length = collection ? collection.length : 0,
1889
- noaccum = arguments.length < 3;
1890
-
1891
- if (typeof length != 'number') {
1892
- var props = keys(collection);
1893
- length = props.length;
1894
- }
1895
- forEach(collection, function(value, index, collection) {
1896
- index = props ? props[--length] : --length;
1897
- accumulator = noaccum
1898
- ? (noaccum = false, iteratee[index])
1899
- : callback.call(thisArg, accumulator, iteratee[index], index, collection);
1900
- });
1901
- return accumulator;
1902
- }
1903
-
1904
- /**
1905
- * The opposite of `_.filter`, this method returns the values of a
1906
- * `collection` that `callback` does **not** return truthy for.
1907
- *
1908
- * @static
1909
- * @memberOf _
1910
- * @category Collections
1911
- * @param {Array|Object|String} collection The collection to iterate over.
1912
- * @param {Function} [callback=identity] The function called per iteration.
1913
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1914
- * @returns {Array} Returns a new array of elements that did **not** pass the
1915
- * callback check.
1916
- * @example
1917
- *
1918
- * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
1919
- * // => [1, 3, 5]
1920
- */
1921
- function reject(collection, callback, thisArg) {
1922
- callback = createCallback(callback, thisArg);
1923
- return filter(collection, function(value, index, collection) {
1924
- return !callback(value, index, collection);
1925
- });
1926
- }
1927
-
1928
- /**
1929
- * Creates an array of shuffled `array` values, using a version of the
1930
- * Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
1931
- *
1932
- * @static
1933
- * @memberOf _
1934
- * @category Collections
1935
- * @param {Array|Object|String} collection The collection to shuffle.
1936
- * @returns {Array} Returns a new shuffled collection.
1937
- * @example
1938
- *
1939
- * _.shuffle([1, 2, 3, 4, 5, 6]);
1940
- * // => [4, 1, 6, 3, 5, 2]
1941
- */
1942
- function shuffle(collection) {
1943
- var index = -1,
1944
- result = Array(collection ? collection.length : 0);
1945
-
1946
- forEach(collection, function(value) {
1947
- var rand = floor(nativeRandom() * (++index + 1));
1948
- result[index] = result[rand];
1949
- result[rand] = value;
1950
- });
1951
- return result;
1952
- }
1953
-
1954
- /**
1955
- * Gets the size of the `collection` by returning `collection.length` for arrays
1956
- * and array-like objects or the number of own enumerable properties for objects.
1957
- *
1958
- * @static
1959
- * @memberOf _
1960
- * @category Collections
1961
- * @param {Array|Object|String} collection The collection to inspect.
1962
- * @returns {Number} Returns `collection.length` or number of own enumerable properties.
1963
- * @example
1964
- *
1965
- * _.size([1, 2]);
1966
- * // => 2
1967
- *
1968
- * _.size({ 'one': 1, 'two': 2, 'three': 3 });
1969
- * // => 3
1970
- *
1971
- * _.size('curly');
1972
- * // => 5
1973
- */
1974
- function size(collection) {
1975
- var length = collection ? collection.length : 0;
1976
- return typeof length == 'number' ? length : keys(collection).length;
1977
- }
1978
-
1979
- /**
1980
- * Checks if the `callback` returns a truthy value for **any** element of a
1981
- * `collection`. The function returns as soon as it finds passing value, and
1982
- * does not iterate over the entire `collection`. The `callback` is bound to
1983
- * `thisArg` and invoked with three arguments; (value, index|key, collection).
1984
- *
1985
- * @static
1986
- * @memberOf _
1987
- * @alias any
1988
- * @category Collections
1989
- * @param {Array|Object|String} collection The collection to iterate over.
1990
- * @param {Function} [callback=identity] The function called per iteration.
1991
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
1992
- * @returns {Boolean} Returns `true` if any element passes the callback check,
1993
- * else `false`.
1994
- * @example
1995
- *
1996
- * _.some([null, 0, 'yes', false]);
1997
- * // => true
1998
- */
1999
- function some(collection, callback, thisArg) {
2000
- var result;
2001
- callback = createCallback(callback, thisArg);
2002
-
2003
- if (isArray(collection)) {
2004
- var index = -1,
2005
- length = collection.length;
2006
-
2007
- while (++index < length) {
2008
- if (result = callback(collection[index], index, collection)) {
2009
- break;
2010
- }
2011
- }
2012
- } else {
2013
- forEach(collection, function(value, index, collection) {
2014
- return (result = callback(value, index, collection)) && indicatorObject;
2015
- });
2016
- }
2017
- return !!result;
2018
- }
2019
-
2020
- /**
2021
- * Creates an array, stable sorted in ascending order by the results of
2022
- * running each element of `collection` through a `callback`. The `callback`
2023
- * is bound to `thisArg` and invoked with three arguments; (value, index|key, collection).
2024
- * The `callback` argument may also be the name of a property to sort by (e.g. 'length').
2025
- *
2026
- * @static
2027
- * @memberOf _
2028
- * @category Collections
2029
- * @param {Array|Object|String} collection The collection to iterate over.
2030
- * @param {Function|String} callback|property The function called per iteration
2031
- * or property name to sort by.
2032
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
2033
- * @returns {Array} Returns a new array of sorted elements.
2034
- * @example
2035
- *
2036
- * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); });
2037
- * // => [3, 1, 2]
2038
- *
2039
- * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math);
2040
- * // => [3, 1, 2]
2041
- *
2042
- * _.sortBy(['larry', 'brendan', 'moe'], 'length');
2043
- * // => ['moe', 'larry', 'brendan']
2044
- */
2045
- function sortBy(collection, callback, thisArg) {
2046
- var result = [];
2047
- callback = createCallback(callback, thisArg);
2048
- forEach(collection, function(value, index, collection) {
2049
- result.push({
2050
- 'criteria': callback(value, index, collection),
2051
- 'index': index,
2052
- 'value': value
2053
- });
2054
- });
2055
-
2056
- var length = result.length;
2057
- result.sort(compareAscending);
2058
- while (length--) {
2059
- result[length] = result[length].value;
2060
- }
2061
- return result;
2062
- }
2063
-
2064
- /**
2065
- * Converts the `collection`, to an array.
2066
- *
2067
- * @static
2068
- * @memberOf _
2069
- * @category Collections
2070
- * @param {Array|Object|String} collection The collection to convert.
2071
- * @returns {Array} Returns the new converted array.
2072
- * @example
2073
- *
2074
- * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4);
2075
- * // => [2, 3, 4]
2076
- */
2077
- function toArray(collection) {
2078
- if (collection && typeof collection.length == 'number') {
2079
- return (typeof collection == 'string')
2080
- ? collection.split('')
2081
- : slice.call(collection);
2082
- }
2083
- return values(collection);
2084
- }
2085
-
2086
- /**
2087
- * Examines each element in a `collection`, returning an array of all elements
2088
- * that contain the given `properties`.
2089
- *
2090
- * @static
2091
- * @memberOf _
2092
- * @category Collections
2093
- * @param {Array|Object|String} collection The collection to iterate over.
2094
- * @param {Object} properties The object of property values to filter by.
2095
- * @returns {Array} Returns a new array of elements that contain the given `properties`.
2096
- * @example
2097
- *
2098
- * var stooges = [
2099
- * { 'name': 'moe', 'age': 40 },
2100
- * { 'name': 'larry', 'age': 50 },
2101
- * { 'name': 'curly', 'age': 60 }
2102
- * ];
2103
- *
2104
- * _.where(stooges, { 'age': 40 });
2105
- * // => [{ 'name': 'moe', 'age': 40 }]
2106
- */
2107
- function where(collection, properties) {
2108
- var props = [];
2109
- forIn(properties, function(value, prop) {
2110
- props.push(prop);
2111
- });
2112
- return filter(collection, function(object) {
2113
- var length = props.length;
2114
- while (length--) {
2115
- var result = object[props[length]] === properties[props[length]];
2116
- if (!result) {
2117
- break;
2118
- }
2119
- }
2120
- return !!result;
2121
- });
2122
- }
2123
-
2124
- /*--------------------------------------------------------------------------*/
2125
-
2126
- /**
2127
- * Creates an array with all falsey values of `array` removed. The values
2128
- * `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
2129
- *
2130
- * @static
2131
- * @memberOf _
2132
- * @category Arrays
2133
- * @param {Array} array The array to compact.
2134
- * @returns {Array} Returns a new filtered array.
2135
- * @example
2136
- *
2137
- * _.compact([0, 1, false, 2, '', 3]);
2138
- * // => [1, 2, 3]
2139
- */
2140
- function compact(array) {
2141
- var index = -1,
2142
- length = array ? array.length : 0,
2143
- result = [];
2144
-
2145
- while (++index < length) {
2146
- var value = array[index];
2147
- if (value) {
2148
- result.push(value);
2149
- }
2150
- }
2151
- return result;
2152
- }
2153
-
2154
- /**
2155
- * Creates an array of `array` elements not present in the other arrays
2156
- * using strict equality for comparisons, i.e. `===`.
2157
- *
2158
- * @static
2159
- * @memberOf _
2160
- * @category Arrays
2161
- * @param {Array} array The array to process.
2162
- * @param {Array} [array1, array2, ...] Arrays to check.
2163
- * @returns {Array} Returns a new array of `array` elements not present in the
2164
- * other arrays.
2165
- * @example
2166
- *
2167
- * _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
2168
- * // => [1, 3, 4]
2169
- */
2170
- function difference(array) {
2171
- var index = -1,
2172
- length = array.length,
2173
- flattened = concat.apply(arrayRef, arguments),
2174
- result = [];
2175
-
2176
- while (++index < length) {
2177
- var value = array[index]
2178
- if (indexOf(flattened, value, length) < 0) {
2179
- result.push(value);
2180
- }
2181
- }
2182
- return result
2183
- }
2184
-
2185
- /**
2186
- * Gets the first element of the `array`. Pass `n` to return the first `n`
2187
- * elements of the `array`.
2188
- *
2189
- * @static
2190
- * @memberOf _
2191
- * @alias head, take
2192
- * @category Arrays
2193
- * @param {Array} array The array to query.
2194
- * @param {Number} [n] The number of elements to return.
2195
- * @param- {Object} [guard] Internally used to allow this method to work with
2196
- * others like `_.map` without using their callback `index` argument for `n`.
2197
- * @returns {Mixed} Returns the first element or an array of the first `n`
2198
- * elements of `array`.
2199
- * @example
2200
- *
2201
- * _.first([5, 4, 3, 2, 1]);
2202
- * // => 5
2203
- */
2204
- function first(array, n, guard) {
2205
- if (array) {
2206
- return (n == null || guard) ? array[0] : slice.call(array, 0, n);
2207
- }
2208
- }
2209
-
2210
- /**
2211
- * Flattens a nested array (the nesting can be to any depth). If `shallow` is
2212
- * truthy, `array` will only be flattened a single level.
2213
- *
2214
- * @static
2215
- * @memberOf _
2216
- * @category Arrays
2217
- * @param {Array} array The array to compact.
2218
- * @param {Boolean} shallow A flag to indicate only flattening a single level.
2219
- * @returns {Array} Returns a new flattened array.
2220
- * @example
2221
- *
2222
- * _.flatten([1, [2], [3, [[4]]]]);
2223
- * // => [1, 2, 3, 4];
2224
- *
2225
- * _.flatten([1, [2], [3, [[4]]]], true);
2226
- * // => [1, 2, 3, [[4]]];
2227
- */
2228
- function flatten(array, shallow) {
2229
- var index = -1,
2230
- length = array ? array.length : 0,
2231
- result = [];
2232
-
2233
- while (++index < length) {
2234
- var value = array[index];
2235
-
2236
- // recursively flatten arrays (susceptible to call stack limits)
2237
- if (isArray(value)) {
2238
- push.apply(result, shallow ? value : flatten(value));
2239
- } else {
2240
- result.push(value);
2241
- }
2242
- }
2243
- return result;
2244
- }
2245
-
2246
- /**
2247
- * Gets the index at which the first occurrence of `value` is found using
2248
- * strict equality for comparisons, i.e. `===`. If the `array` is already
2249
- * sorted, passing `true` for `fromIndex` will run a faster binary search.
2250
- *
2251
- * @static
2252
- * @memberOf _
2253
- * @category Arrays
2254
- * @param {Array} array The array to search.
2255
- * @param {Mixed} value The value to search for.
2256
- * @param {Boolean|Number} [fromIndex=0] The index to search from or `true` to
2257
- * perform a binary search on a sorted `array`.
2258
- * @returns {Number} Returns the index of the matched value or `-1`.
2259
- * @example
2260
- *
2261
- * _.indexOf([1, 2, 3, 1, 2, 3], 2);
2262
- * // => 1
2263
- *
2264
- * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3);
2265
- * // => 4
2266
- *
2267
- * _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
2268
- * // => 2
2269
- */
2270
- function indexOf(array, value, fromIndex) {
2271
- var index = -1,
2272
- length = array ? array.length : 0;
2273
-
2274
- if (typeof fromIndex == 'number') {
2275
- index = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0) - 1;
2276
- } else if (fromIndex) {
2277
- index = sortedIndex(array, value);
2278
- return array[index] === value ? index : -1;
2279
- }
2280
- while (++index < length) {
2281
- if (array[index] === value) {
2282
- return index;
2283
- }
2284
- }
2285
- return -1;
2286
- }
2287
-
2288
- /**
2289
- * Gets all but the last element of `array`. Pass `n` to exclude the last `n`
2290
- * elements from the result.
2291
- *
2292
- * @static
2293
- * @memberOf _
2294
- * @category Arrays
2295
- * @param {Array} array The array to query.
2296
- * @param {Number} [n=1] The number of elements to exclude.
2297
- * @param- {Object} [guard] Internally used to allow this method to work with
2298
- * others like `_.map` without using their callback `index` argument for `n`.
2299
- * @returns {Array} Returns all but the last element or `n` elements of `array`.
2300
- * @example
2301
- *
2302
- * _.initial([3, 2, 1]);
2303
- * // => [3, 2]
2304
- */
2305
- function initial(array, n, guard) {
2306
- return array
2307
- ? slice.call(array, 0, -((n == null || guard) ? 1 : n))
2308
- : [];
2309
- }
2310
-
2311
- /**
2312
- * Computes the intersection of all the passed-in arrays using strict equality
2313
- * for comparisons, i.e. `===`.
2314
- *
2315
- * @static
2316
- * @memberOf _
2317
- * @category Arrays
2318
- * @param {Array} [array1, array2, ...] Arrays to process.
2319
- * @returns {Array} Returns a new array of unique elements, in order, that are
2320
- * present in **all** of the arrays.
2321
- * @example
2322
- *
2323
- * _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
2324
- * // => [1, 2]
2325
- */
2326
- function intersection(array) {
2327
- var args = arguments,
2328
- argsLength = args.length,
2329
- result = [];
2330
-
2331
- forEach(array, function(value) {
2332
- if (indexOf(result, value) < 0) {
2333
- var length = argsLength;
2334
- while (--length) {
2335
- if (indexOf(args[length], value) < 0) {
2336
- return;
2337
- }
2338
- }
2339
- result.push(value);
2340
- }
2341
- });
2342
- return result;
2343
- }
2344
-
2345
- /**
2346
- * Gets the last element of the `array`. Pass `n` to return the last `n`
2347
- * elements of the `array`.
2348
- *
2349
- * @static
2350
- * @memberOf _
2351
- * @category Arrays
2352
- * @param {Array} array The array to query.
2353
- * @param {Number} [n] The number of elements to return.
2354
- * @param- {Object} [guard] Internally used to allow this method to work with
2355
- * others like `_.map` without using their callback `index` argument for `n`.
2356
- * @returns {Mixed} Returns the last element or an array of the last `n`
2357
- * elements of `array`.
2358
- * @example
2359
- *
2360
- * _.last([3, 2, 1]);
2361
- * // => 1
2362
- */
2363
- function last(array, n, guard) {
2364
- if (array) {
2365
- var length = array.length;
2366
- return (n == null || guard) ? array[length - 1] : slice.call(array, -n || length);
2367
- }
2368
- }
2369
-
2370
- /**
2371
- * Gets the index at which the last occurrence of `value` is found using strict
2372
- * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used
2373
- * as the offset from the end of the collection.
2374
- *
2375
- * @static
2376
- * @memberOf _
2377
- * @category Arrays
2378
- * @param {Array} array The array to search.
2379
- * @param {Mixed} value The value to search for.
2380
- * @param {Number} [fromIndex=array.length-1] The index to search from.
2381
- * @returns {Number} Returns the index of the matched value or `-1`.
2382
- * @example
2383
- *
2384
- * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2);
2385
- * // => 4
2386
- *
2387
- * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
2388
- * // => 1
2389
- */
2390
- function lastIndexOf(array, value, fromIndex) {
2391
- var index = array ? array.length : 0;
2392
- if (typeof fromIndex == 'number') {
2393
- index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1;
2394
- }
2395
- while (index--) {
2396
- if (array[index] === value) {
2397
- return index;
2398
- }
2399
- }
2400
- return -1;
2401
- }
2402
-
2403
- /**
2404
- * Creates an object composed from arrays of `keys` and `values`. Pass either
2405
- * a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or
2406
- * two arrays, one of `keys` and one of corresponding `values`.
2407
- *
2408
- * @static
2409
- * @memberOf _
2410
- * @category Arrays
2411
- * @param {Array} keys The array of keys.
2412
- * @param {Array} [values=[]] The array of values.
2413
- * @returns {Object} Returns an object composed of the given keys and
2414
- * corresponding values.
2415
- * @example
2416
- *
2417
- * _.object(['moe', 'larry', 'curly'], [30, 40, 50]);
2418
- * // => { 'moe': 30, 'larry': 40, 'curly': 50 }
2419
- */
2420
- function object(keys, values) {
2421
- var index = -1,
2422
- length = keys ? keys.length : 0,
2423
- result = {};
2424
-
2425
- while (++index < length) {
2426
- var key = keys[index];
2427
- if (values) {
2428
- result[key] = values[index];
2429
- } else {
2430
- result[key[0]] = key[1];
2431
- }
2432
- }
2433
- return result;
2434
- }
2435
-
2436
- /**
2437
- * Creates an array of numbers (positive and/or negative) progressing from
2438
- * `start` up to but not including `stop`. This method is a port of Python's
2439
- * `range()` function. See http://docs.python.org/library/functions.html#range.
2440
- *
2441
- * @static
2442
- * @memberOf _
2443
- * @category Arrays
2444
- * @param {Number} [start=0] The start of the range.
2445
- * @param {Number} end The end of the range.
2446
- * @param {Number} [step=1] The value to increment or descrement by.
2447
- * @returns {Array} Returns a new range array.
2448
- * @example
2449
- *
2450
- * _.range(10);
2451
- * // => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
2452
- *
2453
- * _.range(1, 11);
2454
- * // => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
2455
- *
2456
- * _.range(0, 30, 5);
2457
- * // => [0, 5, 10, 15, 20, 25]
2458
- *
2459
- * _.range(0, -10, -1);
2460
- * // => [0, -1, -2, -3, -4, -5, -6, -7, -8, -9]
2461
- *
2462
- * _.range(0);
2463
- * // => []
2464
- */
2465
- function range(start, end, step) {
2466
- start = +start || 0;
2467
- step = +step || 1;
2468
-
2469
- if (end == null) {
2470
- end = start;
2471
- start = 0;
2472
- }
2473
- // use `Array(length)` so V8 will avoid the slower "dictionary" mode
2474
- // http://www.youtube.com/watch?v=XAqIpGU8ZZk#t=16m27s
2475
- var index = -1,
2476
- length = nativeMax(0, ceil((end - start) / step)),
2477
- result = Array(length);
2478
-
2479
- while (++index < length) {
2480
- result[index] = start;
2481
- start += step;
2482
- }
2483
- return result;
2484
- }
2485
-
2486
- /**
2487
- * The opposite of `_.initial`, this method gets all but the first value of
2488
- * `array`. Pass `n` to exclude the first `n` values from the result.
2489
- *
2490
- * @static
2491
- * @memberOf _
2492
- * @alias drop, tail
2493
- * @category Arrays
2494
- * @param {Array} array The array to query.
2495
- * @param {Number} [n=1] The number of elements to exclude.
2496
- * @param- {Object} [guard] Internally used to allow this method to work with
2497
- * others like `_.map` without using their callback `index` argument for `n`.
2498
- * @returns {Array} Returns all but the first value or `n` values of `array`.
2499
- * @example
2500
- *
2501
- * _.rest([3, 2, 1]);
2502
- * // => [2, 1]
2503
- */
2504
- function rest(array, n, guard) {
2505
- return array
2506
- ? slice.call(array, (n == null || guard) ? 1 : n)
2507
- : [];
2508
- }
2509
-
2510
- /**
2511
- * Uses a binary search to determine the smallest index at which the `value`
2512
- * should be inserted into `array` in order to maintain the sort order of the
2513
- * sorted `array`. If `callback` is passed, it will be executed for `value` and
2514
- * each element in `array` to compute their sort ranking. The `callback` is
2515
- * bound to `thisArg` and invoked with one argument; (value). The `callback`
2516
- * argument may also be the name of a property to order by.
2517
- *
2518
- * @static
2519
- * @memberOf _
2520
- * @category Arrays
2521
- * @param {Array} array The array to iterate over.
2522
- * @param {Mixed} value The value to evaluate.
2523
- * @param {Function|String} [callback=identity|property] The function called
2524
- * per iteration or property name to order by.
2525
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
2526
- * @returns {Number} Returns the index at which the value should be inserted
2527
- * into `array`.
2528
- * @example
2529
- *
2530
- * _.sortedIndex([20, 30, 50], 40);
2531
- * // => 2
2532
- *
2533
- * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x');
2534
- * // => 2
2535
- *
2536
- * var dict = {
2537
- * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 }
2538
- * };
2539
- *
2540
- * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
2541
- * return dict.wordToNumber[word];
2542
- * });
2543
- * // => 2
2544
- *
2545
- * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
2546
- * return this.wordToNumber[word];
2547
- * }, dict);
2548
- * // => 2
2549
- */
2550
- function sortedIndex(array, value, callback, thisArg) {
2551
- var low = 0,
2552
- high = array ? array.length : low;
2553
-
2554
- // explicitly reference `identity` for better engine inlining
2555
- callback = callback ? createCallback(callback, thisArg) : identity;
2556
- value = callback(value);
2557
- while (low < high) {
2558
- var mid = (low + high) >>> 1;
2559
- callback(array[mid]) < value
2560
- ? low = mid + 1
2561
- : high = mid;
2562
- }
2563
- return low;
2564
- }
2565
-
2566
- /**
2567
- * Computes the union of the passed-in arrays using strict equality for
2568
- * comparisons, i.e. `===`.
2569
- *
2570
- * @static
2571
- * @memberOf _
2572
- * @category Arrays
2573
- * @param {Array} [array1, array2, ...] Arrays to process.
2574
- * @returns {Array} Returns a new array of unique values, in order, that are
2575
- * present in one or more of the arrays.
2576
- * @example
2577
- *
2578
- * _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
2579
- * // => [1, 2, 3, 101, 10]
2580
- */
2581
- function union() {
2582
- return uniq(concat.apply(arrayRef, arguments));
2583
- }
2584
-
2585
- /**
2586
- * Creates a duplicate-value-free version of the `array` using strict equality
2587
- * for comparisons, i.e. `===`. If the `array` is already sorted, passing `true`
2588
- * for `isSorted` will run a faster algorithm. If `callback` is passed, each
2589
- * element of `array` is passed through a callback` before uniqueness is computed.
2590
- * The `callback` is bound to `thisArg` and invoked with three arguments; (value, index, array).
2591
- *
2592
- * @static
2593
- * @memberOf _
2594
- * @alias unique
2595
- * @category Arrays
2596
- * @param {Array} array The array to process.
2597
- * @param {Boolean} [isSorted=false] A flag to indicate that the `array` is already sorted.
2598
- * @param {Function} [callback=identity] The function called per iteration.
2599
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
2600
- * @returns {Array} Returns a duplicate-value-free array.
2601
- * @example
2602
- *
2603
- * _.uniq([1, 2, 1, 3, 1]);
2604
- * // => [1, 2, 3]
2605
- *
2606
- * _.uniq([1, 1, 2, 2, 3], true);
2607
- * // => [1, 2, 3]
2608
- *
2609
- * _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return Math.floor(num); });
2610
- * // => [1, 2, 3]
2611
- *
2612
- * _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
2613
- * // => [1, 2, 3]
2614
- */
2615
- function uniq(array, isSorted, callback, thisArg) {
2616
- var index = -1,
2617
- length = array ? array.length : 0,
2618
- result = [],
2619
- seen = result;
2620
-
2621
- if (callback) {
2622
- seen = [];
2623
- callback = createCallback(callback, thisArg);
2624
- }
2625
- while (++index < length) {
2626
- var value = array[index],
2627
- computed = callback ? callback(value, index, array) : value;
2628
-
2629
- if (isSorted
2630
- ? !index || seen[seen.length - 1] !== computed
2631
- : indexOf(seen, computed) < 0
2632
- ) {
2633
- if (callback) {
2634
- seen.push(computed);
2635
- }
2636
- result.push(value);
2637
- }
2638
- }
2639
- return result;
2640
- }
2641
-
2642
- /**
2643
- * Creates an array with all occurrences of the passed values removed using
2644
- * strict equality for comparisons, i.e. `===`.
2645
- *
2646
- * @static
2647
- * @memberOf _
2648
- * @category Arrays
2649
- * @param {Array} array The array to filter.
2650
- * @param {Mixed} [value1, value2, ...] Values to remove.
2651
- * @returns {Array} Returns a new filtered array.
2652
- * @example
2653
- *
2654
- * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
2655
- * // => [2, 3, 4]
2656
- */
2657
- function without(array) {
2658
- var index = -1,
2659
- length = array.length,
2660
- result = [];
2661
-
2662
- while (++index < length) {
2663
- var value = array[index]
2664
- if (indexOf(arguments, value, 1) < 0) {
2665
- result.push(value);
2666
- }
2667
- }
2668
- return result
2669
- }
2670
-
2671
- /**
2672
- * Groups the elements of each array at their corresponding indexes. Useful for
2673
- * separate data sources that are coordinated through matching array indexes.
2674
- * For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix
2675
- * in a similar fashion.
2676
- *
2677
- * @static
2678
- * @memberOf _
2679
- * @category Arrays
2680
- * @param {Array} [array1, array2, ...] Arrays to process.
2681
- * @returns {Array} Returns a new array of grouped elements.
2682
- * @example
2683
- *
2684
- * _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]);
2685
- * // => [['moe', 30, true], ['larry', 40, false], ['curly', 50, false]]
2686
- */
2687
- function zip(array) {
2688
- var index = -1,
2689
- length = array ? max(pluck(arguments, 'length')) : 0,
2690
- result = Array(length);
2691
-
2692
- while (++index < length) {
2693
- result[index] = pluck(arguments, index);
2694
- }
2695
- return result;
2696
- }
2697
-
2698
- /*--------------------------------------------------------------------------*/
2699
-
2700
- /**
2701
- * Creates a function that is restricted to executing `func` only after it is
2702
- * called `n` times. The `func` is executed with the `this` binding of the
2703
- * created function.
2704
- *
2705
- * @static
2706
- * @memberOf _
2707
- * @category Functions
2708
- * @param {Number} n The number of times the function must be called before
2709
- * it is executed.
2710
- * @param {Function} func The function to restrict.
2711
- * @returns {Function} Returns the new restricted function.
2712
- * @example
2713
- *
2714
- * var renderNotes = _.after(notes.length, render);
2715
- * _.forEach(notes, function(note) {
2716
- * note.asyncSave({ 'success': renderNotes });
2717
- * });
2718
- * // `renderNotes` is run once, after all notes have saved
2719
- */
2720
- function after(n, func) {
2721
- if (n < 1) {
2722
- return func();
2723
- }
2724
- return function() {
2725
- if (--n < 1) {
2726
- return func.apply(this, arguments);
2727
- }
2728
- };
2729
- }
2730
-
2731
- /**
2732
- * Creates a function that, when called, invokes `func` with the `this`
2733
- * binding of `thisArg` and prepends any additional `bind` arguments to those
2734
- * passed to the bound function.
2735
- *
2736
- * @static
2737
- * @memberOf _
2738
- * @category Functions
2739
- * @param {Function} func The function to bind.
2740
- * @param {Mixed} [thisArg] The `this` binding of `func`.
2741
- * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied.
2742
- * @returns {Function} Returns the new bound function.
2743
- * @example
2744
- *
2745
- * var func = function(greeting) {
2746
- * return greeting + ' ' + this.name;
2747
- * };
2748
- *
2749
- * func = _.bind(func, { 'name': 'moe' }, 'hi');
2750
- * func();
2751
- * // => 'hi moe'
2752
- */
2753
- function bind(func, thisArg) {
2754
- // use `Function#bind` if it exists and is fast
2755
- // (in V8 `Function#bind` is slower except when partially applied)
2756
- return isBindFast || (nativeBind && arguments.length > 2)
2757
- ? nativeBind.call.apply(nativeBind, arguments)
2758
- : createBound(func, thisArg, slice.call(arguments, 2));
2759
- }
2760
-
2761
- /**
2762
- * Binds methods on `object` to `object`, overwriting the existing method.
2763
- * If no method names are provided, all the function properties of `object`
2764
- * will be bound.
2765
- *
2766
- * @static
2767
- * @memberOf _
2768
- * @category Functions
2769
- * @param {Object} object The object to bind and assign the bound methods to.
2770
- * @param {String} [methodName1, methodName2, ...] Method names on the object to bind.
2771
- * @returns {Object} Returns `object`.
2772
- * @example
2773
- *
2774
- * var buttonView = {
2775
- * 'label': 'lodash',
2776
- * 'onClick': function() { alert('clicked: ' + this.label); }
2777
- * };
2778
- *
2779
- * _.bindAll(buttonView);
2780
- * jQuery('#lodash_button').on('click', buttonView.onClick);
2781
- * // => When the button is clicked, `this.label` will have the correct value
2782
- */
2783
- function bindAll(object) {
2784
- var funcs = arguments,
2785
- index = funcs.length > 1 ? 0 : (funcs = functions(object), -1),
2786
- length = funcs.length;
2787
-
2788
- while (++index < length) {
2789
- var key = funcs[index];
2790
- object[key] = bind(object[key], object);
2791
- }
2792
- return object;
2793
- }
2794
-
2795
- /**
2796
- * Creates a function that is the composition of the passed functions,
2797
- * where each function consumes the return value of the function that follows.
2798
- * In math terms, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`.
2799
- * Each function is executed with the `this` binding of the composed function.
2800
- *
2801
- * @static
2802
- * @memberOf _
2803
- * @category Functions
2804
- * @param {Function} [func1, func2, ...] Functions to compose.
2805
- * @returns {Function} Returns the new composed function.
2806
- * @example
2807
- *
2808
- * var greet = function(name) { return 'hi: ' + name; };
2809
- * var exclaim = function(statement) { return statement + '!'; };
2810
- * var welcome = _.compose(exclaim, greet);
2811
- * welcome('moe');
2812
- * // => 'hi: moe!'
2813
- */
2814
- function compose() {
2815
- var funcs = arguments;
2816
- return function() {
2817
- var args = arguments,
2818
- length = funcs.length;
2819
-
2820
- while (length--) {
2821
- args = [funcs[length].apply(this, args)];
2822
- }
2823
- return args[0];
2824
- };
2825
- }
2826
-
2827
- /**
2828
- * Creates a function that will delay the execution of `func` until after
2829
- * `wait` milliseconds have elapsed since the last time it was invoked. Pass
2830
- * `true` for `immediate` to cause debounce to invoke `func` on the leading,
2831
- * instead of the trailing, edge of the `wait` timeout. Subsequent calls to
2832
- * the debounced function will return the result of the last `func` call.
2833
- *
2834
- * @static
2835
- * @memberOf _
2836
- * @category Functions
2837
- * @param {Function} func The function to debounce.
2838
- * @param {Number} wait The number of milliseconds to delay.
2839
- * @param {Boolean} immediate A flag to indicate execution is on the leading
2840
- * edge of the timeout.
2841
- * @returns {Function} Returns the new debounced function.
2842
- * @example
2843
- *
2844
- * var lazyLayout = _.debounce(calculateLayout, 300);
2845
- * jQuery(window).on('resize', lazyLayout);
2846
- */
2847
- function debounce(func, wait, immediate) {
2848
- var args,
2849
- result,
2850
- thisArg,
2851
- timeoutId;
2852
-
2853
- function delayed() {
2854
- timeoutId = null;
2855
- if (!immediate) {
2856
- result = func.apply(thisArg, args);
2857
- }
2858
- }
2859
- return function() {
2860
- var isImmediate = immediate && !timeoutId;
2861
- args = arguments;
2862
- thisArg = this;
2863
-
2864
- clearTimeout(timeoutId);
2865
- timeoutId = setTimeout(delayed, wait);
2866
-
2867
- if (isImmediate) {
2868
- result = func.apply(thisArg, args);
2869
- }
2870
- return result;
2871
- };
2872
- }
2873
-
2874
- /**
2875
- * Executes the `func` function after `wait` milliseconds. Additional arguments
2876
- * will be passed to `func` when it is invoked.
2877
- *
2878
- * @static
2879
- * @memberOf _
2880
- * @category Functions
2881
- * @param {Function} func The function to delay.
2882
- * @param {Number} wait The number of milliseconds to delay execution.
2883
- * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with.
2884
- * @returns {Number} Returns the `setTimeout` timeout id.
2885
- * @example
2886
- *
2887
- * var log = _.bind(console.log, console);
2888
- * _.delay(log, 1000, 'logged later');
2889
- * // => 'logged later' (Appears after one second.)
2890
- */
2891
- function delay(func, wait) {
2892
- var args = slice.call(arguments, 2);
2893
- return setTimeout(function() { func.apply(undefined, args); }, wait);
2894
- }
2895
-
2896
- /**
2897
- * Defers executing the `func` function until the current call stack has cleared.
2898
- * Additional arguments will be passed to `func` when it is invoked.
2899
- *
2900
- * @static
2901
- * @memberOf _
2902
- * @category Functions
2903
- * @param {Function} func The function to defer.
2904
- * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with.
2905
- * @returns {Number} Returns the `setTimeout` timeout id.
2906
- * @example
2907
- *
2908
- * _.defer(function() { alert('deferred'); });
2909
- * // returns from the function before `alert` is called
2910
- */
2911
- function defer(func) {
2912
- var args = slice.call(arguments, 1);
2913
- return setTimeout(function() { func.apply(undefined, args); }, 1);
2914
- }
2915
-
2916
- /**
2917
- * Creates a function that memoizes the result of `func`. If `resolver` is
2918
- * passed, it will be used to determine the cache key for storing the result
2919
- * based on the arguments passed to the memoized function. By default, the first
2920
- * argument passed to the memoized function is used as the cache key. The `func`
2921
- * is executed with the `this` binding of the memoized function.
2922
- *
2923
- * @static
2924
- * @memberOf _
2925
- * @category Functions
2926
- * @param {Function} func The function to have its output memoized.
2927
- * @param {Function} [resolver] A function used to resolve the cache key.
2928
- * @returns {Function} Returns the new memoizing function.
2929
- * @example
2930
- *
2931
- * var fibonacci = _.memoize(function(n) {
2932
- * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);
2933
- * });
2934
- */
2935
- function memoize(func, resolver) {
2936
- var cache = {};
2937
- return function() {
2938
- var key = resolver ? resolver.apply(this, arguments) : arguments[0];
2939
- return hasOwnProperty.call(cache, key)
2940
- ? cache[key]
2941
- : (cache[key] = func.apply(this, arguments));
2942
- };
2943
- }
2944
-
2945
- /**
2946
- * Creates a function that is restricted to execute `func` once. Repeat calls to
2947
- * the function will return the value of the first call. The `func` is executed
2948
- * with the `this` binding of the created function.
2949
- *
2950
- * @static
2951
- * @memberOf _
2952
- * @category Functions
2953
- * @param {Function} func The function to restrict.
2954
- * @returns {Function} Returns the new restricted function.
2955
- * @example
2956
- *
2957
- * var initialize = _.once(createApplication);
2958
- * initialize();
2959
- * initialize();
2960
- * // Application is only created once.
2961
- */
2962
- function once(func) {
2963
- var result,
2964
- ran = false;
2965
-
2966
- return function() {
2967
- if (ran) {
2968
- return result;
2969
- }
2970
- ran = true;
2971
- result = func.apply(this, arguments);
2972
-
2973
- // clear the `func` variable so the function may be garbage collected
2974
- func = null;
2975
- return result;
2976
- };
2977
- }
2978
-
2979
- /**
2980
- * Creates a function that, when executed, will only call the `func`
2981
- * function at most once per every `wait` milliseconds. If the throttled
2982
- * function is invoked more than once during the `wait` timeout, `func` will
2983
- * also be called on the trailing edge of the timeout. Subsequent calls to the
2984
- * throttled function will return the result of the last `func` call.
2985
- *
2986
- * @static
2987
- * @memberOf _
2988
- * @category Functions
2989
- * @param {Function} func The function to throttle.
2990
- * @param {Number} wait The number of milliseconds to throttle executions to.
2991
- * @returns {Function} Returns the new throttled function.
2992
- * @example
2993
- *
2994
- * var throttled = _.throttle(updatePosition, 100);
2995
- * jQuery(window).on('scroll', throttled);
2996
- */
2997
- function throttle(func, wait) {
2998
- var args,
2999
- result,
3000
- thisArg,
3001
- timeoutId,
3002
- lastCalled = 0;
3003
-
3004
- function trailingCall() {
3005
- lastCalled = new Date;
3006
- timeoutId = null;
3007
- result = func.apply(thisArg, args);
3008
- }
3009
- return function() {
3010
- var now = new Date,
3011
- remaining = wait - (now - lastCalled);
3012
-
3013
- args = arguments;
3014
- thisArg = this;
3015
-
3016
- if (remaining <= 0) {
3017
- clearTimeout(timeoutId);
3018
- lastCalled = now;
3019
- result = func.apply(thisArg, args);
3020
- }
3021
- else if (!timeoutId) {
3022
- timeoutId = setTimeout(trailingCall, remaining);
3023
- }
3024
- return result;
3025
- };
3026
- }
3027
-
3028
- /**
3029
- * Creates a function that passes `value` to the `wrapper` function as its
3030
- * first argument. Additional arguments passed to the function are appended
3031
- * to those passed to the `wrapper` function. The `wrapper` is executed with
3032
- * the `this` binding of the created function.
3033
- *
3034
- * @static
3035
- * @memberOf _
3036
- * @category Functions
3037
- * @param {Mixed} value The value to wrap.
3038
- * @param {Function} wrapper The wrapper function.
3039
- * @returns {Function} Returns the new function.
3040
- * @example
3041
- *
3042
- * var hello = function(name) { return 'hello ' + name; };
3043
- * hello = _.wrap(hello, function(func) {
3044
- * return 'before, ' + func('moe') + ', after';
3045
- * });
3046
- * hello();
3047
- * // => 'before, hello moe, after'
3048
- */
3049
- function wrap(value, wrapper) {
3050
- return function() {
3051
- var args = [value];
3052
- push.apply(args, arguments);
3053
- return wrapper.apply(this, args);
3054
- };
3055
- }
3056
-
3057
- /*--------------------------------------------------------------------------*/
3058
-
3059
- /**
3060
- * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their
3061
- * corresponding HTML entities.
3062
- *
3063
- * @static
3064
- * @memberOf _
3065
- * @category Utilities
3066
- * @param {String} string The string to escape.
3067
- * @returns {String} Returns the escaped string.
3068
- * @example
3069
- *
3070
- * _.escape('Moe, Larry & Curly');
3071
- * // => "Moe, Larry &amp; Curly"
3072
- */
3073
- function escape(string) {
3074
- return string == null ? '' : (string + '').replace(reUnescapedHtml, escapeHtmlChar);
3075
- }
3076
-
3077
- /**
3078
- * This function returns the first argument passed to it.
3079
- *
3080
- * Note: It is used throughout Lo-Dash as a default callback.
3081
- *
3082
- * @static
3083
- * @memberOf _
3084
- * @category Utilities
3085
- * @param {Mixed} value Any value.
3086
- * @returns {Mixed} Returns `value`.
3087
- * @example
3088
- *
3089
- * var moe = { 'name': 'moe' };
3090
- * moe === _.identity(moe);
3091
- * // => true
3092
- */
3093
- function identity(value) {
3094
- return value;
3095
- }
3096
-
3097
- /**
3098
- * Adds functions properties of `object` to the `lodash` function and chainable
3099
- * wrapper.
3100
- *
3101
- * @static
3102
- * @memberOf _
3103
- * @category Utilities
3104
- * @param {Object} object The object of function properties to add to `lodash`.
3105
- * @example
3106
- *
3107
- * _.mixin({
3108
- * 'capitalize': function(string) {
3109
- * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
3110
- * }
3111
- * });
3112
- *
3113
- * _.capitalize('larry');
3114
- * // => 'Larry'
3115
- *
3116
- * _('curly').capitalize();
3117
- * // => 'Curly'
3118
- */
3119
- function mixin(object) {
3120
- forEach(functions(object), function(methodName) {
3121
- var func = lodash[methodName] = object[methodName];
3122
-
3123
- lodash.prototype[methodName] = function() {
3124
- var args = [this.__wrapped__];
3125
- push.apply(args, arguments);
3126
-
3127
- var result = func.apply(lodash, args);
3128
- if (this.__chain__) {
3129
- result = new lodash(result);
3130
- result.__chain__ = true;
3131
- }
3132
- return result;
3133
- };
3134
- });
3135
- }
3136
-
3137
- /**
3138
- * Reverts the '_' variable to its previous value and returns a reference to
3139
- * the `lodash` function.
3140
- *
3141
- * @static
3142
- * @memberOf _
3143
- * @category Utilities
3144
- * @returns {Function} Returns the `lodash` function.
3145
- * @example
3146
- *
3147
- * var lodash = _.noConflict();
3148
- */
3149
- function noConflict() {
3150
- window._ = oldDash;
3151
- return this;
3152
- }
3153
-
3154
- /**
3155
- * Produces a random number between `min` and `max` (inclusive). If only one
3156
- * argument is passed, a number between `0` and the given number will be returned.
3157
- *
3158
- * @static
3159
- * @memberOf _
3160
- * @category Utilities
3161
- * @param {Number} [min=0] The minimum possible value.
3162
- * @param {Number} [max=1] The maximum possible value.
3163
- * @returns {Number} Returns a random number.
3164
- * @example
3165
- *
3166
- * _.random(0, 5);
3167
- * // => a number between 1 and 5
3168
- *
3169
- * _.random(5);
3170
- * // => also a number between 1 and 5
3171
- */
3172
- function random(min, max) {
3173
- if (min == null && max == null) {
3174
- max = 1;
3175
- }
3176
- min = +min || 0;
3177
- if (max == null) {
3178
- max = min;
3179
- min = 0;
3180
- }
3181
- return min + floor(nativeRandom() * ((+max || 0) - min + 1));
3182
- }
3183
-
3184
- /**
3185
- * Resolves the value of `property` on `object`. If `property` is a function
3186
- * it will be invoked and its result returned, else the property value is
3187
- * returned. If `object` is falsey, then `null` is returned.
3188
- *
3189
- * @deprecated
3190
- * @static
3191
- * @memberOf _
3192
- * @category Utilities
3193
- * @param {Object} object The object to inspect.
3194
- * @param {String} property The property to get the value of.
3195
- * @returns {Mixed} Returns the resolved value.
3196
- * @example
3197
- *
3198
- * var object = {
3199
- * 'cheese': 'crumpets',
3200
- * 'stuff': function() {
3201
- * return 'nonsense';
3202
- * }
3203
- * };
3204
- *
3205
- * _.result(object, 'cheese');
3206
- * // => 'crumpets'
3207
- *
3208
- * _.result(object, 'stuff');
3209
- * // => 'nonsense'
3210
- */
3211
- function result(object, property) {
3212
- // based on Backbone's private `getValue` function
3213
- // https://github.com/documentcloud/backbone/blob/0.9.2/backbone.js#L1419-1424
3214
- var value = object ? object[property] : null;
3215
- return isFunction(value) ? object[property]() : value;
3216
- }
3217
-
3218
- /**
3219
- * A micro-templating method that handles arbitrary delimiters, preserves
3220
- * whitespace, and correctly escapes quotes within interpolated code.
3221
- *
3222
- * Note: In the development build `_.template` utilizes sourceURLs for easier
3223
- * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl
3224
- *
3225
- * Note: Lo-Dash may be used in Chrome extensions by either creating a `lodash csp`
3226
- * build and avoiding `_.template` use, or loading Lo-Dash in a sandboxed page.
3227
- * See http://developer.chrome.com/trunk/extensions/sandboxingEval.html
3228
- *
3229
- * @static
3230
- * @memberOf _
3231
- * @category Utilities
3232
- * @param {String} text The template text.
3233
- * @param {Obect} data The data object used to populate the text.
3234
- * @param {Object} options The options object.
3235
- * escape - The "escape" delimiter regexp.
3236
- * evaluate - The "evaluate" delimiter regexp.
3237
- * interpolate - The "interpolate" delimiter regexp.
3238
- * sourceURL - The sourceURL of the template's compiled source.
3239
- * variable - The data object variable name.
3240
- *
3241
- * @returns {Function|String} Returns a compiled function when no `data` object
3242
- * is given, else it returns the interpolated text.
3243
- * @example
3244
- *
3245
- * // using a compiled template
3246
- * var compiled = _.template('hello <%= name %>');
3247
- * compiled({ 'name': 'moe' });
3248
- * // => 'hello moe'
3249
- *
3250
- * var list = '<% _.forEach(people, function(name) { %><li><%= name %></li><% }); %>';
3251
- * _.template(list, { 'people': ['moe', 'larry', 'curly'] });
3252
- * // => '<li>moe</li><li>larry</li><li>curly</li>'
3253
- *
3254
- * // using the "escape" delimiter to escape HTML in data property values
3255
- * _.template('<b><%- value %></b>', { 'value': '<script>' });
3256
- * // => '<b>&lt;script&gt;</b>'
3257
- *
3258
- * // using the ES6 delimiter as an alternative to the default "interpolate" delimiter
3259
- * _.template('hello ${ name }', { 'name': 'curly' });
3260
- * // => 'hello curly'
3261
- *
3262
- * // using the internal `print` function in "evaluate" delimiters
3263
- * _.template('<% print("hello " + epithet); %>!', { 'epithet': 'stooge' });
3264
- * // => 'hello stooge!'
3265
- *
3266
- * // using custom template delimiters
3267
- * _.templateSettings = {
3268
- * 'interpolate': /{{([\s\S]+?)}}/g
3269
- * };
3270
- *
3271
- * _.template('hello {{ name }}!', { 'name': 'mustache' });
3272
- * // => 'hello mustache!'
3273
- *
3274
- * // using the `sourceURL` option to specify a custom sourceURL for the template
3275
- * var compiled = _.template('hello <%= name %>', null, { 'sourceURL': '/basic/greeting.jst' });
3276
- * compiled(data);
3277
- * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
3278
- *
3279
- * // using the `variable` option to ensure a with-statement isn't used in the compiled template
3280
- * var compiled = _.template('hello <%= data.name %>!', null, { 'variable': 'data' });
3281
- * compiled.source;
3282
- * // => function(data) {
3283
- * var __t, __p = '', __e = _.escape;
3284
- * __p += 'hello ' + ((__t = ( data.name )) == null ? '' : __t) + '!';
3285
- * return __p;
3286
- * }
3287
- *
3288
- * // using the `source` property to inline compiled templates for meaningful
3289
- * // line numbers in error messages and a stack trace
3290
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
3291
- * var JST = {\
3292
- * "main": ' + _.template(mainText).source + '\
3293
- * };\
3294
- * ');
3295
- */
3296
- function template(text, data, options) {
3297
- text || (text = '');
3298
- options = defaults({}, options, lodash.templateSettings);
3299
-
3300
- var index = 0,
3301
- source = "__p += '",
3302
- variable = options.variable;
3303
-
3304
- var reDelimiters = RegExp(
3305
- (options.escape || reNoMatch).source + '|' +
3306
- (options.interpolate || reNoMatch).source + '|' +
3307
- (options.evaluate || reNoMatch).source + '|$'
3308
- , 'g');
3309
-
3310
- text.replace(reDelimiters, function(match, escapeValue, interpolateValue, evaluateValue, offset) {
3311
- source += text.slice(index, offset).replace(reUnescapedString, escapeStringChar);
3312
- source +=
3313
- escapeValue ? "' +\n_.escape(" + escapeValue + ") +\n'" :
3314
- evaluateValue ? "';\n" + evaluateValue + ";\n__p += '" :
3315
- interpolateValue ? "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'" : '';
3316
-
3317
- index = offset + match.length;
3318
- });
3319
-
3320
- source += "';\n";
3321
- if (!variable) {
3322
- variable = 'obj';
3323
- source = 'with (' + variable + ' || {}) {\n' + source + '\n}\n';
3324
- }
3325
- source = 'function(' + variable + ') {\n' +
3326
- 'var __t, __p = \'\', __j = Array.prototype.join;\n' +
3327
- 'function print() { __p += __j.call(arguments, \'\') }\n' +
3328
- source +
3329
- 'return __p\n}';
3330
-
3331
- try {
3332
- var result = Function('_', 'return ' + source)(lodash);
3333
- } catch(e) {
3334
- e.source = source;
3335
- throw e;
3336
- }
3337
- if (data) {
3338
- return result(data);
3339
- }
3340
- result.source = source;
3341
- return result;
3342
- }
3343
-
3344
- /**
3345
- * Executes the `callback` function `n` times, returning an array of the results
3346
- * of each `callback` execution. The `callback` is bound to `thisArg` and invoked
3347
- * with one argument; (index).
3348
- *
3349
- * @static
3350
- * @memberOf _
3351
- * @category Utilities
3352
- * @param {Number} n The number of times to execute the callback.
3353
- * @param {Function} callback The function called per iteration.
3354
- * @param {Mixed} [thisArg] The `this` binding of `callback`.
3355
- * @returns {Array} Returns a new array of the results of each `callback` execution.
3356
- * @example
3357
- *
3358
- * var diceRolls = _.times(3, _.partial(_.random, 1, 6));
3359
- * // => [3, 6, 4]
3360
- *
3361
- * _.times(3, function(n) { mage.castSpell(n); });
3362
- * // => calls `mage.castSpell(n)` three times, passing `n` of `0`, `1`, and `2` respectively
3363
- *
3364
- * _.times(3, function(n) { this.cast(n); }, mage);
3365
- * // => also calls `mage.castSpell(n)` three times
3366
- */
3367
- function times(n, callback, thisArg) {
3368
- n = +n || 0;
3369
- var index = -1,
3370
- result = Array(n);
3371
-
3372
- while (++index < n) {
3373
- result[index] = callback.call(thisArg, index);
3374
- }
3375
- return result;
3376
- }
3377
-
3378
- /**
3379
- * The opposite of `_.escape`, this method converts the HTML entities
3380
- * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#x27;` in `string` to their
3381
- * corresponding characters.
3382
- *
3383
- * @static
3384
- * @memberOf _
3385
- * @category Utilities
3386
- * @param {String} string The string to unescape.
3387
- * @returns {String} Returns the unescaped string.
3388
- * @example
3389
- *
3390
- * _.unescape('Moe, Larry &amp; Curly');
3391
- * // => "Moe, Larry & Curly"
3392
- */
3393
- function unescape(string) {
3394
- return string == null ? '' : (string + '').replace(reEscapedHtml, unescapeHtmlChar);
3395
- }
3396
-
3397
- /**
3398
- * Generates a unique id. If `prefix` is passed, the id will be appended to it.
3399
- *
3400
- * @static
3401
- * @memberOf _
3402
- * @category Utilities
3403
- * @param {String} [prefix] The value to prefix the id with.
3404
- * @returns {Number|String} Returns a numeric id if no prefix is passed, else
3405
- * a string id may be returned.
3406
- * @example
3407
- *
3408
- * _.uniqueId('contact_');
3409
- * // => 'contact_104'
3410
- */
3411
- function uniqueId(prefix) {
3412
- var id = idCounter++;
3413
- return prefix ? prefix + id : id;
3414
- }
3415
-
3416
- /*--------------------------------------------------------------------------*/
3417
-
3418
- /**
3419
- * Wraps the value in a `lodash` wrapper object.
3420
- *
3421
- * @static
3422
- * @memberOf _
3423
- * @category Chaining
3424
- * @param {Mixed} value The value to wrap.
3425
- * @returns {Object} Returns the wrapper object.
3426
- * @example
3427
- *
3428
- * var stooges = [
3429
- * { 'name': 'moe', 'age': 40 },
3430
- * { 'name': 'larry', 'age': 50 },
3431
- * { 'name': 'curly', 'age': 60 }
3432
- * ];
3433
- *
3434
- * var youngest = _.chain(stooges)
3435
- * .sortBy(function(stooge) { return stooge.age; })
3436
- * .map(function(stooge) { return stooge.name + ' is ' + stooge.age; })
3437
- * .first()
3438
- * .value();
3439
- * // => 'moe is 40'
3440
- */
3441
- function chain(value) {
3442
- value = new lodash(value);
3443
- value.__chain__ = true;
3444
- return value;
3445
- }
3446
-
3447
- /**
3448
- * Invokes `interceptor` with the `value` as the first argument, and then
3449
- * returns `value`. The purpose of this method is to "tap into" a method chain,
3450
- * in order to perform operations on intermediate results within the chain.
3451
- *
3452
- * @static
3453
- * @memberOf _
3454
- * @category Chaining
3455
- * @param {Mixed} value The value to pass to `interceptor`.
3456
- * @param {Function} interceptor The function to invoke.
3457
- * @returns {Mixed} Returns `value`.
3458
- * @example
3459
- *
3460
- * _.chain([1, 2, 3, 200])
3461
- * .filter(function(num) { return num % 2 == 0; })
3462
- * .tap(alert)
3463
- * .map(function(num) { return num * num })
3464
- * .value();
3465
- * // => // [2, 200] (alerted)
3466
- * // => [4, 40000]
3467
- */
3468
- function tap(value, interceptor) {
3469
- interceptor(value);
3470
- return value;
3471
- }
3472
-
3473
- /**
3474
- * Enables method chaining on the wrapper object.
3475
- *
3476
- * @name chain
3477
- * @deprecated
3478
- * @memberOf _
3479
- * @category Chaining
3480
- * @returns {Mixed} Returns the wrapper object.
3481
- * @example
3482
- *
3483
- * _([1, 2, 3]).value();
3484
- * // => [1, 2, 3]
3485
- */
3486
- function wrapperChain() {
3487
- this.__chain__ = true;
3488
- return this;
3489
- }
3490
-
3491
- /**
3492
- * Extracts the wrapped value.
3493
- *
3494
- * @name value
3495
- * @memberOf _
3496
- * @category Chaining
3497
- * @returns {Mixed} Returns the wrapped value.
3498
- * @example
3499
- *
3500
- * _([1, 2, 3]).value();
3501
- * // => [1, 2, 3]
3502
- */
3503
- function wrapperValue() {
3504
- return this.__wrapped__;
3505
- }
3506
-
3507
- /*--------------------------------------------------------------------------*/
3508
-
3509
- /**
3510
- * The semantic version number.
3511
- *
3512
- * @static
3513
- * @memberOf _
3514
- * @type String
3515
- */
3516
- lodash.VERSION = '0.9.2';
3517
-
3518
- // assign static methods
3519
- lodash.after = after;
3520
- lodash.bind = bind;
3521
- lodash.bindAll = bindAll;
3522
- lodash.chain = chain;
3523
- lodash.clone = clone;
3524
- lodash.compact = compact;
3525
- lodash.compose = compose;
3526
- lodash.contains = contains;
3527
- lodash.countBy = countBy;
3528
- lodash.debounce = debounce;
3529
- lodash.defaults = defaults;
3530
- lodash.defer = defer;
3531
- lodash.delay = delay;
3532
- lodash.difference = difference;
3533
- lodash.escape = escape;
3534
- lodash.every = every;
3535
- lodash.extend = extend;
3536
- lodash.filter = filter;
3537
- lodash.find = find;
3538
- lodash.first = first;
3539
- lodash.flatten = flatten;
3540
- lodash.forEach = forEach;
3541
- lodash.functions = functions;
3542
- lodash.groupBy = groupBy;
3543
- lodash.has = has;
3544
- lodash.identity = identity;
3545
- lodash.indexOf = indexOf;
3546
- lodash.initial = initial;
3547
- lodash.intersection = intersection;
3548
- lodash.invert = invert;
3549
- lodash.invoke = invoke;
3550
- lodash.isArray = isArray;
3551
- lodash.isBoolean = isBoolean;
3552
- lodash.isDate = isDate;
3553
- lodash.isElement = isElement;
3554
- lodash.isEmpty = isEmpty;
3555
- lodash.isEqual = isEqual;
3556
- lodash.isFinite = isFinite;
3557
- lodash.isFunction = isFunction;
3558
- lodash.isNaN = isNaN;
3559
- lodash.isNull = isNull;
3560
- lodash.isNumber = isNumber;
3561
- lodash.isObject = isObject;
3562
- lodash.isRegExp = isRegExp;
3563
- lodash.isString = isString;
3564
- lodash.isUndefined = isUndefined;
3565
- lodash.keys = keys;
3566
- lodash.last = last;
3567
- lodash.lastIndexOf = lastIndexOf;
3568
- lodash.map = map;
3569
- lodash.max = max;
3570
- lodash.memoize = memoize;
3571
- lodash.min = min;
3572
- lodash.mixin = mixin;
3573
- lodash.noConflict = noConflict;
3574
- lodash.object = object;
3575
- lodash.omit = omit;
3576
- lodash.once = once;
3577
- lodash.pairs = pairs;
3578
- lodash.pick = pick;
3579
- lodash.pluck = pluck;
3580
- lodash.random = random;
3581
- lodash.range = range;
3582
- lodash.reduce = reduce;
3583
- lodash.reduceRight = reduceRight;
3584
- lodash.reject = reject;
3585
- lodash.rest = rest;
3586
- lodash.result = result;
3587
- lodash.shuffle = shuffle;
3588
- lodash.size = size;
3589
- lodash.some = some;
3590
- lodash.sortBy = sortBy;
3591
- lodash.sortedIndex = sortedIndex;
3592
- lodash.tap = tap;
3593
- lodash.template = template;
3594
- lodash.throttle = throttle;
3595
- lodash.times = times;
3596
- lodash.toArray = toArray;
3597
- lodash.unescape = unescape;
3598
- lodash.union = union;
3599
- lodash.uniq = uniq;
3600
- lodash.uniqueId = uniqueId;
3601
- lodash.values = values;
3602
- lodash.where = where;
3603
- lodash.without = without;
3604
- lodash.wrap = wrap;
3605
- lodash.zip = zip;
3606
-
3607
- // assign aliases
3608
- lodash.all = every;
3609
- lodash.any = some;
3610
- lodash.collect = map;
3611
- lodash.detect = find;
3612
- lodash.drop = rest;
3613
- lodash.each = forEach;
3614
- lodash.foldl = reduce;
3615
- lodash.foldr = reduceRight;
3616
- lodash.head = first;
3617
- lodash.include = contains;
3618
- lodash.inject = reduce;
3619
- lodash.methods = functions;
3620
- lodash.select = filter;
3621
- lodash.tail = rest;
3622
- lodash.take = first;
3623
- lodash.unique = uniq;
3624
-
3625
- /*--------------------------------------------------------------------------*/
3626
-
3627
- // add all static functions to `lodash.prototype`
3628
- mixin(lodash);
3629
-
3630
- // add `lodash.prototype.chain` after calling `mixin()` to avoid overwriting
3631
- // it with the wrapped `lodash.chain`
3632
- lodash.prototype.chain = wrapperChain;
3633
- lodash.prototype.value = wrapperValue;
3634
-
3635
- // add all mutator Array functions to the wrapper.
3636
- forEach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
3637
- var func = arrayRef[methodName];
3638
-
3639
- lodash.prototype[methodName] = function() {
3640
- var value = this.__wrapped__;
3641
- func.apply(value, arguments);
3642
-
3643
- // avoid array-like object bugs with `Array#shift` and `Array#splice` in
3644
- // Firefox < 10 and IE < 9
3645
- if (hasObjectSpliceBug && value.length === 0) {
3646
- delete value[0];
3647
- }
3648
- if (this.__chain__) {
3649
- value = new lodash(value);
3650
- value.__chain__ = true;
3651
- }
3652
- return value;
3653
- };
3654
- });
3655
-
3656
- // add all accessor Array functions to the wrapper.
3657
- forEach(['concat', 'join', 'slice'], function(methodName) {
3658
- var func = arrayRef[methodName];
3659
-
3660
- lodash.prototype[methodName] = function() {
3661
- var value = this.__wrapped__,
3662
- result = func.apply(value, arguments);
3663
-
3664
- if (this.__chain__) {
3665
- result = new lodash(result);
3666
- result.__chain__ = true;
3667
- }
3668
- return result;
3669
- };
3670
- });
3671
-
3672
- /*--------------------------------------------------------------------------*/
3673
-
3674
- if (freeExports) {
3675
- // in Node.js or RingoJS v0.8.0+
3676
- if (typeof module == 'object' && module && module.exports == freeExports) {
3677
- (module.exports = lodash)._ = lodash;
3678
- }
3679
- // in Narwhal or RingoJS v0.7.0-
3680
- else {
3681
- freeExports._ = lodash;
3682
- }
3683
- }
3684
- else {
3685
- // in a browser or Rhino
3686
- window._ = lodash;
3687
- }
3688
- }(this));