{"name":"get-amd-module-type","version":"7.0.0","description":"Get the type of an AMD module used for an AST node or within a file","type":"module","exports":{".":"./index.js"},"scripts":{"lint":"xo","fix":"xo --fix","uvu":"uvu test -i fixtures","test":"npm run lint && npm run uvu","test:ci":"c8 npm run uvu"},"repository":{"type":"git","url":"git+https://github.com/dependents/node-get-amd-module-type.git"},"keywords":["module","type","amd","factory","form"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","bugs":{"url":"https://github.com/dependents/node-get-amd-module-type/issues"},"homepage":"https://github.com/dependents/node-get-amd-module-type","engines":{"node":">=20.19.0 || >=22.12.0"},"dependencies":{"ast-module-types":"^7.0.0","node-source-walk":"^8.0.0"},"devDependencies":{"c8":"^11.0.0","uvu":"^0.5.6","xo":"^2.0.2"},"gitHead":"15e12627b1e241c41207dc7c2d0150893dd20273","_id":"get-amd-module-type@7.0.0","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-Pxu8tqdNbCBWoahaWS1EElwWxP9iNVTWr3VlqsobQPTs5qs77E66BI79ln00d2QoJdcvKIcoDlKDOiVGBehoDA==","shasum":"4fe5267a6fe540eda95b44ee5fe35ba209af858d","tarball":"http://registry-npm.ywwl.com/get-amd-module-type/download/get-amd-module-type-7.0.0.tgz","fileCount":4,"unpackedSize":5780,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC6YkYdhiZRSfLG8vXpSDaTTIxuMl75ZmvSLuePvtUyVAIhAJvV+6Zj9HSy5j0OZoTv0hnwt2gvJktqF7IcA2vAQcxY"}],"size":2484,"noattachment":false,"key":"/get-amd-module-type/-/get-amd-module-type-7.0.0.tgz"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/get-amd-module-type_7.0.0_1779201372413_0.084077079910865"},"_hasShrinkwrap":false,"readme":"# get-amd-module-type\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-get-amd-module-type/ci.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/node-get-amd-module-type/actions/workflows/ci.yml?query=branch%3Amain)\n[![npm version](https://img.shields.io/npm/v/get-amd-module-type?logo=npm&logoColor=fff)](https://www.npmjs.com/package/get-amd-module-type)\n[![npm downloads](https://img.shields.io/npm/dm/get-amd-module-type)](https://www.npmjs.com/package/get-amd-module-type)\n\n> Get the type of an AMD module used for an AST node or within a file\n\n```sh\nnpm install get-amd-module-type\n```\n\n## Usage\n\n```js\n// ESM\nimport getType from 'get-amd-module-type';\n// or CJS\nconst getType = require('get-amd-module-type');\n\n// Async\ngetType('my/file.js', (error, type) => {\n  if (error) throw error;\n  console.log(type);\n});\n\nlet type;\n\n// Sync\ntype = getType.sync('my/file.js');\n\n// From source code\ntype = getType.fromSource('define() {}');\n\n// From an AST node\ntype = getType.fromAST(node);\n```\n\nThe returned `type` will be any of the following:\n\n* `'named'`: `define('name', [deps], func)`\n* `'deps'`: `define([deps], func)`\n* `'rem'`: `define(function(require, exports, module){});`\n* `'factory'`: `define(function(require){})`\n* `'nodeps'`: `define({})`\n* `'driver'`: `require([deps], function)`\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1779201372547,"_cnpm_publish_time":1779201372547,"dist-tags":{"latest":"7.0.0"}}