{"id":24030490,"url":"https://github.com/callmecavs/xec","last_synced_at":"2025-04-19T11:41:41.660Z","repository":{"id":57401229,"uuid":"65586281","full_name":"callmecavs/xec","owner":"callmecavs","description":"An async script loader, for the browser, built on Promises.","archived":false,"fork":false,"pushed_at":"2017-01-26T01:21:56.000Z","size":18,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-08T10:43:00.899Z","etag":null,"topics":["async","script-loader"],"latest_commit_sha":null,"homepage":"","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/callmecavs.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":"2016-08-12T22:08:49.000Z","updated_at":"2024-12-15T15:04:25.000Z","dependencies_parsed_at":"2022-09-19T04:50:39.943Z","dependency_job_id":null,"html_url":"https://github.com/callmecavs/xec","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callmecavs%2Fxec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callmecavs%2Fxec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callmecavs%2Fxec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callmecavs%2Fxec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/callmecavs","download_url":"https://codeload.github.com/callmecavs/xec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233072515,"owners_count":18620778,"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":["async","script-loader"],"created_at":"2025-01-08T17:44:19.566Z","updated_at":"2025-01-08T17:44:20.155Z","avatar_url":"https://github.com/callmecavs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xec\n\n[![xec on NPM](https://img.shields.io/npm/v/xec.svg?style=flat-square)](https://www.npmjs.com/package/xec)\n\nAn async script loader, for the browser, built on Promises.\n\n\u003e Pronounced \"exec\".\n\n## Install\n\n```\nnpm i xec --save\n```\n\n## API\n\nxec exports a singleton, and _won't load the same source twice_.\n\nIt exposes the following API:\n\n* [one](#onesource)\n* [many](#manysources)\n\n### .one(source)\n\n```javascript\nimport { one } from 'xec'\n\none('path/one.js')\n  .then(() =\u003e console.log('Script loaded and executed.'))\n  .catch(() =\u003e console.log('Something went wrong.'))\n```\n\n### .many(sources)\n\n```javascript\nimport { many } from 'xec'\n\nconst sources = [\n  'path/one.js',\n  'path/two.js'\n]\n\nmany(sources)\n  .then(() =\u003e console.log('All scripts loaded and executed.'))\n  .catch(() =\u003e console.log('Something went wrong.'))\n```\n\n## Browser Support\n\n1. Async script loading requires [`async`](http://caniuse.com/#search=async) attribute support.\n2. [Promises](http://caniuse.com/#search=promises) are required. If needed, [polyfill](https://github.com/stefanpenner/es6-promise) them.\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT). © 2017 Michael Cavalea\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallmecavs%2Fxec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcallmecavs%2Fxec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallmecavs%2Fxec/lists"}