# asteroid-db

> Server-less NoSQL Database

Latest version **1.0.9** (published 2020-04-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install asteroid-db
pnpm add asteroid-db
yarn add asteroid-db
bun add asteroid-db
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2020-04-08 |
| First published | 2019-12-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 14.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Manjunath Jidagi |
| Maintainers | manjujidagi |
| Keywords | asteroid-db, database, db, nosql, serverless, localstorage-alternative, cookies-alternative |

## Links

- npm: https://www.npmjs.com/package/asteroid-db
- Repository: https://github.com/manjunathjidagi/asteroid-db
- Homepage: https://github.com/manjunathjidagi/asteroid-db#readme
- Issues: https://github.com/manjunathjidagi/asteroid-db/issues
- npm.io page: https://npm.io/package/asteroid-db

## Dependencies (5)

- [make-dir](https://npm.io/package/make-dir.md) ^3.0.0
- [is-subset](https://npm.io/package/is-subset.md) ^0.1.1
- [node.extend](https://npm.io/package/node.extend.md) ^2.0.2
- [canonical-path](https://npm.io/package/canonical-path.md) ^1.0.0
- [output-file-sync](https://npm.io/package/output-file-sync.md) ^2.0.1

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.0.9 (latest) — 2020-04-08
- 1.0.8 — 2020-02-03
- 1.0.7 — 2020-01-01
- 1.0.6 — 2019-12-29
- 1.0.5 — 2019-12-27
- 1.0.4 — 2019-12-27
- 1.0.3 — 2019-12-23
- 1.0.2 — 2019-12-23
- 1.0.1 — 2019-12-21
- 1.0.0 — 2019-12-21
- 0.0.2 — 2019-12-12
- 0.0.1 — 2019-12-12
- 0.0.0 — 2019-12-12

## README

# asteroid-db
Server-less NoSQL Database

```javascript
const AsteroidDB = require('asteroid-db')

var adb = new AsteroidDB()
```

**Set Development**

```javascript
adb.set_development(true)
```

**Test Connection**

```javascript
adb.test()
```

**Data Manipulation**

*First Parameter ( par_1 ) - Database Name*

*Second Parameter ( par_2 ) - Catalogue Name*

*Third Parameter ( par_3 ) - Catalogue Type*

*Fourth Parameter ( par_4 ) - Catalogue Itself*

 - **Create Catalogue**

```javascript

// Create Catalogue 'par_4' Object Format [ Required ]
// {
//     "data" : {
//         "key1" : "val1",
//         "key2" : "val2"
//     }
// }


bool adb.create_catalogue(par_1, par_2, par_3, par_4))


// ----------- Example ----------------
if(adb.create_catalogue("my_db", "secure", "private", { "data" : { "username" : "hello", "password" : "world" }})){
	console.log("Catalogue Creation Successful")
}
else{
	console.log("Catalogue Creation Failed")
}
// ---------- Example Ends -------------
```


 - **Read Catalogue**

```javascript

// Read Catalogue 'par_4' Object Format [ Optional ]
// {
//     "filter" : {
//         "key1" : "val1",
//         "key2" : "val2"
//     }
// }


[false/array] adb.read_catalogue(par_1, par_2, par_3, par_4))


// ----------- Example ----------------
var ret_data = adb.read_catalogue("my_db", "secure", "private")
console.log(ret_data)
// ---------- Example Ends -------------
```

 - **Update Catalogue**

```javascript

// Update Catalogue 'par_4' Object Format [ Required ]
// {
//     "filter" : {
//         "key1" : "val1"
//     },
//		"data" : {
//			"key2" : "val2"
//		}
// }


bool adb.update_catalogue(par_1, par_2, par_3, par_4))


// ----------- Example ----------------
if(adb.update_catalogue("my_db", "secure", "private", { "filter" : { "username" : "hello" }, "data" : { "password" : "myworld" }})){
	console.log("Catalogue Update Successful")
}
else{
	console.log("Catalogue Update Failed")
}
// ---------- Example Ends -------------
```

 - **Delete Catalogue**

```javascript

// Delete Catalogue 'par_4' Object Format [ Required ]
// {
//     "filter" : {
//         "key1" : "val1"
//     }
// }


bool adb.delete_catalogue(par_1, par_2, par_3, par_4))


// ----------- Example ----------------
if(adb.delete_catalogue("my_db", "secure", "private", { "filter" : { "username" : "hello" }})){
	console.log("Catalogue Deletion Successful")
}
else{
	console.log("Catalogue Deletion Failed")
}
// ---------- Example Ends -------------
```

 - **Replace Catalogue**

```javascript

// Replace Catalogue 'par_4' Object Format [ Required ]
// {
//     "filter" : {
//         "key1" : "val1"
//     },
//		"data" : {
//			"key2" : "val2"
//		}
// }


bool adb.replace_catalogue(par_1, par_2, par_3, par_4))


// ----------- Example ----------------
if(adb.replace_catalogue("my_db", "secure", "private", { "filter" : { "username" : "hello" }, "data" : { "userid" : "hi buddy" }})){
	console.log("Catalogue Replace Successful")
}
else{
	console.log("Catalogue Replace Failed")
}
// ---------- Example Ends -------------
```

---
_Source: https://npm.io/package/asteroid-db · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
