Skip to content

Commit 4e37ae0

Browse files
author
Saul van der Walt
committed
update example info
1 parent b6f4932 commit 4e37ae0

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

README.md

+2-15
Original file line numberDiff line numberDiff line change
@@ -184,27 +184,14 @@ sync model values with other objects
184184
if (nolongerToday) {
185185
// this will update the element's text
186186
model.PhilosophyOfTheDay = 'nominalism'
187+
} else if (fedUpWithPositivism) {
188+
model.PhilosophyOfTheDay = 'critical-realism'
187189
}
188190

189191
// stop syncing
190192
model.sync.stop(PHODelement, 'textContent')
191193
```
192194

193-
``.listen(justonce, evtType, fn)``
194-
for ease of use in special cases
195-
```js
196-
const model = SuperModel()
197-
198-
model.listen(
199-
'nihilism',
200-
val => console.log(val),
201-
true // once = true, on = false
202-
)
203-
204-
model.emit.nihilism('nothing has meaning') // logs
205-
model.emit.nihilism('nothing has meaning') // doesn't log
206-
```
207-
208195
``.emitAsync`` is the same as ``.emit``
209196
it's just less slightly blocking by running the event loop
210197
and each event listener in a ``setTimeout(ln, 0)``

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "super-model-js",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Manage your app's state like never before, harness the power of the proxy!",
55
"main": "SuperModel.js",
66
"scripts": {

0 commit comments

Comments
 (0)