{"name":"get-amd-module-type","version":"3.0.2","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\"","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":"dbe4cf958e45bde31b946bbf73d69f8d8fc840e9","_id":"get-amd-module-type@3.0.2","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-PcuKwB8ouJnKuAPn6Hk3UtdfKoUV3zXRqVEvj8XGIXqjWfgd1j7QGdXy5Z9OdQfzVt1Sk29HVe/P+X74ccOuqw==","shasum":"46550cee2b8e1fa4c3f2c8a5753c36990aa49ab0","tarball":"http://registry-npm.ywwl.com/get-amd-module-type/download/get-amd-module-type-3.0.2.tgz","fileCount":4,"unpackedSize":5483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGn6ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpR9A/+KQ8oYp8xIFSlW4VxTiIvQ4gylPhGY/9obM0K1w22PWbSIHhO\r\nTersyPNEPzhvuthqrNvJkXE4gMSeY6SGz1CU5zKRKbkSdu28yn0YHAO8MDt4\r\npT2b3jKnMyYhRe+gir9exPBrab1X76RECkPHZRdBxiqDphDkF14NhWQXlYI/\r\nb16POlLRxa7GwsRFzbCkUd6xCTSR10V0F06gg1bV2EDw2er8PAASn8Y5cia3\r\nNCcnJvrV7CG3tucEgtPwCDUF5gtZtEsQ4D8Ky3BIj7fPaCUBk/85lyUsVM+b\r\nBF4ftrEvQxyZrJM5f9sEUmyGtSPYUpX3FXXjF7GTnhYVBiShJoNkqzA59d3V\r\npXZlG+e7iHr3BGUDDPDk6vnnMowJ3dOHLlT/vnklnLMfWqwgJxzi5tGV8ZII\r\nNaDpxC+vKriwlwVbLT0J+aJtoH67KgSIK1oJYimmH/swb2hyicxUEHHixwlo\r\nQsFfyzduk5vL2qxRrPFItp1HDACjArPzCbglXM/RGtft12ZgpxaW6elilTBT\r\nHbz+GMXVaCk0+2HI4xGDMHFUM/kcpVen8FWxb+nwXnRFgPgFoshqZqrmC5dK\r\nqVPnPx9btJS2zdojIWqQd070I18v2LXBOk5y2dIDTbqxDaljRyY/IZuSoky6\r\nlO7jsniQhKk6V0yAMB2AZsSSOT8s426ZInE=\r\n=u1l4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/OtRISCu3al++csVwOpR2XzTNQtnnL11+O8k10DjfEAIgQzg1Bu+VXNcyFogHjYRzOnAeF1Ut9FUiwMz46cFVOFw="}],"size":2365,"noattachment":false,"key":"/get-amd-module-type/-/get-amd-module-type-3.0.2.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.2_1645903512995_0.0684786243403821"},"_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":1645903513156,"_cnpm_publish_time":1645903513156,"dist-tags":{"latest":"7.0.0"}}