Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lullaby6/jnbase
NPM Package - Manipulates json files easily for use as lightweight databases
https://github.com/lullaby6/jnbase
data-base database db javascript js js-package json json-database json-db node nosql npm npm-package
Last synced: about 1 month ago
JSON representation
NPM Package - Manipulates json files easily for use as lightweight databases
- Host: GitHub
- URL: https://github.com/lullaby6/jnbase
- Owner: lullaby6
- Created: 2023-09-25T00:32:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-25T20:48:33.000Z (over 1 year ago)
- Last Synced: 2024-11-08T14:16:51.910Z (about 2 months ago)
- Topics: data-base, database, db, javascript, js, js-package, json, json-database, json-db, node, nosql, npm, npm-package
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/jnbase
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jbase
Manipulates json files easily for use as lightweight databases.
# Installation
```sh
npm install jnbase
```# Usage
```js
const jnbase = require('jnbase');//creating 'users' key/table
jnbase.create('users')//adding users
jnbase.data.add('users', {username: 'lullaby6'});
jnbase.data.add('users', {username: 'Elon Musk'});//adding multiple users
jnbase.data.addMultiple('users', [{username: 'marcos15'}, {username: 'Pedro'}]);//updating user
jnbase.data.update('users', {username: 'lullaby6'}, {username: 'Lullaby'});//removing user
jnbase.data.remove('users', {username: 'Elon Musk'});//get user id
console.log(jnbase.data.get('users', {username: 'Lullaby'})[0].id)
```