utils/index.html
ztimson 1877bac7ce
All checks were successful
Build / Build NPM Project (push) Successful in 48s
Build / Tag Version (push) Successful in 7s
Build / Publish Documentation (push) Successful in 42s
Allow dynamically creating tables
2025-06-16 20:56:28 -04:00

20 lines
440 B
HTML

<html>
<body>
<script type="module">
import {Cache, Database} from './dist/index.mjs';
const db = new Database('test');
db.connection.then(() => {
console.log(db.tables);
});
const table = window.table = await db.createTable('test2');
table.add({ name: 'Alice', age: 30 });
table.add({ name: 'Bob', age: 24 });
table.add({ name: 'Carol', age: 30 });
console.log(db.tables);
</script>
</body>
</html>