From fa3f1111bf26a5440c027ca5d07f91f99be186c2 Mon Sep 17 00:00:00 2001 From: Kim Streich Date: Sun, 27 Aug 2023 12:12:41 -0600 Subject: [PATCH] =?UTF-8?q?Allow=20boolean=20footprint=20parameters=20to?= =?UTF-8?q?=20accept=201=20and=200=20in=20addition=20to=20=E2=80=9Ctrue?= =?UTF-8?q?=E2=80=9D=20and=20=E2=80=9Cfalse=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pcbs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcbs.js b/src/pcbs.js index a50d039..adcf2d9 100644 --- a/src/pcbs.js +++ b/src/pcbs.js @@ -92,7 +92,7 @@ const footprint = exports._footprint = (points, net_indexer, component_indexer, const converters = { string: v => v, number: v => a.sane(v, `${name}.params.${param_name}`, 'number')(units), - boolean: v => v === 'true', + boolean: v => v === 'true' || a.mathnum(v)(units) === 1, array: v => yaml.load(v), object: v => yaml.load(v), net: v => v,