Node.js 10.0.0 or newer is required.
- Run
npm -g --add-python-to-path install windows-build-tools node-gyp
in CMD/Powershell as administrator - Restart CMD/Powershell
- Run
npm i advanceddb
- Install XCode
- Run
npm i -g node-gyp
in Terminal - Run
node-gyp --python /path/to/python2.7
(skip this step if you didn't install python 3.x) - Run
npm i advanceddb
in Terminal
- Run
npm i advanceddb
in Terminal
const Addb = require('advanceddb');
const db = new Addb.Database();
db.set('account_1234567890', 'password'); // -> { key: 'account_1234567890', value: 'password' }
db.set('account_123456789', {
id: 123456789,
password: 'password',
checked: true
}); // -> { key: 'account_123456789', value: '{"id":123456789,"password":"password","checked":true}' }
db.get('account_1234567890'); // -> password
db.has('account_1234567890'); // -> true
db.delete('account_1234567890'); // -> true
db.getAll() // -> // -> [ { key: 'account_123456789', value: '{"id":123456789,"password":"password","checked":true}' } ]
db.deleteAll(); // -> true</code></pre>