{"name":"get-amd-module-type","version":"2.0.4","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":"git+https://github.com/mrjoelkemp/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/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.3.1","node-source-walk":"~3.0.0"},"gitHead":"e3714ab13e7f60569a49cf5b6f3f1c4c7e147a42","_id":"get-amd-module-type@2.0.4","_shasum":"8a23764d81d45e0208059a14302e904a657ad911","_from":".","_npmVersion":"3.8.0","_nodeVersion":"0.12.6","_npmUser":{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"},"maintainers":[{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"}],"dist":{"shasum":"8a23764d81d45e0208059a14302e904a657ad911","tarball":"http://registry-npm.ywwl.com/get-amd-module-type/download/get-amd-module-type-2.0.4.tgz","integrity":"sha512-NCRu48/YeD1TJ84QU7KU8F33RYXcIY/Ad2FoSpcXieX+rxw/bufZIACdksu01ictTQAIIcLRWJVLXhn+/Jp3DQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDt5/JwiWKviQ+L3jGBPRsJm14G2QKnmTOa1j5dx9VQHAiEAsksyMo9lCgC1B3TLqkzWK9ThIiek1deTyKfnje9RXxk="}],"size":2782,"noattachment":false,"key":"/get-amd-module-type/-/get-amd-module-type-2.0.4.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/get-amd-module-type-2.0.4.tgz_1466043053510_0.41614428581669927"},"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":1466043055856,"_cnpm_publish_time":1466043055856,"dist-tags":{"latest":"7.0.0"}}