{"name":"get-amd-module-type","version":"3.0.1","description":"Get the type of AMD module used for an AST node or within a file","main":"index.js","scripts":{"lint":"eslint index.js \"test/*.js\"","mocha":"mocha","test":"npm run lint && 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":">=6.0"},"dependencies":{"ast-module-types":"^3.0.0","node-source-walk":"^4.2.2"},"devDependencies":{"eslint":"^5.16.0","mocha":"^6.2.3"},"gitHead":"2bdda032736cb6388eac9843f9749629e0bf7754","_id":"get-amd-module-type@3.0.1","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-P05MPwDLfy8xi2xgxqJqjNtKi5GhAXQBdECSU9Io6baf1Nlkr1rt1aGpY0Cqv7tV55JL+pkgyMDCrnq4CdUk2A==","shasum":"27ee1cfe290bf441aff39fd1283a9d2b7071da33","tarball":"http://registry-npm.ywwl.com/get-amd-module-type/download/get-amd-module-type-3.0.1.tgz","fileCount":4,"unpackedSize":5350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGn6HACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqmkw//f3oVXDqlsE15EMIKhaumQXW+EACWcDLbxF5wgWON2hyK19cx\r\n+8w8Nc1SkeAt0Ldv46xyc7oytTZmI1CQGgnznIkogtgJ6eYBFyFM/BLjAA8s\r\n5IdVYazkc352yezGMBrtAkb5ODxqs3AGvWnjUshA0ZWNsCr+BdOTEcqm3V4M\r\nt44EAgB2SIhe9vwC7Xf8FUOQmLLNpXWWYuEfQGj4hZqjF8oEIPgNMzXsV8th\r\nJuxYabfCS4k+j/a2D8wOCXAAG1WhrBCRc6ZlfXqGL0wqi2J1uVkdNBS2bRxm\r\nJw8lGpRAWFKAbnuWkhiHJoQ/YBKo2h73kwUo14qQ1zn5xhkK7UWjVHbATaly\r\nybhC4ximQJQ206l3GHZtFJmGaZBT6PGN4zGETyo/cLt8BFvrIIX9VjvPHCeC\r\ntL07QHUfkKQVPB/X5xB+MRepEi3TS/vlwPWSszejsdpchlf0yGZuK3I1gtpK\r\nvoJb75+0tWJTGt0egR+MxVfYWehJjtNP6YiziBLgibjutk6rVnxUt6EZNBbU\r\nzWRgHVgk9c6z8FpuhQAF65BzZbQYKiaTo+HqKfZUg1Qn13mJFlD45/F9YO08\r\n6BEfQDrqbW9gVlQgc8i3kWtx/m5emWfYAtxAKJHYjXzbKiXIlvFnmp5hW+oT\r\n/OcVHtsbikLQDYHLf7ywQg15LYKxJKe99Gk=\r\n=36uq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOJ955ddtydtYM8hnodxRepdI5+5TS2d12EpcuhEw8gAIgA1mr3SESel5/6wmU128kBHguMOk6as443usZ6GjyfPI="}],"size":2299,"noattachment":false,"key":"/get-amd-module-type/-/get-amd-module-type-3.0.1.tgz"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-amd-module-type_3.0.1_1645903495769_0.003314599854818079"},"_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":1645903495903,"_cnpm_publish_time":1645903495903,"dist-tags":{"latest":"7.0.0"}}