{"id":19412833,"url":"https://github.com/fisker/browser-load-script","last_synced_at":"2025-09-22T04:31:51.712Z","repository":{"id":37021673,"uuid":"470866225","full_name":"fisker/browser-load-script","owner":"fisker","description":"Load script in browser.","archived":false,"fork":false,"pushed_at":"2024-12-30T14:09:06.000Z","size":1159,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-05T21:58:17.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/fisker.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"fisker","open_collective":"fisker","custom":"https://buymeacoffee.com/fisker","patreon":"fisker_cheung"}},"created_at":"2022-03-17T05:57:19.000Z","updated_at":"2024-12-29T15:25:27.000Z","dependencies_parsed_at":"2023-09-28T23:52:03.108Z","dependency_job_id":"7a2302d6-c40c-45a5-84cc-d6159f964eaf","html_url":"https://github.com/fisker/browser-load-script","commit_stats":{"total_commits":99,"total_committers":3,"mean_commits":33.0,"dds":"0.12121212121212122","last_synced_commit":"9eaf28643cd6972570fe05a131bf31ed5f2ec21e"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fisker%2Fbrowser-load-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fisker%2Fbrowser-load-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fisker%2Fbrowser-load-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fisker%2Fbrowser-load-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fisker","download_url":"https://codeload.github.com/fisker/browser-load-script/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233642169,"owners_count":18707255,"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-10T12:28:30.077Z","updated_at":"2025-09-22T04:31:46.335Z","avatar_url":"https://github.com/fisker.png","language":"JavaScript","funding_links":["https://github.com/sponsors/fisker","https://opencollective.com/fisker","https://buymeacoffee.com/fisker","https://patreon.com/fisker_cheung"],"categories":[],"sub_categories":[],"readme":"# browser-load-script\n\n[![Build Status][github_actions_badge]][github_actions_link]\n[![Coverage][coveralls_badge]][coveralls_link]\n[![Npm Version][package_version_badge]][package_link]\n[![MIT License][license_badge]][license_link]\n\n[github_actions_badge]: https://img.shields.io/github/workflow/status/fisker/browser-load-script/CI/main?style=flat-square\n[github_actions_link]: https://github.com/fisker/browser-load-script/actions?query=branch%3Amain\n[coveralls_badge]: https://img.shields.io/coveralls/github/fisker/browser-load-script/main?style=flat-square\n[coveralls_link]: https://coveralls.io/github/fisker/browser-load-script?branch=main\n[license_badge]: https://img.shields.io/npm/l/browser-load-script.svg?style=flat-square\n[license_link]: https://github.com/fisker/browser-load-script/blob/main/license\n[package_version_badge]: https://img.shields.io/npm/v/browser-load-script.svg?style=flat-square\n[package_link]: https://www.npmjs.com/package/browser-load-script\n\n\u003e Load script in browser.\n\n## Install\n\n```bash\nyarn add browser-load-script\n```\n\n## Usage\n\n```html\n\u003cscript type=\"importmap\"\u003e\n  {\n    \"imports\": {\n      \"browser-load-script\": \"https://unpkg.com/browser-load-script\"\n    }\n  }\n\u003c/script\u003e\n\u003cscript type=\"module\"\u003e\n  import loadScript from 'browser-load-script'\n\n  await loadScript('data:application/javascript,')\n\u003c/script\u003e\n```\n\n## API\n\n### `loadScript(sourceOrProperties)`\n\n```js\nimport loadScript from 'browser-load-script'\n\nawait loadScript('https://example.com/script.js')\n```\n\n#### `sourceOrProperties`\n\n- Type: `string | Object`\n\n[Available properties](https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement#instance_properties)\n\n```js\nimport loadScript from 'browser-load-script'\n\nawait loadScript({\n  src: 'https://example.com/script.js',\n  defer: true,\n  crossOrigin: 'anonymous',\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffisker%2Fbrowser-load-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffisker%2Fbrowser-load-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffisker%2Fbrowser-load-script/lists"}