Skip to content

Commit

Permalink
determine if fs.existSync exists, else use path
Browse files Browse the repository at this point in the history
  • Loading branch information
schinken committed Aug 7, 2012
1 parent a964396 commit e7d0208
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -17,6 +17,7 @@ exports.sync = function (x, opts) {

if (!opts) opts = {};
var isFile = opts.isFile || function (file) {
var obj = fs.existsSync ? fs : path;
return path.existsSync(file) && fs.statSync(file).isFile()
};
var readFileSync = opts.readFileSync || fs.readFileSync;
Expand Down

0 comments on commit e7d0208

Please sign in to comment.