{"id":25257902,"url":"https://github.com/alexcmgit/dart-shared-tools","last_synced_at":"2025-04-06T01:14:14.703Z","repository":{"id":109371767,"uuid":"526956322","full_name":"alexcmgit/dart-shared-tools","owner":"alexcmgit","description":"A set of Dart tools that I often use in my projects (no Flutter dependency).","archived":false,"fork":false,"pushed_at":"2022-12-06T19:59:00.000Z","size":35,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T14:22:05.791Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dart","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/alexcmgit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2022-08-20T14:53:23.000Z","updated_at":"2024-06-29T03:14:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfe10fa0-3466-4cc3-83c2-dccfee4e433a","html_url":"https://github.com/alexcmgit/dart-shared-tools","commit_stats":null,"previous_names":["alexcmgit/dart-shared-tools"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcmgit%2Fdart-shared-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcmgit%2Fdart-shared-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcmgit%2Fdart-shared-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcmgit%2Fdart-shared-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexcmgit","download_url":"https://codeload.github.com/alexcmgit/dart-shared-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419870,"owners_count":20936013,"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":"2025-02-12T06:52:44.537Z","updated_at":"2025-04-06T01:14:14.679Z","avatar_url":"https://github.com/alexcmgit.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"## How to install\n\n(Recommended) Fork and depend of your fork instead using this one. This is a really unstable installation since it's not from _pub.dev_.\n\n```yaml\ndependencies:\n  # ...\n  dart_shared_tools:\n    git:\n      url: https://github.com/alexrintt/dart-shared-tools\n      ref: master\n  # ...\n```\n\nAnd use as:\n\n```dart\nimport 'package:dart_shared_tools/dart_shared_tools.dart';\n```\n\n## Features\n\nCheck out full list of features.\n\n### Available extensions\n\n- `ApplyIfNotNull`.\n\n```dart\n// Single line solution:\nsomeNullValue?.apply((T value) =\u003e executeOnlyIfItsNotNull(value)) ?? otherwise();\n\n// Instead of:\nif (someNullValue != null) {\n  executeOnlyIfItsNotNull(someNullValue!);\n} else {\n  otherwise();\n}\n```\n\n### Utilities\n\n- _Sem Ver_ masking function. Useful to work with database versions (Which accepts only integers).\n\n```dart\nmaskVersion('v0.1.0'); // 256\nunmarkVersion(256); // 'v0.1.0'\n```\n\n### Constants\n\n- DP constants.\n\n```dart\nconst double k0dp = 0 * 2.0;\nconst double k1dp = 1 * 2.0;\nconst double k2dp = 2 * 2.0;\nconst double k3dp = 3 * 2.0;\nconst double k4dp = 4 * 2.0;\nconst double k5dp = 5 * 2.0;\nconst double k6dp = 6 * 2.0;\nconst double k7dp = 7 * 2.0;\nconst double k8dp = 8 * 2.0;\nconst double k9dp = 9 * 2.0;\n// ...available up to [k40dp]\n```\n\n\u003cbr\u003e\n\n\u003csamp\u003e\n\n\u003ch2 align=\"center\"\u003e\n  Open Source\n\u003c/h2\u003e\n\u003cp align=\"center\"\u003e\n  \u003csub\u003eCopyright © 2022-present, Alex Rintt.\u003c/sub\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eDart Shared Tools \u003ca href=\"/LICENSE\"\u003eis MIT licensed 💖\u003c/a\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/51419598/178327667-15a00cd0-60c5-485f-8a0e-68c92545907b.png\" width=\"35\" /\u003e\n\u003c/p\u003e\n  \n\u003c/samp\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexcmgit%2Fdart-shared-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexcmgit%2Fdart-shared-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexcmgit%2Fdart-shared-tools/lists"}