Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions lib/convertCircuitJsonToReadableNetlist.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { su } from "@tscircuit/soup-util"
import { su } from "@tscircuit/circuit-json-util"
import type {
AnyCircuitElement,
CircuitJson,
Expand Down Expand Up @@ -37,16 +37,15 @@ export const convertCircuitJsonToReadableNetlist = (

if (component.ftype === "simple_resistor") {
componentDescription = `${component.display_resistance}${
footprint ? ` ${footprint}` : ""} resistor`
footprint ? ` ${footprint}` : ""
} resistor`
} else if (component.ftype === "simple_capacitor") {
componentDescription = `${component.display_capacitance}${
footprint ? ` ${footprint}` : ""} capacitor`
footprint ? ` ${footprint}` : ""
} capacitor`
} else if (component.ftype === "simple_chip") {
const manufacturerPartNumber = component.manufacturer_part_number
componentDescription = [
manufacturerPartNumber,
footprint,
]
componentDescription = [manufacturerPartNumber, footprint]
.filter(Boolean)
.join(", ")
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/generateNetName.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { su } from "@tscircuit/soup-util"
import { su } from "@tscircuit/circuit-json-util"
import type { AnyCircuitElement, AnySourceComponent } from "circuit-json"
import { getReadableNameForPin } from "./getReadableNameForPin"
import { scorePhrase } from "./scorePhrase"
Expand Down
2 changes: 1 addition & 1 deletion lib/getReadableNameForPin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { su } from "@tscircuit/soup-util"
import { su } from "@tscircuit/circuit-json-util"
import type {
AnyCircuitElement,
CircuitJson,
Expand Down
Loading
Loading