This example takes an array of text (copied from Twitter) and processes them with a filter chain. The filter chain is just a series of methods called on the input passed, modifying the input, and returning it. You can dynamically add, remove, and reorder the filters, so this allows for dynamic, customizable processing. In Spaz, the user could write their own filters (in their user.js file) to adjust how their timelines are processed -- adding previews, removing posts they don't want, and so on.

This example parses links, usernames, and hashtags, and shows media previews using oEmbed.