Skip to content

AstroDigital/camda

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Camda
Npm Version Build Status Coverage Status

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

About

Functional instances for node callbacks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%