- From: Adam Rice <notifications@github.com>
- Date: Mon, 23 Oct 2017 06:09:20 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 23 October 2017 13:09:44 UTC
ricea commented on this pull request. > @@ -4572,6 +4572,67 @@ and similarly, closing or aborting the <code>writable</code> side will implicitl </div> +<h3 id="example-ts-lipfuzz">A transform stream that replaces template tags</h3> + +It's often useful to substitute tags with variables on a stream of data, where the parts that need to be replaced are +small compared to the overall data size. This example presents a simple way to do that. It maps strings to strings, +replacing a template like <code>"Time: <span>{</span>{time}} Message: <span>{</span>{message}}"</code> with <code>"Time: When I tried backslashes I ended up with `\time` and `\message` in the output, which was not what I wanted. Probably something to do with the context. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/846#discussion_r146258075
Received on Monday, 23 October 2017 13:09:44 UTC