
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
circuit-json-to-bom-csv
Advanced tools
A utility to convert Circuit JSON to Bill of Materials (BOM) CSV format.
A utility to convert Circuit JSON to Bill of Materials (BOM) CSV format.
You can install this package using npm:
npm install circuit-json-to-bom-csv
Or using yarn:
yarn add circuit-json-to-bom-csv
This package provides two main functions: convertCircuitJsonToBomRows
and convertBomRowsToCsv
.
import { convertCircuitJsonToBomRows } from "circuit-json-to-bom-csv"
import type { AnyCircuitElement } from "circuit-json"
const circuitJson: AnyCircuitElement[] = [
// Your circuit JSON data here
]
const bomRows = await convertCircuitJsonToBomRows({ circuitJson })
console.log(bomRows)
import { convertBomRowsToCsv } from "circuit-json-to-bom-csv"
const bomRows = [
{
designator: "R1",
comment: "1k",
value: "1k",
footprint: "0805",
supplier_part_number_columns: {
"JLCPCB Part #": "C17513",
},
},
// More BOM rows...
]
const csv = convertBomRowsToCsv(bomRows)
console.log(csv)
convertCircuitJsonToBomRows(options: { circuitJson: AnyCircuitElement[], resolvePart?: Function }): Promise<BomRow[]>
Converts Circuit JSON to BOM rows.
circuitJson
: An array of Circuit JSON elements.resolvePart
(optional): A function to resolve additional part information.Returns a Promise that resolves to an array of BOM rows.
convertBomRowsToCsv(bomRows: BomRow[]): string
Converts BOM rows to a CSV string.
bomRows
: An array of BOM row objects.Returns a CSV string representation of the BOM.
This project is licensed under the MIT License.
FAQs
A utility to convert Circuit JSON to Bill of Materials (BOM) CSV format.
The npm package circuit-json-to-bom-csv receives a total of 2,597 weekly downloads. As such, circuit-json-to-bom-csv popularity was classified as popular.
We found that circuit-json-to-bom-csv demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.