glm_cidr

Package Version Hex Docs

This is a simple library to assist with answering these basic questions:

I’m sure there are other interesting questions related to cidr.

Feel free to fork and/or submit PR’s for additional functionality.

gleam add glm_cidr
import glm_cidr as cidr

pub fn main() -> Nil {
  let subnet = cidr.subnet("10.0.0.1/24")
  let relation = cidr.relationship(subnet, "10.0.0.66")
  /// -> Ok(AddressIsInsideSubnet(next: 10.0.0.67, subnet_metadata: { first: 10.0.0.1, last: 10.0.0.255, count: 254 } )
}

Further documentation can be found at https://hexdocs.pm/glm_cidr.

Development

gleam check # Check the project
gleam test  # Run the tests
Search Document