{"id":21899065,"url":"https://github.com/johnsonlee/once","last_synced_at":"2025-03-22T05:25:36.382Z","repository":{"id":39649554,"uuid":"497306622","full_name":"johnsonlee/once","owner":"johnsonlee","description":"A library to make sure code blocks are executed only once","archived":false,"fork":false,"pushed_at":"2022-06-18T19:19:13.000Z","size":69,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-27T06:14:59.535Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnsonlee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-28T12:07:00.000Z","updated_at":"2024-04-19T15:48:34.000Z","dependencies_parsed_at":"2022-09-20T06:50:24.974Z","dependency_job_id":null,"html_url":"https://github.com/johnsonlee/once","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":"johnsonlee/gradle-kotlin-dsl-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonlee%2Fonce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonlee%2Fonce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonlee%2Fonce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonlee%2Fonce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnsonlee","download_url":"https://codeload.github.com/johnsonlee/once/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244911357,"owners_count":20530600,"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-28T14:37:20.059Z","updated_at":"2025-03-22T05:25:36.362Z","avatar_url":"https://github.com/johnsonlee.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Once\n\nA library to make sure code blocks are executed only once\n\n## Getting Started\n\nConfiguring the dependencies:\n\n```kotlin\ndependencies {\n    implementation(\"io.johnsonlee:once:1.1.0\")\n}\n```\n\nThen, you can use it in your code:\n\n```kotlin\nclass Gretting {\n\n  val once = Once\u003cUnit\u003e()\n  \n  fun hello(name: String): Unit = once {\n    println(\"Hello, ${name}\")\n  }\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnsonlee%2Fonce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnsonlee%2Fonce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnsonlee%2Fonce/lists"}