{"_id":"@damonholden/ip_address_to_integer_components","name":"@damonholden/ip_address_to_integer_components","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@damonholden/ip_address_to_integer_components","version":"1.0.0","description":"A simple, zero-dependency, JavaScript class for converting IP addresses to integer versions of their network address components (the IP address, broadcast address, and network address).","main":"./IpAddressToIntegerComponents.js","scripts":{"test":"node ./IpAddressToIntegerComponents.test.js"},"repository":{"type":"git","url":"git+https://github.com/damonholden/ip_address_to_integer_components.git"},"keywords":["ip"],"author":{"name":"damonholden"},"license":"MIT","bugs":{"url":"https://github.com/damonholden/ip_address_to_integer_components/issues"},"homepage":"https://github.com/damonholden/ip_address_to_integer_components#readme","_id":"@damonholden/ip_address_to_integer_components@1.0.0","gitHead":"d45d55e09ff7224852d74cfb329b8651d0244dfa","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-EBRChFXSmzkD9vJGn4wEAH8WPh36PNtqyYUJo1/Lza+J+ZRoTlShApqZboUjdFJMkqZOfzSZJmofEzex4GBRsQ==","shasum":"3ce12b77323ec332932c90b3a13cd97d7f7e40be","tarball":"https://registry.npmjs.org/@damonholden/ip_address_to_integer_components/-/ip_address_to_integer_components-1.0.0.tgz","fileCount":3,"unpackedSize":3367,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrFbbln6n+Z9wH64o0yEk2aQeZo2v28I3RutPAkDa4VgIhANHWDWjO/zCJESxEbmwgFovv9B/EBWhjGTkThWXPJZjI"}]},"_npmUser":{"name":"damonholden","email":"Damonh003@gmail.com"},"directories":{},"maintainers":[{"name":"damonholden","email":"Damonh003@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ip_address_to_integer_components_1.0.0_1733085631621_0.7954601940274932"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-01T20:40:31.492Z","1.0.0":"2024-12-01T20:40:31.840Z","modified":"2024-12-01T20:40:32.146Z"},"maintainers":[{"name":"damonholden","email":"Damonh003@gmail.com"}],"description":"A simple, zero-dependency, JavaScript class for converting IP addresses to integer versions of their network address components (the IP address, broadcast address, and network address).","homepage":"https://github.com/damonholden/ip_address_to_integer_components#readme","keywords":["ip"],"repository":{"type":"git","url":"git+https://github.com/damonholden/ip_address_to_integer_components.git"},"author":{"name":"damonholden"},"bugs":{"url":"https://github.com/damonholden/ip_address_to_integer_components/issues"},"license":"MIT","readme":"# ip_address_to_integer_components\n\nA simple, zero-dependency, JavaScript class for converting IP addresses to integer versions of their network address components (the IP address, broadcast address, and network address).\n\n## Usage\n\nInstantiate the `IpAddressToIntegerComponents` class with a string representation of an IP and an integer representation of the IP's mask:\n\n```JavaScript\nconst ipAddressComponents = new IpAddressToIntegerComponents(\"192.168.0.1\", 16)\n/*\n\tIpAddressToIntegerComponents {\n  \t\taddress: 3232235521,\n  \t\tnetworkAddress: 3232235520,\n  \t\tbroadcastAddress: 3232301055\n\t}\n*/\n```\n\nInstantiating an `IpAddressToIntegerComponents` instance without providing a subnet mask will return the same interface with the `networkAddress` and `broadcastAddress` set to `null`:\n\n```JavaScript\nconst ipAddressComponents = new IpAddressToIntegerComponents(\"192.168.0.1\", 16)\n/*\n\tIpAddressToIntegerComponents {\n  \t\taddress: 3232235521,\n  \t\tnetworkAddress: null,\n  \t\tbroadcastAddress: null\n\t}\n*/\n```\n\n## Development\n\nBefore committing code or publishing a new package version tests must be ran using the following command:\n\n```bash\nnpm test\n```\n\nIt is also important to make sure the package actually works as an npm package before publishing:\n\n```Bash\nnpm install . -g\n```\n\nAlso worth checking that the correct files are being published by doing a dry run:\n\n```Bash\nnpm publish --dry-run\n```\n","readmeFilename":"readme.md"}