{"_id":"@4hera/local-devices","_rev":"5-db367a630387366ea26ce4dbe7872ced","name":"@4hera/local-devices","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@4hera/local-devices","version":"1.0.0","keywords":["arp","devices","ip","local","mac","mac-address","scan","4hera","hera"],"author":{"name":"4HERA Team"},"license":"MIT","_id":"@4hera/local-devices@1.0.0","maintainers":[{"name":"4hera","email":"team@4hera.com"}],"homepage":"http://-","dist":{"shasum":"64de08e3228da75ee61a830de5a97239fbbfb90a","tarball":"https://registry.npmjs.org/@4hera/local-devices/-/local-devices-1.0.0.tgz","fileCount":8,"integrity":"sha512-RlDb8dPca3HAC0Y7lumo5cTRJMfQqTLca6t1aSe6hA8K3by7eOWUi5mCJ0kkq11OrgpoEYE7xwrOZq4i2BANEg==","signatures":[{"sig":"MEUCIFDtfNOIbtweFBCpDaDXEQKrVgEh2OrlF/xXHJ5RuXQsAiEAiLUlXEBZrMMTyxgpLuYr+NUvz78aUS2Y4jUvJRnX4ZY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16421},"jest":{"setupFiles":["./jest-setup.js"]},"main":"src/index.js","husky":{"hooks":{"pre-push":"npm test","pre-commit":"lint-staged"}},"types":"./src/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"d432b8f6f26ed214362cc761c260a410373c53f2","scripts":{"lint":"standard --verbose | snazzy","test":"jest","pretest":"npm run lint","watch-test":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"4hera","email":"team@4hera.com"},"standard":{"globals":["jest","describe","beforeAll","afterAll","beforeEach","afterEach","it","expect"]},"repository":{"url":"-","type":"git"},"_npmVersion":"11.6.0","description":"Find devices connected to the current local network.","directories":{},"lint-staged":{"*.js":["npm run lint","git update-index --again","jest --findRelatedTests"]},"_nodeVersion":"24.9.0","dependencies":{"ipaddr.js":"^2.2.0","cidr-tools":"^7.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^9.1.6","snazzy":"^9.0.0","standard":"^17.1.2","@types/jest":"^29.5.14","lint-staged":"^15.2.10"},"_npmOperationalInternal":{"tmp":"tmp/local-devices_1.0.0_1759336119658_0.851807229270191","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@4hera/local-devices","version":"1.0.1","keywords":["arp","devices","ip","local","mac","mac-address","scan","4hera","hera"],"author":{"name":"4HERA Team"},"license":"MIT","_id":"@4hera/local-devices@1.0.1","maintainers":[{"name":"4hera","email":"team@4hera.com"}],"homepage":"http://-","dist":{"shasum":"de95729002f0bb261d995126ebf80ffdc0308760","tarball":"https://registry.npmjs.org/@4hera/local-devices/-/local-devices-1.0.1.tgz","fileCount":8,"integrity":"sha512-cEKnp+1kjFseiFZYMNORlmGyMEDSpdq8RIbg1Prxi95v/paGZnEMPIeDgtkGJ6nMrtbkAg6xo5O9etJSY41oWQ==","signatures":[{"sig":"MEYCIQDbYEla/Nj6XHHiOyhqQKcwDn0oQk76PurbED6bbAOyLgIhAJunnHlIBDzGxvnKR4SPM9jqRoy3sNV0OCNmLluvxhPi","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17380},"jest":{"setupFiles":["./jest-setup.js"]},"main":"src/index.js","husky":{"hooks":{"pre-push":"npm test","pre-commit":"lint-staged"}},"types":"./src/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"30c186f79a1efaf219366c43557a583cb1b41ad8","scripts":{"lint":"standard --verbose | snazzy","test":"jest","pretest":"npm run lint","watch-test":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"4hera","email":"team@4hera.com"},"standard":{"globals":["jest","describe","beforeAll","afterAll","beforeEach","afterEach","it","expect"]},"repository":{"url":"-","type":"git"},"_npmVersion":"11.6.0","description":"Find devices connected to the current local network.","directories":{},"lint-staged":{"*.js":["npm run lint","git update-index --again","jest --findRelatedTests"]},"_nodeVersion":"24.9.0","dependencies":{"ipaddr.js":"^2.2.0","cidr-tools":"^11.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","husky":"^9.1.7","snazzy":"^9.0.0","standard":"^17.1.2","@types/jest":"^30.0.0","lint-staged":"^16.2.3"},"_npmOperationalInternal":{"tmp":"tmp/local-devices_1.0.1_1759348441709_0.9683499657888728","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@4hera/local-devices","version":"1.0.3","keywords":["arp","devices","ip","local","mac","mac-address","scan","network","subnet","hera","4hera","local-devices"],"author":{"name":"4Hera Team"},"license":"MIT","_id":"@4hera/local-devices@1.0.3","maintainers":[{"name":"4hera","email":"team@4hera.com"}],"dist":{"shasum":"400f01dd1b7bc92149c40860894b155fb603caab","tarball":"https://registry.npmjs.org/@4hera/local-devices/-/local-devices-1.0.3.tgz","fileCount":12,"integrity":"sha512-rj/GTiVR2ovFHgJbTEbF0wvBJ/Z75PM0xrLmSXdqUkQITCaoNFaml19bcrMtXlmndoj4pgiSthShuJ7uqGmbnQ==","signatures":[{"sig":"MEUCIQDOLsSAjxEmrtq+Vw+IkIRdBSKVzUScKTDzyAKehrtvKAIgdQeCFAMt7pcs84zl3Tt7CApCVCChVV1uZiFQy3mEjgE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24073},"jest":{"globals":{"NODE_OPTIONS":"--experimental-vm-modules"},"transform":{},"setupFiles":["./jest-setup.js"],"testEnvironment":"node"},"main":"src/index.js","type":"commonjs","husky":{"hooks":{"pre-push":"npm test","pre-commit":"lint-staged"}},"types":"./src/index.d.ts","engines":{"node":">=10.17"},"exports":{".":{"types":"./src/index.d.ts","import":"./src/index.mjs","require":"./src/index.js"}},"gitHead":"d4deb84bc71dee18af9558829804087024854ebc","scripts":{"lint":"standard --verbose | snazzy","test":"jest --testPathIgnorePatterns=esm.test.mjs","pretest":"npm run lint","test:esm":"echo ESM tests moved to test_project for better compatibility","coveralls":"jest --coverage && cat ./coverage/lcov.info | coveralls","watch-test":"jest --watch","contributors:add":"all-contributors add","contributors:generate":"all-contributors generate"},"_npmUser":{"name":"4hera","email":"team@4hera.com"},"standard":{"globals":["jest","describe","beforeAll","afterAll","beforeEach","afterEach","it","expect"]},"_npmVersion":"11.6.0","description":"Find devices connected to the current local network.","directories":{},"lint-staged":{"*.js":["npm run lint","git update-index --again","jest --findRelatedTests"]},"_nodeVersion":"24.9.0","dependencies":{"ip":"^2.0.1","mz":"^2.7.0","get-ip-range":"^4.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","husky":"^9.1.7","snazzy":"^9.0.0","standard":"^17.1.2","coveralls":"^3.1.1","@types/jest":"^30.0.0","lint-staged":"^16.2.3"},"_npmOperationalInternal":{"tmp":"tmp/local-devices_1.0.3_1759396467382_0.7014739816945021","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@4hera/local-devices","version":"1.0.4","keywords":["arp","devices","ip","local","mac","mac-address","scan","network","subnet","hera","4hera","local-devices"],"author":{"name":"4Hera Team"},"license":"MIT","_id":"@4hera/local-devices@1.0.4","maintainers":[{"name":"4hera","email":"team@4hera.com"}],"dist":{"shasum":"6e8d1f8e5678d52c2e6b0abc142b231139c8f561","tarball":"https://registry.npmjs.org/@4hera/local-devices/-/local-devices-1.0.4.tgz","fileCount":14,"integrity":"sha512-sOi/0VtuxG/CgiNg9o+1C3wIzUMg+ytbtgbLNUV9zGW94yplIfJlBmjZ7Pd+7ynhaP56goKcMR/vr+jX6xcl0g==","signatures":[{"sig":"MEUCIQCCxouDn9inQLL4lmhi2/thVFEi5qPeJSCb17nlfZJA6gIgE8opAY6Nv4itPmN4jZjomrIUth1B9Tnbjcs/GsKpLIk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24197},"jest":{"globals":{"NODE_OPTIONS":"--experimental-vm-modules"},"transform":{},"setupFiles":["./jest-setup.js"],"testEnvironment":"node"},"main":"src/index.js","type":"commonjs","husky":{"hooks":{"pre-push":"npm test","pre-commit":"lint-staged"}},"types":"./src/index.d.ts","engines":{"node":">=10.17"},"exports":{".":{"types":"./src/index.d.ts","import":"./src/index.mjs","require":"./src/index.js"}},"gitHead":"549912227bcb38839c7ad365a7c360e00dde9d4a","scripts":{"lint":"standard --verbose | snazzy","test":"jest --testPathIgnorePatterns=esm.test.mjs","pretest":"npm run lint","test:esm":"echo ESM tests moved to test_project for better compatibility","coveralls":"jest --coverage && cat ./coverage/lcov.info | coveralls","watch-test":"jest --watch"},"_npmUser":{"name":"4hera","email":"team@4hera.com"},"standard":{"globals":["jest","describe","beforeAll","afterAll","beforeEach","afterEach","it","expect"]},"_npmVersion":"11.6.0","description":"Find devices connected to the current local network.","directories":{},"lint-staged":{"*.js":["npm run lint","git update-index --again","jest --findRelatedTests"]},"_nodeVersion":"24.9.0","dependencies":{"ip":"^2.0.1","get-ip-range":"^4.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","husky":"^9.1.7","snazzy":"^9.0.0","standard":"^17.1.2","coveralls":"^3.1.1","@types/jest":"^30.0.0","lint-staged":"^16.2.3"},"_npmOperationalInternal":{"tmp":"tmp/local-devices_1.0.4_1759423481711_0.036088735386941906","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@4hera/local-devices","description":"Find devices connected to the current local network.","version":"1.0.5","author":{"name":"4Hera Team"},"license":"MIT","main":"src/index.js","type":"commonjs","exports":{".":{"types":"./src/index.d.ts","import":"./src/index.mjs","require":"./src/index.js"}},"scripts":{"coveralls":"jest --coverage && cat ./coverage/lcov.info | coveralls","lint":"standard --verbose | snazzy","test":"jest --testPathIgnorePatterns=esm.test.mjs","test:esm":"echo ESM tests moved to test_project for better compatibility","pretest":"npm run lint","watch-test":"jest --watch"},"types":"./src/index.d.ts","dependencies":{"get-ip-range":"^4.0.1","ip":"^2.0.1"},"devDependencies":{"@types/jest":"^30.0.0","coveralls":"^3.1.1","cross-env":"^10.1.0","jest":"^30.2.0","lint-staged":"^16.2.3","snazzy":"^9.0.0","standard":"^17.1.2"},"engines":{"node":">=10.17"},"keywords":["arp","devices","ip","local","mac","mac-address","scan","network","subnet","hera","4hera","local-devices"],"lint-staged":{"*.{js,mjs}":["npm run lint","git update-index --again","jest --findRelatedTests"]},"jest":{"setupFiles":["./jest-setup.js"],"testEnvironment":"node","globals":{},"transform":{}},"standard":{"globals":["jest","describe","beforeAll","afterAll","beforeEach","afterEach","it","expect"]},"_id":"@4hera/local-devices@1.0.5","gitHead":"a8cabc41eeeb423aa11221b16e934af207d20b87","_nodeVersion":"24.9.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-mHTbkvYfK1hCZBrw3is3nTEjjYiQCMoUct6Z1Pmwso0vZGHCNHoqnwMPKpJRHBkl2lieaGp2zKhLJpmCFqDw0A==","shasum":"9bd9e2d47d4979fc49d08862e3c57249f4b7ae82","tarball":"https://registry.npmjs.org/@4hera/local-devices/-/local-devices-1.0.5.tgz","fileCount":14,"unpackedSize":24324,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHUct16Sq72egm4uUx+o+7e33ACEdAM9e4NpfY84grvaAiBBfYyogAnlImuT1Q3ah7JwJrZKJn2ZvwLaVQn5XoxrZg=="}]},"_npmUser":{"name":"4hera","email":"team@4hera.com"},"directories":{},"maintainers":[{"name":"4hera","email":"team@4hera.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/local-devices_1.0.5_1759424827438_0.4972657335647037"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-01T16:28:39.586Z","modified":"2025-10-02T17:07:07.808Z","1.0.0":"2025-10-01T16:28:39.836Z","1.0.1":"2025-10-01T19:54:01.901Z","1.0.3":"2025-10-02T09:14:27.557Z","1.0.4":"2025-10-02T16:44:41.955Z","1.0.5":"2025-10-02T17:07:07.629Z"},"author":{"name":"4Hera Team"},"license":"MIT","keywords":["arp","devices","ip","local","mac","mac-address","scan","network","subnet","hera","4hera","local-devices"],"description":"Find devices connected to the current local network.","maintainers":[{"name":"4hera","email":"team@4hera.com"}],"readme":"# @4hera/local-devices\n\n<div align=\"center\">\n  <img src=\"https://www.4hera.com/img/4hera_logo.png\" alt=\"Local Devices Logo\" width=\"200\">\n  <p><strong>Find devices connected to the current local network</strong></p>\n</div>\n\nA powerful Node.js library for discovering devices on your local network by scanning ARP tables. \n\n🔍 **Network Discovery**: Find all devices connected to your local network  \n🛡️ **Security Enhanced**: Built-in protection against command injection attacks  \n🌐 **Cross-Platform**: Works on Windows, macOS, and Linux  \n📊 **Rich Device Info**: Get IP addresses, MAC addresses, and hostnames  \n🎯 **Flexible Targeting**: Scan specific IP addresses or ranges  \n⚡ **High Performance**: Optimized for speed and reliability  \n\n## Installation\n\n```bash\nnpm install @4hera/local-devices\n```\n\n## Usage\n\n### Basic Usage\n\n```javascript\nconst findLocalDevices = require('@4hera/local-devices')\n\n// Find all devices on the local network\nfindLocalDevices()\n  .then(devices => {\n    console.log('Found devices:', devices)\n    // Example output:\n    // [\n    //   { ip: '192.168.1.1', mac: 'aa:bb:cc:dd:ee:ff', name: 'router.local' },\n    //   { ip: '192.168.1.100', mac: '11:22:33:44:55:66', name: 'laptop.local' }\n    // ]\n  })\n  .catch(error => {\n    console.error('Error finding devices:', error)\n  })\n```\n\n### Advanced Usage\n\n```javascript\n// Scan a specific IP address\nfindLocalDevices({ address: '192.168.1.100' })\n  .then(device => {\n    console.log('Device:', device)\n  })\n\n// Scan a range of IP addresses\nfindLocalDevices({ address: '192.168.1.1-192.168.1.254' })\n  .then(devices => {\n    console.log('Devices in range:', devices)\n  })\n\n// Scan using CIDR notation\nfindLocalDevices({ address: '192.168.1.0/24' })\n  .then(devices => {\n    console.log('Devices in subnet:', devices)\n  })\n\n// Skip name resolution for faster scanning\nfindLocalDevices({ skipNameResolution: true })\n  .then(devices => {\n    console.log('Devices (no hostnames):', devices)\n  })\n\n// Use custom ARP command path\nfindLocalDevices({ arpPath: '/usr/sbin/arp' })\n  .then(devices => {\n    console.log('Devices:', devices)\n  })\n```\n\n## API Reference\n\n### findLocalDevices(options)\n\nReturns a Promise that resolves to an array of device objects.\n\n#### Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| address | string | '' | IP address, range, or CIDR to scan |\n| skipNameResolution | boolean | false | Skip hostname resolution for faster scanning |\n| arpPath | string | 'arp' | Path to the ARP command |\n\n#### Device Object\n```javascript\n{\n  ip: '192.168.1.100',           // IP address\n  mac: '11:22:33:44:55:66',      // MAC address\n  name: 'device.local'           // Hostname (if available)\n}\n```\n\n## Security Features\n\nThis 4HERA Team edition includes enhanced security features:\n\n- Command Injection Protection: Validates all input parameters\n- Input Sanitization: Sanitizes IP addresses and ranges\n- Error Handling: Comprehensive error handling for invalid inputs\n\n## Platform Support\n\n- ✅ Windows: Uses `arp -a` command\n- ✅ Linux: Uses `arp -a` or `arp -an` command\n- ✅ macOS: Uses `arp -a` command\n\n## Requirements\n\n- Node.js >= 10.17\n- Network access to local subnet\n- Appropriate permissions to execute ARP commands\n\n## Contributing\n\nThis is a 4HERA Team maintained package. For contributions, issues, or feature requests, please visit our GitHub repository.\n\n## License\n\nMIT License\n\n```\nMIT License\n\nCopyright (c) 2025 4HERA Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n## 4HERA Team\n\nThis package is maintained by the 4HERA Team. For more information about our projects and team, visit our organization page.\n\n> Note: This is the official 4HERA Team edition of local-devices with enhanced security and additional features.","readmeFilename":"README.md"}