protobufjs 6.11.2 → 6.11.3

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 (202) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/bin/pbjs +0 -0
  3. package/bin/pbts +0 -0
  4. package/package-lock.json +7870 -0
  5. package/package.json +3 -3
  6. package/scripts/changelog.js +150 -0
  7. package/src/util.js +3 -0
  8. package/cli/node_modules/.package-lock.json +0 -256
  9. package/cli/node_modules/acorn/CHANGELOG.md +0 -620
  10. package/cli/node_modules/acorn/LICENSE +0 -21
  11. package/cli/node_modules/acorn/README.md +0 -269
  12. package/cli/node_modules/acorn/bin/acorn +0 -4
  13. package/cli/node_modules/acorn/dist/acorn.d.ts +0 -209
  14. package/cli/node_modules/acorn/dist/acorn.js +0 -5186
  15. package/cli/node_modules/acorn/dist/acorn.js.map +0 -1
  16. package/cli/node_modules/acorn/dist/acorn.mjs +0 -5155
  17. package/cli/node_modules/acorn/dist/acorn.mjs.d.ts +0 -2
  18. package/cli/node_modules/acorn/dist/acorn.mjs.map +0 -1
  19. package/cli/node_modules/acorn/dist/bin.js +0 -64
  20. package/cli/node_modules/acorn/package.json +0 -35
  21. package/cli/node_modules/acorn-jsx/LICENSE +0 -19
  22. package/cli/node_modules/acorn-jsx/README.md +0 -40
  23. package/cli/node_modules/acorn-jsx/index.js +0 -488
  24. package/cli/node_modules/acorn-jsx/package.json +0 -27
  25. package/cli/node_modules/acorn-jsx/xhtml.js +0 -255
  26. package/cli/node_modules/balanced-match/.npmignore +0 -5
  27. package/cli/node_modules/balanced-match/LICENSE.md +0 -21
  28. package/cli/node_modules/balanced-match/README.md +0 -91
  29. package/cli/node_modules/balanced-match/index.js +0 -59
  30. package/cli/node_modules/balanced-match/package.json +0 -49
  31. package/cli/node_modules/brace-expansion/LICENSE +0 -21
  32. package/cli/node_modules/brace-expansion/README.md +0 -129
  33. package/cli/node_modules/brace-expansion/index.js +0 -201
  34. package/cli/node_modules/brace-expansion/package.json +0 -47
  35. package/cli/node_modules/concat-map/.travis.yml +0 -4
  36. package/cli/node_modules/concat-map/LICENSE +0 -18
  37. package/cli/node_modules/concat-map/README.markdown +0 -62
  38. package/cli/node_modules/concat-map/example/map.js +0 -6
  39. package/cli/node_modules/concat-map/index.js +0 -13
  40. package/cli/node_modules/concat-map/package.json +0 -43
  41. package/cli/node_modules/concat-map/test/map.js +0 -39
  42. package/cli/node_modules/deep-is/.npmignore +0 -1
  43. package/cli/node_modules/deep-is/.travis.yml +0 -6
  44. package/cli/node_modules/deep-is/LICENSE +0 -22
  45. package/cli/node_modules/deep-is/README.markdown +0 -70
  46. package/cli/node_modules/deep-is/example/cmp.js +0 -11
  47. package/cli/node_modules/deep-is/index.js +0 -102
  48. package/cli/node_modules/deep-is/package.json +0 -61
  49. package/cli/node_modules/deep-is/test/NaN.js +0 -16
  50. package/cli/node_modules/deep-is/test/cmp.js +0 -23
  51. package/cli/node_modules/deep-is/test/neg-vs-pos-0.js +0 -15
  52. package/cli/node_modules/escodegen/LICENSE.BSD +0 -21
  53. package/cli/node_modules/escodegen/README.md +0 -84
  54. package/cli/node_modules/escodegen/bin/escodegen.js +0 -77
  55. package/cli/node_modules/escodegen/bin/esgenerate.js +0 -64
  56. package/cli/node_modules/escodegen/escodegen.js +0 -2647
  57. package/cli/node_modules/escodegen/package.json +0 -62
  58. package/cli/node_modules/eslint-visitor-keys/CHANGELOG.md +0 -25
  59. package/cli/node_modules/eslint-visitor-keys/LICENSE +0 -201
  60. package/cli/node_modules/eslint-visitor-keys/README.md +0 -98
  61. package/cli/node_modules/eslint-visitor-keys/lib/index.js +0 -81
  62. package/cli/node_modules/eslint-visitor-keys/lib/visitor-keys.json +0 -284
  63. package/cli/node_modules/eslint-visitor-keys/package.json +0 -40
  64. package/cli/node_modules/espree/CHANGELOG.md +0 -509
  65. package/cli/node_modules/espree/LICENSE +0 -25
  66. package/cli/node_modules/espree/README.md +0 -233
  67. package/cli/node_modules/espree/espree.js +0 -177
  68. package/cli/node_modules/espree/lib/ast-node-types.js +0 -96
  69. package/cli/node_modules/espree/lib/espree.js +0 -286
  70. package/cli/node_modules/espree/lib/features.js +0 -29
  71. package/cli/node_modules/espree/lib/options.js +0 -106
  72. package/cli/node_modules/espree/lib/token-translator.js +0 -263
  73. package/cli/node_modules/espree/lib/visitor-keys.js +0 -123
  74. package/cli/node_modules/espree/package.json +0 -64
  75. package/cli/node_modules/esprima/ChangeLog +0 -235
  76. package/cli/node_modules/esprima/LICENSE.BSD +0 -21
  77. package/cli/node_modules/esprima/README.md +0 -46
  78. package/cli/node_modules/esprima/bin/esparse.js +0 -139
  79. package/cli/node_modules/esprima/bin/esvalidate.js +0 -236
  80. package/cli/node_modules/esprima/dist/esprima.js +0 -6709
  81. package/cli/node_modules/esprima/package.json +0 -112
  82. package/cli/node_modules/estraverse/.jshintrc +0 -16
  83. package/cli/node_modules/estraverse/LICENSE.BSD +0 -19
  84. package/cli/node_modules/estraverse/README.md +0 -153
  85. package/cli/node_modules/estraverse/estraverse.js +0 -801
  86. package/cli/node_modules/estraverse/gulpfile.js +0 -70
  87. package/cli/node_modules/estraverse/package.json +0 -40
  88. package/cli/node_modules/esutils/LICENSE.BSD +0 -19
  89. package/cli/node_modules/esutils/README.md +0 -174
  90. package/cli/node_modules/esutils/lib/ast.js +0 -144
  91. package/cli/node_modules/esutils/lib/code.js +0 -135
  92. package/cli/node_modules/esutils/lib/keyword.js +0 -165
  93. package/cli/node_modules/esutils/lib/utils.js +0 -33
  94. package/cli/node_modules/esutils/package.json +0 -44
  95. package/cli/node_modules/fast-levenshtein/LICENSE.md +0 -25
  96. package/cli/node_modules/fast-levenshtein/README.md +0 -104
  97. package/cli/node_modules/fast-levenshtein/levenshtein.js +0 -136
  98. package/cli/node_modules/fast-levenshtein/package.json +0 -39
  99. package/cli/node_modules/fs.realpath/LICENSE +0 -43
  100. package/cli/node_modules/fs.realpath/README.md +0 -33
  101. package/cli/node_modules/fs.realpath/index.js +0 -66
  102. package/cli/node_modules/fs.realpath/old.js +0 -303
  103. package/cli/node_modules/fs.realpath/package.json +0 -26
  104. package/cli/node_modules/glob/LICENSE +0 -21
  105. package/cli/node_modules/glob/README.md +0 -375
  106. package/cli/node_modules/glob/changelog.md +0 -67
  107. package/cli/node_modules/glob/common.js +0 -240
  108. package/cli/node_modules/glob/glob.js +0 -790
  109. package/cli/node_modules/glob/package.json +0 -46
  110. package/cli/node_modules/glob/sync.js +0 -486
  111. package/cli/node_modules/inflight/LICENSE +0 -15
  112. package/cli/node_modules/inflight/README.md +0 -37
  113. package/cli/node_modules/inflight/inflight.js +0 -54
  114. package/cli/node_modules/inflight/package.json +0 -29
  115. package/cli/node_modules/inherits/LICENSE +0 -16
  116. package/cli/node_modules/inherits/README.md +0 -42
  117. package/cli/node_modules/inherits/inherits.js +0 -9
  118. package/cli/node_modules/inherits/inherits_browser.js +0 -27
  119. package/cli/node_modules/inherits/package.json +0 -29
  120. package/cli/node_modules/levn/LICENSE +0 -22
  121. package/cli/node_modules/levn/README.md +0 -196
  122. package/cli/node_modules/levn/lib/cast.js +0 -298
  123. package/cli/node_modules/levn/lib/coerce.js +0 -285
  124. package/cli/node_modules/levn/lib/index.js +0 -22
  125. package/cli/node_modules/levn/lib/parse-string.js +0 -113
  126. package/cli/node_modules/levn/lib/parse.js +0 -102
  127. package/cli/node_modules/levn/package.json +0 -47
  128. package/cli/node_modules/minimatch/LICENSE +0 -15
  129. package/cli/node_modules/minimatch/README.md +0 -209
  130. package/cli/node_modules/minimatch/minimatch.js +0 -923
  131. package/cli/node_modules/minimatch/package.json +0 -30
  132. package/cli/node_modules/once/LICENSE +0 -15
  133. package/cli/node_modules/once/README.md +0 -79
  134. package/cli/node_modules/once/once.js +0 -42
  135. package/cli/node_modules/once/package.json +0 -33
  136. package/cli/node_modules/optionator/CHANGELOG.md +0 -56
  137. package/cli/node_modules/optionator/LICENSE +0 -22
  138. package/cli/node_modules/optionator/README.md +0 -238
  139. package/cli/node_modules/optionator/lib/help.js +0 -260
  140. package/cli/node_modules/optionator/lib/index.js +0 -465
  141. package/cli/node_modules/optionator/lib/util.js +0 -54
  142. package/cli/node_modules/optionator/package.json +0 -44
  143. package/cli/node_modules/path-is-absolute/index.js +0 -20
  144. package/cli/node_modules/path-is-absolute/license +0 -21
  145. package/cli/node_modules/path-is-absolute/package.json +0 -43
  146. package/cli/node_modules/path-is-absolute/readme.md +0 -59
  147. package/cli/node_modules/prelude-ls/CHANGELOG.md +0 -99
  148. package/cli/node_modules/prelude-ls/LICENSE +0 -22
  149. package/cli/node_modules/prelude-ls/README.md +0 -15
  150. package/cli/node_modules/prelude-ls/lib/Func.js +0 -65
  151. package/cli/node_modules/prelude-ls/lib/List.js +0 -686
  152. package/cli/node_modules/prelude-ls/lib/Num.js +0 -130
  153. package/cli/node_modules/prelude-ls/lib/Obj.js +0 -154
  154. package/cli/node_modules/prelude-ls/lib/Str.js +0 -92
  155. package/cli/node_modules/prelude-ls/lib/index.js +0 -178
  156. package/cli/node_modules/prelude-ls/package.json +0 -52
  157. package/cli/node_modules/rimraf/CHANGELOG.md +0 -65
  158. package/cli/node_modules/rimraf/LICENSE +0 -15
  159. package/cli/node_modules/rimraf/README.md +0 -101
  160. package/cli/node_modules/rimraf/bin.js +0 -68
  161. package/cli/node_modules/rimraf/package.json +0 -32
  162. package/cli/node_modules/rimraf/rimraf.js +0 -360
  163. package/cli/node_modules/source-map/CHANGELOG.md +0 -301
  164. package/cli/node_modules/source-map/LICENSE +0 -28
  165. package/cli/node_modules/source-map/README.md +0 -742
  166. package/cli/node_modules/source-map/dist/source-map.debug.js +0 -3234
  167. package/cli/node_modules/source-map/dist/source-map.js +0 -3233
  168. package/cli/node_modules/source-map/dist/source-map.min.js +0 -2
  169. package/cli/node_modules/source-map/dist/source-map.min.js.map +0 -1
  170. package/cli/node_modules/source-map/lib/array-set.js +0 -121
  171. package/cli/node_modules/source-map/lib/base64-vlq.js +0 -140
  172. package/cli/node_modules/source-map/lib/base64.js +0 -67
  173. package/cli/node_modules/source-map/lib/binary-search.js +0 -111
  174. package/cli/node_modules/source-map/lib/mapping-list.js +0 -79
  175. package/cli/node_modules/source-map/lib/quick-sort.js +0 -114
  176. package/cli/node_modules/source-map/lib/source-map-consumer.js +0 -1145
  177. package/cli/node_modules/source-map/lib/source-map-generator.js +0 -425
  178. package/cli/node_modules/source-map/lib/source-node.js +0 -413
  179. package/cli/node_modules/source-map/lib/util.js +0 -488
  180. package/cli/node_modules/source-map/package.json +0 -73
  181. package/cli/node_modules/source-map/source-map.d.ts +0 -98
  182. package/cli/node_modules/source-map/source-map.js +0 -8
  183. package/cli/node_modules/tmp/CHANGELOG.md +0 -288
  184. package/cli/node_modules/tmp/LICENSE +0 -21
  185. package/cli/node_modules/tmp/README.md +0 -365
  186. package/cli/node_modules/tmp/lib/tmp.js +0 -780
  187. package/cli/node_modules/tmp/package.json +0 -58
  188. package/cli/node_modules/type-check/LICENSE +0 -22
  189. package/cli/node_modules/type-check/README.md +0 -210
  190. package/cli/node_modules/type-check/lib/check.js +0 -126
  191. package/cli/node_modules/type-check/lib/index.js +0 -16
  192. package/cli/node_modules/type-check/lib/parse-type.js +0 -196
  193. package/cli/node_modules/type-check/package.json +0 -40
  194. package/cli/node_modules/word-wrap/LICENSE +0 -21
  195. package/cli/node_modules/word-wrap/README.md +0 -182
  196. package/cli/node_modules/word-wrap/index.d.ts +0 -50
  197. package/cli/node_modules/word-wrap/index.js +0 -46
  198. package/cli/node_modules/word-wrap/package.json +0 -77
  199. package/cli/node_modules/wrappy/LICENSE +0 -15
  200. package/cli/node_modules/wrappy/README.md +0 -36
  201. package/cli/node_modules/wrappy/package.json +0 -29
  202. package/cli/node_modules/wrappy/wrappy.js +0 -33
