Skip to content

Commit

Permalink
Merge pull request #3 from felixsanz/master
Browse files Browse the repository at this point in the history
fs.exists is deprecated
  • Loading branch information
hemanth committed Feb 6, 2016
2 parents 9365654 + 1a04621 commit 766137b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ All the async methods of node's `fs` API are converted to promises using lie-den
Below methods, to be precise:

```js
[ 'exists',
'readFile',
[ 'readFile',
'close',
'open',
'read',
Expand Down
11 changes: 1 addition & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,10 @@ var fs = require('fs')

Object.keys(fs).forEach(function(k){
var val = fs[k];
if (k === 'exists') {
exports[k] = exists;
}
else if (anAysnc(val)) {
if (anAysnc(val)) {
exports[k] = $(val);
}
else {
exports[k] = val;
}
});

function exists (path) {
return new Promise(function (resolve) {
return fs.exists(resolve);
})
}

0 comments on commit 766137b

Please sign in to comment.