crankpm

npm package for crankdb


Keywords
crankdb, package, key, value, key-value, driver, cli, npm, database, npm-package
License
MIT
Install
npm install crankpm@1.0.3

Documentation

crankpm (CrankDB Node JS driver)

crankpm is the database driver for CrankDB for node js applications.

Pre requisites

Setup CrankDB and get it started.

To install run: npm install crankpm

Sample implementation

const Crank = require('crankpm');

const crank = new Crank();

const setRes = crank.set("key", "value");
const getRes = crank.get("key");
const delRes = crank.delete("key");

crank.set('year', { 2019: 'covid', 2020: 'vaccine' })
const findRes = crank.find({ 2019: 'covid' });

console.log({ setRes, getRes, delRes, findRes });

Expected output:

{
  setRes: '"key set"',
  getRes: '"value"',
  delRes: '"key deleted."',
  findRes: '[{"2019":"covid","2020":"vaccine"}]'
}