Allow boolean footprint parameters to accept 1 and 0 in addition to “true” and “false”

This commit is contained in:
Kim Streich 2023-08-27 12:12:41 -06:00 committed by Bán Dénes
parent bd02d43f21
commit fa3f1111bf

View file

@ -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,