@tscircuit/soup-util

0.0.27 • Public • Published

@tscircuit/soup-util

This is a small utility library for working with tscircuit soup

It reduces the amount of code to retrieve or join elements from the soup, it also neatly handles all the typing.

import su from "@tscircuit/soup-util"

const soup = [
  /* [ { type: "source_component", ... }, ... ] */
]

const pcb_component = su(soup).pcb_component.get("1234")

const source_component = su(soup).source_component.getUsing({
  pcb_component_id: "123",
})

const schematic_component = su(soup).schematic_component.getWhere({ width: 1 })

const source_traces = su(soup).source_trace.list({ source_component_id: "123" })

Readme

Keywords

none

Package Sidebar

Install

npm i @tscircuit/soup-util

Weekly Downloads

1,828

Version

0.0.27

License

ISC

Unpacked Size

128 kB

Total Files

5

Last publish

Collaborators

  • seveibar