You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .verb.md
+33-86Lines changed: 33 additions & 86 deletions
Original file line number
Diff line number
Diff line change
@@ -11,22 +11,19 @@ Parses a comment like this:
11
11
12
12
```js
13
13
/**
14
-
* Register a handler function to be called on a node of the given `type`.
15
-
* Override a built-in handler `type`, or register a new type.
14
+
* Create an instance of `CustomClass` with the given `options`.
16
15
*
17
-
* ```js
18
-
* comments.set('param', function(node) {
19
-
* // do stuff to node
20
-
* });
21
-
* ```
22
-
* @param{String} `type` The `node.type` to call the handler on. You can override built-in middleware by registering a handler of the same name, or register a handler for rendering a new type.
23
-
* @param{Function} `fn` The handler function
24
-
* @return{Object} Returns the instance for chaining.
16
+
* @param{String}options
25
17
* @apipublic
26
18
*/
27
19
28
-
set(type, fn) {
29
-
// do stuff
20
+
classCustomClass {
21
+
constructor(options) {
22
+
this.options= options;
23
+
}
24
+
set(type, fn) {
25
+
// do stuff
26
+
}
30
27
}
31
28
```
32
29
@@ -36,90 +33,40 @@ Into an array of comment objects, like this:
36
33
[
37
34
{
38
35
type:'BlockComment',
39
-
val:
40
-
'\nRegister a handler function to be called on a node of the given `type`.\nOverride a built-in handler `type`, or register a new type.\n\n```js\ncomments.set("param", function(node) {\n // do stuff to node\n});\n```\n@param {String} `type` The `node.type` to call the handler on. You can override built-in middleware by registering a handler of the same name, or register a handler for rendering a new type.\n@param {Function} `fn` The handler function\n@return {Object} Returns the instance for chaining.\n@api public',
41
-
range: [0, 549],
42
-
loc: {
43
-
start: {
44
-
line:1,
45
-
column:0
46
-
},
47
-
end: {
48
-
line:14,
49
-
column:3
50
-
}
51
-
},
52
-
codeStart:551,
36
+
value:'\nCreate an instance of `CustomClass` with the given `options`.\n\n@param {String} options\n@api public',
'*\n * Register a handler function to be called on a node of the given `type`.\n * Override a built-in handler `type`, or register a new type.\n *\n * ```js\n * comments.set("param", function(node) {\n * // do stuff to node\n * });\n * ```\n * @param {String} `type` The `node.type` to call the handler on. You can override built-in middleware by registering a handler of the same name, or register a handler for rendering a new type.\n * @param {Function} `fn` The handler function\n * @return {Object} Returns the instance for chaining.\n * @api public\n',
41
+
'*\n * Create an instance of `CustomClass` with the given `options`.\n *\n * @param {String} options\n * @api public\n',
'Register a handler function to be called on a node of the given `type`.\nOverride a built-in handler `type`, or register a new type.',
54
+
description:'Create an instance of `CustomClass` with the given `options`.',
78
55
footer:'',
79
-
examples: [
80
-
{
81
-
type:'gfm',
82
-
raw:'```js\ncomments.set("param", function(node) {\n // do stuff to node\n});\n```',
83
-
description:'',
84
-
language:'js',
85
-
val:'\ncomments.set("param", function(node) {\n // do stuff to node\n});\n'
86
-
}
87
-
],
56
+
examples: [],
88
57
tags: [
89
58
{
90
59
title:'param',
91
-
name:'type',
92
-
description:
93
-
'The `node.type` to call the handler on. You can override built-in middleware by registering a handler of the same name, or register a handler for rendering a new type.',
0 commit comments