Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit ec82410

Browse files
fix lint errors
1 parent 67a1dca commit ec82410

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
const sprintf2 = require('sprintf-js').sprintf;
1+
var sprintf2 = require('sprintf-js').sprintf;
22

3-
const sprintf = (message, moduleName, data) => {
4-
const dataValues = Object.keys(data).map(k => data[k]);
3+
var sprintf = function(message, moduleName, data) {
4+
var dataValues = Object.keys(data).map(function(k) { return data[k]; });
55
try {
6-
return {
7-
...data,
8-
message: sprintf2.apply(sprintf2, [message, moduleName, ...dataValues]),
9-
}
10-
} catch (error) {
11-
}
6+
return Object.assign({}, data, {
7+
message: sprintf2.apply(sprintf2, [message, moduleName].concat(dataValues)),
8+
});
9+
} catch (error) {}
1210
};
1311

1412
module.exports = sprintf;

0 commit comments

Comments
 (0)