Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Lint package module.

  • Loading branch information...
commit 7566fdeeb51b5fde3e6d3167699241ef91cb3eff 1 parent 5e11dab
@reid authored
Showing with 12 additions and 7 deletions.
  1. +12 −7 lib/package.js
View
19 lib/package.js
@@ -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;
-}
+};
Please sign in to comment.
Something went wrong with that request. Please try again.