2 ms·
For a direct comparison: wrapTag('p', capitalize(parseTemplate(sanitize('hello, %s'), 'Sam'))) 'hello, %s' |> sanitize |> parseTemplate(%, 'Sam') |> c
by crooked-v 5y ago
For a direct comparison:
wrapTag('p', capitalize(parseTemplate(sanitize('hello, %s'), 'Sam')))
'hello, %s' |> sanitize |> parseTemplate(%, 'Sam') |> capitalize |> wrapTag('p', %)
And with some little adjustments with currying even those % placeholders can go away.
- inbx0 5y agoNote that, in the current form of the JS proposal, you also need to use the placeholder in unary functions. I.e. sanitize(%) and capitalize(%)