Permalink
Browse files

Lint package module.

  • Loading branch information...
1 parent 5e11dab commit 7566fdeeb51b5fde3e6d3167699241ef91cb3eff @reid reid committed Mar 8, 2012
Showing with 12 additions and 7 deletions.
  1. +12 −7 lib/package.js
View
@@ -8,12 +8,17 @@ var cache;
// Read package metadata.
// Cache it for subsequent runs.
exports.readPackageSync = function () {
- if (!cache) cache = JSON.parse(
- fs.readFileSync(
- path.join(
- __dirname, "..", "package.json"
+ if (!cache) {
+ cache = JSON.parse(
+ fs.readFileSync(
+ path.join(
+ __dirname,
+ "..",
+ "package.json"
+ ),
+ "utf8"
)
- ) + ""
- );
+ );
+ }
return cache;
-}
+};

0 comments on commit 7566fde

Please sign in to comment.