{"name":"get-amd-module-type","version":"6.0.1","description":"Get the type of an AMD module used for an AST node or within a file","main":"index.js","scripts":{"lint":"xo","fix":"xo --fix","mocha":"mocha","test":"npm run lint && npm run mocha","test:ci":"c8 npm run mocha"},"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":">=18"},"dependencies":{"ast-module-types":"^6.0.1","node-source-walk":"^7.0.1"},"devDependencies":{"c8":"^10.1.3","mocha":"^11.1.0","xo":"^0.60.0"},"xo":{"space":true,"ignores":["test/fixtures/*"],"rules":{"arrow-body-style":"off","capitalized-comments":"off","comma-dangle":["error","never"],"curly":["error","multi-line"],"max-nested-callbacks":["error",5],"operator-linebreak":["error","after"],"object-curly-spacing":["error","always"],"prefer-template":"error","space-before-function-paren":["error","never"],"unicorn/no-anonymous-default-export":"off","unicorn/explicit-length-check":"off","unicorn/prefer-module":"off","unicorn/prefer-node-protocol":"off","unicorn/prefer-top-level-await":"off","unicorn/prevent-abbreviations":"off"},"overrides":[{"files":"test/**","envs":["mocha"]}]},"_id":"get-amd-module-type@6.0.1","gitHead":"874c97e5686e3628314f2ab484d7bd8797fae2f0","_nodeVersion":"20.18.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-MtjsmYiCXcYDDrGqtNbeIYdAl85n+5mSv2r3FbzER/YV3ZILw4HNNIw34HuV5pyl0jzs6GFYU1VHVEefhgcNHQ==","shasum":"191f479ae8706c246b52bf402fbe1bb0965d9f1e","tarball":"http://registry-npm.ywwl.com/get-amd-module-type/download/get-amd-module-type-6.0.1.tgz","fileCount":4,"unpackedSize":6710,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAeycrVdbK5SA+KxPsNg/8i3HoA73U/llDTxhOTHUF36AiEAok6cXKdY/boDVh9DL+KJ8/XLDpnCadkmkD19piDQbaI="}],"size":2805,"noattachment":false,"key":"/get-amd-module-type/-/get-amd-module-type-6.0.1.tgz"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/get-amd-module-type_6.0.1_1738415627212_0.9231075439711711"},"_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\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":1738415627396,"maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"}],"_cnpm_publish_time":1738415627396,"dist-tags":{"latest":"7.0.0"}}