camda
v0.5.0
Published
Functional instances for node callbacks
Downloads
14
Readme
Camda
A library for extensions of classic node callback functions
Getting Started
Install it for use in node.js:
npm install --save -E camda
var CB = require('camda').CB;
var request = require('request');
// Creating a simple CB for a http GET request
var get = CB(request);
// mapping over the response
var getStatusCode = get.map(res => res.statusCode);
// execute normally!
getStatusCode('https://github.com/', (err, code) => {
if(err) return console.error(err);
console.log('Status code returned: ' + code);
});
License
MIT https://github.com/JeffDownie/camda/raw/master/LICENSE.txt