-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
41 lines (39 loc) · 1018 Bytes
/
index.html
File metadata and controls
41 lines (39 loc) · 1018 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Pattern Matching</title>
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<style>
html {
height: 100%;
}
body {
margin: 0;
min-height: 100%;
}
</style>
</head>
<body>
<main>
<h1>Pattern Matching</h1>
<pre>
<code>
import PatternMatch from "./dist/index.es.js";
const string = PatternMatch({ a: true })
.when(({ a }) => a, () => "whatever is true")
.run();
</code>
</pre>
</main>
<script type="module">
import PatternMatch from "./dist/index.es.js";
const string = PatternMatch({ a: true })
.when(() => true, () => "whatever is true")
.run();
console.log(string)
</script>
</body>
</html>