Skip to content

Commit

Permalink
fp.getFootprintNames() to get an array of footprint names (#76)
Browse files Browse the repository at this point in the history
* fp.getFootprints() to get an array of footprint names

* renamed getFootprints to getFootprintNames
  • Loading branch information
ShiboSoftwareDev authored Nov 8, 2024
1 parent 542e6b3 commit c6c0f67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/footprinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export type Footprinter = {
soup: () => AnySoupElement[]
circuitJson: () => AnyCircuitElement[]
json: () => AnyFootprinterDefinitionOutput[]
getFootprintNames: () => string[]
}

export const string = (def: string): Footprinter => {
Expand Down Expand Up @@ -150,6 +151,9 @@ export const footprinter = (): Footprinter & {
}
return () => FOOTPRINT_FN[target.fn](target).parameters
}
if (prop === "getFootprintNames") {
return () => Object.keys(FOOTPRINT_FN)
}
if (prop === "params") {
// TODO
return () => target
Expand Down

0 comments on commit c6c0f67

Please sign in to comment.