Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thoughtworksinc/q.scala
Convert any value to code
https://github.com/thoughtworksinc/q.scala
scala
Last synced: about 2 months ago
JSON representation
Convert any value to code
- Host: GitHub
- URL: https://github.com/thoughtworksinc/q.scala
- Owner: ThoughtWorksInc
- License: apache-2.0
- Created: 2016-04-01T11:53:56.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-01T23:36:08.000Z (over 1 year ago)
- Last Synced: 2024-04-14T05:24:35.395Z (9 months ago)
- Topics: scala
- Language: Scala
- Size: 173 KB
- Stars: 12
- Watchers: 11
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/ThoughtWorksInc/Q.scala.svg?branch=master)](https://travis-ci.org/ThoughtWorksInc/Q.scala)
[![Latest version](https://index.scala-lang.org/thoughtworksinc/q.scala/q/latest.svg)](https://index.scala-lang.org/thoughtworksinc/q.scala/q)
[![Scaladoc](https://javadoc.io/badge/com.thoughtworks.q/q_2.11.svg?label=scaladoc)](https://javadoc.io/page/com.thoughtworks.q/q_2.11/latest/com/thoughtworks/Q$.html)**Q.scala** is a library to convert any value to parsable code.
## Usage
``` sbt
libraryDependencies += "com.thoughtworks.q" %% "q" % "latest.release"
`````` scala
import com.thoughtworks.Q._
import scala.reflect.runtime.universe._val data: Seq[Either[Double, String]] = Seq(Left(math.random), Right("string data"))
// Output: _root_.scala.Seq(_root_.scala.util.Left(0.6437966035784641), _root_.scala.util.Right("string data"))
println(q"$data")
```