syntex-automation
Advanced tools
Comparing version 1.0.0 to 1.0.1-b2
26
main.js
@@ -1,28 +0,26 @@ | ||
const Emitter = require('./emitter'); | ||
const emitter = require('./emitter'); | ||
module.exports = class AutomationSystem | ||
class AutomationSystem | ||
{ | ||
constructor() | ||
{ | ||
this.emitter = new Emitter(); | ||
console.log('STARTED'); | ||
this.addInputStream('DemoEvent'); | ||
setTimeout(() => this.addOutputStream('DemoEvent', { hallo : true, welt : 'Hey' }), 10000); | ||
} | ||
addInputStream(key) | ||
setInputStream(stream, callback) | ||
{ | ||
this.emitter.on(key, (values) => { | ||
emitter.on(stream, (reciever, values) => { | ||
console.log('Emitter Received', values); | ||
callback(reciever, values); | ||
}); | ||
} | ||
addOutputStream(key, values) | ||
setOutputStream(stream, reciever, values) | ||
{ | ||
emitter.emit(key, values); | ||
emitter.emit(stream, reciever, values); | ||
} | ||
} | ||
} | ||
module.exports = new AutomationSystem(); |
{ | ||
"name": "syntex-automation", | ||
"version": "1.0.0", | ||
"version": "1.0.1-b2", | ||
"description": "An automation system for your smart home", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1342
21
2