crankpm

1.0.3 • Public • Published

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"}]'
}

Package Sidebar

Install

npm i crankpm

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

8.06 kB

Total Files

14

Last publish

Collaborators

  • kartikkhk