Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
es6-import-list
Advanced tools
Utility for obtaining the dependency list from ES6 modules. This module only analyzes imports declared using the ES module syntax.
npm install -g es6-import-list
$ es6-import-list -d src/
// Output:
┌────────────────────────┬─────────────────────────┐
│ Modules │ Import List │
├────────────────────────┼─────────────────────────┤
│ megadraft │ MegadraftEditor │
│ │ MegadraftIcons │
│ │ editorStateFromRaw │
├────────────────────────┼─────────────────────────┤
│ react │ Component │
│ │ React │
├────────────────────────┼─────────────────────────┤
│ react-dom │ render │
└────────────────────────┴─────────────────────────┘
Generate a JSON output with all the dependency information
$ es6-import-list -d src/ --json
// Output:
{
"megadraft": [
"MegadraftEditor",
"MegadraftIcons",
"editorStateFromRaw"
],
"react": [
"Component",
"React"
],
"react-dom": [
"render"
]
}
Try es6-import-list --help
for more information.
const getImports = require('es6-import-list');
getImports('my-directory', importsList => {
console.log(importsList);
});
Default options:
const options = {
match: /.js$/,
exclude: [/^\./],
excludeDir: ['dist', 'lib', 'node_modules'],
}
es6-import-list uses node-dir, so you can pass additional options parameter to match or ignore files, for example.
const getImports = require('es6-import-list');
const options = {
match: /.js$/,
exclude: [/^\./],
excludeDir: ['node_modules'],
};
getImports('my-directory', options, importList => {
console.log(importList);
});
FAQs
List all es6 imports
The npm package es6-import-list receives a total of 0 weekly downloads. As such, es6-import-list popularity was classified as not popular.
We found that es6-import-list demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.