{"name":"get-amd-module-type","version":"2.0.2","description":"Get the type of AMD module used for an AST node or within a file","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test/test.js"},"repository":{"type":"git","url":"https://github.com/mrjoelkemp/node-get-amd-module-type.git"},"keywords":["module","type","amd"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","bugs":{"url":"https://github.com/mrjoelkemp/node-get-amd-module-type/issues"},"homepage":"https://github.com/mrjoelkemp/node-get-amd-module-type","devDependencies":{"mocha":"~2.0.1"},"dependencies":{"ast-module-types":"~2.0.1","node-source-walk":"~1.1.2"},"gitHead":"ba59161a5a4e8c90d7528ec6450ef8040b690843","_id":"get-amd-module-type@2.0.2","_shasum":"11e2182793d1f454ceb29bad4bd9c82abcb0bb0d","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"},"maintainers":[{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"}],"dist":{"shasum":"11e2182793d1f454ceb29bad4bd9c82abcb0bb0d","tarball":"http://registry-npm.ywwl.com/get-amd-module-type/download/get-amd-module-type-2.0.2.tgz","integrity":"sha512-as3lMuA5i8nBxvExBYM7XuBPTr4PVt0b4wMWr9QZsqVBTpiXTRCXSzg7unrWjGviFDWaAIqFC/iASQUcNvMj0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGCALZfS9Nh590R0tsK2HWd/FvJbBoa+AA9WByMM/0ZwIgHaowyF52CHFF30c4MV/jrPO/f1xquofoNI0pgrIzHoY="}],"size":2599,"noattachment":false,"key":"/get-amd-module-type/-/get-amd-module-type-2.0.2.tgz"},"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":1415459159519,"_cnpm_publish_time":1415459159519,"dist-tags":{"latest":"7.0.0"}}