{"_id":"@astro_z/nodejs-intership-lesson-1","name":"@astro_z/nodejs-intership-lesson-1","dist-tags":{"latest":"1.0.1-alpha"},"versions":{"1.0.1-alpha":{"name":"@astro_z/nodejs-intership-lesson-1","version":"1.0.1-alpha","description":"NodeJs internship, lesson 1. Get Info by My Ip","main":"index.js","scripts":{"lint":"eslint","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/zazymko/nodejs-intership-lesson-1.git"},"author":{"name":"Artem Zazymko"},"license":"MIT","bugs":{"url":"https://github.com/zazymko/nodejs-intership-lesson-1/issues"},"homepage":"https://github.com/zazymko/nodejs-intership-lesson-1#readme","devDependencies":{"eslint":"8.17.0","eslint-config-airbnb":"19.0.4"},"dependencies":{"acorn":"^8.7.1","ansi-regex":"^5.0.1","argparse":"^2.0.1","ajv":"^6.12.6","acorn-jsx":"^5.3.2","ansi-styles":"^4.3.0","aria-query":"^4.2.2","array.prototype.flat":"^1.3.0","array.prototype.flatmap":"^1.3.0","ast-types-flow":"^0.0.7","array-includes":"^3.1.5","brace-expansion":"^1.1.11","axe-core":"^4.4.2","callsites":"^3.1.0","concat-map":"^0.0.1","balanced-match":"^1.0.2","axobject-query":"^2.2.0","color-convert":"^2.0.1","call-bind":"^1.0.2","chalk":"^4.1.2","damerau-levenshtein":"^1.0.8","color-name":"^1.1.4","core-js-pure":"^3.22.8","confusing-browser-globals":"^1.0.11","deep-is":"^0.1.4","define-properties":"^1.1.4","cross-spawn":"^7.0.3","emoji-regex":"^9.2.2","es-shim-unscopables":"^1.0.0","doctrine":"^3.0.0","debug":"^4.3.4","es-abstract":"^1.20.1","eslint-config-airbnb-base":"^15.0.0","eslint-plugin-import":"^2.26.0","es-to-primitive":"^1.2.1","escape-string-regexp":"^4.0.0","eslint-import-resolver-node":"^0.3.6","eslint-module-utils":"^2.7.3","eslint-plugin-react-hooks":"^4.5.0","eslint-utils":"^3.0.0","eslint-scope":"^7.1.1","eslint-plugin-react":"^7.30.0","esquery":"^1.4.0","esrecurse":"^4.3.0","espree":"^9.3.2","estraverse":"^5.3.0","esutils":"^2.0.3","eslint-visitor-keys":"^3.3.0","eslint-plugin-jsx-a11y":"^6.5.1","fast-levenshtein":"^2.0.6","file-entry-cache":"^6.0.1","flat-cache":"^3.0.4","fast-json-stable-stringify":"^2.1.0","flatted":"^3.2.5","functional-red-black-tree":"^1.0.1","fast-deep-equal":"^3.1.3","fs.realpath":"^1.0.0","function.prototype.name":"^1.1.5","find-up":"^2.1.0","get-intrinsic":"^1.1.2","glob-parent":"^6.0.2","glob":"^7.2.3","get-symbol-description":"^1.0.0","has-flag":"^4.0.0","function-bind":"^1.1.1","has":"^1.0.3","has-bigints":"^1.0.2","has-property-descriptors":"^1.0.0","functions-have-names":"^1.2.3","ignore":"^5.2.0","import-fresh":"^3.3.0","inflight":"^1.0.6","has-tostringtag":"^1.0.0","imurmurhash":"^0.1.4","has-symbols":"^1.0.3","is-bigint":"^1.0.4","inherits":"^2.0.4","is-glob":"^4.0.3","is-boolean-object":"^1.1.2","is-core-module":"^2.9.0","is-extglob":"^2.1.1","globals":"^13.15.0","internal-slot":"^1.0.3","is-date-object":"^1.0.5","is-negative-zero":"^2.0.2","is-regex":"^1.1.4","is-symbol":"^1.0.4","is-callable":"^1.2.4","is-weakref":"^1.0.2","js-tokens":"^4.0.0","is-number-object":"^1.0.7","is-shared-array-buffer":"^1.0.2","is-string":"^1.0.7","isexe":"^2.0.0","js-yaml":"^4.1.0","json-schema-traverse":"^0.4.1","jsx-ast-utils":"^3.3.0","json-stable-stringify-without-jsonify":"^1.0.1","language-tags":"^1.0.5","lodash.merge":"^4.6.2","levn":"^0.4.1","language-subtag-registry":"^0.3.21","minimist":"^1.2.6","locate-path":"^2.0.0","json5":"^1.0.1","ms":"^2.1.2","object-inspect":"^1.12.2","loose-envify":"^1.4.0","minimatch":"^3.1.2","object-keys":"^1.1.1","natural-compare":"^1.4.0","object-assign":"^4.1.1","object.assign":"^4.1.2","object.values":"^1.1.5","object.entries":"^1.1.5","object.fromentries":"^2.0.5","optionator":"^0.9.1","object.hasown":"^1.1.1","p-try":"^1.0.0","p-limit":"^1.3.0","path-exists":"^3.0.0","path-is-absolute":"^1.0.1","parent-module":"^1.0.1","path-parse":"^1.0.7","punycode":"^2.1.1","once":"^1.4.0","p-locate":"^2.0.0","prelude-ls":"^1.2.1","react-is":"^16.13.1","resolve-from":"^4.0.0","prop-types":"^15.8.1","path-key":"^3.1.1","regexpp":"^3.2.0","shebang-command":"^2.0.0","regexp.prototype.flags":"^1.4.3","shebang-regex":"^3.0.0","semver":"^6.3.0","resolve":"^1.22.0","side-channel":"^1.0.4","regenerator-runtime":"^0.13.9","string.prototype.matchall":"^4.0.7","strip-bom":"^3.0.0","text-table":"^0.2.0","strip-ansi":"^6.0.1","strip-json-comments":"^3.1.1","rimraf":"^3.0.2","supports-preserve-symlinks-flag":"^1.0.0","type-check":"^0.4.0","supports-color":"^7.2.0","uri-js":"^4.4.1","type-fest":"^0.20.2","which-boxed-primitive":"^1.0.2","word-wrap":"^1.2.3","wrappy":"^1.0.2","string.prototype.trimstart":"^1.0.5","v8-compile-cache":"^2.3.0","string.prototype.trimend":"^1.0.5","unbox-primitive":"^1.0.2","tsconfig-paths":"^3.14.1","which":"^2.0.2"},"gitHead":"52f432665b7b6cd224508bdf5aaa79ae27786b88","_id":"@astro_z/nodejs-intership-lesson-1@1.0.1-alpha","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-dnHOKnxJgn9kh4ou7ghbghCJT6YrXXdFFyUWCZ/7gehIFtuSuZFgjjbc/gAaH9VYlqBt4TJzEQxEVwElZe7Dlw==","shasum":"4ff84e267cbd88e7b73e55515f32b98db9cbe368","tarball":"https://registry.npmjs.org/@astro_z/nodejs-intership-lesson-1/-/nodejs-intership-lesson-1-1.0.1-alpha.tgz","fileCount":7,"unpackedSize":9771,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQa9iaqd7baJtI/WHWSYmVHix5yrPBlhxn0wXZM/lL8gIhAKiDYxoYS0h3XIzYtw7sJqPGKQbIq7F1CPkJZ5iNDi35"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipDn4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmog0A//TNh28ikBpdqG4ITUvma0lP461G4oJLjqmQy9zJDhMTCcP8ym\r\nKJOt0hkRjibTJmKYI/tVtS9FJqt4YkAcbeLXOvprgtX3wsTishKN8zg9C4Na\r\nwiKcnlQEXZMpCfA9+VbN1PfmoWwYERRmFH/+0oOan9PqEwo9Oz3cHZ4eKD6z\r\nVIxJmaZjy6k8YFgZVj9F81ifZAxfiVTy+7lF6M7ylPS6ilYk/R+2PeGAg0qL\r\nmB6KUUJWLoV1mHg1OkXf/gpAwjpSvHBOIFRcReqNl3GhAtCp6Vb+gbt+Qwaf\r\n3WxTNNlt1OcM59i2zilhnXV/m1FJ80guDFUJV+piZf16+zm7DB1+zzrOVtxb\r\nUqiBnK91oqqXaKcJ6YP8g7sguh8Dfmdmnn/Sic592/Lmp1M/Kcy/AO5+xRSF\r\nWwwqSFR/EjL8HhDynESV6e0sQcIRhhUNElx08kw8U2iResSwerqvAFj4oexi\r\nR0lv32KC5/316Q59HwIIsfY/LvsKt/ruuCQl1NWv4F48+yJp7NhgcSEE1Yov\r\n6FtLG6QDOLKPaUG9kYw7kK79pZ2fVWjflDVenKcOhnfNVw9YEmErTn/0iyKS\r\n+6U5Bcnd+FQwj04CsGbnnhwW6um4pxV8Yem/fuLSC7jPgwfayAom2JsXn5nk\r\n/zCpA2jJGCOc6dTCY5Of3LC7yhD1ErDpCB0=\r\n=g6XL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"astro_z","email":"artem.zazymko@gmail.com"},"directories":{},"maintainers":[{"name":"astro_z","email":"artem.zazymko@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodejs-intership-lesson-1_1.0.1-alpha_1654929912209_0.8981864922944385"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-11T06:45:12.144Z","1.0.1-alpha":"2022-06-11T06:45:12.356Z","modified":"2022-06-11T06:45:12.474Z"},"maintainers":[{"name":"astro_z","email":"artem.zazymko@gmail.com"}],"description":"NodeJs internship, lesson 1. Get Info by My Ip","homepage":"https://github.com/zazymko/nodejs-intership-lesson-1#readme","repository":{"type":"git","url":"git+https://github.com/zazymko/nodejs-intership-lesson-1.git"},"author":{"name":"Artem Zazymko"},"bugs":{"url":"https://github.com/zazymko/nodejs-intership-lesson-1/issues"},"license":"MIT","readme":"# nodejs-intership-lesson-1\nNodeJs internship, lesson 1. Get Info by My Ip\n\n```sh\nnpm install nodejs-intership-lesson-1\n```\n\n## Usage\n\n```js\nimport { getIpByRequest, getPublicIpV4ByNetwork } from 'nodejs-intership-lesson-1';\n\nconsole.log(getIpByRequest(request));\n//=> '0.0.0.0'\n\nconsole.log(await getPublicIpV4ByNetwork());\n//=> '127.0.0.1'\n```\n\n## API\n\nThe package returns the address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `0.0.0.0` will be returned.\n\nThe package relies on operating systems tools and also can return ip with request connection.\n\n### getIpByRequest()\n\nReturns the IPv4 address with request connection.\n\n### getPublicIpV4ByNetwork()\n\nReturns the internal IPv4 address.\n","readmeFilename":"README.md"}