fixed white spacing and added (embarrassing absent) variable declarations
This commit is contained in:
parent
ccd609c1c3
commit
6c1eb5e917
2 changed files with 49 additions and 49 deletions
|
@ -98,7 +98,7 @@ File.prototype.load = function (callback) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//deals with string that include BOM
|
//deals with string that include BOM
|
||||||
stringData = data.toString();
|
var stringData = data.toString();
|
||||||
|
|
||||||
if (stringData.charAt(0) === '\uFEFF') stringData = stringData.substr(1);
|
if (stringData.charAt(0) === '\uFEFF') stringData = stringData.substr(1);
|
||||||
self.store = self.format.parse(stringData);
|
self.store = self.format.parse(stringData);
|
||||||
|
@ -131,7 +131,7 @@ File.prototype.loadSync = function () {
|
||||||
//
|
//
|
||||||
try {
|
try {
|
||||||
//deals with file that include BOM
|
//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);
|
if (fileData.charAt(0) === '\uFEFF') fileData = fileData.substr(1);
|
||||||
|
|
||||||
data = this.format.parse(fileData);
|
data = this.format.parse(fileData);
|
||||||
|
|
|
@ -85,7 +85,7 @@ vows.describe('nconf/stores/file').addBatch({
|
||||||
},
|
},
|
||||||
"should load the data correctly": function (err, data) {
|
"should load the data correctly": function (err, data) {
|
||||||
assert.isNull(err);
|
assert.isNull(err);
|
||||||
assert.deepEqual(data, this.store.store)
|
assert.deepEqual(data, this.store.store);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"the loadSync() method": {
|
"the loadSync() method": {
|
||||||
|
|
Loading…
Reference in a new issue