Skip to content

TypedLambdaDev/toml-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

toml-parser

A parser for TOML in Scala. TOML is a simple configuration language (https://github.com/toml-lang/toml).

Use

get

def get(key: String): Option[Any] 

Get value regardless of type. Value will return None if key is not present.

optional

def optional[A](key: String): Option[A] def opt[A](key: String): Option[A] 

Get value as given type A. Value will return None if key is not present or if key is present with a type other than A.

require

def require[A](key: String): A def req[A](key: String): A 

Get value as given type A. Value will throw an exception if key is not present or if key is present with a type other than A.

seq (shorthand)

def seq[A: ClassTag](key: String) 

Shorthand for optional[Seq[A]](key).getOrElse(Seq.empty).

Building

  1. Clone github repository
  2. $ sbt publish-local

Testing

  1. $sbt test

About

A parser for TOML in Scala

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages