{"name":"get-amd-module-type","version":"4.0.0","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","test:ci":"c8 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":">=12"},"dependencies":{"ast-module-types":"^3.0.0","node-source-walk":"^5.0.0"},"devDependencies":{"c8":"^7.11.0","eslint":"^8.10.0","mocha":"^9.2.1"},"gitHead":"410217ada7c8b90c8ba1ae434cab2e1c26a180a2","_id":"get-amd-module-type@4.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-GbBawUCuA2tY8ztiMiVo3e3P95gc2TVrfYFfpUHdHQA8WyxMCckK29bQsVKhYX8SUf+w6JLhL2LG8tSC0ANt9Q==","shasum":"3d4e5b44eec81f8337157d7c52c4fa9389aff78b","tarball":"http://registry-npm.ywwl.com/get-amd-module-type/download/get-amd-module-type-4.0.0.tgz","fileCount":4,"unpackedSize":5538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIMF1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpugBAAn6DLEgo4rVXWl/jCm2oEA9a1yHFPoKrNfLnM3Wg36fq7ld0/\r\n5+AgHucDnWEevqAnWy4t+n1UdbBvEwU9P6BHOzlDXwU9B7EqFo+6pc81pUIk\r\nXzbtLZ6E6G9yZy0GcGxcSCFubkuzNKDe4tF0Gbu0i7VBj/zEDwpjlBCzmCjb\r\nqEMeYaTyGFFsl53xsZl5EYpSBKO+nZgBADl8UutLDdTmN6rJBn7STtNP6KqE\r\nTLfoqba2eEi7m1hXdJBTxs5kOxFrJI/kF4CZASWKd8KcFg9rrZVjaDN6xtPL\r\nFnwW/h64j+95AGrQnvMgObL/g9Df24iLhRu7fbIw8O7OGKZWKsZh489gMWtW\r\nJmyhU0o81c78IogfQQnYfps1owOT7ehiSIsUcsRJCh6+zdtbRyb1n9m3wO4X\r\nU1oKs75dCV/jxhOqBzD/aCEIDHo2DuQTcHnMsEewAlO0qIib5XQpqtoMVnqp\r\ngb8w3FTKAMv2bURhw1geIHiFDiYhgSWY9I+Vpq9yuR8/2Qht6fTdlxgHNXu2\r\n/fOOG+fQXYtH+clZUJ2RVsWHlim6/PPGNE35w2jxvKuSaCt0CWBiSJWbC0QA\r\npNKF7sABiMKs4M9zVvAsfp3I3nmWgqq+ba5XVM+zLXwBX4ilxzOgYzCimDOy\r\nXnYWCpvRnAJOY1lkV4YpzhOtmOywQTJXDSU=\r\n=tMz6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBHHFuI44yoixr7SKi/+CbjAzzJqZqSXA8Obu8D4vEqsAiBgXo9S0WvBwuviXHI9aiTxDrTGv2JyAEE7n1UpQCAdTw=="}],"size":2382,"noattachment":false,"key":"/get-amd-module-type/-/get-amd-module-type-4.0.0.tgz"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-amd-module-type_4.0.0_1646313845490_0.8828294254972902"},"_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":1646313845655,"_cnpm_publish_time":1646313845655,"dist-tags":{"latest":"7.0.0"}}