rowanmanning/chic — pull request #2 by jhnns (2012-12-25 19:02:58+00:00)
Title: Added ability to extend non-chic classes

Hi, I really like your class module. It's simple, expressive and yet powerful.

But I thought it would be cool to also extend non-chic classes like normal JavaScript constructors. A good example would be extending node's EventEmitter or Streams which is a common use-case I think (ok, you've got your own EventEmitter with chic-event, but this is only one example).

I thought it would be cool to use chic like this:

```javascript
var MyEventEmitter = new Class(EventEmitter).extend({
bar: "baz",
foo: function () {}
});
```

You may disagree about the interface, but I think the possibility would be cool. The `new` keyword is optional actually, but jshint forces me to do so because of the uppercase C.

I've also added tests. jshint passes without warnings.