undefine-db

database api wrapper for undefine-db

Usage no npm install needed!

<script type="module">
  import undefineDb from 'https://cdn.skypack.dev/undefine-db';
</script>

README

Welcome to undefine-db 👋

Version Documentation Maintenance License: MIT

simple key-value database api wrapper for undefine-db

🏠 Homepage

Join our Discord for support and help etc!

Requirements

The undefine-db can be hosted locally
You should checkout this before installing this.
The repository contains the code to run undefine-db and connect to it using this wrapper https://github.com/oadpoaw/undefine-db

Install

npm install undefine-db

Example Usage

const { UndefineDB } = require('undefine-db');
const db = new UndefineDB('http://localhost:4201/');

await db.connect('databaseTokenHere', () => {
  console.log(`Database connected!`);
});

const data = await db.get('undefine'); // returns null if not found, so this is null, because its not in the database
await db.set('undefine', { lol: 'xd' }); // 'undefine': { "lol": "xd" }
const newData = await db.get('undefine');
console.log(newData); // { "lol": "xd" }
await db.delete('undefine'); // goodbye

Documentation

See Documentation

Author

👤 oadpoaw

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 oadpoaw.
This project is MIT licensed.