{"id":21623258,"url":"https://github.com/erictsangx/kotlin-random","last_synced_at":"2026-04-18T13:35:43.654Z","repository":{"id":57733139,"uuid":"66241359","full_name":"erictsangx/kotlin-random","owner":"erictsangx","description":null,"archived":false,"fork":false,"pushed_at":"2017-03-24T09:33:50.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T22:11:59.957Z","etag":null,"topics":["kotlin","random","testing"],"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/erictsangx.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":"2016-08-22T05:10:30.000Z","updated_at":"2019-07-17T15:44:22.000Z","dependencies_parsed_at":"2022-09-26T22:30:39.944Z","dependency_job_id":null,"html_url":"https://github.com/erictsangx/kotlin-random","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erictsangx%2Fkotlin-random","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erictsangx%2Fkotlin-random/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erictsangx%2Fkotlin-random/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erictsangx%2Fkotlin-random/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erictsangx","download_url":"https://codeload.github.com/erictsangx/kotlin-random/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244287969,"owners_count":20428908,"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":["kotlin","random","testing"],"created_at":"2024-11-25T00:12:09.217Z","updated_at":"2026-04-18T13:35:43.648Z","avatar_url":"https://github.com/erictsangx.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kotlin-random\n\nA very simple lib of Java Random and Kotlin aims to make testing easier, no magic. \nAlso support Java8 OffsetTime, OffsetDateTime and Instant\n\n## Gradle\n```gradle\ncompile \"io.github.erictsangx:kotlin-random:0.0.1\"\n```\n\n## Maven\n```maven\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.erictsangx\u003c/groupId\u003e\n  \u003cartifactId\u003ekotlin-random\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n## Examples:\n```kotlin\nval a = Rand.int  // 1-100 by default\nval b = Rand.str  // 3feffb92c82745a3b6ccd5f9fec5e3f1\nval c = Rand.bool // same as Random().nextBoolean()\n\nval timeA = Rand.time // 15:52:23.130+08:00\nval dataA = Rand.nDate //[OffsetDateTime.now] - [1,7] days - [Rand.time]\nval dataB = Rand.pDate //[OffsetDateTime.now] + [1,7] days + [Rand.time]\n\n```\n\n## Extensions\n```kotlin\nclass Foo(name: String, age: Int)\n\nval Rand.foo: Foo\n    get() = Foo(str, int)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferictsangx%2Fkotlin-random","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferictsangx%2Fkotlin-random","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferictsangx%2Fkotlin-random/lists"}