Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

macaddress

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

macaddress - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

12

index.js

@@ -56,8 +56,8 @@ /* jshint node: true */

addresses[name] = iface.mac;
if (iface.ipv4 || iface.ipv6) {
if (iface.ipv4) {
score += 1;
if (iface.ipv4 && iface.ipv6) {
score += 1;
}
}
if (iface.ipv6) {
score += 1;
}
if (goodIfaces.test(name)) {

@@ -109,6 +109,4 @@ score += 2;

}
var ifaces = lib.networkInterfaces();
var resolve = {};
Object.keys(ifaces).forEach(function (iface) {

@@ -119,3 +117,2 @@ if (!ifaces[iface].mac) {

});
if (Object.keys(resolve).length === 0) {

@@ -127,3 +124,2 @@ if (typeof callback === "function") {

}
util.parallel(resolve, function (err, result) {

@@ -130,0 +126,0 @@ Object.keys(result).forEach(function (iface) {

{
"name": "macaddress",
"version": "0.5.1",
"version": "0.5.2",
"description": "Get the MAC addresses (hardware addresses) of the hosts network interfaces.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,3 +6,3 @@ node-macaddress

Retrieve MAC addresses in Linux, OS X, and Windows.
Retrieve [MAC addresses](https://en.wikipedia.org/wiki/MAC_address) in Linux, OS X, and Windows.

@@ -17,2 +17,6 @@ A common misconception about MAC addresses is that every *host* had *one* MAC address,

A common misconception about this library is that it reports the mac address of the client that accesses some kind of backend. It does not. Reporting the mac address is not in any way similar to reporting the IP address of the client that accesses your application. This library reports the mac address of the server the application is running on. This useful for example for distributed/scaled applications, for example when generating UUIDs.
Also it seems to be worth noting that this library is not intended to be used in a browser. There is no web api reporting the mac address of the machine (and that is a good thing).
**Features:**

@@ -69,3 +73,3 @@

```JavaScript
macaddress.one.then(function (mac) {
macaddress.one().then(function (mac) {
console.log("Mac address for this host: %s", mac);

@@ -72,0 +76,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc