{"id":23248260,"url":"https://github.com/devhammed/dartified","last_synced_at":"2025-10-08T18:22:39.616Z","repository":{"id":56862781,"uuid":"526592818","full_name":"devhammed/dartified","owner":"devhammed","description":"Life-saving helpers for working with JavaScript libraries when compiling Dart/Flutter to Web.","archived":false,"fork":false,"pushed_at":"2022-08-19T12:16:15.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T07:20:13.181Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devhammed.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}},"created_at":"2022-08-19T12:09:53.000Z","updated_at":"2024-06-28T17:47:25.000Z","dependencies_parsed_at":"2022-09-11T03:01:38.729Z","dependency_job_id":null,"html_url":"https://github.com/devhammed/dartified","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/devhammed%2Fdartified","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devhammed%2Fdartified/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devhammed%2Fdartified/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devhammed%2Fdartified/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devhammed","download_url":"https://codeload.github.com/devhammed/dartified/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419868,"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":"2024-12-19T08:13:01.014Z","updated_at":"2025-10-08T18:22:39.547Z","avatar_url":"https://github.com/devhammed.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dartified\n\nLife-saving helpers for working with JavaScript libraries when compiling Dart/Flutter to Web.\n\n## Features\n\nThe functions included in this library will only work when you are compiling a Dart/Flutter project to Web.\n\nBelow are the included helpers so far:\n\n- `isBasicType(value)` - Checks if a value doesn't need to be converted between JavaScript and Dart.\n- `dartify(dynamic object)` - Converts a JavaScript object to what can be used in Dart.\n- `jsify(Object object)` - Converts a Dart object to what can be passed to JavaScript.\n- `promiseToFuture(JsObject object)` - Converts a JavaScript Promise object to Dart's Future object.\n\n## Usage\n\n```dart\nimport 'dart:js' as js;\n\nimport 'package:dartified/dartified.dart';\n\n/// An example using browser's fetch.\nFuture\u003cvoid\u003e main() async {\n  try {\n    var response = await Dartified.promiseToFuture(\n      js.context.callMethod(\n        Dartified.jsify('fetch'),\n        [\n          Dartified.jsify(\n            'https://api.github.com/repos/javascript-tutorial/en.javascript.info/commits',\n          ),\n        ],\n      ),\n    );\n\n    var json =\n        await Dartified.promiseToFuture\u003cString\u003e(response.callMethod('json'));\n\n    print(Dartified.dartify(json));\n  } catch (e) {\n    print('error: $e');\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevhammed%2Fdartified","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevhammed%2Fdartified","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevhammed%2Fdartified/lists"}