Converts true/false string values pulled from gDoc into Boolean.
Notes
Made utils/truthyString/index.js, imported truthyString and wrapped it around props we want to convert in Page.svelte
Didn't use Boolean() to convert string into boolean to avoid an empty string returning true
Kept the list of string values we accept to these, but can add more if want to
const trueStrings = ['true', 't', 'yes', '1'];const falseStrings = ['false', 'f', 'no', '0'];
What's in this pull request
Description
Converts true/false string values pulled from gDoc into Boolean.
Notes
utils/truthyString/index.js
, importedtruthyString
and wrapped it around props we want to convert in Page.svelteBoolean()
to convert string into boolean to avoid an empty string returningtrue
const trueStrings = ['true', 't', 'yes', '1'];
const falseStrings = ['false', 'f', 'no', '0'];