
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
get-amd-module-type
Advanced tools
Get the type of an AMD module used for an AST node or within a file
Get the type of an AMD module used for an AST node or within a file
npm install get-amd-module-type
const getType = require('get-amd-module-type');
// Async
getType('my/file.js', (error, type) => {
if (error) throw error;
console.log(type);
});
let type;
// Sync
type = getType.sync('my/file.js');
// From source code
type = getType.fromSource('define() {}');
// From an AST node
type = getType.fromAST(node);
The returned type
will be any of the following:
'named'
: define('name', [deps], func)
'deps'
: define([deps], func)
'rem'
: define(function(require, exports, module){});
'factory'
: define(function(require){})
'nodeps'
: define({})
'driver'
: require([deps], function)
FAQs
Get the type of an AMD module used for an AST node or within a file
The npm package get-amd-module-type receives a total of 1,405,958 weekly downloads. As such, get-amd-module-type popularity was classified as popular.
We found that get-amd-module-type demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.