{"id":19032717,"url":"https://github.com/joutvhu/libjs-loader","last_synced_at":"2025-04-23T16:41:45.270Z","repository":{"id":57837724,"uuid":"528131897","full_name":"joutvhu/libjs-loader","owner":"joutvhu","description":"Provides a method for lazy loading of JS libraries in the browser.","archived":false,"fork":false,"pushed_at":"2023-07-28T07:01:05.000Z","size":254,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T02:45:07.903Z","etag":null,"topics":["js","lazy","library","loader"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/libjs-loader","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/joutvhu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2022-08-23T19:17:39.000Z","updated_at":"2023-01-24T11:27:17.000Z","dependencies_parsed_at":"2025-04-17T14:16:03.641Z","dependency_job_id":"1c926330-ef4d-4c0d-b0d1-3bc3b1586fd6","html_url":"https://github.com/joutvhu/libjs-loader","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joutvhu%2Flibjs-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joutvhu%2Flibjs-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joutvhu%2Flibjs-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joutvhu%2Flibjs-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joutvhu","download_url":"https://codeload.github.com/joutvhu/libjs-loader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250472037,"owners_count":21436069,"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":["js","lazy","library","loader"],"created_at":"2024-11-08T21:30:43.892Z","updated_at":"2025-04-23T16:41:45.251Z","avatar_url":"https://github.com/joutvhu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LibJs Loader\n\nProvides a method for lazy loading of js libraries in the browser.\n\n## Installation\n\n```shell\nnpm i libjs-loader\n```\n\n## Using\n\n```ts\nimport { loadLibrary } from 'libjs-loader';\n\nloadLibrary(\n    'https://mozilla.github.io/pdf.js/build/pdf.js',\n    'pdfjs-dist/build/pdf',\n    (pdfLib: any) =\u003e {\n        const pdfWorker = 'https://mozilla.github.io/pdf.js/build/pdf.worker.js';\n        pdfLib.GlobalWorkerOptions.workerSrc = pdfWorker;\n        pdfLib.loadScript(pdfWorker);\n    })\n    .then(pdf =\u003e {\n        const loadingTask = pdf.getDocument('pdf url');\n        ...\n    });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoutvhu%2Flibjs-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoutvhu%2Flibjs-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoutvhu%2Flibjs-loader/lists"}