-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for default values, including in hiearchies #22
Conversation
lib/adlib.js
Outdated
@@ -12,6 +12,7 @@ function isString(v) { | |||
|
|||
function _swap(parameter, settings, transforms) { | |||
let value; | |||
console.info(`_swap: param: ${parameter}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left this little guy behind
lib/adlib.js
Outdated
let hbsEntries = templateValue.match(handlebars); | ||
|
||
if (hbsEntries && hbsEntries.length) { | ||
console.log(`Got a ${hbsEntries.length} handlebar entries...`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can probably remove this console.log
lib/adlib.js
Outdated
let numberOfPaths = paths.length; | ||
// here we check each option, in order, and return the first with a value in the hash, OR the last | ||
path = paths.find((pathOption, idx) => { | ||
console.info(`Checking to see if ${pathOption} is in settings hash...`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this logger
lib/adlib.js
Outdated
values.forEach((v) => { | ||
// console.log(`Comparing ${templateValue} with ${v.key}`) | ||
if (templateValue == v.key) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was my mistake from earlier but this should probably be a ===
Supports strings, urls, int and float
Closes #21