Simple utility to generate thunks
on the fly
npm install thu
var thu = require('thu');
var fs = require('fs');
var thunk = thu(fs.readFile, 'filename.txt', 'utf8');
thunk(function(err, result) {
console.log(result);
});
var thu = require('thu');
var redis = require('redis');
var client = redis.createClient();
var thunk1 = thu(client, 'set', 'key-name', 'value');
var thunk2 = thu(client, 'get', 'key-name');