/glisbn

ISBN utility library for Gleam.

Primary LanguageGleamMIT LicenseMIT

glisbn

Package Version Hex Docs

A ISBN utility library for the Gleam.

gleam add glisbn
import glisbn

pub fn main() {
  let isbn10 = "9788535902778"
  glisbn.is_valid(isbn10) // -> true

  glisbn.hyphenate(isbn10) // -> Ok("978-85-359-0277-8")

  glisbn.isbn10_to_13(isbn10) // -> Ok("9789788535904")

  glisbn.get_publisher_zone(isbn10) // -> Ok("Brazil")

  // for more other usage examples see docs
}

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

Development

gleam run   # Run the project
gleam test  # Run the tests
gleam shell # Run an Erlang shell