File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed
Expand file tree Collapse file tree 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
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 ``
209196it's just less slightly blocking by running the event loop
210197and each event listener in a `` setTimeout(ln, 0) ``
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments