code cleanup
This commit is contained in:
parent
bda9fba255
commit
4f98f2ff20
13
.eslintrc
Normal file
13
.eslintrc
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": false,
|
||||||
|
"commonjs": true,
|
||||||
|
"es2021": true,
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 12
|
||||||
|
},
|
||||||
|
"rules": {}
|
||||||
|
}
|
||||||
@ -757,7 +757,7 @@ function decodePiCpuinfo(lines) {
|
|||||||
const serial = getValue(lines, 'serial', ':', true);
|
const serial = getValue(lines, 'serial', ':', true);
|
||||||
|
|
||||||
let result = {};
|
let result = {};
|
||||||
if (oldRevisionCodes.hasOwnProperty(revisionCode)) {
|
if ({}.hasOwnProperty.call(oldRevisionCodes, revisionCode)) {
|
||||||
// old revision codes
|
// old revision codes
|
||||||
result = {
|
result = {
|
||||||
model,
|
model,
|
||||||
@ -787,7 +787,7 @@ function decodePiCpuinfo(lines) {
|
|||||||
memory: 256 * Math.pow(2, memSizeCode),
|
memory: 256 * Math.pow(2, memSizeCode),
|
||||||
manufacturer,
|
manufacturer,
|
||||||
processor,
|
processor,
|
||||||
type: typeList.hasOwnProperty(typeCode) ? typeList[typeCode] : '',
|
type: {}.hasOwnProperty.call(typeList, typeCode) ? typeList[typeCode] : '',
|
||||||
revision: '1.' + revision.substr(7, 1),
|
revision: '1.' + revision.substr(7, 1),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user