An implementation of the Intercepting Filter pattern for javascript