Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/footprinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ const normalizeDefinition = (def: string): string => {
return def
.trim()
.replace(/^pinheader(?=[\d_]|$)/i, "pinrow")
.replace(/^spdip-?(\d+)(?=_|$)/i, "dip$1")
.replace(/^sot23-(\d+)(?=_|$)/i, "sot23_$1")
.replace(/^sot-223-(\d+)(?=_|$)/i, "sot223_$1")
.replace(/^to-220f-(\d+)(?=_|$)/i, "to220f_$1")
Expand Down
12 changes: 12 additions & 0 deletions tests/dip.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ test("DIP16 string resolves using lowercase function", () => {
const lowercaseJson = fp.string("dip16").json()
expect(uppercaseJson).toEqual(lowercaseJson)
})

test("SPDIP-28 string resolves to DIP28", () => {
const spdipJson = fp.string("SPDIP-28").json()
const dipJson = fp.string("dip28").json()
expect(spdipJson).toEqual(dipJson)
})

test("spdip28 string resolves to DIP28", () => {
const spdipJson = fp.string("spdip28").json()
const dipJson = fp.string("dip28").json()
expect(spdipJson).toEqual(dipJson)
})
test("dip16 with nosquareplating", () => {
const circuitJson = fp
.string("dip16_nosquareplating")
Expand Down