{"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"keywords":["address","ip","ipv4","mac"],"dist-tags":{"latest":"1.0.2"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"description":"Get current machine IP, MAC and DNS servers.","readme":"address\n=======\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Gittip][gittip-image]][gittip-url]\n[![David deps][david-image]][david-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[travis-image]: https://img.shields.io/travis/node-modules/address.svg?style=flat-square\n[travis-url]: https://travis-ci.org/node-modules/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[gittip-image]: https://img.shields.io/gittip/fengmk2.svg?style=flat-square\n[gittip-url]: https://www.gittip.com/fengmk2/\n[david-image]: https://img.shields.io/david/node-modules/address.svg?style=flat-square\n[david-url]: https://david-dm.org/node-modules/address\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\nvar 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(function (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', function (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(function (err, addrs) {\n  console.log(addrs);\n  // ['10.13.2.1', '10.13.2.6']\n});\n```\n\n## benchmark\n\nrun `$ npm run benchmark`\n\n```\n18,929 op/s » #ip\n17,622 op/s » #ipv6\n16,347 op/s » #mac\n11,906 op/s » #dns\n```\n\n## License\n\n[MIT](LICENSE.txt)\n","repository":{"type":"git","url":"git://github.com/node-modules/address.git"},"users":{"xueboren":true,"ssplast":true,"nickeltobias":true,"wenhsiaoyi":true,"bvaccc":true,"nazy":true},"bugs":{"url":"https://github.com/node-modules/address/issues"},"license":"MIT","versions":{"0.0.1":{"name":"address","version":"0.0.1","description":"Get current machine IP, MAC and DNS servers.","main":"index.js","scripts":{"test":"make test-all"},"dependencies":{},"devDependencies":{"pedding":"*","mm":"*","should":"*","blanket":"*","travis-cov":"*","coveralls":"*","mocha-lcov-reporter":"*","mocha":"*"},"repository":{"type":"git","url":"git://github.com/fengmk2/address.git"},"keywords":["address"],"engines":{"node":">= 0.8.0"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/fengmk2/address/issues"},"_id":"address@0.0.1","dist":{"shasum":"2e32201de7ab7d2bffb3abeef19763497e224a89","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/address/-/address-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"directories":{}},"0.0.2":{"name":"address","version":"0.0.2","description":"Get current machine IP, MAC and DNS servers.","main":"index.js","scripts":{"test":"make test-all"},"dependencies":{},"devDependencies":{"pedding":"*","mm":"*","should":"*","blanket":"*","travis-cov":"*","coveralls":"*","mocha-lcov-reporter":"*","mocha":"*"},"repository":{"type":"git","url":"git://github.com/fengmk2/address.git"},"keywords":["address"],"engines":{"node":">= 0.8.0"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/fengmk2/address/issues"},"_id":"address@0.0.2","dist":{"shasum":"961c202a217a742291dfdd590efb9eb99bb66ae7","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/address/-/address-0.0.2.tgz"},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"directories":{}},"0.0.3":{"name":"address","version":"0.0.3","description":"Get current machine IP, MAC and DNS servers.","main":"index.js","scripts":{"test":"make test-all"},"dependencies":{},"devDependencies":{"pedding":"*","mm":"*","should":"*","blanket":"*","travis-cov":"*","coveralls":"*","mocha-lcov-reporter":"*","mocha":"*"},"repository":{"type":"git","url":"git://github.com/fengmk2/address.git"},"keywords":["address"],"engines":{"node":">= 0.8.0"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/fengmk2/address/issues"},"_id":"address@0.0.3","dist":{"shasum":"81c73446c8f5f08758ff5ede5cfab74e4d348f16","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/address/-/address-0.0.3.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"directories":{}},"1.0.0":{"name":"address","version":"1.0.0","description":"Get current machine IP, MAC and DNS servers.","main":"lib/address.js","files":["lib"],"scripts":{"test":"mocha --check-leaks -R spec -t 5000 test/*.test.js","test-cov":"istanbul cover node_modules/.bin/_mocha -- --check-leaks -t 5000 test/*.test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --check-leaks -t 5000 test/*.test.js","benchmark":"matcha","autod":"autod -w --prefix '~'","cnpm":"npm install --registry=https://registry.npm.taobao.org","contributors":"contributors -f plain -o AUTHORS"},"dependencies":{},"devDependencies":{"istanbul":"*","matcha":"*","mm":"*","mocha":"*","pedding":"*","should":"*"},"repository":{"type":"git","url":"git://github.com/node-modules/address.git"},"keywords":["address","ip","ipv4","mac"],"engines":{"node":">= 0.12.0"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","gitHead":"4af8781dfb49f7f0682879b0f176cc9fb82d0fc3","bugs":{"url":"https://github.com/node-modules/address/issues"},"homepage":"https://github.com/node-modules/address#readme","_id":"address@1.0.0","_shasum":"20200f7900eeb5f13779e768785c78c32ce2ce86","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.0.0","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"dist":{"shasum":"20200f7900eeb5f13779e768785c78c32ce2ce86","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/address/-/address-1.0.0.tgz"},"directories":{}},"1.0.1":{"name":"address","version":"1.0.1","description":"Get current machine IP, MAC and DNS servers.","main":"lib/address.js","files":["lib"],"scripts":{"test":"mocha --check-leaks -R spec -t 5000 test/*.test.js","test-cov":"istanbul cover node_modules/.bin/_mocha -- --check-leaks -t 5000 test/*.test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --check-leaks -t 5000 test/*.test.js","benchmark":"matcha","autod":"autod -w --prefix '^'","cnpm":"npm install --registry=https://registry.npm.taobao.org","contributors":"contributors -f plain -o AUTHORS"},"dependencies":{},"devDependencies":{"contributors":"*","istanbul":"*","matcha":"*","mm":"*","mocha":"*","pedding":"*","should":"*"},"repository":{"type":"git","url":"git://github.com/node-modules/address.git"},"keywords":["address","ip","ipv4","mac"],"engines":{"node":">= 0.12.0"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","contributors":[{"name":"fengmk2","email":"fengmk2@gmail.com","url":"http://fengmk2.com"},{"name":"alsotang","email":"alsotang@gmail.com","url":"https://github.com/alsotang"}],"gitHead":"fc3536a8f2a3862d3c8066178b3f7d60483192cc","bugs":{"url":"https://github.com/node-modules/address/issues"},"homepage":"https://github.com/node-modules/address#readme","_id":"address@1.0.1","_shasum":"363f5d3f2be26d0655d8afd5a9562e4fc2194537","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.0","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"dist":{"shasum":"363f5d3f2be26d0655d8afd5a9562e4fc2194537","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/address/-/address-1.0.1.tgz"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/address-1.0.1.tgz_1475221883259_0.3445093466434628"},"directories":{}},"1.0.2":{"name":"address","version":"1.0.2","description":"Get current machine IP, MAC and DNS servers.","main":"lib/address.js","files":["lib"],"scripts":{"test":"mocha --check-leaks -R spec -t 5000 test/*.test.js","test-cov":"istanbul cover node_modules/.bin/_mocha -- --check-leaks -t 5000 test/*.test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --check-leaks -t 5000 test/*.test.js","benchmark":"matcha","autod":"autod -w --prefix '^'","cnpm":"npm install --registry=https://registry.npm.taobao.org","contributors":"contributors -f plain -o AUTHORS"},"dependencies":{},"devDependencies":{"contributors":"*","istanbul":"*","matcha":"*","mm":"*","mocha":"*","pedding":"*","should":"*","benchmark":"*","beautify-benchmark":"*","webstorm-disable-index":"1"},"repository":{"type":"git","url":"git://github.com/node-modules/address.git"},"keywords":["address","ip","ipv4","mac"],"engines":{"node":">= 0.12.0"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","contributors":[{"name":"fengmk2","email":"fengmk2@gmail.com","url":"http://fengmk2.com"},{"name":"alsotang","email":"alsotang@gmail.com","url":"https://github.com/alsotang"}],"gitHead":"f5cee41a0503249a02876a82f9e4f7dfc1d253b7","bugs":{"url":"https://github.com/node-modules/address/issues"},"homepage":"https://github.com/node-modules/address#readme","_id":"address@1.0.2","_shasum":"480081e82b587ba319459fef512f516fe03d58af","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"dist":{"shasum":"480081e82b587ba319459fef512f516fe03d58af","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/address/-/address-1.0.2.tgz"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/address-1.0.2.tgz_1495729717962_0.17448946181684732"},"directories":{}}},"name":"address","contributors":[{"name":"fengmk2","email":"fengmk2@gmail.com","url":"http://fengmk2.com"},{"name":"alsotang","email":"alsotang@gmail.com","url":"https://github.com/alsotang"}],"time":{"modified":"2017-07-13T19:08:53.784Z","created":"2013-07-30T15:10:01.881Z","0.0.1-alpha":"2013-07-30T15:10:08.745Z","0.0.1":"2013-07-31T09:44:48.849Z","0.0.2":"2013-08-08T06:21:39.984Z","0.0.3":"2013-11-04T08:17:10.694Z","1.0.0":"2015-08-05T23:45:45.211Z","1.0.1":"2016-09-30T07:51:25.004Z","1.0.2":"2017-05-25T16:28:38.130Z"},"readmeFilename":"README.md","homepage":"https://github.com/node-modules/address#readme"}