Template strings flags
# Axel Rauschmayer (10 years ago)
Alternative: an operator for function composition.
let text = `…` @@ t;
# Kevin Smith (10 years ago)
Why not provide special formatting flags for
Template strings
?
Tagged template strings are your friend.
# Axel Rauschmayer (10 years ago)
Why not provide special formatting flags for
Template strings
?Tagged template strings are your friend.
If you want to modify behavior (e.g. cut off prefixed whitespace) then more trickery is needed, e.g.:
dedent(String.raw)`…`
And there is no handler function that provides untagged behavior.
Why not provide special formatting flags for
Template strings
?let text = `text text text text text text text text text text text text`t;
t
- trim whitespacesExpected result:
let text = `text text text text text text text text text text text text`t;
Alexander