Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

existsSync

  • Loading branch information...
commit d1c1012f14c50212ea49a9a1255c902f5ad6cb37 1 parent a964396
@substack authored
Showing with 3 additions and 2 deletions.
  1. +2 −1  index.js
  2. +1 −1  package.json
View
3  index.js
@@ -1,5 +1,6 @@
var fs = require('fs');
var path = require('path');
+var existsSync = fs.existsSync || path.existsSync;
// taken from `ls -1 lib` in node 0.6.11
var core = exports.core = [
@@ -17,7 +18,7 @@ exports.sync = function (x, opts) {
if (!opts) opts = {};
var isFile = opts.isFile || function (file) {
- return path.existsSync(file) && fs.statSync(file).isFile()
+ return existsSync(file) && fs.statSync(file).isFile()
};
var readFileSync = opts.readFileSync || fs.readFileSync;
View
2  package.json
@@ -1,7 +1,7 @@
{
"name" : "resolve",
"description" : "A more hookable require.resolve() implementation",
- "version" : "0.2.2",
+ "version" : "0.2.3",
"repository" : {
"type" : "git",
"url" : "git://github.com/substack/node-resolve.git"
Please sign in to comment.
Something went wrong with that request. Please try again.