Skip to content

Commit 5fa8e48

Browse files
committed
DataProvider: Rename data_path to dataPath
1 parent 1d992e0 commit 5fa8e48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/data_provider.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ class FsDataProvider extends BaseDataProvider {
6262
constructor(dataRootPath) {
6363
super();
6464

65-
this.data_path = dataRootPath;
65+
this.dataPath = dataRootPath;
6666
}
6767

6868
_loadData(dataName) {
6969
return new Promise((resolve, reject) => {
70-
fs.readFile(`${this.data_path}/${dataName}.data`, (err, data) => {
70+
fs.readFile(`${this.dataPath}/${dataName}.data`, (err, data) => {
7171
if (err) return reject(err);
7272
return resolve(data.toString('utf8'));
7373
});
@@ -81,7 +81,7 @@ class FsDataProvider extends BaseDataProvider {
8181
*/
8282
list() {
8383
return new Promise((resolve, reject) => {
84-
fs.readdir(this.data_path, (err, data) => {
84+
fs.readdir(this.dataPath, (err, data) => {
8585
if (err) return reject(err);
8686

8787
const list = data.filter(x => x.endsWith('.data'))

0 commit comments

Comments
 (0)