Gathering detailed insights and metrics for address
Gathering detailed insights and metrics for address
Gathering detailed insights and metrics for address
Gathering detailed insights and metrics for address
npm install address
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (96.73%)
JavaScript (3.27%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
238 Stars
52 Commits
33 Forks
22 Watchers
4 Branches
28 Contributors
Updated on Mar 04, 2025
Latest Version
2.0.3
Package Id
address@2.0.3
Unpacked Size
61.12 kB
Size
13.37 kB
File Count
20
NPM Version
10.7.0
Node Version
18.20.3
Published on
Jun 19, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Get current machine IPv4, IPv6, MAC and DNS servers.
DNS servers receive from /etc/resolv.conf
.
1npm install address
Get IP is sync and get MAC is async for now.
1import { ip, ipv6, mac } from 'address'; 2 3// default interface 'eth' on linux, 'en' on osx. 4ip(); // '192.168.0.2' 5ipv6(); // 'fe80::7aca:39ff:feb0:e67d' 6mac(function (err, addr) { 7 console.log(addr); // '78:ca:39:b0:e6:7d' 8}); 9 10// local loopback 11ip('lo'); // '127.0.0.1' 12 13// vboxnet MAC 14mac('vboxnet', function (err, addr) { 15 console.log(addr); // '0a:00:27:00:00:00' 16});
1const { ip, ipv6, mac } = require('address'); 2 3// default interface 'eth' on linux, 'en' on osx. 4ip(); // '192.168.0.2' 5ipv6(); // 'fe80::7aca:39ff:feb0:e67d' 6mac(function (err, addr) { 7 console.log(addr); // '78:ca:39:b0:e6:7d' 8}); 9 10// local loopback 11ip('lo'); // '127.0.0.1' 12 13// vboxnet MAC 14mac('vboxnet', function (err, addr) { 15 console.log(addr); // '0a:00:27:00:00:00' 16});
1import { address } from 'address'; 2 3address((err, addrs) => { 4 console.log(addrs.ip, addrs.ipv6, addrs.mac); 5 // '192.168.0.2', 'fe80::7aca:39ff:feb0:e67d', '78:ca:39:b0:e6:7d' 6}); 7 8address('vboxnet', (err, addrs) => { 9 console.log(addrs.ip, addrs.ipv6, addrs.mac); 10 // '192.168.56.1', null, '0a:00:27:00:00:00' 11});
1const { address } = require('address'); 2 3address((err, addrs) => { 4 console.log(addrs.ip, addrs.ipv6, addrs.mac); 5 // '192.168.0.2', 'fe80::7aca:39ff:feb0:e67d', '78:ca:39:b0:e6:7d' 6}); 7 8address('vboxnet', (err, addrs) => { 9 console.log(addrs.ip, addrs.ipv6, addrs.mac); 10 // '192.168.56.1', null, '0a:00:27:00:00:00' 11});
1import { getInterfaceAddress } from 'address'; 2 3getInterfaceAddress('IPv4', 'eth1'); 4// { address: '192.168.1.1', family: 'IPv4', mac: '78:ca:39:b0:e6:7d' }
1const { getInterfaceAddress } = require('address'); 2 3getInterfaceAddress('IPv4', 'eth1'); 4// { address: '192.168.1.1', family: 'IPv4', mac: '78:ca:39:b0:e6:7d' }
1import { dns } from 'address'; 2 3dns((err, servers) => { 4 console.log(servers); 5 // ['10.13.2.1', '10.13.2.6'] 6});
1const { dns } = require('address'); 2 3dns((err, servers) => { 4 console.log(servers); 5 // ['10.13.2.1', '10.13.2.6'] 6});
1import { address, mac, dns } from 'address/promises'; 2 3const addr = await address(); 4const macAddress = await mac(); 5const servers = await dns();
fengmk2 | alsotang | jkelleyrtp | slyon | mariodu | mathieutu |
---|---|---|---|---|---|
zhangyuheng | semantic-release-bot | coolme200 | whxaxes |
This project follows the git-contributor spec, auto updated at Fri Sep 22 2023 20:49:32 GMT+0800
.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 7/28 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More