{
  "manifest": {
    "name": "address",
    "version": "1.2.2",
    "description": "Get current machine IP, MAC and DNS servers.",
    "main": "lib/address.js",
    "types": "lib/address.d.ts",
    "files": [
      "lib"
    ],
    "scripts": {
      "lint": "eslint test",
      "test": "egg-bin test",
      "ci": "egg-bin cov",
      "contributors": "git-contributor"
    },
    "dependencies": {},
    "devDependencies": {
      "@types/node": "14",
      "egg-bin": "^5.6.1",
      "eslint": "^8.30.0",
      "eslint-config-egg": "^12.1.0",
      "git-contributor": "^1.1.0",
      "mm": "*",
      "runscript": "^1.4.0",
      "typescript": "4"
    },
    "repository": {
      "type": "git",
      "url": "git://github.com/node-modules/address.git"
    },
    "keywords": [
      "address",
      "ip",
      "ipv4",
      "mac"
    ],
    "engines": {
      "node": ">= 10.0.0"
    },
    "author": {
      "name": "fengmk2",
      "email": "fengmk2@gmail.com"
    },
    "license": "MIT",
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-address-1.2.2-2b5248dac5485a6390532c6a517fda2e3faac89e-integrity/node_modules/address/package.json",
    "readmeFilename": "README.md",
    "readme": "address\n=======\n\n[![NPM version][npm-image]][npm-url]\n[![Node.js CI](https://github.com/node-modules/address/actions/workflows/nodejs.yml/badge.svg)](https://github.com/node-modules/address/actions/workflows/nodejs.yml)\n[![Test coverage][coveralls-image]][coveralls-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/address.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/address\n[coveralls-image]: https://img.shields.io/coveralls/node-modules/address.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/node-modules/address?branch=master\n[download-image]: https://img.shields.io/npm/dm/address.svg?style=flat-square\n[download-url]: https://npmjs.org/package/address\n\nGet current machine IP, MAC and DNS servers.\n\nDNS servers receive from `/etc/resolv.conf`.\n\n## Install\n\n```bash\n$ npm install address\n```\n\n## Usage\n\nGet IP is sync and get MAC is async for now.\n\n```js\nconst address = require('address');\n\n// default interface 'eth' on linux, 'en' on osx.\naddress.ip();   // '192.168.0.2'\naddress.ipv6(); // 'fe80::7aca:39ff:feb0:e67d'\naddress.mac(function (err, addr) {\n  console.log(addr); // '78:ca:39:b0:e6:7d'\n});\n\n// local loopback\naddress.ip('lo'); // '127.0.0.1'\n\n// vboxnet MAC\naddress.mac('vboxnet', function (err, addr) {\n  console.log(addr); // '0a:00:27:00:00:00'\n});\n```\n\n### Get all addresses: IPv4, IPv6 and MAC\n\n```js\naddress((err, addrs) => {\n  console.log(addrs.ip, addrs.ipv6, addrs.mac);\n  // '192.168.0.2', 'fe80::7aca:39ff:feb0:e67d', '78:ca:39:b0:e6:7d'\n});\n\naddress('vboxnet', (err, addrs) => {\n  console.log(addrs.ip, addrs.ipv6, addrs.mac);\n  // '192.168.56.1', null, '0a:00:27:00:00:00'\n});\n```\n\n### Get an interface info with family\n\n```js\naddress.interface('IPv4', 'eth1');\n// { address: '192.168.1.1', family: 'IPv4', mac: '78:ca:39:b0:e6:7d' }\n```\n\n### Get DNS servers\n\n```js\naddress.dns((err, addrs) => {\n  console.log(addrs);\n  // ['10.13.2.1', '10.13.2.6']\n});\n```\n\n## License\n\n[MIT](LICENSE.txt)\n\n<!-- GITCONTRIBUTOR_START -->\n\n## Contributors\n\n|[<img src=\"https://avatars.githubusercontent.com/u/156269?v=4\" width=\"100px;\"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src=\"https://avatars.githubusercontent.com/u/1147375?v=4\" width=\"100px;\"/><br/><sub><b>alsotang</b></sub>](https://github.com/alsotang)<br/>|[<img src=\"https://avatars.githubusercontent.com/u/10237910?v=4\" width=\"100px;\"/><br/><sub><b>jkelleyrtp</b></sub>](https://github.com/jkelleyrtp)<br/>|[<img src=\"https://avatars.githubusercontent.com/u/1409643?v=4\" width=\"100px;\"/><br/><sub><b>mariodu</b></sub>](https://github.com/mariodu)<br/>|[<img src=\"https://avatars.githubusercontent.com/u/11351322?v=4\" width=\"100px;\"/><br/><sub><b>mathieutu</b></sub>](https://github.com/mathieutu)<br/>|[<img src=\"https://avatars.githubusercontent.com/u/2139038?v=4\" width=\"100px;\"/><br/><sub><b>zhangyuheng</b></sub>](https://github.com/zhangyuheng)<br/>|\n| :---: | :---: | :---: | :---: | :---: | :---: |\n[<img src=\"https://avatars.githubusercontent.com/u/1400114?v=4\" width=\"100px;\"/><br/><sub><b>coolme200</b></sub>](https://github.com/coolme200)<br/>|[<img src=\"https://avatars.githubusercontent.com/u/5856440?v=4\" width=\"100px;\"/><br/><sub><b>whxaxes</b></sub>](https://github.com/whxaxes)<br/>\n\nThis project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Sep 13 2022 09:09:11 GMT+0800`.\n\n<!-- GITCONTRIBUTOR_END -->\n",
    "licenseText": "This software is licensed under the MIT License.\n\nCopyright (C) 2013 - 2014 fengmk2 <fengmk2@gmail.com>\nCopyright (C) 2015 - present node-modules and other contributors.\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\nall copies 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\nTHE SOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz",
    "hash": "2b5248dac5485a6390532c6a517fda2e3faac89e",
    "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==",
    "registry": "npm",
    "packageName": "address",
    "cacheIntegrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA== sha1-K1JI2sVIWmOQUyxqUX/aLj+qyJ4="
  },
  "registry": "npm",
  "hash": "2b5248dac5485a6390532c6a517fda2e3faac89e"
}