chaijs/chai — pull request #67 by domenic (2012-05-27 02:44:52+00:00)
Title: Chaining and flags

New utility `transferFlags` replaces `getAllFlags`. Will be useful for domenic/chai-as-promised#5 and is used in fixing #66.

New utility `addChainableMethod`. Encapsulates the transfer of prototype properties and flags onto new function objects, which are returned from getters... yeah, you know. It's basically the pattern we often do, except using manual proto-property and flag transfer instead of `__proto__`.

Used `addChainableMethod` on `a`/`an` and `includes`/`contains`, which (after a browser build) makes the expect and assert tests pass again in IE9/IE10.

Please code review! :)