Coder Social home page Coder Social logo

tristate's Introduction

tristate

Build Status Maven Central Scaladoc

Tristate[A] is three-valued variant of Option[A] distinguishing between Present[A](a: A), Absent, and Unspecified.

Name Description Scaladoc
tristate-core Main library API
tristate-play Play JSON Reads/Writes API
tristate-cats Cats Typeclasses API
tristate-scalaz Scalaz Typeclasses API

Installation

Add the following to your sbt build:

libraryDependencies += "org.davidbild" %% "tristate-core" % "0.4.0"

To support de/serialization using Play JSON, also add:

libraryDependencies += "org.davidbild" %% "tristate-play" % "0.4.0"

For Scalaz typeclass instances (Functor, Monad, etc.), also add:

libraryDependencies += "org.davidbild" %% "tristate-scalaz" % "0.4.0"

For Cats typeclass instances (Functor, Monad, etc.), also add:

libraryDependencies += "org.davidbild" %% "tristate-cats" % "0.4.0"

Usage

TODO

Import

import org.davidbild.tristate.Tristate

// For optional Play JSON support
import org.davidbild.tristate.contrib.play._

// For optional Scalaz typeclass support
import org.davidbild.tristate.contrib.scalaz._

// For optional Cats typeclass support
import org.davidbild.tristate.contrib.cats._

Documents

Contributing

Please submit bugs, questions, suggestions, or (ideally) contributions as issues and pull requests on Github.

Maintainers

David R. Bild https://www.davidbild.org

License

Copyright 2016 David R. Bild

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License from the LICENSE.txt file or at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

tristate's People

Contributors

drbild avatar maximskripnik avatar stefanobaghino avatar

Stargazers

scalway avatar V. Lukoyanov avatar Srepfler Srdan avatar  avatar Andrey Romanov avatar Sam avatar Alireza Meskin avatar Milad Khajavi avatar Jan Stette avatar Nathan Fischer avatar Giovanni Ruggiero avatar  avatar  avatar ... avatar Shane Delmore avatar  avatar Yuval Itzchakov avatar Egor Ilchenko avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

lobzison bevolta

tristate's Issues

Scala 2.13 support

Please publish a new version with Scala 2.13 and play-json 2.8.1 support

Thanks in advance

Still active?

I've recently released a json library at https://github.com/kag0/ninny-json which has first class support for distinguishing between null and absent fields in the typeclasses. It seems like a natural partner for what you've got here.
If this project is still active I'll send you a PR to add support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.