From 20815ad72430a05ce9aaec5c757e2485d637c7d3 Mon Sep 17 00:00:00 2001 From: Brandon Nozaki Miller Date: Wed, 23 Aug 2017 02:27:57 -0700 Subject: [PATCH] added once documentation to subscribe --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0f6092d..1ffbfe7 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,9 @@ By default the correct version (ES5/ES6) will be included. You can force the es5 |Method|Arguments|Description| |------|---------|-----------| -|subscribe|type (string), handler(function)|will bind the `handler` function to the the `type` event. Just like `addEventListener` in the browser| +|subscribe|type (string), handler(function), once (bool|optional)|will bind the `handler` function to the the `type` event. Just like `addEventListener` in the browser. If once is set to true the hander will be removed after being called once.| |on|same as above|same as above| -|once|same as above| will bind the `handler` function to the the `type` event and unbind it after one execution. Just like `addEventListener` in the browser withe the `once` option set| +|once|type (string), handler(function)| will bind the `handler` function to the the `type` event and unbind it after ***one*** execution. Just like `addEventListener` in the browser withe the `once` option set| |unSubscribe|type (string), handler(function or *)|will ***un***bind the `handler` function from the the `type` event. If the `handler` is `*`, all handlers for the event type will be removed. Just like `removeEventListener` in the browser, but also can remove all event handlers for the type.| |off|same as above|same as above| |publish|type (string), ...data arguments|will call all `handler` functions bound to the event `type` and pass all `...data arguments` to those handlers|