UNPKG

node-getmacip

Version:

Get local IP address and MAC address

30 lines (20 loc) 281 B
## 安装 ``` npm install node-getmacip ``` ## 导入 ``` const {getMac, getIp} = require('node-getmacip') ``` ## 获取 mac ``` let mac = getMac() console.log(mac) ``` ## 获取 ip ``` let ip = getIp() console.log(ip) ``` ## 开源协议 ISC