utils/index.html
ztimson 6d706d4c15
All checks were successful
Build / Build NPM Project (push) Successful in 1m7s
Build / Tag Version (push) Successful in 14s
Build / Publish Documentation (push) Successful in 53s
Added database wrapper
2025-05-25 23:02:56 -04:00

30 lines
564 B
HTML

<html>
<body>
<script type="module">
import {Cache, Database} from './dist/index.mjs';
const db = new Database('test', ['test', 'test2', 'test3']);
const cache = new Cache('id', {
ttl: 60,
storage: db.table('test'),
expiryPolicy: 'delete'
});
const cache2 = new Cache('id', {
ttl: 60,
storage: db.table('test2'),
expiryPolicy: 'delete'
});
const cache3 = new Cache('id', {
ttl: 60,
storage: db.table('test3'),
expiryPolicy: 'delete'
});
console.log(cache3.all());
</script>
</body>
</html>