Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
duart38 committed Sep 4, 2020
1 parent 62a8f39 commit be015e8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ observable.setValue("new val")
| getValue() | Returns the current value. To be used outside of callbacks |
| getHistory() | Gets the change history. Every time a new value is set it is pushed to a history array |
| bind() | used to listen to changes. Takes a callback method that is called with the new data when the observe instance changes. **Returns the function used for the event listener.. To be used with the unBind method (see below)** |
| unBind() | Unbinds a previously bound EventListener or EventListenerObject. The callback returned by bind() should be provided. Returns this |
| setValue() | Updates the observed value.. all bound will be notified. Setting a value equals to the last set value will do nothing. Returns the value that was passed in it (last value in case multiple) |
| stop() | Prevents event from reaching any registered event listeners after the current one. Returns this |
| reset() | Restore the state to the original provided method. Returns this |
| unBind() | Unbinds a previously bound EventListener or EventListenerObject. The callback returned by bind() should be provided. Returns this |
| setValue() | Updates the observed value.. all bound will be notified. Setting a value equals to the last set value will do nothing. Returns the value that was passed in it (last value in case multiple) |
| stop() | Prevents event from reaching any registered event listeners after the current one. Returns this |
| reset() | Restore the state to the original provided method. Returns this |
| unBindAll() | Unbinds ALL previously bound EventListener or EventListenerObject. |
| maxHistorySize | Limit the history array size **(can be lowered to save some precious ram)** |

> The history length is limited to 1000 values.. after this the first value (excluding the original) will be removed on each push.. to increase or decrease this value change the "maxHistorySize" variable
Expand Down

0 comments on commit be015e8

Please sign in to comment.