1
0
Fork 0
mirror of synced 2024-07-03 21:40:55 +12:00

some mutating function parameter

This commit is contained in:
Michael Shanks 2020-09-11 21:30:40 +01:00
parent f975237417
commit fe8c870050

View file

@ -4,6 +4,7 @@ export function readableToRuntimeBinding(bindableProperties, textWithBindings) {
// Find all instances of mustasche
const boundValues = textWithBindings.match(CAPTURE_VAR_INSIDE_MUSTACHE)
let result = textWithBindings
// Replace readableBindings with runtimeBindings
boundValues &&
boundValues.forEach(boundValue => {
@ -11,13 +12,13 @@ export function readableToRuntimeBinding(bindableProperties, textWithBindings) {
return boundValue === `{{ ${readableBinding} }}`
})
if (binding) {
textWithBindings = textWithBindings.replace(
result = textWithBindings.replace(
boundValue,
`{{ ${binding.runtimeBinding} }}`
)
}
})
return textWithBindings
return result
}
export function runtimeToReadableBinding(bindableProperties, textWithBindings) {