tildeio/rsvp.js — pull request #4 by rpflorence (2012-10-17 06:38:18+00:00)
Title: promisify - converts node callbacks to promises

Just starting a conversation here, I was talking to Yehuda about this last night on freenode.

Pretty simple, you can turn the usual node callback pattern into promises like so:

```javascript
var fs = require('fs');
var RSVP = require('rsvp');

// create a new function that'll return a promise
var readFile = RSVP.promisify(fs.readFile);

// usage
readFile('sample.txt').then(function(data) {
console.log(data.toString());
});
```

I didn't know where to put tests in this repository since it just runs the Promises/A specs.

Thoughts on 1) validity of adding this to rsvp and 2) if this is the right API?