{"id":19561535,"url":"https://github.com/sweet-delights/delightful-typeclasses","last_synced_at":"2026-03-02T13:33:33.132Z","repository":{"id":39851240,"uuid":"310685450","full_name":"sweet-delights/delightful-typeclasses","owner":"sweet-delights","description":"A Scala library containing utility typeclasses","archived":false,"fork":false,"pushed_at":"2024-08-19T21:05:00.000Z","size":64,"stargazers_count":0,"open_issues_count":10,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-11T05:13:15.572Z","etag":null,"topics":["lgpl","scala","shapeless","typeclass","typeclasses"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sweet-delights.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":"CODE_OF_CONDUCT","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-06T19:13:50.000Z","updated_at":"2021-12-16T04:20:23.000Z","dependencies_parsed_at":"2024-01-15T00:43:17.240Z","dependency_job_id":"33c5d04f-4d43-4a2f-a7c7-64f18bf03ef0","html_url":"https://github.com/sweet-delights/delightful-typeclasses","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sweet-delights%2Fdelightful-typeclasses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sweet-delights%2Fdelightful-typeclasses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sweet-delights%2Fdelightful-typeclasses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sweet-delights%2Fdelightful-typeclasses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sweet-delights","download_url":"https://codeload.github.com/sweet-delights/delightful-typeclasses/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233111117,"owners_count":18626700,"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":["lgpl","scala","shapeless","typeclass","typeclasses"],"created_at":"2024-11-11T05:11:51.869Z","updated_at":"2026-03-02T13:33:28.098Z","avatar_url":"https://github.com/sweet-delights.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://github.com/sweet-delights/delightful-cron/actions/workflows/scala.yml/badge.svg)](https://github.com/sweet-delights/delightful-cron/actions/workflows/scala.yml)\r\n[![Maven Central](https://img.shields.io/maven-central/v/org.sweet-delights/delightful-typeclasses_2.13.svg)](https://maven-badges.herokuapp.com/maven-central/org.sweet-delights/delightful-typeclasses_2.13)\r\n\r\n`delightful-typeclasses` is Scala a library containing utility typeclasses.\r\n\r\nThis library is built for Scala 2.12.15, 2.13.8 and 3.1.2\r\n\r\n### SBT\r\n```scala\r\nlibraryDependencies += \"org.sweet-delights\" %% \"delightful-typeclasses\" % \"0.2.0\"\r\n```\r\n\r\n### Maven\r\n```xml\r\n\u003cdependency\u003e\r\n  \u003cgroupId\u003eorg.sweet-delights\u003c/groupId\u003e\r\n  \u003cartifactId\u003edelightful-typeclasses_2.12\u003c/artifactId\u003e\r\n  \u003cversion\u003e0.2.0\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\n## [License](LICENSE.md)\r\n\r\nAll files in `delightful-typeclasses` are under the GNU Lesser General Public License version 3.\r\nPlease read files [`COPYING`](COPYING) and [`COPYING.LESSER`](COPYING.LESSER) for details.\r\n\r\n## Available typeclasses\r\n\r\n### `Default[T]`\r\n\r\nThe `Default[T]` typeclass creates a default instance of `T`.\r\n\r\n*Step 1*: define case classes\r\n\r\n```scala\r\nimport java.time.LocalDateTime\r\n\r\ncase class Foo(\r\n  opt: Option[Int],\r\n  str: String,\r\n  double: Double,\r\n  more: List[Bar]\r\n)\r\n\r\ncase class Bar(\r\n  list: List[LocalDateTime]\r\n)\r\n```\r\n\r\n*Step 2*: instantiate!\r\n\r\n```scala\r\n\r\n\r\nval default = Default[Foo]\r\nprintln(default)\r\n// Foo(\r\n//   opt = Some(0),\r\n//   str = \"\",\r\n//   double = \"0.0\",\r\n//   List(\r\n//     Bar(List(LocalDateTime.parse(\"1970-01-01T00:00:00.000\")))\r\n//   )\r\n// )\r\n```\r\n\r\n## Acknowledgments\r\n\r\n- the [`shapeless`](https://github.com/milessabin/shapeless) library\r\n- the [The Type Astronaut's Guide to Shapeless](https://underscore.io/books/shapeless-guide/) book\r\n- the [Scala 3](https://docs.scala-lang.org/scala3/reference/contextual/derivation.html) documentation","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsweet-delights%2Fdelightful-typeclasses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsweet-delights%2Fdelightful-typeclasses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsweet-delights%2Fdelightful-typeclasses/lists"}