Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hdl-js

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hdl-js - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

src/emulator/hardware/builtin-gates/__tests__/Bit-test.js

2

package.json
{
"name": "hdl-js",
"version": "0.0.15",
"version": "0.0.16",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Hardware definition language (HDL) and Hardware simulator",

@@ -288,4 +288,7 @@ /**

expect(order).toEqual(['eval', 'clockUp', 'clockDown', 'eval']);
Gate.setClockValue(+3);
expect(Gate.getClockValue()).toBe(+3);
});
});

@@ -19,3 +19,3 @@ /**

function isNegativeZero(value) {
return 1 / value === -Infinity;
return value === 0 && (1 / value === -Infinity);
}

@@ -58,2 +58,3 @@

this._buildNamesToPinsMap();
this.init();
}

@@ -202,3 +203,7 @@

if (this.getClass().isClocked()) {
Gate.isClockDown() ? this.tick() : this.tock();
// The -0 is a setup row, don't execute on it.
if (!isNegativeZero(row[Pin.CLOCK])) {
Gate.isClockDown() ? this.tick() : this.tock();
this.getPin(Pin.CLOCK).setValue(Gate.getClockValue());
}
} else {

@@ -451,6 +456,13 @@ this.eval();

static resetClock() {
Gate._clockValue = -0;
Gate.setClockValue(-0);
}
/**
* Sets clock value.
*/
static setClockValue(value) {
Gate._clockValue = value;
}
/**
* Returns clock value.

@@ -457,0 +469,0 @@ */

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