Skip to content

Commit 5a38190

Browse files
committed
fix eslint errors in lstm and w2v
1 parent 3dac4fa commit 5a38190

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/LSTM/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ class LSTM {
152152
}
153153
}
154154

155-
const LSTMGenerator = (modelPath = './', callback) => {
156-
return new LSTM(modelPath, callback);
157-
};
155+
const LSTMGenerator = (modelPath = './', callback) => new LSTM(modelPath, callback);
158156

159157
export default LSTMGenerator;

src/Word2vec/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ class Word2Vec {
117117
}
118118
}
119119

120-
const word2vec = (model, cb) => {
121-
return new Word2Vec(model, cb);
122-
};
120+
const word2vec = (model, cb) => new Word2Vec(model, cb);
123121

124122
export default word2vec;

src/utils/callcallback.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
export default function callCallback(promise, callback) {
77
if (callback) {
88
promise
9-
.then(result => {
9+
.then((result) => {
1010
callback(undefined, result);
1111
return result;
1212
})
13-
.catch(error => {
13+
.catch((error) => {
1414
callback(error);
1515
});
1616
}

0 commit comments

Comments
 (0)