fixed white spacing and added (embarrassing absent) variable declarations

master
midknight41 2013-10-26 20:40:12 +01:00
parent ccd609c1c3
commit 6c1eb5e917
2 changed files with 49 additions and 49 deletions

View File

@ -98,7 +98,7 @@ File.prototype.load = function (callback) {
try {
//deals with string that include BOM
stringData = data.toString();
var stringData = data.toString();
if (stringData.charAt(0) === '\uFEFF') stringData = stringData.substr(1);
self.store = self.format.parse(stringData);
@ -131,7 +131,7 @@ File.prototype.loadSync = function () {
//
try {
//deals with file that include BOM
fileData = fs.readFileSync(this.file, 'utf8');
var fileData = fs.readFileSync(this.file, 'utf8');
if (fileData.charAt(0) === '\uFEFF') fileData = fileData.substr(1);
data = this.format.parse(fileData);

View File

@ -85,7 +85,7 @@ vows.describe('nconf/stores/file').addBatch({
},
"should load the data correctly": function (err, data) {
assert.isNull(err);
assert.deepEqual(data, this.store.store)
assert.deepEqual(data, this.store.store);
}
},
"the loadSync() method": {