diff options
author | Rich Trott <rtrott@gmail.com> | 2014-10-28 22:08:09 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2014-10-28 22:08:09 +0300 |
commit | 369f2d4b76740bcdc7f14291b4621f79c7fa1ee8 (patch) | |
tree | e2018bf1bed8fa86bf7616c76bc15236893923e5 /lib | |
parent | 74ae6f619f52def1415862997d5ad13d23f2805b (diff) |
mv var to top of function to be consistent with style in rest of file
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rewire.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rewire.js b/lib/rewire.js index 5644599..167d7b3 100644 --- a/lib/rewire.js +++ b/lib/rewire.js @@ -19,7 +19,8 @@ var srcs = { function internalRewire(parentModulePath, targetPath) { var targetModule, prelude, - appendix; + appendix, + src; // Checking params if (typeof targetPath !== "string") { @@ -56,7 +57,7 @@ function internalRewire(parentModulePath, targetPath) { // Check if the module uses the strict mode. // If so we must ensure that "use strict"; stays at the beginning of the module. - var src = fs.readFileSync(targetPath, "utf8"); + src = fs.readFileSync(targetPath, "utf8"); if (detectStrictMode(src) === true) { prelude = ' "use strict"; ' + prelude; } |