{"name":"has-dynamic-import","version":"2.1.1","description":"Does the current environment have `import()` support?","main":"index.js","browser":{"./":"./browser.js","./syntax":"./browser-syntax.js"},"exports":{".":[{"browser":"./browser.js","default":"./index.js"},"./index.js"],"./syntax":[{"browser":"./browser-syntax.js","default":"./syntax.js"},"./syntax.js"],"./package.json":"./package.json"},"sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated && npm run emit-types","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=.js,.mjs .","tsc":"tsc -p .","postlint":"npm run tsc","preemit-types":"rm -f *.ts *.ts.map test/*.ts test/*.ts.map","emit-types":"npm run tsc -- --noEmit false --emitDeclarationOnly","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"npx npm@'>= 10.2' audit --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-dynamic-import.git"},"keywords":["import","dynamic","modules","esm","javascript","ecmascript","esmodules"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-dynamic-import/issues"},"homepage":"https://github.com/inspect-js/has-dynamic-import#readme","devDependencies":{"@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.2","@types/call-bind":"^1.0.5","@types/node":"^20.17.10","@types/semver":"^7.5.8","@types/tape":"^5.7.0","auto-changelog":"^2.5.0","encoding":"^0.1.13","eslint":"=8.8.0","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","semver":"^6.3.1","tape":"^5.9.0","typescript":"next"},"directories":{"test":"test"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"dependencies":{"call-bind":"^1.0.8","call-bound":"^1.0.3","get-intrinsic":"^1.2.6"},"testling":{"files":"test/index.js"},"publishConfig":{"ignore":[".github/workflows","!*.d.ts","!*.d.ts.map"]},"engines":{"node":">= 0.4"},"_id":"has-dynamic-import@2.1.1","gitHead":"eb47c9ae873a029923c88d3013f3fba95c3e1cff","types":"./index.d.ts","_nodeVersion":"23.4.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-DuTCn6K/RW8S27npDMumGKsjG6HE7MxzedZka5tJP+9dqfxks+UMqKBmeCijHtIhsBEZPlbMg0qMHi2nKYVtKQ==","shasum":"c81e5ad210483b76b4fbe3393c96c2269c0b06b8","tarball":"http://registry-npm.ywwl.com/has-dynamic-import/download/has-dynamic-import-2.1.1.tgz","fileCount":26,"unpackedSize":21899,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG35ZfjLWNuSIo0nPS5hyqvqfVLEtLV1we60MPalXnRfAiBOj7UxIgzRV80lc4dJ29TO2s2OZ2pTVjg6gESdkQZuAw=="}],"size":7924,"noattachment":false,"key":"/has-dynamic-import/-/has-dynamic-import-2.1.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/has-dynamic-import_2.1.1_1734331180838_0.15064795012659604"},"_hasShrinkwrap":false,"readme":"# has-dynamic-import <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\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&stars=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","publish_time":1734331180996,"_cnpm_publish_time":1734331180996,"dist-tags":{"latest":"2.1.1"}}