-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemo.html
61 lines (52 loc) · 1.51 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<html>
<head>
<script type="module" src="demo.js"> </script>
<link rel="stylesheet" type="text/css" href="docs/styles/jsdoc-default.css">
</head>
<body>
<h1>Code is loaded; proceed with studies in the console.</h1>
Not sure what to do?
You should refer to the <a href="https://github.com/jerng/corner-store/#application-programming-interface">README section on API</a>.
<hr/>
<pre>
Too lazy? Try this in the console.
<code>
CS = new Graph ( 'store' )
Monitor.monitor ( CS )
CS.a = 1
CS.b = 2
CS.c = new Script ( g => g.a + g.b )
CS.c
CS.d = { m:1, n:2, o:3 }
CS.d.n = [ 77, 88, 99 ]
CS.d
CS.d ()
CS ()
CS ( 'graph' )
</code>
Then this.
<code>
CS.iHaveSources = new Script ( s => s.a * 2 )
CS.iHaveSources
</code>
Then this.
<code>
CS.sideEffectedVertex = undefined
CS.reactiveVertex = new Script (
s => { s.sideEffectedVertex = s.a + 2 },
{ reactive : true,
getHandler : false
}
)
</code>
Then this.
<code>
CS.a = 99
</code>
</pre>
<hr/>
An example of an 'in production' app which has some of these features: <a
href="https://aws.amazon.com/step-functions/features/">AWS Step
Functions</a>
</body>
</html>