ceejbot/reflip — pull request #3 by kitcambridge (2014-02-20 23:19:48+00:00)
Title: Remove `request.features`

Decorating the `request` object causes issues if a Reflip-enabled Express app mounts a Reflip-enabled sub-app with different settings. For example, if app A configures Reflip with the `"aardvarks"` setting enabled, app B configures an independent Reflip instance with `"aardvarks"` disabled, and A mounts B as a sub-app, `request.features.aardvarks` will be `false` if A mounts B after mounting the `flip` middleware, and `true` if A mounts `flip` after B.

The internal cache of feature lookups is now exposed by calling `request.check()` without any arguments. Mutating this object will affect the results returned by `request.check('feature-name')`, consistent with the current behavior.

This is a backward-incompatible change.