About Code Plugin

This plugin formats and colors computer source code.

For example, many data handling plugins use value() to extract a numerical value from a string or object.

value = (obj) -> return NaN unless obj? switch obj.constructor when Number then obj when String then +obj when Array then value(obj[0]) when Object then value(obj.value) when Function then obj() else NaN

Choose code in the Factory plugin menu to create a code item. See About Factory Plugin.

See GitHub for plugin source.

Formatting is by prettify.js available from Google Code .