Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Latest commit

 

History

History

lite-delta

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

lite-delta

Computes a structual diff between two values.

Maven Central

Install

Insert the following to your build.sbt.

libraryDependencies += "codes.quine.labo" %% "lite-delta" % "<latest version>"

Usage

Delta.diff computes a diff between two any values and returns a prettified string of this diff.

For example:

import codes.quine.labo.lite.delta.Delta

sealed abstract class FooBar
case class Foo(x: Int, y: Int) extends FooBar
case class Bar(z: String) extends FooBar

Delta.diff(
  Seq(Foo(1, 2), Bar("foo"), Foo(3, 4), Foo(5, 6)),
  Seq(Foo(1, 2), Bar("bar"), Foo(5, 6), Bar("foobar"))
)

Screenshot:

screenshot