I just finished reading about Angus Croll's
chains and wraps each method in a new function that calls the tracer's
To understand this, remember that functions on objects can be iterated
which means they can be decorated with properties. Combining these two
facts allows object methods to be iterated over and safely modified to
call external code.
This can even be done recursively:
tracer.traceAll(jQuery, true) >> tracing init >> tracing size >> tracing toArray // ...
The source code is in the article: A tracer utility in