jashkenas/coffee-script — Issue #1764: Enhanced instanceof
Author: axnsoftware
Created: 2011-10-10 20:50:41+00:00
State: open

Proposal for an enhanced instanceof which will test against a list of classes that is still backwards compatible.

The enhanced syntax would be as follows:

if a instanceof []
# ...

which would compile to

if (a instanceof or a instanceof or ... a instanceof ) {
// ...
}