New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dtex/mock-io

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dtex/mock-io - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

modules/analog.js

4

index.js
import Digital from "./modules/digital.js";
import PWM from "./modules/pwm.js";
import I2C from "./modules/i2c.js";
import Analog from "./modules/analog.js";
export { Digital, PWM }
export { Digital, PWM, I2C, Analog }
class Digital {
static Input = 0x00;
static Output = 0x01;

@@ -8,14 +9,26 @@

this.edge = (undefined === opts.edge) ? 0 : opts.edge;
this.mode = opts.mode;
this.mode = opts.mode || 0x00;
this.onReadable = opts.onReadable;
this.target = opts.target;
this.value = 0x00;
this.Input = 0x00;
this.Output = 0x01;
}
read() {
return this.value;
}
write(value) {
}
if (value != this.value) {
this.value = value;
if (this.mode === this.Input) {
this.onReadable();
}
}
}
exTrigger(event) {
this.emit(event);
}

@@ -22,0 +35,0 @@ }

@@ -6,9 +6,12 @@ class PWM {

constructor(opts) {
this.pin = opts.pin;
this.edge = (undefined === opts.edge) ? 0 : opts.edge;
this.mode = opts.mode;
this.onReadable = opts.onReadable;
this.target = opts.target;
this.resolution = 10;
this.value = null;
return (async () => {
console.log(opts.pin);
this.pin = opts.pin;
this.edge = (undefined === opts.edge) ? 0 : opts.edge;
this.mode = opts.mode;
this.onReadable = opts.onReadable;
this.target = opts.target;
this.resolution = 10;
this.value = null;
})();
}

@@ -15,0 +18,0 @@

{
"name": "@dtex/mock-io",
"version": "0.0.2",
"version": "0.0.3",
"description": "Mock file for TC-53 IO testing",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc