-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwhatsupdoc.json
More file actions
419 lines (419 loc) · 15.8 KB
/
whatsupdoc.json
File metadata and controls
419 lines (419 loc) · 15.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
{
"name": ".",
"lineNo": 3,
"params": [],
"errors": [
"Did not recognize \"license\" tag."
],
"throws": [],
"see": [],
"author": {
"name": "Kris Kowal",
"url": "http://askawizard.blogspot.com",
"email": "kris@cixar.com"
},
"module": true,
"doc": "An API for parsing inline JavaScript documentation.",
"type": "module",
"id": ".",
"children": [
{
"name": "parseModule",
"lineNo": 17,
"params": [
{
"name": "text",
"type": "String",
"doc": "the text of a JavaScript program"
},
{
"name": "id",
"type": "String",
"doc": "optional module identifier"
}
],
"errors": [],
"throws": [],
"see": [],
"returns": {
"type": "{name, doc, children}",
"doc": "a tree of code point documentation descriptors of the form `{name, type, params, returns, throws, doc, errors, children, fileName, lineNo}`"
},
"doc": "Creates a documentation tree for a module."
},
{
"name": "comments",
"lineNo": 37,
"params": [
{
"name": "text",
"type": "String",
"doc": "the text of a JavaScript program."
},
{
"name": "fileName",
"type": "String",
"doc": "optional"
},
{
"name": "lineNo",
"type": "Number",
"doc": "line number starting with 1, optional"
}
],
"errors": [],
"throws": [],
"see": [],
"returns": {
"type": "Array * {comment, code, prefix, fileName, lineNo}",
"doc": ""
},
"doc": "takes the text of a JavaScript file and returns an array\nof each of the block comments, the prefix on the initial\nline (for measuring indentation), and the subsequent code\nup to the next comment.\n\nIt's a good idea to expand the tabs in the program text\nbefore running them through this function. The `util`\nmodule in the `narwhal-lib` package provides an `expand`\nfunction that serves this purpose."
},
{
"name": "docs",
"lineNo": 127,
"params": [
{
"name": "nodes",
"type": "Array * {comment, prefix, code, fileName, lineNo}",
"doc": "nodes in the format produced by `comments`"
}
],
"errors": [],
"throws": [],
"see": [],
"returns": {
"type": "Array * {doc, code, name, level, fileName, lineNo}",
"doc": "nodes"
},
"doc": "Extracts documentation nodes from comment nodes.\n\nTakes the output of the `comments` method and returns an\narray of objects with `doc`, `code`, and `level`\nproperties, consumable by `parseDocs`.\n\n* `doc` is a string containing each line of\n the original `comment` with the leading cruft on each\n line trimmed off.\n* `code` is the subsequent code up\n to the next comment.\n* `level` is the number of extra stars on the beginning\n of the comment. These can be used to provide an\n indication of hierarchical depth."
},
{
"name": "guessMarkup",
"lineNo": 191,
"params": [],
"errors": [],
"throws": [],
"see": [],
"doc": "Scans an array of comment descriptors as provided by the\n`comments` method and returns a markup language module\nname. The default is `undefined`."
},
{
"name": "parseDocs",
"lineNo": 206,
"params": [
{
"name": "nodes",
"type": "Array * {level, doc, code, fileName, lineNo}"
},
{
"name": "markup",
"type": "String",
"doc": "the name of a markup module, a module that exports a `to` method for whatever format the documentation must be rendered in, for example `toHtml`. The `to` method may accept a second argument, a function for resolving custom references if they are supported by the language."
}
],
"errors": [],
"throws": [],
"see": [],
"returns": {
"type": "Array",
"doc": "with `name`, `level`, `markup`, and the properties added by {@link parseDoc}."
},
"doc": "Takes an array of nodes produced by `docs` and returns an\narray of nodes consumable by `tree`. Uses `parseDoc` to\nextract `@` meta-data like `param` and `returns`. Uses\n`guessName` to guess the name of the object. `@name`\noverrides the guess."
},
{
"name": "tree",
"lineNo": 243,
"params": [
{
"name": "nodes",
"type": "Array * {level, ...}"
},
{
"name": "id",
"type": "String",
"doc": "optional module identifier"
}
],
"errors": [],
"throws": [],
"see": [],
"returns": {
"type": "{\"type\": \"module\", \"id\": id, \"children\": Array * ...}",
"doc": ""
},
"doc": "takes a linear list of documentation nodes from a single\nmodule, such as those returned by `parseDocs`, and\nreturns the root of a tree of nodes, where the `level`\nnumbers are translated into `children` arrays."
},
{
"name": "guessName",
"lineNo": 288,
"params": [
{
"name": "code",
"type": "String",
"doc": "a block of code to search for an applicable name."
}
],
"errors": [],
"throws": [],
"see": [],
"returns": {
"type": "String | Undefined",
"doc": "a name or undefined if no name can be found."
},
"doc": ""
},
{
"name": "parseDoc",
"lineNo": 301,
"params": [
{
"name": "text",
"type": "String",
"doc": "a documentation string"
},
{
"name": "node",
"type": "Object",
"doc": "a documentation node, as provided by `parseDocs`"
},
{
"name": "tagParsers",
"type": "Object * [name String, handler Function(text, node)]",
"doc": "an optional mapping of `@` tag names to corresponding handlers. Defaults to `tagParsers` as exported by the same module."
}
],
"errors": [],
"throws": [],
"see": [],
"returns": {
"doc": "node"
},
"doc": "Accepts a documentation string and a documentation node,\nstrips out and applies the `@` metadata blocks to the\ndocumentation node."
},
{
"name": "tagParsers",
"lineNo": 352,
"params": [],
"errors": [],
"throws": [],
"see": [],
"doc": "an `Object` mapping tag names to parser functions, in the\nform accepted by the `tagParsers` argument of `parseDoc`.\nThe parser functions accept the tag text and the node\nthey are augmenting, in the form of one of the objects\nreturned by `parseDoc`.",
"children": [
{
"name": "param",
"lineNo": 361,
"params": [
{
"name": "text",
"type": "String"
},
{
"name": "node",
"type": "{errors Array}"
}
],
"errors": [],
"throws": [],
"see": [],
"doc": "parses an `@param` tag, pushing an `Object` of the\nform `{name, type, description}` onto the `params`\n`Array` of the given `node`."
},
{
"name": "params",
"lineNo": 389,
"params": [
{
"name": "text",
"type": "String"
},
{
"name": "node",
"type": "{errors Array}"
}
],
"errors": [],
"throws": [],
"see": [],
"doc": "parses an `@params` tag for variadic parameters, pushing an\n`Object` of the form `{name, type, description, variadic: true}`\nonto the `params` `Array` of the given `node`."
},
{
"name": "returns",
"lineNo": 417,
"params": [
{
"name": "text",
"type": "String"
},
{
"name": "node",
"type": "{errors Array}"
}
],
"errors": [],
"throws": [],
"see": [],
"doc": "parses an `@returns` tag, setting the `returns`\nproperty of the given `node` to an `Object` of the form,\n`{name, type, description}`."
},
{
"name": "return",
"lineNo": 438,
"params": [
{
"name": "text",
"type": "String"
},
{
"name": "node",
"type": "{errors Array}"
}
],
"errors": [
"Did not recognize \"see\" tag."
],
"throws": [],
"see": [],
"doc": ""
},
{
"name": "name",
"lineNo": 446,
"params": [
{
"name": "text",
"type": "String"
},
{
"name": "node",
"type": "{errors Array}"
}
],
"errors": [],
"throws": [],
"see": [],
"doc": "Specifies or overrides the documentation parser's guess\nfor the name of the object being documented."
},
{
"name": "author",
"lineNo": 457,
"params": [
{
"name": "text",
"type": "String"
},
{
"name": "node",
"type": "{errors Array}"
}
],
"errors": [],
"throws": [],
"see": [],
"doc": "Notes the author. Uses the `Author` type from the\n`packages` module of the `narwhal-lib` package to\nnormalize a string representation of an author of the\nform:\n\n Author Name (http://example.com) <author@example.com>\n\nWhere each component is optional and gets composed into\nan `Object` with `name`, `url` and `email` properties."
},
{
"name": "contributor",
"lineNo": 475,
"params": [
{
"name": "text",
"type": "String"
},
{
"name": "node",
"type": "{errors Array}"
}
],
"errors": [
"Did not recognize \"see\" tag."
],
"throws": [],
"see": [],
"doc": "Notes a contributor. More than one can be credited."
},
{
"name": "constructor",
"lineNo": 487,
"params": [
{
"name": "text",
"type": "String"
},
{
"name": "node",
"type": "{errors Array}"
}
],
"errors": [],
"throws": [],
"see": [],
"doc": "Tags a node as a constructor function."
},
{
"name": "deprecated",
"lineNo": 499,
"params": [
{
"name": "text",
"type": "String"
},
{
"name": "node",
"type": "{errors Array}"
}
],
"errors": [],
"throws": [],
"see": [],
"doc": "Tags a documentation node as deprecated."
},
{
"name": "module",
"lineNo": 511,
"params": [
{
"name": "text",
"type": "String"
},
{
"name": "node",
"type": "{errors Array}"
}
],
"errors": [],
"throws": [],
"see": [],
"doc": ""
},
{
"name": "fileoverview",
"lineNo": 521,
"params": [
{
"name": "text",
"type": "String"
},
{
"name": "node",
"type": "{errors Array}"
}
],
"errors": [
"Did not recognize \"see\" tag."
],
"throws": [],
"see": [],
"doc": ""
},
{
"name": "type",
"lineNo": 528,
"params": [],
"errors": [],
"throws": [],
"see": [],
"doc": ""
}
]
}
]
}