afile
v1.0.1
Published
Find a file on the list
Downloads
21
Readme
afile
Find a file in the list
Install
$ npm install --save afile
Usage
var afile = require('afile');
var targets = [
process.cwd(),
process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'],
'/'
].map(p => {
return path.join(p, '.bowerrc');
});
afile(targets).then(function (f) {
console.log(f);
//=> /home/yours/.bowerrc
}, function () {
// not in the list
});
## API
### afile(tagets)
return promise, it will resolve if target was founded.
## License
MIT © [Jimmy Moon](http://ragingwind.me)