hop-message 0.0.1 → 0.0.2
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.
- package/package.json +10 -4
- package/src/index.js +33 -1
- package/test/live-index.test.js +9 -0
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hop-message",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "routing message for hop",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": "src/index.js",
|
|
6
7
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
+
"start": "node src/index.js",
|
|
9
|
+
"test": "mocha test/*.*"
|
|
8
10
|
},
|
|
9
11
|
"repository": {
|
|
10
12
|
"type": "git",
|
|
@@ -20,5 +22,9 @@
|
|
|
20
22
|
"bugs": {
|
|
21
23
|
"url": "https://github.com/healthscience/hop-message/issues"
|
|
22
24
|
},
|
|
23
|
-
"homepage": "https://github.com/healthscience/hop-message#readme"
|
|
25
|
+
"homepage": "https://github.com/healthscience/hop-message#readme",
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"assert": "^2.0.0",
|
|
28
|
+
"mocha": "^10.0.0"
|
|
29
|
+
}
|
|
24
30
|
}
|
package/src/index.js
CHANGED
|
@@ -1 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict'
|
|
2
|
+
/**
|
|
3
|
+
* message flow and logic routing
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @class HopMessages
|
|
7
|
+
* @package HopMessages
|
|
8
|
+
* @copyright Copyright (c) 2022 James Littlejohn
|
|
9
|
+
* @license http://www.gnu.org/licenses/old-licenses/gpl-3.0.html
|
|
10
|
+
* @version $Id$
|
|
11
|
+
*/
|
|
12
|
+
import util from 'util'
|
|
13
|
+
import EventEmitter from 'events'
|
|
14
|
+
|
|
15
|
+
class HopMessages extends EventEmitter {
|
|
16
|
+
|
|
17
|
+
constructor() {
|
|
18
|
+
super()
|
|
19
|
+
console.log('{{HOP-Messages}}')
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Message in
|
|
24
|
+
* @method messageIn
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
messageIn = function (message) {
|
|
28
|
+
console.log('message')
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default HopMessages
|