{"id":21995746,"url":"https://github.com/excaliburhan/xp-loadjs","last_synced_at":"2025-03-23T04:22:14.661Z","repository":{"id":28895044,"uuid":"119651229","full_name":"excaliburhan/xp-loadjs","owner":"excaliburhan","description":"动态导入js，支持promise","archived":false,"fork":false,"pushed_at":"2023-01-06T01:57:05.000Z","size":771,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-19T13:46:36.094Z","etag":null,"topics":["library"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/excaliburhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-31T07:30:58.000Z","updated_at":"2021-02-01T03:46:01.000Z","dependencies_parsed_at":"2023-01-14T13:45:37.284Z","dependency_job_id":null,"html_url":"https://github.com/excaliburhan/xp-loadjs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fxp-loadjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fxp-loadjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fxp-loadjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fxp-loadjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/excaliburhan","download_url":"https://codeload.github.com/excaliburhan/xp-loadjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245053708,"owners_count":20553380,"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":["library"],"created_at":"2024-11-29T21:18:22.867Z","updated_at":"2025-03-23T04:22:14.624Z","avatar_url":"https://github.com/excaliburhan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xp-loadjs\n动态导入js，支持promise\n\n### Usage\n\n```js\nimport loadjs from 'xp-loadjs'\n\n// single file\nloadjs('https://cdn.bootcss.com/jquery/3.3.1/jquery.js')\n  .then(() =\u003e {\n    console.log('load success')\n  })\n  .catch(() =\u003e {\n    console.log('load error')\n  })\n\n// custom dataset\n// \u003cscript src=\"https://cdn.bootcss.com/jquery/3.3.1/jquery.js\" id=\"1\"\u003e\u003c/script\u003e\nloadjs({\n  url: 'https://cdn.bootcss.com/jquery/3.3.1/jquery.js',\n  extraPropMap: {\n    id: 1\n  }\n})\n\n// multiple files\nloadjs(['https://cdn.bootcss.com/jquery/3.3.1/jquery.js', 'https://cdn.bootcss.com/lodash.js/4.17.4/lodash.js'])\n  .then(() =\u003e {\n    console.log('load success')\n  })\n  .catch(() =\u003e {\n    console.log('load error')\n  })\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcaliburhan%2Fxp-loadjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexcaliburhan%2Fxp-loadjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcaliburhan%2Fxp-loadjs/lists"}