From 5a4ffc24f990714e891f1eface3b977cf57cb4fb Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 17 Nov 2023 16:50:06 +0700 Subject: [PATCH] Minor tweaks --- package.json | 10 ++++++++-- readme.md | 6 +++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ae58d14..0d6311c 100644 --- a/package.json +++ b/package.json @@ -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", @@ -23,7 +23,13 @@ "index.d.ts" ], "keywords": [ - "" + "event", + "emitter", + "events", + "emit", + "listener", + "pubsub", + "observe" ], "devDependencies": { "ava": "^5.3.1", diff --git a/readme.md b/readme.md index e4de421..31cbcef 100644 --- a/readme.md +++ b/readme.md @@ -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)