@@ -1,255 +0,0 @@
1
- module.exports = {
2
- quot: '\u0022',
3
- amp: '&',
4
- apos: '\u0027',
5
- lt: '<',
6
- gt: '>',
7
- nbsp: '\u00A0',
8
- iexcl: '\u00A1',
9
- cent: '\u00A2',
10
- pound: '\u00A3',
11
- curren: '\u00A4',
12
- yen: '\u00A5',
13
- brvbar: '\u00A6',
14
- sect: '\u00A7',
15
- uml: '\u00A8',
16
- copy: '\u00A9',
17
- ordf: '\u00AA',
18
- laquo: '\u00AB',
19
- not: '\u00AC',
20
- shy: '\u00AD',
21
- reg: '\u00AE',
22
- macr: '\u00AF',
23
- deg: '\u00B0',
24
- plusmn: '\u00B1',
25
- sup2: '\u00B2',
26
- sup3: '\u00B3',
27
- acute: '\u00B4',
28
- micro: '\u00B5',
29
- para: '\u00B6',
30
- middot: '\u00B7',
31
- cedil: '\u00B8',
32
- sup1: '\u00B9',
33
- ordm: '\u00BA',
34
- raquo: '\u00BB',
35
- frac14: '\u00BC',
36
- frac12: '\u00BD',
37
- frac34: '\u00BE',
38
- iquest: '\u00BF',
39
- Agrave: '\u00C0',
40
- Aacute: '\u00C1',
41
- Acirc: '\u00C2',
42
- Atilde: '\u00C3',
43
- Auml: '\u00C4',
44
- Aring: '\u00C5',
45
- AElig: '\u00C6',
46
- Ccedil: '\u00C7',
47
- Egrave: '\u00C8',
48
- Eacute: '\u00C9',
49
- Ecirc: '\u00CA',
50
- Euml: '\u00CB',
51
- Igrave: '\u00CC',
52
- Iacute: '\u00CD',
53
- Icirc: '\u00CE',
54
- Iuml: '\u00CF',
55
- ETH: '\u00D0',
56
- Ntilde: '\u00D1',
57
- Ograve: '\u00D2',
58
- Oacute: '\u00D3',
59
- Ocirc: '\u00D4',
60
- Otilde: '\u00D5',
61
- Ouml: '\u00D6',
62
- times: '\u00D7',
63
- Oslash: '\u00D8',
64
- Ugrave: '\u00D9',
65
- Uacute: '\u00DA',
66
- Ucirc: '\u00DB',
67
- Uuml: '\u00DC',
68
- Yacute: '\u00DD',
69
- THORN: '\u00DE',
70
- szlig: '\u00DF',
71
- agrave: '\u00E0',
72
- aacute: '\u00E1',
73
- acirc: '\u00E2',
74
- atilde: '\u00E3',
75
- auml: '\u00E4',
76
- aring: '\u00E5',
77
- aelig: '\u00E6',
78
- ccedil: '\u00E7',
79
- egrave: '\u00E8',
80
- eacute: '\u00E9',
81
- ecirc: '\u00EA',
82
- euml: '\u00EB',
83
- igrave: '\u00EC',
84
- iacute: '\u00ED',
85
- icirc: '\u00EE',
86
- iuml: '\u00EF',
87
- eth: '\u00F0',
88
- ntilde: '\u00F1',
89
- ograve: '\u00F2',
90
- oacute: '\u00F3',
91
- ocirc: '\u00F4',
92
- otilde: '\u00F5',
93
- ouml: '\u00F6',
94
- divide: '\u00F7',
95
- oslash: '\u00F8',
96
- ugrave: '\u00F9',
97
- uacute: '\u00FA',
98
- ucirc: '\u00FB',
99
- uuml: '\u00FC',
100
- yacute: '\u00FD',
101
- thorn: '\u00FE',
102
- yuml: '\u00FF',
103
- OElig: '\u0152',
104
- oelig: '\u0153',
105
- Scaron: '\u0160',
106
- scaron: '\u0161',
107
- Yuml: '\u0178',
108
- fnof: '\u0192',
109
- circ: '\u02C6',
110
- tilde: '\u02DC',
111
- Alpha: '\u0391',
112
- Beta: '\u0392',
113
- Gamma: '\u0393',
114
- Delta: '\u0394',
115
- Epsilon: '\u0395',
116
- Zeta: '\u0396',
117
- Eta: '\u0397',
118
- Theta: '\u0398',
119
- Iota: '\u0399',
120
- Kappa: '\u039A',
121
- Lambda: '\u039B',
122
- Mu: '\u039C',
123
- Nu: '\u039D',
124
- Xi: '\u039E',
125
- Omicron: '\u039F',
126
- Pi: '\u03A0',
127
- Rho: '\u03A1',
128
- Sigma: '\u03A3',
129
- Tau: '\u03A4',
130
- Upsilon: '\u03A5',
131
- Phi: '\u03A6',
132
- Chi: '\u03A7',
133
- Psi: '\u03A8',
134
- Omega: '\u03A9',
135
- alpha: '\u03B1',
136
- beta: '\u03B2',
137
- gamma: '\u03B3',
138
- delta: '\u03B4',
139
- epsilon: '\u03B5',
140
- zeta: '\u03B6',
141
- eta: '\u03B7',
142
- theta: '\u03B8',
143
- iota: '\u03B9',
144
- kappa: '\u03BA',
145
- lambda: '\u03BB',
146
- mu: '\u03BC',
147
- nu: '\u03BD',
148
- xi: '\u03BE',
149
- omicron: '\u03BF',
150
- pi: '\u03C0',
151
- rho: '\u03C1',
152
- sigmaf: '\u03C2',
153
- sigma: '\u03C3',
154
- tau: '\u03C4',
155
- upsilon: '\u03C5',
156
- phi: '\u03C6',
157
- chi: '\u03C7',
158
- psi: '\u03C8',
159
- omega: '\u03C9',
160
- thetasym: '\u03D1',
161
- upsih: '\u03D2',
162
- piv: '\u03D6',
163
- ensp: '\u2002',
164
- emsp: '\u2003',
165
- thinsp: '\u2009',
166
- zwnj: '\u200C',
167
- zwj: '\u200D',
168
- lrm: '\u200E',
169
- rlm: '\u200F',
170
- ndash: '\u2013',
171
- mdash: '\u2014',
172
- lsquo: '\u2018',
173
- rsquo: '\u2019',
174
- sbquo: '\u201A',
175
- ldquo: '\u201C',
176
- rdquo: '\u201D',
177
- bdquo: '\u201E',
178
- dagger: '\u2020',
179
- Dagger: '\u2021',
180
- bull: '\u2022',
181
- hellip: '\u2026',
182
- permil: '\u2030',
183
- prime: '\u2032',
184
- Prime: '\u2033',
185
- lsaquo: '\u2039',
186
- rsaquo: '\u203A',
187
- oline: '\u203E',
188
- frasl: '\u2044',
189
- euro: '\u20AC',
190
- image: '\u2111',
191
- weierp: '\u2118',
192
- real: '\u211C',
193
- trade: '\u2122',
194
- alefsym: '\u2135',
195
- larr: '\u2190',
196
- uarr: '\u2191',
197
- rarr: '\u2192',
198
- darr: '\u2193',
199
- harr: '\u2194',
200
- crarr: '\u21B5',
201
- lArr: '\u21D0',
202
- uArr: '\u21D1',
203
- rArr: '\u21D2',
204
- dArr: '\u21D3',
205
- hArr: '\u21D4',
206
- forall: '\u2200',
207
- part: '\u2202',
208
- exist: '\u2203',
209
- empty: '\u2205',
210
- nabla: '\u2207',
211
- isin: '\u2208',
212
- notin: '\u2209',
213
- ni: '\u220B',
214
- prod: '\u220F',
215
- sum: '\u2211',
216
- minus: '\u2212',
217
- lowast: '\u2217',
218
- radic: '\u221A',
219
- prop: '\u221D',
220
- infin: '\u221E',
221
- ang: '\u2220',
222
- and: '\u2227',
223
- or: '\u2228',
224
- cap: '\u2229',
225
- cup: '\u222A',
226
- 'int': '\u222B',
227
- there4: '\u2234',
228
- sim: '\u223C',
229
- cong: '\u2245',
230
- asymp: '\u2248',
231
- ne: '\u2260',
232
- equiv: '\u2261',
233
- le: '\u2264',
234
- ge: '\u2265',
235
- sub: '\u2282',
236
- sup: '\u2283',
237
- nsub: '\u2284',
238
- sube: '\u2286',
239
- supe: '\u2287',
240
- oplus: '\u2295',
241
- otimes: '\u2297',
242
- perp: '\u22A5',
243
- sdot: '\u22C5',
244
- lceil: '\u2308',
245
- rceil: '\u2309',
246
- lfloor: '\u230A',
247
- rfloor: '\u230B',
248
- lang: '\u2329',
249
- rang: '\u232A',
250
- loz: '\u25CA',
251
- spades: '\u2660',
252
- clubs: '\u2663',
253
- hearts: '\u2665',
254
- diams: '\u2666'
255
- };
@@ -1,5 +0,0 @@
1
- test
2
- .gitignore
3
- .travis.yml
4
- Makefile
5
- example.js
@@ -1,21 +0,0 @@
1
- (MIT)
2
-
3
- Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
- of the Software, and to permit persons to whom the Software is furnished to do
10
- so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,91 +0,0 @@
1
- # balanced-match
2
-
3
- Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
4
-
5
- [![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
6
- [![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
7
-
8
- [![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
9
-
10
- ## Example
11
-
12
- Get the first matching pair of braces:
13
-
14
- ```js
15
- var balanced = require('balanced-match');
16
-
17
- console.log(balanced('{', '}', 'pre{in{nested}}post'));
18
- console.log(balanced('{', '}', 'pre{first}between{second}post'));
19
- console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
20
- ```
21
-
22
- The matches are:
23
-
24
- ```bash
25
- $ node example.js
26
- { start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
27
- { start: 3,
28
- end: 9,
29
- pre: 'pre',
30
- body: 'first',
31
- post: 'between{second}post' }
32
- { start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
33
- ```
34
-
35
- ## API
36
-
37
- ### var m = balanced(a, b, str)
38
-
39
- For the first non-nested matching pair of `a` and `b` in `str`, return an
40
- object with those keys:
41
-
42
- * **start** the index of the first match of `a`
43
- * **end** the index of the matching `b`
44
- * **pre** the preamble, `a` and `b` not included
45
- * **body** the match, `a` and `b` not included
46
- * **post** the postscript, `a` and `b` not included
47
-
48
- If there's no match, `undefined` will be returned.
49
-
50
- If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
51
-
52
- ### var r = balanced.range(a, b, str)
53
-
54
- For the first non-nested matching pair of `a` and `b` in `str`, return an
55
- array with indexes: `[ <a index>, <b index> ]`.
56
-
57
- If there's no match, `undefined` will be returned.
58
-
59
- If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
60
-
61
- ## Installation
62
-
63
- With [npm](https://npmjs.org) do:
64
-
65
- ```bash
66
- npm install balanced-match
67
- ```
68
-
69
- ## License
70
-
71
- (MIT)
72
-
73
- Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
74
-
75
- Permission is hereby granted, free of charge, to any person obtaining a copy of
76
- this software and associated documentation files (the "Software"), to deal in
77
- the Software without restriction, including without limitation the rights to
78
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
79
- of the Software, and to permit persons to whom the Software is furnished to do
80
- so, subject to the following conditions:
81
-
82
- The above copyright notice and this permission notice shall be included in all
83
- copies or substantial portions of the Software.
84
-
85
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
86
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
87
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
88
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
89
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
90
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
91
- SOFTWARE.
@@ -1,59 +0,0 @@
1
- 'use strict';
2
- module.exports = balanced;
3
- function balanced(a, b, str) {
4
- if (a instanceof RegExp) a = maybeMatch(a, str);
5
- if (b instanceof RegExp) b = maybeMatch(b, str);
6
-
7
- var r = range(a, b, str);
8
-
9
- return r && {
10
- start: r[0],
11
- end: r[1],
12
- pre: str.slice(0, r[0]),
13
- body: str.slice(r[0] + a.length, r[1]),
14
- post: str.slice(r[1] + b.length)
15
- };
16
- }
17
-
18
- function maybeMatch(reg, str) {
19
- var m = str.match(reg);
20
- return m ? m[0] : null;
21
- }
22
-
23
- balanced.range = range;
24
- function range(a, b, str) {
25
- var begs, beg, left, right, result;
26
- var ai = str.indexOf(a);
27
- var bi = str.indexOf(b, ai + 1);
28
- var i = ai;
29
-
30
- if (ai >= 0 && bi > 0) {
31
- begs = [];
32
- left = str.length;
33
-
34
- while (i >= 0 && !result) {
35
- if (i == ai) {
36
- begs.push(i);
37
- ai = str.indexOf(a, i + 1);
38
- } else if (begs.length == 1) {
39
- result = [ begs.pop(), bi ];
40
- } else {
41
- beg = begs.pop();
42
- if (beg < left) {
43
- left = beg;
44
- right = bi;
45
- }
46
-
47
- bi = str.indexOf(b, i + 1);
48
- }
49
-
50
- i = ai < bi && ai >= 0 ? ai : bi;
51
- }
52
-
53
- if (begs.length) {
54
- result = [ left, right ];
55
- }
56
- }
57
-
58
- return result;
59
- }
@@ -1,49 +0,0 @@
1
- {
2
- "name": "balanced-match",
3
- "description": "Match balanced character pairs, like \"{\" and \"}\"",
4
- "version": "1.0.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
- "bench": "make bench"
14
- },
15
- "dependencies": {},
16
- "devDependencies": {
17
- "matcha": "^0.7.0",
18
- "tape": "^4.6.0"
19
- },
20
- "keywords": [
21
- "match",
22
- "regexp",
23
- "test",
24
- "balanced",
25
- "parse"
26
- ],
27
- "author": {
28
- "name": "Julian Gruber",
29
- "email": "mail@juliangruber.com",
30
- "url": "http://juliangruber.com"
31
- },
32
- "license": "MIT",
33
- "testling": {
34
- "files": "test/*.js",
35
- "browsers": [
36
- "ie/8..latest",
37
- "firefox/20..latest",
38
- "firefox/nightly",
39
- "chrome/25..latest",
40
- "chrome/canary",
41
- "opera/12..latest",
42
- "opera/next",
43
- "safari/5.1..latest",
44
- "ipad/6.0..latest",
45
- "iphone/6.0..latest",
46
- "android-browser/4.2..latest"
47
- ]
48
- }
49
- }
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,129 +0,0 @@
1
- # brace-expansion
2
-
3
- [Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
4
- as known from sh/bash, in JavaScript.
5
-
6
- [![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
7
- [![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
8
- [![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
9
-
10
- [![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
11
-
12
- ## Example
13
-
14
- ```js
15
- var expand = require('brace-expansion');
16
-
17
- expand('file-{a,b,c}.jpg')
18
- // => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
19
-
20
- expand('-v{,,}')
21
- // => ['-v', '-v', '-v']
22
-
23
- expand('file{0..2}.jpg')
24
- // => ['file0.jpg', 'file1.jpg', 'file2.jpg']
25
-
26
- expand('file-{a..c}.jpg')
27
- // => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
28
-
29
- expand('file{2..0}.jpg')
30
- // => ['file2.jpg', 'file1.jpg', 'file0.jpg']
31
-
32
- expand('file{0..4..2}.jpg')
33
- // => ['file0.jpg', 'file2.jpg', 'file4.jpg']
34
-
35
- expand('file-{a..e..2}.jpg')
36
- // => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
37
-
38
- expand('file{00..10..5}.jpg')
39
- // => ['file00.jpg', 'file05.jpg', 'file10.jpg']
40
-
41
- expand('{{A..C},{a..c}}')
42
- // => ['A', 'B', 'C', 'a', 'b', 'c']
43
-
44
- expand('ppp{,config,oe{,conf}}')
45
- // => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
46
- ```
47
-
48
- ## API
49
-
50
- ```js
51
- var expand = require('brace-expansion');
52
- ```
53
-
54
- ### var expanded = expand(str)
55
-
56
- Return an array of all possible and valid expansions of `str`. If none are
57
- found, `[str]` is returned.
58
-
59
- Valid expansions are:
60
-
61
- ```js
62
- /^(.*,)+(.+)?$/
63
- // {a,b,...}
64
- ```
65
-
66
- A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
67
-
68
- ```js
69
- /^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
70
- // {x..y[..incr]}
71
- ```
72
-
73
- A numeric sequence from `x` to `y` inclusive, with optional increment.
74
- If `x` or `y` start with a leading `0`, all the numbers will be padded
75
- to have equal length. Negative numbers and backwards iteration work too.
76
-
77
- ```js
78
- /^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
79
- // {x..y[..incr]}
80
- ```
81
-
82
- An alphabetic sequence from `x` to `y` inclusive, with optional increment.
83
- `x` and `y` must be exactly one character, and if given, `incr` must be a
84
- number.
85
-
86
- For compatibility reasons, the string `${` is not eligible for brace expansion.
87
-
88
- ## Installation
89
-
90
- With [npm](https://npmjs.org) do:
91
-
92
- ```bash
93
- npm install brace-expansion
94
- ```
95
-
96
- ## Contributors
97
-
98
- - [Julian Gruber](https://github.com/juliangruber)
99
- - [Isaac Z. Schlueter](https://github.com/isaacs)
100
-
101
- ## Sponsors
102
-
103
- This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
104
-
105
- Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
106
-
107
- ## License
108
-
109
- (MIT)
110
-
111
- Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
112
-
113
- Permission is hereby granted, free of charge, to any person obtaining a copy of
114
- this software and associated documentation files (the "Software"), to deal in
115
- the Software without restriction, including without limitation the rights to
116
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
117
- of the Software, and to permit persons to whom the Software is furnished to do
118
- so, subject to the following conditions:
119
-
120
- The above copyright notice and this permission notice shall be included in all
121
- copies or substantial portions of the Software.
122
-
123
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
124
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
125
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
126
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
127
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
128
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
129
- SOFTWARE.