freeformsystems/cli-rc — pull request #6 by boneskull (2014-08-30 04:31:07+00:00)
Title: load(): pass instance to callback function

if you do not retain the value returned by `rc()`, it's effectively impossible to get at the `path` if wrapping this function in the Q library:

```js
// before this change:
Q.nfcall(require('cli-rc'))
.then(function(config) {
// now you have your data, but since the wrapper returns a Promise instead of a RunControl
// instance, we must use a callback if we want it.
});

// after:
Q.nfcall(require('cli-rc'))
.spread(function(config, rc) {
// now we have access to the instance, and thusly the path property.
});
```