From d69fcf20b89245a9bf594fac20820dc273d72fc5 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Wed, 2 May 2012 10:48:56 -0700 Subject: [PATCH] readme --- Readme.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..97e8085 --- /dev/null +++ b/Readme.md @@ -0,0 +1,30 @@ + +# Emitter + + Event emitter component. + +## Installation + + $ npm install emitter-component + +## API + + +### Emitter#on(event, fn) + + Register an `event` handler `fn`. + +### Emitter#once(event, fn) + + Register a single-shot `event` handler `fn`, + removed immediately after it is invoked the + first time. + +### Emitter#off(event, fn) + + Remove `event` handler `fn`, or pass only the `event` + name to remove all handlers for `event`. + +### Emitter#emit(event, ...) + + Emit an `event` with variable option args.