{"name":"get-amd-module-type","version":"6.0.2","keywords":["module","type","amd","factory","form"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"get-amd-module-type@6.0.2","maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"}],"homepage":"https://github.com/dependents/node-get-amd-module-type","bugs":{"url":"https://github.com/dependents/node-get-amd-module-type/issues"},"xo":{"rules":{"curly":["error","multi-line"],"comma-dangle":["error","never"],"prefer-template":"error","arrow-body-style":"off","operator-linebreak":["error","after"],"capitalized-comments":"off","object-curly-spacing":["error","always"],"unicorn/prefer-module":"off","space-before-function-paren":["error","never"],"unicorn/prefer-node-protocol":"off","unicorn/explicit-length-check":"off","unicorn/prevent-abbreviations":"off","unicorn/prefer-top-level-await":"off","unicorn/no-anonymous-default-export":"off"},"space":true,"ignores":["test/fixtures/*"],"overrides":[{"envs":["mocha"],"files":"test/**"}]},"dist":{"shasum":"257604e956bc7ec3f48da209c8a7e5ba4470a2fa","tarball":"http://registry-npm.ywwl.com/get-amd-module-type/download/get-amd-module-type-6.0.2.tgz","fileCount":4,"integrity":"sha512-7zShVYAYtMnj9S65CfN+hvpBCByfuB1OY8xID01nZEzXTZbx4YyysAfi+nMl95JSR6odt4q8TCj2W63KAoyVLQ==","signatures":[{"sig":"MEUCIH28k3hL2FyX1w58og0qZeUzceai8FAhZnqixgvytqQIAiEA1fHb6TE8GX/6KmrBcPzInpuo35tBbNyMASDUA+X9rk8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6628,"size":2787,"noattachment":false,"key":"/get-amd-module-type/-/get-amd-module-type-6.0.2.tgz"},"main":"index.js","engines":{"node":">=18"},"gitHead":"1350def2f9d19ae587021d4d3a06cfca6f3b4a69","scripts":{"fix":"xo --fix","lint":"xo","test":"npm run lint && npm run mocha","mocha":"mocha","test:ci":"c8 npm run mocha"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"repository":{"url":"git+https://github.com/dependents/node-get-amd-module-type.git","type":"git"},"_npmVersion":"11.11.0","description":"Get the type of an AMD module used for an AST node or within a file","directories":{},"_nodeVersion":"24.14.1","dependencies":{"ast-module-types":"^6.0.1","node-source-walk":"^7.0.1"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","xo":"^0.60.0","mocha":"^11.7.5"},"_npmOperationalInternal":{"tmp":"tmp/get-amd-module-type_6.0.2_1776092889233_0.40666486085735376","host":"s3://npm-registry-packages-npm-production"},"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":1776092889365,"_cnpm_publish_time":1776092889365,"dist-tags":{"latest":"7.0.0"}}