@tscircuit/soup-util
TypeScript icon, indicating that this package has built-in type declarations

0.0.41 • 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

11,527

Version

0.0.41

License

ISC

Unpacked Size

182 kB

Total Files

5

Last publish

Collaborators

  • seveibar