{"name":"get-amd-module-type","version":"4.1.0","description":"Get the type of an AMD module used for an AST node or within a file","main":"index.js","scripts":{"lint":"eslint index.js \"test/*.js\"","fix":"npm run lint -- --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":">=12"},"dependencies":{"ast-module-types":"^4.0.0","node-source-walk":"^5.0.1"},"devDependencies":{"c8":"^7.13.0","eslint":"^8.36.0","mocha":"^9.2.2"},"gitHead":"b10e02f0d9ca040e88f1db12cf841c48a471f6a6","_id":"get-amd-module-type@4.1.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-0e/eK6vTGCnSfQ6eYs3wtH05KotJYIP7ZIZEueP/KlA+0dIAEs8bYFvOd/U56w1vfjhJqBagUxVMyy9Tr/cViQ==","shasum":"af1396d02cd935cb6fafdc4a5282395db3422db6","tarball":"http://registry-npm.ywwl.com/get-amd-module-type/download/get-amd-module-type-4.1.0.tgz","fileCount":4,"unpackedSize":5597,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICfno6YCxEcXJai2qPUHFnpBu5LCckkUgjrVrMo3lM9tAiAaMSroS+9kkhQV0CkaGs1OyiIFLlrfyufdVgAS1TWHXw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFr6CACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpXaA//TofJ9UM4Njgo8MjVC0ytSUy7wmZDcJK5ouSvi+WXBSDvCNrP\r\nwv+ZPrv54xVmSIZLwG0ja4+uDvxS/gT5BLeuM+3VOqvxLrJA/rTsO929Pn+W\r\nKzY5ZZx1BMdy8vID+Ir/e0LeQ2ta2qQ+L0JvrSqLXfO/ycA9ICYbTAax7Tv8\r\nKCE/ngxxTZBzcOgwElQuvelPVlllv0awZp6E/pRQgkGgIpG/fZfWBIOmiz6C\r\nYEKinoS+o8RM/wXNVWmtr7ZPWe/ybbVBGq1NmVO/PkvYzzMHujyBKrbmMJlt\r\nfNCkIs6wQRyonL6cm1me86jjoY/ymC/8Bd1Sh5c5OcmTTf/gg6mxmVPvX/2o\r\nP7tg9vrxRWlIE/MVhIuRjSF8Q/CkWw3S78kSnq+KSmNQTweIYCwoxYbQ4p6e\r\nDOVYD6NEYOWTlwT4ghD5mkZk7JIWYKKv8v7Wb+AVNNFTQfsh8N3iWcCgcHvl\r\nLCI9lIJx7ZIYHzXkRdxw7MfGgrqZ+rzVKkfOuqzJgPUHMJ93AScQCgAqurSr\r\ndtlX+XNk/RATnT3QZ4wHqyExPb1sasGbcRPM5CPC4b8zgsUq3HlWGEsbm6tq\r\nDqgKViXyUxIFQmipvaICIJeal9xFKCoNPInVRyVQTnZEwPbmhzs4WbStAHWw\r\nhOKDLnooCJAy1AB9TrBq9Nhu7WtLt/ePKsw=\r\n=xDw2\r\n-----END PGP SIGNATURE-----\r\n","size":2403,"noattachment":false,"key":"/get-amd-module-type/-/get-amd-module-type-4.1.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_4.1.0_1679212161956_0.7163073127420971"},"_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":1679212162112,"_cnpm_publish_time":1679212162112,"dist-tags":{"latest":"7.0.0"}}