Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

filekv

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filekv

This is a key&value storage library, which uses file system to store data.

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

filekv

This is a key&value storage library, which uses file system to store data.

Install

$ npm install filekv -g

How to use


var filekv = require('filekv');

var filekvClient = new filekv({

        fileDir:__dirname+'/data', //Here is your datafile dir! This config item not have default value!!!

        workQueueMax:1000 //This number can't greater than your OS open file max number!

});



filekvClient.set('userinfo',{name:'wzy',sex:1,github:'http://www.github.com/zenboss'},(Date.now()/1000)+3600,function(err){

	console.log(err);

});

filekvClient.get('userinfo',function(err,data){

	console.log(err,data);

});

filekvClient.has('userinfo',function(err,isHas){

	console.log(err,isHas);

});

filekvClient.del('userinfo',function(err){

	console.log(err);

});

API

filekv.prototype.set(key,value/object[,expireTime[,callback]])

Use this function setting a key&value

filekv.prototype.get(key[,callback])

Use this function get a key&value

filekv.prototype.has(key[,callback])

Use this function check a key exist

filekv.prototype.del(key[,callback])

Use this function delete a key

Keywords

FAQs

Package last updated on 04 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc