Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Nov 17, 2023
1 parent 3340972 commit 5a4ffc2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "component-emitter",
"version": "0.0.0",
"version": "1.3.1",
"description": "Simple event emitter",
"license": "MIT",
"repository": "sindresorhus/component-emitter",
Expand All @@ -23,7 +23,13 @@
"index.d.ts"
],
"keywords": [
""
"event",
"emitter",
"events",
"emit",
"listener",
"pubsub",
"observe"
],
"devDependencies": {
"ava": "^5.3.1",
Expand Down
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ Emitter(User.prototype);

## API

### new Emitter()

Create a new emitter.

### Emitter(object)

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.
Use it as a mixin. For example a plain object may become an emitter, or you may extend an existing prototype.

### Emitter#on(event, listener)

Expand Down

0 comments on commit 5a4ffc2

Please sign in to comment.