Wondering what’s next for npm?Check out our public roadmap! »

network-interface

1.0.0 • Public • Published

network-interface


NPM version build status node version npm download

Operating system network-related library for Node.js is used to obtain hardware status and network environment changes, etc.

Introduction

The goal of this project is to provide a library that can be used by Node.js so that we can accurately obtain the current computer network status and support the integrated use of frameworks like Electron. At this stage, only some APIs of wlanapi and netlistmgr are wrapped.

More cases

  1. https://paradite.com/2016/09/28/my-experience-building-progressive-web-app-pwa
  2. https://github.com/electron/electron/issues/11290

Installment

$ npm i network-interface --save

Usage

const networkInterface = require('network-interface');
 
networkInterface.addEventListener('wlan-status-changed', (error, data) => {
  if (error) {
    throw error;
    return;
  }
  console.log('event fired: wlan-status-changed');
  console.log(data);
});

Future plan

Only supports windows platform? Because I don’t need to solve the problems of other platforms, others may be supported in the future, and hope you can give some contributions.

License

The MIT License (MIT)

Install

npm i network-interface

DownloadsWeekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

1.05 MB

Total Files

7

Last publish

Collaborators

  • avatar