-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
32 lines (30 loc) · 802 Bytes
/
test.html
File metadata and controls
32 lines (30 loc) · 802 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Emlet Test</title>
<style>
body {
background-color: #111;
color: #eee;
font-family: monospace;
padding: 2rem;
}
</style>
</head>
<body>
<h1>Emlet Test</h1>
<p>Check the console for output.</p>
<script src="./emlet.js"></script>
<!-- <script src="https://unpkg.com/emlet"></script> -->
<script>
console.log('emlet.embed("hello") →', emlet.embed('hello'))
const em = new Emlet(128)
const vec = em.embed('world')
const em2 = new Emlet(128, true)
const vec2 = em2.embed('world')
console.log('Emlet(128).embed("world").length (128) →', vec.length)
console.log('Emlet(128, true).embed("world").length (160) →', vec2.length)
</script>
</body>
</html>