opal 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -1
  3. data/lib/opal/cli.rb +9 -1
  4. data/lib/opal/cli_options.rb +12 -3
  5. data/lib/opal/cli_runners/nodejs.rb +3 -2
  6. data/lib/opal/version.rb +1 -1
  7. data/opal/corelib/kernel.rb +7 -0
  8. data/opal/corelib/runtime.js +4 -0
  9. data/spec/lib/cli_spec.rb +16 -0
  10. data/stdlib/nodejs.rb +1 -2
  11. data/stdlib/nodejs/{process.rb → kernel.rb} +7 -4
  12. data/stdlib/nodejs/node_modules/.bin/js-yaml +140 -0
  13. data/stdlib/nodejs/node_modules/glob/LICENSE +15 -0
  14. data/stdlib/nodejs/node_modules/glob/README.md +357 -0
  15. data/stdlib/nodejs/node_modules/glob/common.js +177 -0
  16. data/stdlib/nodejs/node_modules/glob/glob.js +649 -0
  17. data/stdlib/nodejs/node_modules/glob/node_modules/inflight/.eslintrc +17 -0
  18. data/stdlib/nodejs/node_modules/glob/node_modules/inflight/LICENSE +15 -0
  19. data/stdlib/nodejs/node_modules/glob/node_modules/inflight/README.md +37 -0
  20. data/stdlib/nodejs/node_modules/glob/node_modules/inflight/inflight.js +44 -0
  21. data/stdlib/nodejs/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +15 -0
  22. data/stdlib/nodejs/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +36 -0
  23. data/stdlib/nodejs/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +52 -0
  24. data/stdlib/nodejs/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +51 -0
  25. data/stdlib/nodejs/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +33 -0
  26. data/stdlib/nodejs/node_modules/glob/node_modules/inflight/package.json +61 -0
  27. data/stdlib/nodejs/node_modules/glob/node_modules/inflight/test.js +97 -0
  28. data/stdlib/nodejs/node_modules/glob/node_modules/inherits/LICENSE +16 -0
  29. data/stdlib/nodejs/node_modules/glob/node_modules/inherits/README.md +42 -0
  30. data/stdlib/nodejs/node_modules/glob/node_modules/inherits/inherits.js +1 -0
  31. data/stdlib/nodejs/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
  32. data/stdlib/nodejs/node_modules/glob/node_modules/inherits/package.json +51 -0
  33. data/stdlib/nodejs/node_modules/glob/node_modules/inherits/test.js +25 -0
  34. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/.npmignore +1 -0
  35. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/.travis.yml +4 -0
  36. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/LICENSE +23 -0
  37. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/README.md +216 -0
  38. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/benchmark.js +15 -0
  39. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/browser.js +1181 -0
  40. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/minimatch.js +845 -0
  41. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +2 -0
  42. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml +3 -0
  43. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +121 -0
  44. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
  45. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
  46. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
  47. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +4 -0
  48. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
  49. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
  50. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
  51. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
  52. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +73 -0
  53. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
  54. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +4 -0
  55. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
  56. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
  57. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
  58. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
  59. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +83 -0
  60. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
  61. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +75 -0
  62. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +32 -0
  63. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +1075 -0
  64. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +182 -0
  65. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +9 -0
  66. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +10 -0
  67. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +24 -0
  68. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +15 -0
  69. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +16 -0
  70. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +10 -0
  71. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +13 -0
  72. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +7 -0
  73. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +50 -0
  74. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/package.json +60 -0
  75. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/test/basic.js +399 -0
  76. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/test/brace-expand.js +45 -0
  77. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/test/defaults.js +274 -0
  78. data/stdlib/nodejs/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
  79. data/stdlib/nodejs/node_modules/glob/node_modules/once/LICENSE +27 -0
  80. data/stdlib/nodejs/node_modules/glob/node_modules/once/README.md +51 -0
  81. data/stdlib/nodejs/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
  82. data/stdlib/nodejs/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
  83. data/stdlib/nodejs/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +52 -0
  84. data/stdlib/nodejs/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
  85. data/stdlib/nodejs/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
  86. data/stdlib/nodejs/node_modules/glob/node_modules/once/once.js +21 -0
  87. data/stdlib/nodejs/node_modules/glob/node_modules/once/package.json +60 -0
  88. data/stdlib/nodejs/node_modules/glob/node_modules/once/test/once.js +23 -0
  89. data/stdlib/nodejs/node_modules/glob/package.json +72 -0
  90. data/stdlib/nodejs/node_modules/glob/sync.js +409 -0
  91. data/stdlib/nodejs/node_modules/js-yaml/HISTORY.md +277 -0
  92. data/stdlib/nodejs/node_modules/js-yaml/LICENSE +21 -0
  93. data/stdlib/nodejs/node_modules/js-yaml/README.md +288 -0
  94. data/stdlib/nodejs/node_modules/js-yaml/bin/js-yaml.js +140 -0
  95. data/stdlib/nodejs/node_modules/js-yaml/bower.json +23 -0
  96. data/stdlib/nodejs/node_modules/js-yaml/dist/js-yaml.js +3666 -0
  97. data/stdlib/nodejs/node_modules/js-yaml/dist/js-yaml.min.js +3 -0
  98. data/stdlib/nodejs/node_modules/js-yaml/examples/custom_types.js +102 -0
  99. data/stdlib/nodejs/node_modules/js-yaml/examples/custom_types.yml +18 -0
  100. data/stdlib/nodejs/node_modules/js-yaml/examples/dumper.js +31 -0
  101. data/stdlib/nodejs/node_modules/js-yaml/examples/dumper.json +22 -0
  102. data/stdlib/nodejs/node_modules/js-yaml/examples/sample_document.js +18 -0
  103. data/stdlib/nodejs/node_modules/js-yaml/examples/sample_document.yml +197 -0
  104. data/stdlib/nodejs/node_modules/js-yaml/index.js +7 -0
  105. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml.js +39 -0
  106. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/common.js +62 -0
  107. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/dumper.js +554 -0
  108. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/exception.js +25 -0
  109. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/loader.js +1581 -0
  110. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/mark.js +78 -0
  111. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/schema.js +103 -0
  112. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/schema/core.js +18 -0
  113. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +25 -0
  114. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +28 -0
  115. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +17 -0
  116. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/schema/json.js +25 -0
  117. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type.js +61 -0
  118. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/binary.js +133 -0
  119. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/bool.js +37 -0
  120. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/float.js +110 -0
  121. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/int.js +183 -0
  122. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/js/function.js +85 -0
  123. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +84 -0
  124. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +27 -0
  125. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/map.js +8 -0
  126. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/merge.js +12 -0
  127. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/null.js +36 -0
  128. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/omap.js +56 -0
  129. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/pairs.js +61 -0
  130. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/seq.js +8 -0
  131. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/set.js +33 -0
  132. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/str.js +8 -0
  133. data/stdlib/nodejs/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +98 -0
  134. data/stdlib/nodejs/node_modules/js-yaml/node_modules/.bin/esparse +117 -0
  135. data/stdlib/nodejs/node_modules/js-yaml/node_modules/.bin/esvalidate +177 -0
  136. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/HISTORY.md +115 -0
  137. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/LICENSE +21 -0
  138. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/README.md +239 -0
  139. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/arguments.js +36 -0
  140. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js +22 -0
  141. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/constants.js +59 -0
  142. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/help.js +13 -0
  143. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/nargs.js +33 -0
  144. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/parents.js +28 -0
  145. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js +23 -0
  146. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js +49 -0
  147. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/sum.js +35 -0
  148. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js +270 -0
  149. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/index.js +1 -0
  150. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action.js +146 -0
  151. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action/append.js +55 -0
  152. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js +47 -0
  153. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action/count.js +40 -0
  154. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action/help.js +48 -0
  155. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action/store.js +50 -0
  156. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js +43 -0
  157. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js +27 -0
  158. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js +26 -0
  159. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js +148 -0
  160. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action/version.js +50 -0
  161. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/action_container.js +481 -0
  162. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/argparse.js +14 -0
  163. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js +50 -0
  164. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js +54 -0
  165. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js +75 -0
  166. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js +1168 -0
  167. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/const.js +18 -0
  168. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js +88 -0
  169. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js +798 -0
  170. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/lib/namespace.js +77 -0
  171. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.npmignore +2 -0
  172. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.travis.yml +8 -0
  173. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown +825 -0
  174. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/bower.json +33 -0
  175. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json +11 -0
  176. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/foo.js +10 -0
  177. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/gulpfile.js +26 -0
  178. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js +673 -0
  179. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log +0 -0
  180. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json +107 -0
  181. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/LICENSE +23 -0
  182. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/README.md +22 -0
  183. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/package.json +69 -0
  184. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore-min.js +6 -0
  185. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore.js +1415 -0
  186. data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/package.json +62 -0
  187. data/stdlib/nodejs/node_modules/js-yaml/node_modules/esprima/README.md +73 -0
  188. data/stdlib/nodejs/node_modules/js-yaml/node_modules/esprima/bin/esparse.js +117 -0
  189. data/stdlib/nodejs/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js +177 -0
  190. data/stdlib/nodejs/node_modules/js-yaml/node_modules/esprima/esprima.js +3908 -0
  191. data/stdlib/nodejs/node_modules/js-yaml/node_modules/esprima/package.json +69 -0
  192. data/stdlib/nodejs/node_modules/js-yaml/node_modules/esprima/test/compat.js +239 -0
  193. data/stdlib/nodejs/node_modules/js-yaml/node_modules/esprima/test/reflect.js +422 -0
  194. data/stdlib/nodejs/node_modules/js-yaml/node_modules/esprima/test/run.js +66 -0
  195. data/stdlib/nodejs/node_modules/js-yaml/node_modules/esprima/test/runner.js +387 -0
  196. data/stdlib/nodejs/node_modules/js-yaml/node_modules/esprima/test/test.js +20238 -0
  197. data/stdlib/nodejs/node_modules/js-yaml/package.json +83 -0
  198. data/{package.json → stdlib/nodejs/package.json} +0 -3
  199. data/stdlib/phantomjs.rb +1 -6
  200. data/tasks/testing.rake +1 -4
  201. metadata +191 -6
  202. data/stdlib/nodejs/runtime.rb +0 -26
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "balanced-match",
3
+ "description": "Match balanced character pairs, like \"{\" and \"}\"",
4
+ "version": "0.2.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git://github.com/juliangruber/balanced-match.git"
8
+ },
9
+ "homepage": "https://github.com/juliangruber/balanced-match",
10
+ "main": "index.js",
11
+ "scripts": {
12
+ "test": "make test"
13
+ },
14
+ "dependencies": {},
15
+ "devDependencies": {
16
+ "tape": "~1.1.1"
17
+ },
18
+ "keywords": [
19
+ "match",
20
+ "regexp",
21
+ "test",
22
+ "balanced",
23
+ "parse"
24
+ ],
25
+ "author": {
26
+ "name": "Julian Gruber",
27
+ "email": "mail@juliangruber.com",
28
+ "url": "http://juliangruber.com"
29
+ },
30
+ "license": "MIT",
31
+ "testling": {
32
+ "files": "test/*.js",
33
+ "browsers": [
34
+ "ie/8..latest",
35
+ "firefox/20..latest",
36
+ "firefox/nightly",
37
+ "chrome/25..latest",
38
+ "chrome/canary",
39
+ "opera/12..latest",
40
+ "opera/next",
41
+ "safari/5.1..latest",
42
+ "ipad/6.0..latest",
43
+ "iphone/6.0..latest",
44
+ "android-browser/4.2..latest"
45
+ ]
46
+ },
47
+ "gitHead": "ba40ed78e7114a4a67c51da768a100184dead39c",
48
+ "bugs": {
49
+ "url": "https://github.com/juliangruber/balanced-match/issues"
50
+ },
51
+ "_id": "balanced-match@0.2.0",
52
+ "_shasum": "38f6730c03aab6d5edbb52bd934885e756d71674",
53
+ "_from": "balanced-match@>=0.2.0 <0.3.0",
54
+ "_npmVersion": "2.1.8",
55
+ "_nodeVersion": "0.10.32",
56
+ "_npmUser": {
57
+ "name": "juliangruber",
58
+ "email": "julian@juliangruber.com"
59
+ },
60
+ "maintainers": [
61
+ {
62
+ "name": "juliangruber",
63
+ "email": "julian@juliangruber.com"
64
+ }
65
+ ],
66
+ "dist": {
67
+ "shasum": "38f6730c03aab6d5edbb52bd934885e756d71674",
68
+ "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz"
69
+ },
70
+ "directories": {},
71
+ "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz",
72
+ "readme": "ERROR: No README data found!"
73
+ }
@@ -0,0 +1,56 @@
1
+ var test = require('tape');
2
+ var balanced = require('..');
3
+
4
+ test('balanced', function(t) {
5
+ t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), {
6
+ start: 3,
7
+ end: 12,
8
+ pre: 'pre',
9
+ body: 'in{nest}',
10
+ post: 'post'
11
+ });
12
+ t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), {
13
+ start: 8,
14
+ end: 11,
15
+ pre: '{{{{{{{{',
16
+ body: 'in',
17
+ post: 'post'
18
+ });
19
+ t.deepEqual(balanced('{', '}', 'pre{body{in}post'), {
20
+ start: 8,
21
+ end: 11,
22
+ pre: 'pre{body',
23
+ body: 'in',
24
+ post: 'post'
25
+ });
26
+ t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), {
27
+ start: 4,
28
+ end: 13,
29
+ pre: 'pre}',
30
+ body: 'in{nest}',
31
+ post: 'post'
32
+ });
33
+ t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), {
34
+ start: 3,
35
+ end: 8,
36
+ pre: 'pre',
37
+ body: 'body',
38
+ post: 'between{body2}post'
39
+ });
40
+ t.notOk(balanced('{', '}', 'nope'), 'should be notOk');
41
+ t.deepEqual(balanced('<b>', '</b>', 'pre<b>in<b>nest</b></b>post'), {
42
+ start: 3,
43
+ end: 19,
44
+ pre: 'pre',
45
+ body: 'in<b>nest</b>',
46
+ post: 'post'
47
+ });
48
+ t.deepEqual(balanced('<b>', '</b>', 'pre</b><b>in<b>nest</b></b>post'), {
49
+ start: 7,
50
+ end: 23,
51
+ pre: 'pre</b>',
52
+ body: 'in<b>nest</b>',
53
+ post: 'post'
54
+ });
55
+ t.end();
56
+ });
@@ -0,0 +1,18 @@
1
+ This software is released under the MIT license:
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
+ the Software, and to permit persons to whom the Software is furnished to do so,
8
+ subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,62 @@
1
+ concat-map
2
+ ==========
3
+
4
+ Concatenative mapdashery.
5
+
6
+ [![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)
7
+
8
+ [![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)
9
+
10
+ example
11
+ =======
12
+
13
+ ``` js
14
+ var concatMap = require('concat-map');
15
+ var xs = [ 1, 2, 3, 4, 5, 6 ];
16
+ var ys = concatMap(xs, function (x) {
17
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
18
+ });
19
+ console.dir(ys);
20
+ ```
21
+
22
+ ***
23
+
24
+ ```
25
+ [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]
26
+ ```
27
+
28
+ methods
29
+ =======
30
+
31
+ ``` js
32
+ var concatMap = require('concat-map')
33
+ ```
34
+
35
+ concatMap(xs, fn)
36
+ -----------------
37
+
38
+ Return an array of concatenated elements by calling `fn(x, i)` for each element
39
+ `x` and each index `i` in the array `xs`.
40
+
41
+ When `fn(x, i)` returns an array, its result will be concatenated with the
42
+ result array. If `fn(x, i)` returns anything else, that value will be pushed
43
+ onto the end of the result array.
44
+
45
+ install
46
+ =======
47
+
48
+ With [npm](http://npmjs.org) do:
49
+
50
+ ```
51
+ npm install concat-map
52
+ ```
53
+
54
+ license
55
+ =======
56
+
57
+ MIT
58
+
59
+ notes
60
+ =====
61
+
62
+ This module was written while sitting high above the ground in a tree.
@@ -0,0 +1,6 @@
1
+ var concatMap = require('../');
2
+ var xs = [ 1, 2, 3, 4, 5, 6 ];
3
+ var ys = concatMap(xs, function (x) {
4
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
5
+ });
6
+ console.dir(ys);
@@ -0,0 +1,13 @@
1
+ module.exports = function (xs, fn) {
2
+ var res = [];
3
+ for (var i = 0; i < xs.length; i++) {
4
+ var x = fn(xs[i], i);
5
+ if (isArray(x)) res.push.apply(res, x);
6
+ else res.push(x);
7
+ }
8
+ return res;
9
+ };
10
+
11
+ var isArray = Array.isArray || function (xs) {
12
+ return Object.prototype.toString.call(xs) === '[object Array]';
13
+ };
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "concat-map",
3
+ "description": "concatenative mapdashery",
4
+ "version": "0.0.1",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git://github.com/substack/node-concat-map.git"
8
+ },
9
+ "main": "index.js",
10
+ "keywords": [
11
+ "concat",
12
+ "concatMap",
13
+ "map",
14
+ "functional",
15
+ "higher-order"
16
+ ],
17
+ "directories": {
18
+ "example": "example",
19
+ "test": "test"
20
+ },
21
+ "scripts": {
22
+ "test": "tape test/*.js"
23
+ },
24
+ "devDependencies": {
25
+ "tape": "~2.4.0"
26
+ },
27
+ "license": "MIT",
28
+ "author": {
29
+ "name": "James Halliday",
30
+ "email": "mail@substack.net",
31
+ "url": "http://substack.net"
32
+ },
33
+ "testling": {
34
+ "files": "test/*.js",
35
+ "browsers": {
36
+ "ie": [
37
+ 6,
38
+ 7,
39
+ 8,
40
+ 9
41
+ ],
42
+ "ff": [
43
+ 3.5,
44
+ 10,
45
+ 15
46
+ ],
47
+ "chrome": [
48
+ 10,
49
+ 22
50
+ ],
51
+ "safari": [
52
+ 5.1
53
+ ],
54
+ "opera": [
55
+ 12
56
+ ]
57
+ }
58
+ },
59
+ "bugs": {
60
+ "url": "https://github.com/substack/node-concat-map/issues"
61
+ },
62
+ "homepage": "https://github.com/substack/node-concat-map",
63
+ "_id": "concat-map@0.0.1",
64
+ "dist": {
65
+ "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
66
+ "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
67
+ },
68
+ "_from": "concat-map@0.0.1",
69
+ "_npmVersion": "1.3.21",
70
+ "_npmUser": {
71
+ "name": "substack",
72
+ "email": "mail@substack.net"
73
+ },
74
+ "maintainers": [
75
+ {
76
+ "name": "substack",
77
+ "email": "mail@substack.net"
78
+ }
79
+ ],
80
+ "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
81
+ "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
82
+ "readme": "ERROR: No README data found!"
83
+ }
@@ -0,0 +1,39 @@
1
+ var concatMap = require('../');
2
+ var test = require('tape');
3
+
4
+ test('empty or not', function (t) {
5
+ var xs = [ 1, 2, 3, 4, 5, 6 ];
6
+ var ixes = [];
7
+ var ys = concatMap(xs, function (x, ix) {
8
+ ixes.push(ix);
9
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
10
+ });
11
+ t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]);
12
+ t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]);
13
+ t.end();
14
+ });
15
+
16
+ test('always something', function (t) {
17
+ var xs = [ 'a', 'b', 'c', 'd' ];
18
+ var ys = concatMap(xs, function (x) {
19
+ return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ];
20
+ });
21
+ t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
22
+ t.end();
23
+ });
24
+
25
+ test('scalars', function (t) {
26
+ var xs = [ 'a', 'b', 'c', 'd' ];
27
+ var ys = concatMap(xs, function (x) {
28
+ return x === 'b' ? [ 'B', 'B', 'B' ] : x;
29
+ });
30
+ t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
31
+ t.end();
32
+ });
33
+
34
+ test('undefs', function (t) {
35
+ var xs = [ 'a', 'b', 'c', 'd' ];
36
+ var ys = concatMap(xs, function () {});
37
+ t.same(ys, [ undefined, undefined, undefined, undefined ]);
38
+ t.end();
39
+ });
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "brace-expansion",
3
+ "description": "Brace expansion as known from sh/bash",
4
+ "version": "1.1.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git://github.com/juliangruber/brace-expansion.git"
8
+ },
9
+ "homepage": "https://github.com/juliangruber/brace-expansion",
10
+ "main": "index.js",
11
+ "scripts": {
12
+ "test": "tape test/*.js",
13
+ "gentest": "bash test/generate.sh"
14
+ },
15
+ "dependencies": {
16
+ "balanced-match": "^0.2.0",
17
+ "concat-map": "0.0.1"
18
+ },
19
+ "devDependencies": {
20
+ "tape": "^3.0.3"
21
+ },
22
+ "keywords": [],
23
+ "author": {
24
+ "name": "Julian Gruber",
25
+ "email": "mail@juliangruber.com",
26
+ "url": "http://juliangruber.com"
27
+ },
28
+ "license": "MIT",
29
+ "testling": {
30
+ "files": "test/*.js",
31
+ "browsers": [
32
+ "ie/8..latest",
33
+ "firefox/20..latest",
34
+ "firefox/nightly",
35
+ "chrome/25..latest",
36
+ "chrome/canary",
37
+ "opera/12..latest",
38
+ "opera/next",
39
+ "safari/5.1..latest",
40
+ "ipad/6.0..latest",
41
+ "iphone/6.0..latest",
42
+ "android-browser/4.2..latest"
43
+ ]
44
+ },
45
+ "gitHead": "b5fa3b1c74e5e2dba2d0efa19b28335641bc1164",
46
+ "bugs": {
47
+ "url": "https://github.com/juliangruber/brace-expansion/issues"
48
+ },
49
+ "_id": "brace-expansion@1.1.0",
50
+ "_shasum": "c9b7d03c03f37bc704be100e522b40db8f6cfcd9",
51
+ "_from": "brace-expansion@>=1.0.0 <2.0.0",
52
+ "_npmVersion": "2.1.10",
53
+ "_nodeVersion": "0.10.32",
54
+ "_npmUser": {
55
+ "name": "juliangruber",
56
+ "email": "julian@juliangruber.com"
57
+ },
58
+ "maintainers": [
59
+ {
60
+ "name": "juliangruber",
61
+ "email": "julian@juliangruber.com"
62
+ },
63
+ {
64
+ "name": "isaacs",
65
+ "email": "isaacs@npmjs.com"
66
+ }
67
+ ],
68
+ "dist": {
69
+ "shasum": "c9b7d03c03f37bc704be100e522b40db8f6cfcd9",
70
+ "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz"
71
+ },
72
+ "directories": {},
73
+ "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz",
74
+ "readme": "ERROR: No README data found!"
75
+ }
@@ -0,0 +1,32 @@
1
+ var test = require('tape');
2
+ var expand = require('..');
3
+ var fs = require('fs');
4
+ var resfile = __dirname + '/bash-results.txt';
5
+ var cases = fs.readFileSync(resfile, 'utf8').split('><><><><');
6
+
7
+ // throw away the EOF marker
8
+ cases.pop()
9
+
10
+ test('matches bash expansions', function(t) {
11
+ cases.forEach(function(testcase) {
12
+ var set = testcase.split('\n');
13
+ var pattern = set.shift();
14
+ var actual = expand(pattern);
15
+
16
+ // If it expands to the empty string, then it's actually
17
+ // just nothing, but Bash is a singly typed language, so
18
+ // "nothing" is the same as "".
19
+ if (set.length === 1 && set[0] === '') {
20
+ set = []
21
+ } else {
22
+ // otherwise, strip off the [] that were added so that
23
+ // "" expansions would be preserved properly.
24
+ set = set.map(function (s) {
25
+ return s.replace(/^\[|\]$/g, '')
26
+ })
27
+ }
28
+
29
+ t.same(actual, set, pattern);
30
+ });
31
+ t.end();
32
+ })