{"id":18277642,"url":"https://github.com/inspect-js/has-dynamic-import","last_synced_at":"2025-04-05T04:30:40.762Z","repository":{"id":50753207,"uuid":"367130787","full_name":"inspect-js/has-dynamic-import","owner":"inspect-js","description":"Does the current environment have `import()` support?","archived":false,"fork":false,"pushed_at":"2024-12-16T06:39:27.000Z","size":88,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-20T21:44:14.657Z","etag":null,"topics":["detect","dynamic","ecmascript","esm","esmodules","has","import","javascript","modules"],"latest_commit_sha":null,"homepage":"","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/inspect-js.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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":["ljharb"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":"npm/deep-equal","community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-05-13T17:53:51.000Z","updated_at":"2024-12-16T06:39:31.000Z","dependencies_parsed_at":"2024-03-11T05:32:08.640Z","dependency_job_id":"f4bfede7-a3fe-46c9-95ba-70b5989239f6","html_url":"https://github.com/inspect-js/has-dynamic-import","commit_stats":{"total_commits":38,"total_committers":2,"mean_commits":19.0,"dds":"0.052631578947368474","last_synced_commit":"624718aab0278af082c3c55f4ad767935bda4f1f"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inspect-js%2Fhas-dynamic-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inspect-js%2Fhas-dynamic-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inspect-js%2Fhas-dynamic-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inspect-js%2Fhas-dynamic-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inspect-js","download_url":"https://codeload.github.com/inspect-js/has-dynamic-import/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289382,"owners_count":20914463,"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":["detect","dynamic","ecmascript","esm","esmodules","has","import","javascript","modules"],"created_at":"2024-11-05T12:19:51.565Z","updated_at":"2025-04-05T04:30:38.911Z","avatar_url":"https://github.com/inspect-js.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ljharb","https://tidelift.com/funding/github/npm/deep-equal"],"categories":[],"sub_categories":[],"readme":"# has-dynamic-import \u003csup\u003e[![Version Badge][npm-version-svg]][package-url]\u003c/sup\u003e\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nDoes the current environment have `import()` support?\n\nAt the time of this writing, node v12.17+, v13.2+ and v14.0+ has support for dynamic [`import()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports); the syntax is supported in node v10+.\n\nThe former can be checked in the package‘s main export, which is an `async function` that returns a boolean indicating if the current environment fully supports dynamic import. Note that in node v12.17 - v12.19 and v13.4 - v13.13, an ExperimentalWarning will be logged.\n\nThe latter can be checked with `'has-dynamic-import/syntax'`, which is a function that returns a boolean indicating if the current environment supports parsing the syntax of dynamic import.\n\n## Tests\n\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/has-dynamic-import\n[npm-version-svg]: https://versionbadg.es/inspect-js/has-dynamic-import.svg\n[deps-svg]: https://david-dm.org/inspect-js/has-dynamic-import.svg\n[deps-url]: https://david-dm.org/inspect-js/has-dynamic-import\n[dev-deps-svg]: https://david-dm.org/inspect-js/has-dynamic-import/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/has-dynamic-import#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/has-dynamic-import.png?downloads=true\u0026stars=true\n[license-image]: https://img.shields.io/npm/l/has-dynamic-import.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/has-dynamic-import.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=has-dynamic-import\n[codecov-image]: https://codecov.io/gh/inspect-js/has-dynamic-import/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/has-dynamic-import/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-dynamic-import\n[actions-url]: https://github.com/inspect-js/has-dynamic-import/actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finspect-js%2Fhas-dynamic-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finspect-js%2Fhas-dynamic-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finspect-js%2Fhas-dynamic-import/lists"}