Skip to content

Commit

Permalink
add mixin docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Sep 6, 2012
1 parent 88fb716 commit 5d25dd6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ $ component install component/emitter
```

## API

### Emitter(obj)

The `Emitter` may also be used as a mixin. For example
a "plain" object may become an emitter, or you may
extend an existing prototype:

```js
var obj = {};
Emitter(obj);
Emitter(User.prototype);
```

### Emitter#on(event, fn)

Expand Down

0 comments on commit 5d25dd6

Please sign in to comment.