mirror of
https://github.com/TECHNOFAB11/ergogen.git
synced 2025-12-11 23:50:05 +01:00
Allow boolean footprint parameters to accept 1 and 0 in addition to “true” and “false”
This commit is contained in:
parent
bd02d43f21
commit
fa3f1111bf
1 changed files with 1 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ const footprint = exports._footprint = (points, net_indexer, component_indexer,
|
||||||
const converters = {
|
const converters = {
|
||||||
string: v => v,
|
string: v => v,
|
||||||
number: v => a.sane(v, `${name}.params.${param_name}`, 'number')(units),
|
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),
|
array: v => yaml.load(v),
|
||||||
object: v => yaml.load(v),
|
object: v => yaml.load(v),
|
||||||
net: v => v,
|
net: v => v,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue