File tree 2 files changed +3
-16
lines changed
2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -184,27 +184,14 @@ sync model values with other objects
184
184
if (nolongerToday) {
185
185
// this will update the element's text
186
186
model .PhilosophyOfTheDay = ' nominalism'
187
+ } else if (fedUpWithPositivism) {
188
+ model .PhilosophyOfTheDay = ' critical-realism'
187
189
}
188
190
189
191
// stop syncing
190
192
model .sync .stop (PHODelement, ' textContent' )
191
193
```
192
194
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
-
208
195
`` .emitAsync `` is the same as `` .emit ``
209
196
it's just less slightly blocking by running the event loop
210
197
and each event listener in a `` setTimeout(ln, 0) ``
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " super-model-js" ,
3
- "version" : " 1.0.1 " ,
3
+ "version" : " 1.0.2 " ,
4
4
"description" : " Manage your app's state like never before, harness the power of the proxy!" ,
5
5
"main" : " SuperModel.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments