{"id":18878645,"url":"https://github.com/nowzoo/sheetload","last_synced_at":"2026-04-25T12:32:36.894Z","repository":{"id":93412750,"uuid":"137593353","full_name":"nowzoo/sheetload","owner":"nowzoo","description":"Load stylesheets dynamically. Also scripts.","archived":false,"fork":false,"pushed_at":"2018-06-18T18:37:19.000Z","size":265,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-31T05:31:23.154Z","etag":null,"topics":["css-loader","javascript","javascript-loader","scripts","stylesheet-loader","stylesheets"],"latest_commit_sha":null,"homepage":"https://nowzoo.github.io/sheetload/","language":"TypeScript","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/nowzoo.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}},"created_at":"2018-06-16T16:09:43.000Z","updated_at":"2018-06-18T18:37:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"34cd260d-930a-4ed7-99a5-6d35bdd9b770","html_url":"https://github.com/nowzoo/sheetload","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/nowzoo/sheetload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowzoo%2Fsheetload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowzoo%2Fsheetload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowzoo%2Fsheetload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowzoo%2Fsheetload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nowzoo","download_url":"https://codeload.github.com/nowzoo/sheetload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowzoo%2Fsheetload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32262801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["css-loader","javascript","javascript-loader","scripts","stylesheet-loader","stylesheets"],"created_at":"2024-11-08T06:28:47.733Z","updated_at":"2026-04-25T12:32:36.867Z","avatar_url":"https://github.com/nowzoo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sheetload\n\nLoad stylesheets dynamically. Also scripts.\n\n## Quick Start\n\n```bash\nnpm i @nowzoo/sheetload --save\n```\n\nLoad a stylesheet...\n\n```ts\nimport { Sheetload } from '@nowzoo/sheetload';\n//...\nSheetload.load(url)\n  .then((el: HTMLLinkElement) =\u003e {\n    //links are disabled at this point...\n    el.removeAttribute(el, 'disabled')\n  })\n  .catch((error: any) =\u003e {\n    //...\n  })\n```\n\nLoad a script...\n\n```ts\nimport { Scriptload } from '@nowzoo/sheetload';\n//...\nScriptload.load(url)\n  .then((el: HTMLScriptElement) =\u003e {\n    //...\n  })\n  .catch((error: any) =\u003e {\n    //...\n  })\n```\n\n\n## API\n\n### `Sheetload`\n\n#### `static load(url: string): Promise\u003cHTMLLinkElement\u003e`\nLoads a stylesheet, resolving with a newly created `link` element when it loads.\n\n**Note:** The element's `disabled` attribute is set. You are responsible for enabling it:\n```ts\nthis.renderer.removeAttribute(link, 'disabled');\n```\n\n**Note:** The element is appended to `document.head`. You are responsible for tracking the link tags yourself to prevent duplication.\n\n### `Scriptload`\n\n#### `static load(url: string): Promise\u003cHTMLScriptElement\u003e`\nLoads a script, resolving with a newly created `script` element when the script loads.\n\n**Note:** The element is appended to `document.head`. You are responsible for tracking the script elements yourself to prevent duplication.\n\n### `Elementload`\n\n#### `static load(el: HTMLElement): Promise\u003cHTMLElement\u003e`\nGiven an element, listens for `load` and `error` events. Resolves on load, rejects on error.\n\n\n## Contributing\n\nContributions are welcome.\n\n```bash\ngit clone https://github.com/nowzoo/sheetload.git\nnpm i\nng build sheetload --prod\n```\n\nThe library code is located under [projects/sheetload](https://github.com/nowzoo/sheetload/tree/master/projects/sheetload).\n\nTesting the library...\n\n```bash\nng test sheetload\n```\n\nYou can also use Wallaby for testing. Use the config found at `projects/sheetload/wallaby.js`.\n\nBuilding the library...\n\n```bash\nng build sheetload --prod\n```\n\nThe demo code is in [src](https://github.com/nowzoo/ngx-highlight-js/tree/master/src). Run the demo locally...\n\n```bash\n# Build the current version of the library first...\nng build ngx-highlight-js --prod\n\nng serve --open\n```\n\n\n\n\n\n## License\n[MIT](https://github.com/nowzoo/ngx-highlight-js/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowzoo%2Fsheetload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnowzoo%2Fsheetload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowzoo%2Fsheetload/lists"}