BOM 归一与查重分组
元件值归一(4K7/10k/10000R 同组)、位号去重、同值不同厂牌/供应商的合并目标与差异清单;仅供应商料号差异自动忽略,离线报告。
Badges only claim the demo-run passed on that host; cross-host installation is handled by the adapter layer.
Preview gallery
Normalize and group this BOM JSON: list equal-value groups, merge targets with field diffs, and flag components missing values.
Content matches the files inside the package; extracted by the publish pipeline.
LCEDA BOM / inventory / solder bundle
Offline core re-implemented from the Apache-2.0 LCEDA plaza extension bom-duplicate-check; partlab calculators and the inventory/solder members are procedures or documented calculators (references/).
Core
scripts/demo.mjs (Node >= 20, no deps):
- Value normalize: trim/collapse whitespace,
Ω/OHM -> R, uppercase;^([0-9]+(\.[0-9]+)?|\.[0-9]+)(P|N|U|µ|M|K|R)?(F|H|R|Ω)?$; multipliers P 1e-12, N 1e-9, U 1e-6, K 1e3, R 1; M = 1e6 for R/unitless else 1e-3. Unit = explicit F/H/R, else R-suffix, else designator kind hint (R1->R,C1->F,L1->H) so10k/10000R/10KΩunify; keyunit:Number((n*mult).toPrecision(12)); empty ->__EMPTY__. - Group by key (skip addIntoBom=false and empty values); identity = value|manufacturer|manufacturerId|supplier; info = identity + supplierId; needsStandardization = count>1 && identityKeys>1; ignoredSupplierIdOnly = count>1 && identity==1 && info>1.
- Designator dedupe: uppercase key, keep higher completeness score (non-empty value/manufacturer/manufacturerId/supplier/supplierId + addIntoBom flag).
- Merge target per field: most-common non-empty (ties zh-Hans compare).
Run
node scripts/demo.mjs --out-dir <dir> [--input <json>]
Default scripts/fixtures/input.json; stdout = edaskills.report.v1;
artifacts bom-groups.csv, standardize-diff.json.
Input: { components:[{designator,value,manufacturer,manufacturerId, supplier,supplierId,addIntoBom}] }.
When to use
- Before procurement: unify equivalent values and spot split identities.
- After library refresh: dry-run which attributes would change.
Not for: live stock/price (partlab cloud), solder paste planning (solder-assistant in-editor), or writing attributes back (procedures).
Dependencies
Demo run
node v24.19.0 · 2026/11/19
- [warning] SPLIT_IDENTITY (R:10000): 3 parts share value but differ in manufacturer/supplier identity; standardize before procurement
- [warning] SPLIT_IDENTITY (F:1e-7): 2 parts share value but differ in manufacturer/supplier identity; standardize before procurement
- [warning] EMPTY_VALUE (R4): component in BOM without a value
FAQ
Ratings & reviews
Not rated0 ratings
Sign in to rate this skill.
Sign inVersions
- v1.0.0Latest87.6 KB
首发种子版本。