1.5.0 • Published 3 years ago

file-based-key-value-datastore v1.5.0

Weekly downloads
7
License
ISC
Repository
-
Last release
3 years ago

file-based-key-value-datastore

File-based key-value data store that supports the basic CRD (create, read, and delete) operations. The data store is thread safe and can receive multiple queries at a time.

NPM

npm install file-based-key-value-datastore

Yarn

yarn add file-based-key-value-datastore

Use it

create accepts key,value,timeout,path as parameters. read accepts a key as parameter and returns the result in JSON format. delete accepts a key as parameter.

const { create, read, deleteKey } = require('file-based-key-value-datastore');

// create(key,value,timeout,path)
create('database', 'nodejs'); 

create('student', { name: 'John', age: 30, branch: 'cse' });

// Using specified path for data store.
create('database', 'nodejs', null, '/Users/user/Downloads/target-folder');

// Using TTL
create('database', 'nodejs', 10000);

// Read from the Data Store
read('database');

// Delete entry from Data Store
deleteKey('database');
1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago