package slugline

  1. Overview
  2. Docs
A very small (and portable) slugifier implementation

Install

dune-project
 Dependency

Authors

Maintainers

Sources

slugline-1.0.0.tbz
sha256=3b155d1eab3d43900e02227befc2bab0e288ca6f7e04209c08ef9d10ac4f5c0b
sha512=b43412e53801893ddffcb239317d63c95cd9d05c760e31a435e1795a9103e710d0b93eac18d1b739c8c688b91eacfe3e7997f9d0f1abde3f5b896d3bf380ac63

doc/README.html

slugline

The implementation is relatively naïve and opinionated, but should be sufficient for most use cases. It has largely been imported from YOCaml (which provides its own implementation) and is small, with no dependencies, making it easy to use with Js_of_ocaml and Mirage. The implementation attempts to intelligently merge separators and is fairly configurable. A more ambitious implementation is provided by the Slug package.

# "Hello world, this is a slug héhéhé" 
  |> Slugline.from_string
  |> Slugline.to_string ;;
- : string = "hello-world-this-is-a-slug-hehehe"