New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

find-node-modules-import

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-node-modules-import

Find specific node modules import statement in your source code

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

find-node-modules-import

Find specific node modules import statement in your source code.

Features

  • Find all imported module name
  • Find specific module name
  • Find Node.js built-in module name like node:fs or assert

📝 This tool only support import syntax. require syntax is not supported.

Install

Install with npm:

npm install find-node-modules-import --global

Requirement:

  • Node.js v16.17.0+ or Node.js v18.6.0+

Usage

Usage
  $ find-node-modules-import [file|glob*]

Options
  --module              [String] filter the result by module name
  --builtinModules      [Boolean] filter the result by Node.js builtin modules. Default: false
  --verbose             [Boolean] show warning/error output. Default: false

Examples
  # show all imports
  $ find-node-modules-import "src/**/*.{js, ts}"
  # show Node.js builtin modules
  $ find-node-modules-import "src/**/*.{js, ts}" --builtinModules
  # show specific module
  $ find-node-modules-import "src/**/*.{js, ts}" --module "lodash"

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  • Fork it!
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request :D

Author

License

MIT © azu

Keywords

npm

FAQs

Package last updated on 14 Jan 2023

Did you know?

Socket

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.

Install

Related posts