package ansifmt

  1. Overview
  2. Docs
val tokenize : 't. 't -> using:(module TOKENIZABLE with type t = 't) -> Token.t list

tokenize value ~using:(module M) transforms value to a list of tokens.

val format : 't. ?stylizer:Stylizer.t -> 't -> using:(module TOKENIZABLE with type t = 't) -> string

format ?stylizer value ~using:(module M) transforms the value into a pretty-printable string using the stylizer if M provides tokenization for the value type.

OCaml

Innovation. Community. Security.