1.8.0 • Published 8 months ago

nun-db v1.8.0

Weekly downloads
44
License
MIT
Repository
github
Last release
8 months ago

Nun-db JS

Nun-db js library for web and Node

Instalation

npm install --save nun-db

Simple usage get set

//import nundb
const NunDb = require('nun-db');

//Connect to the databse
const db = new NunDb('wss://ws.nundb.org/', 'db-name', 'db-token');

db.setValue('someKey', 'someValue');
db.set('someKey', 'someValue');//Alias to setValue

// get a key
db.getValue('someKey').then( value => {
  console.log(`Here is the key value: ${value}`);
  // Here is the key value: someValue
});

Watch

//import nundb
const NunDb = require('nun-db');

//Connect to the databse
const db = new NunDb('wss://ws.nundb.org/', 'db-name', 'db-token');

// get a key
db.watch('someKey', value => {
  console.log(`Here is the key value: ${value}`);
  // Here is the key value: someValue
  // Here is the key value: someValue1
});
db.setValue('someKey', 'someValue');
db.setValue('someKey', 'someValue1');
1.8.0

8 months ago

1.7.0

10 months ago

1.6.0

10 months ago

1.5.1

12 months ago

1.5.0

1 year ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago