[Pkg-javascript-commits] [node-keygrip] 28/68: existsSync shim for both 0.6 and 0.8

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Fri Jun 27 22:13:25 UTC 2014


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to branch master
in repository node-keygrip.

commit f0beb214a81b19a88949032cdb8bb671f264b446
Author: Jed Schmidt <tr at nslator.jp>
Date:   Mon Jul 9 23:35:37 2012 +0900

    existsSync shim for both 0.6 and 0.8
---
 .travis.yml | 1 +
 index.js    | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 2d26206..895dbd3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,4 @@
 language: node_js
 node_js:
   - 0.6
+  - 0.8
diff --git a/index.js b/index.js
index ec82d09..219da47 100644
--- a/index.js
+++ b/index.js
@@ -2,8 +2,10 @@ var crypto = require("crypto")
   , path   = require("path")
   , fs     = require("fs")
 
+  , existsSync = fs.existsSync || path.existsSync
+
   , keysPath = path.join(__dirname, "defaultKeys.json")
-  , defaults = fs.existsSync(keysPath)
+  , defaults = existsSync(keysPath)
       ? JSON.parse(fs.readFileSync(keysPath))
       : undefined
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-keygrip.git



More information about the Pkg-javascript-commits mailing list