{"id":20057648,"url":"https://github.com/todesking/scala-pp","last_synced_at":"2025-07-14T03:07:50.685Z","repository":{"id":136156335,"uuid":"26711323","full_name":"todesking/scala-pp","owner":"todesking","description":"Pretty print objects for debugging purpose. Like Ruby's `pp`","archived":false,"fork":false,"pushed_at":"2015-02-12T11:58:57.000Z","size":260,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-05T14:42:39.780Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/todesking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-16T10:52:25.000Z","updated_at":"2020-12-26T04:24:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"2243a975-a137-4c0f-92e5-1ba25d01a4bc","html_url":"https://github.com/todesking/scala-pp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/todesking/scala-pp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todesking%2Fscala-pp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todesking%2Fscala-pp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todesking%2Fscala-pp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todesking%2Fscala-pp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/todesking","download_url":"https://codeload.github.com/todesking/scala-pp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todesking%2Fscala-pp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265236795,"owners_count":23732504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T12:59:47.476Z","updated_at":"2025-07-14T03:07:50.634Z","avatar_url":"https://github.com/todesking.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scala-pp: Pretty printing Scala objects\n\nIt's like the Ruby's `pp` and `tapp`.\n\nAlso provide `tap` method.\n\n## Requirements\n\nScala 2.11.x (Unfortunately, 2.10.x is not supported yet)\n\n## Status\n\nUnder development, API will change.\n\n## Install\n\n```scala\nresolvers += \"com.todesking\" at \"http://todesking.github.io/mvn/\"\n\nlibraryDependencies += \"com.todesking\" %% \"scala-pp\" % \"0.0.4\"\n```\n\n## Usage\n\n### Basic\n\n```scala\nimport com.todesking.scalapp.ScalaPP\n\nScalaPP.pp(1)\n\nval pretty: String = ScalaPP.format(1)\n```\n\n```scala\nimport com.todesking.scalapp.syntax._ // Enable any.pp, any.tap\n\nscala\u003e 1.pp\n1\nres0: Int = 1\n\n\nscala\u003e \"foo\".pp\n\"foo\"\nres1: String = foo\n\nscala\u003e \"foo\".tap(_.size.pp)\n3\nres2: String = foo\n```\n\n```scala\nscala\u003e import com.todesking.scalapp.syntax._\n\nscala\u003e trait Tree\nscala\u003e case class Node(l: Tree, r: Tree) extends Tree\nscala\u003e case class Leaf(value: Any) extends Tree\n\nscala\u003e Node(Leaf(1),Node(Node(Leaf(1),Node(Leaf(1),Leaf(2))),Leaf(9))).pp()\nNode(\n  Leaf(1),\n  Node(Node(Leaf(1), Node(Leaf(1), Leaf(2))), Leaf(9))\n)\nres4: Node = Node(Leaf(1),Node(Node(Leaf(1),Node(Leaf(1),Leaf(2))),Leaf(9)))\n\nscala\u003e val r = new scala.util.Random\nscala\u003e (1 to 20).map { _ =\u003e r.nextInt }.pp\nVector(\n  -154732736,\n  -1175868887,\n  -1154500417,\n  -224679654,\n  -1673519284,\n  -45175998,\n  -1622246443,\n  -377114259,\n  -594461594,\n  -1236591375,\n  -367565645,\n  1874916582,\n  -784108643,\n  -676509857,\n  -580471591,\n  -295290196,\n  2101491230,\n  1757271540,\n  -2072303228,\n  -606515791\n)\nres6: scala.collection.immutable.IndexedSeq[Int] = Vector(-154732736, -1175868887, -1154500417, -224679654, -1673519284, -45175998, -1622246443, -377114259, -594461594, -1236591375, -367565645, 1874916582, -784108643, -676509857, -580471591, -295290196, 2101491230, 1757271540, -2072303228, -606515791)\n```\n\n### Format option\n\n```scala\nscala\u003e implicit val format = new com.todesking.scalapp.DefaultFormat(showMemberName = true)\nscala\u003e Node(Leaf(1),Node(Node(Leaf(1),Node(Leaf(1),Leaf(2))),Leaf(9))).pp()\nNode(\n  l = Leaf(value = 1),\n  r =\n    Node(\n      l =\n        Node(\n          l = Leaf(value = 1),\n          r =\n            Node(\n              l = Leaf(value = 1),\n              r = Leaf(value = 2)\n            )\n        ),\n      r = Leaf(value = 9)\n    )\n)\nres1: Node = Node(Leaf(1),Node(Node(Leaf(1),Node(Leaf(1),Leaf(2))),Leaf(9)))\n```\n\n### Change output destination\n\n```scala\n// pp via stderr(default is stdout)\nimplicit val out = com.todesking.scalapp.Out.stderr\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodesking%2Fscala-pp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftodesking%2Fscala-pp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodesking%2Fscala-pp/lists"}