Skip to content

Commit dcef07e

Browse files
Dermot SmythDermot Smyth
authored andcommitted
updated example
1 parent 625b901 commit dcef07e

File tree

1 file changed

+19
-8
lines changed
  • examples/jsdoc-project/src/main/ml-modules/lib

1 file changed

+19
-8
lines changed
Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11

2+
function internalHello(str) {
3+
return `Hello ${str}`
4+
}
5+
26
/**
3-
* Returns "Hello " plus the str parameter
7+
* Sample Module
48
*
5-
* @example
6-
* // returns "Hello World"
7-
* hello("World")
8-
*
9-
* @param {string} str the string to say hello to
9+
* @module "/sample.sjs"
10+
* @exports hello
1011
*/
11-
function hello(str) {
12-
return `Hello ${str}`
12+
module.exports = {
13+
/**
14+
* Returns "Hello " plus the str parameter
15+
*
16+
* @example
17+
* const sampleLib = require("/sample.sjs")
18+
* // returns "Hello World"
19+
* sampleLib.hello("World")
20+
*
21+
* @param {string} str the string to say hello to
22+
*/
23+
hello: internalHello
1324
}

0 commit comments

Comments
 (0)