
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
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: [/^\./],
}
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: ['dist', 'lib', '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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.