Skip to content
๐Ÿ”ฎ Find devices connected to the current local network.
JavaScript
Branch: master
Clone or download
Fetching latest commitโ€ฆ
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__
src
.all-contributorsrc
.coveralls.yml.example
.gitignore
.nvmrc
.travis.yml
CHANGES.md
LICENCE
README.md
jest-setup.js
package-lock.json
package.json 3.0.0 Oct 29, 2019

README.md

Local Devices

version MIT License js-standard-style All Contributors PRs Welcome

Build Status Coverage Status Watch on GitHub Star on GitHub

Find all devices connected to the local network using arp -a. This module also pings all possible ip's in the local network to build the arp table.

Installation

Npm

npm install local-devices

Example

// Using a transpiler
import find from 'local-devices'
// Without using a transpiler
const find = require('local-devices');

// Find all local network devices.
find().then(devices => {
  devices /*
  [
    { name: '?', ip: '192.168.0.10', mac: '...' },
    { name: '...', ip: '192.168.0.17', mac: '...' },
    { name: '...', ip: '192.168.0.21', mac: '...' },
    { name: '...', ip: '192.168.0.22', mac: '...' }
  ]
  */
})

// Find a single device by ip address.
find('192.168.0.10').then(device => {
  device /*
  {
    name: '?',
    ip: '192.168.0.10',
    mac: '...'
  }
  */
})

Contributions

  • Use npm test to run tests.

Please feel free to create a PR!

Contributors

Thanks goes to these wonderful people (emoji key):

Dylan Piercey
Dylan Piercey

๐Ÿ’ป ๐Ÿ’ก ๐Ÿ‘€ ๐Ÿ“– ๐Ÿค” ๐Ÿ’ฌ
Stefan Natter
Stefan Natter

๐Ÿ’ป โš ๏ธ ๐Ÿ› ๐Ÿ“– ๐Ÿค”
kounelios13
kounelios13

๐Ÿ› ๐Ÿ“–
MarkusSuomi
MarkusSuomi

๐Ÿ’ป
Xavier Martin
Xavier Martin

๐Ÿ’ป
howel52
howel52

๐Ÿ’ป ๐Ÿ›
LucaSoldi
LucaSoldi

๐Ÿ’ป ๐Ÿ›

This project follows the all-contributors specification. Contributions of any kind are welcome!

How to add Contributors

Contributors can be added with the all-contributors cli. The cli is already installed and can be used like this:

yarn all-contributors add <username> <emoji-keys>

LICENCE

MIT

You canโ€™t perform that action at this time.