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

duh-core

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

duh-core - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

35

lib/expand-ports.js

@@ -5,9 +5,7 @@ 'use strict';

const expandPorts = ports => {
if (ports.constructor !== Object) {
return ports;
}
return Object.keys(ports).reduce((res, name) => {
let width = ports[name];
const expandWire = wire => {
if (wire.width && wire.direction) {
return wire;
} else {
let width = wire;
let direction = 'in';

@@ -29,8 +27,23 @@

return {
direction: direction,
width: width
};
}
};
const expandPorts = ports => {
if (ports.constructor !== Object) {
return ports.map((port) => {
return {
name: port.name,
wire: expandWire(port.wire)
};
});
}
return Object.keys(ports).reduce((res, name) => {
return res.concat({
name: name,
wire: {
direction: direction,
width: width
}
wire: expandWire(ports[name])
});

@@ -37,0 +50,0 @@ }, []);

{
"name": "duh-core",
"version": "0.4.0",
"version": "0.5.0",
"description": "DUH core",

@@ -5,0 +5,0 @@ "main": "lib/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