https://github.com/mojtaba-afraz/doxor.js
❇️ Doxor.js : more comfortable interacting with IndexedDB
https://github.com/mojtaba-afraz/doxor.js
browser database frontend indexeddb javascript storage
Last synced: 13 days ago
JSON representation
❇️ Doxor.js : more comfortable interacting with IndexedDB
- Host: GitHub
- URL: https://github.com/mojtaba-afraz/doxor.js
- Owner: mojtaba-afraz
- License: mit
- Created: 2022-07-15T21:10:10.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-26T10:16:22.000Z (almost 4 years ago)
- Last Synced: 2026-06-11T01:19:19.822Z (14 days ago)
- Topics: browser, database, frontend, indexeddb, javascript, storage
- Language: TypeScript
- Homepage:
- Size: 25.4 KB
- Stars: 21
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# doxor.js
Offline database in Front-End
library for interacting with IndexedDB
## Install Doxor.js using npm
```
npm i doxor.js
```
## Creating a database
```javascript
import Doxor from "doxor.js"
const dbName = new Doxor('dbName')
```
## Specify the structure
```javascript
const usersCollection = {
name: 'users',
indexes: [
{
key: 'name',
unique: false
},
{
key: 'email',
unique: true
}
]
}
dbName.Store(usersCollection)
```
name : Collection name
indexes [array of objects] : Each object carries collection field properties
### result:
## Insert Record
```javascript
dbName.Insert('users',{name:"john",email:"john@email.com"})
```
## Get Record
```javascript
dbName.get('users',1,result => {
console.log(result)
})
```
## Get All Records
```javascript
dbName.getAll('users',result => {
console.log(result)
})
```
## remove Record
```javascript
dbName.remove('users',1)
```