{"name":"get-amd-module-type","version":"5.0.0","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":">=14"},"dependencies":{"ast-module-types":"^5.0.0","node-source-walk":"^6.0.0"},"devDependencies":{"c8":"^7.13.0","mocha":"^10.2.0","xo":"^0.54.2"},"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/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"]}]},"gitHead":"f26986d8281bc5748a73b5db19024645ac49bdc1","_id":"get-amd-module-type@5.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-9mUVPLcOJ8n6VvW+9QOCdYC350Rmqg/hK2I+mFrqoV4KtBkZVGZDnINzN8Zo3s5VoxWk8/isVC48W02+auxDaQ==","shasum":"b885470ad91332cd4786e9530387b49781991bed","tarball":"http://registry-npm.ywwl.com/get-amd-module-type/download/get-amd-module-type-5.0.0.tgz","fileCount":4,"unpackedSize":6635,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCw9BYqd36IOjb6rsBRIBvWui2rY+xs03WYSlMSKLx8MQIgD2ylQ+xLL7H3Q8S07eXwZyE3aU5uBAsg1t3XeYmOT4M="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkVAFFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmow3g//ZDZvfLuILfTNL2fOJTLt/gdhkBYb9RbNZoMN/PvScLl1mMCr\r\nXQ2Tk3Y01xqTNkIU2FySmRW1zcBECeJTf28PGSnADvp8XqAL7ePrwH+BiuMf\r\nzdObzrxhjWe4lO/CVmN0CoE7kxlDOsmPcIfdMpcdBgs7EwGt5Gxf+RaGywB5\r\nhki4SRGZtw9MCQeiiliiBp8+eCtoSJIfXPdg3zdZrUVv+JwCH5HN2/3QSVCV\r\nnMps5GnG1lFHVTqcBzOJR8WOqx/VrfLGiP2+G5MNa8iLWviI5SPQXy5j6OXz\r\nh5XZxO9uhu+BcCNwqzDXDfodTPx7Vt+vb0LGtlo2e4xP91cArbHvs+uS1xhh\r\npiZGDU8q90yFQe8/vjBEsjaYrQOwJRAJU4yarZh9QDZFrUk9AqCmMlzRJ5Gh\r\neA8yTsn8pZl33xQIZgWgHB3kEY2zNZ/1e71UfDy4elkiiP8abi/zbThdjUky\r\nPodklO8FrJ+tgW1xhB3i6bgX3rnDOWwcuNW0IqRzyS4Wh8uAc4BmgiThNCqx\r\nedgdMfjXF32cn8RGOuT+J2h4J+db5KGJzatsTO4KFquVdikk8IH/RdcpQtG8\r\nUg7kke9kAW8cEZ7WTzUgBoQp5jVxeeGuj0XeWa77VoTK5Ao5q2KVpWk98dbo\r\n6rU5H3RhXA+TNr8ebGBdWFJKcUvBH1ag8sY=\r\n=iiwU\r\n-----END PGP SIGNATURE-----\r\n","size":2745,"noattachment":false,"key":"/get-amd-module-type/-/get-amd-module-type-5.0.0.tgz"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-amd-module-type_5.0.0_1683226949596_0.034142373480265054"},"_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":1683226949771,"_cnpm_publish_time":1683226949771,"dist-tags":{"latest":"7.0.0"}}