{"name":"get-amd-module-type","version":"2.0.0","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":"a3f3a0bbe583e815e243b1886eac3887e01b9c0a","_id":"get-amd-module-type@2.0.0","_shasum":"d001d132206b32a6281b9f8561884e1ec0589513","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"},"maintainers":[{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"}],"dist":{"shasum":"d001d132206b32a6281b9f8561884e1ec0589513","tarball":"http://registry-npm.ywwl.com/get-amd-module-type/download/get-amd-module-type-2.0.0.tgz","integrity":"sha512-XSZaaVPm//zjvqjA5HjS121LDge2a3Xj67Hk+OUkunzjTP3dfJkCsRmz5ibfOpJvk3GfFpdvEI4BDdmzdjih2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBdlvBarIHLx7CwcZ3x2jJNdKggZMzpkIfAJ9bAPwb3PAiBBHakPkuIHnPM55E5o48PNunEdEyYpID6opD8fpXbCHQ=="}],"size":2473,"noattachment":false,"key":"/get-amd-module-type/-/get-amd-module-type-2.0.0.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":1414864364371,"_cnpm_publish_time":1414864364371,"dist-tags":{"latest":"7.0.0"}}