kyoto-tycoon

0.0.7 • Public • Published

node-kyoto-tycoon

KyotoTycoon client library for Node.js

Install

npm

npm install kyoto-tycoon

source

cp -r node-kyoto-tycoon ~/.node_libraries/kyoto-tycoon

Example

var KyotoTycoon = require('kyoto-tycoon').KyotoTycoon

var kt = new KyotoTycoon()
kt.set('key1', 'val1', function() {
    kt.get('key1', function(err ,data) {
        console.log(data)
        kt.end()
    })
})

// use JSDeferred
var kt3 = new KyotoTycoon({ deferred : true })
kt3.set('key3', 'val3').next(function() {
    return kt3.get('key3')
}).next(function(err, data) {
    console.log(data)
}).next(function() {
    kt3.end()
})

Utils

$ kt-cli
kt> set a 1
kt> set b 2
kt> get a
1
kt> get b
2
kt> cur_jump 1 key=a
kt> cur_get 1
{ key: 'a', value: '1' }
kt> cur_step 1
kt> cur_get 1
{ key: 'b', value: '2' }
kt> all
{ a: '1', b: '2' }
kt> keys
[ 'a', 'b' ]

Copyright

node-kyoto-tycoon The MIT License Copyright (c) 2010 swdyh

lib/base64.js Copyright (C) 1999 Masanao Izumo http://www.onicos.com/staff/iz/amuse/javascript/expert/

lib/jsdeferred.js Copyright (c) 2007 cho45 ( www.lowreal.net )

Readme

Keywords

none

Package Sidebar

Install

npm i kyoto-tycoon

Weekly Downloads

0

Version

0.0.7

License

none

Last publish

Collaborators

  • swdyh