Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
keeramis committed May 14, 2024
1 parent 135d91c commit a537e4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/network-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ const NetworkDevice = base => class extends base {
// Helper function to get active flags of a network interface
_getActiveFlags(flags, flagDefinitions) {
const activeFlags = [];
for (const [key, value] of Object.entries(flagDefinitions)) {
for (const value of Object.values(flagDefinitions)) {
if (value !== 0 && (flags & value)) {
activeFlags.push(value);
}
Expand Down Expand Up @@ -216,7 +216,7 @@ const NetworkDevice = base => class extends base {

const activeFlags = this._getActiveFlags(flags, proto.InterfaceFlag);
const flagsStrings = activeFlags.map(flag => InterfaceFlag.fromProtobuf(flag));

const result = {
index: ifaceIndex,
name,
Expand Down
2 changes: 1 addition & 1 deletion src/network-device.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('NetworkDevice', () => {
'mtu': 1500,
'flagsVal': 98307,
'extFlags': 1048576,
'flagsStrings': ['UP', "BROADCAST", 'MULTICAST', 'NOND6'],
'flagsStrings': ['UP', 'BROADCAST', 'MULTICAST', 'NOND6'],
'metric': 0,
'profile': Buffer.from([])
};
Expand Down

0 comments on commit a537e4e

Please sign in to comment.