ip_address
Version, currently 0.1.33 versions
- 0.1.3latestJun 5, 2018
- 0.1.2not indexedJul 5, 2018
- 0.1.1not indexedJul 5, 2018
github.com/chris-huxtable/ip_address.cr
Encapsulates IPv4 and IPv6 Addresses and Blocks
0 stars
0 dependents
License: ISC
Installation
# Add this to your shard.yml
dependencies:
ip_address:
github: chris-huxtable/ip_address.cr
version: ~> 0.1.3Then run:
shards installshard.yml
- Crystal
0.24.2- License
- ISC
- Author
- Chris Huxtable
Dependencies
This version declares no dependencies.
README
ip_address.cr
Encapsulates IPv4 and IPv6 Addresses and Blocks.
Installation
Add this to your application's shard.yml:
dependencies:
ip_address:
github: chris-huxtable/ip_address.cr
Usage
require "ip_address"
Some samples:
address0 = IP["127.0.0.128"]
address1 = IP["10.0.0.0"]?
address2 = IP.new("127.0.0.0")
address3 = IP.new?("127.0.0.0")
address4 = IP["2001:0db8:123:4567:89ab:cdef:1234:5678"]
address5 = IP::Address["1::2"]?
address6 = IP.new("::1")
address7 = IP::Address.new?("::0")
block0 = IP["127.0.0.0/8"]
block1 = IP::Block["10.0.0.0/8"]?
block2 = IP.new("127.0.0.0/8")
block3 = IP::Block.new?("127.0.0.0/8")
block0 = IP["127.0.0.0/8"]
block1 = IP::Block["10.0.0.0/8"]?
block2 = IP.new("127.0.0.0/8")
block3 = IP::Block.new?("127.0.0.0/8")
loopback = IP::Address::IPv4.loopback
block0.includes?(address0)
Contributing
- Fork it ( https://github.com/chris-huxtable/ip_address.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- Chris Huxtable - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.3- Tagged
- Jun 5, 2018
- Commit
6eb12c4675f1- Crystal
0.24.2- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/chris-huxtable/ip_address.cr
Metadata
- Created
- Aug 17, 2026
- Updated
- Aug 17, 2026
- Synced
- Aug 17, 2026
- Versions
- 3