Comparing version 1.0.0 to 1.0.1
@@ -36,6 +36,4 @@ 'use strict'; | ||
return new Promise(function (resolve, reject) { | ||
afile(targets, f => { | ||
return f ? resolve(f) : reject(new Error('Not found a file')); | ||
}); | ||
afile(targets, f => f ? resolve(f) : reject(new Error('Not found a file'))); | ||
}); | ||
}; |
{ | ||
"name": "afile", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Find a file on the list", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -25,3 +25,2 @@ # afile [![Build Status](https://travis-ci.org/ragingwind/afile.svg?branch=master)](https://travis-ci.org/ragingwind/afile) | ||
// promise supports | ||
afile(targets).then(function (f) { | ||
@@ -34,15 +33,2 @@ console.log(f); | ||
// callback style | ||
afile.cb(targets, f => { | ||
console.log(f); | ||
//=> /home/yours/.bowerrc | ||
}); | ||
// sync style | ||
afile.sync(targets); | ||
//=> /home/yours/.bowerrc | ||
}); | ||
``` | ||
## API | ||
@@ -52,14 +38,6 @@ | ||
return promise, will resolve if target file is exist. | ||
return promise, it will resolve if target was founded. | ||
### afile.cb(tagets, cb) | ||
callback style, will pass with target file path or not. | ||
### afile.sync(targets) | ||
return target file path or null. | ||
## License | ||
MIT © [Jimmy Moon](http://ragingwind.me) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2934
31
41