# find-node-modules-import

> Find specific node modules import statement in your source code

Latest version **1.1.0** (published 2023-01-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install find-node-modules-import
pnpm add find-node-modules-import
yarn add find-node-modules-import
bun add find-node-modules-import
```

Provides the command `find-node-modules-import`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2023-01-14 |
| First published | 2023-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 16.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | azu |
| Maintainers | azu |
| Keywords | npm, node, import, analytics, core-modules, builtin |

## Links

- npm: https://www.npmjs.com/package/find-node-modules-import
- Repository: https://github.com/azu/find-node-modules-import
- Issues: https://github.com/azu/find-node-modules-import/issues
- npm.io page: https://npm.io/package/find-node-modules-import

## Dependencies (4)

- [meow](https://npm.io/package/meow.md) ^11.0.0
- [globby](https://npm.io/package/globby.md) ^13.1.3
- [es-module-lexer](https://npm.io/package/es-module-lexer.md) ^1.1.0
- [structured-source](https://npm.io/package/structured-source.md) ^4.0.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2023-01-14
- 1.0.2 — 2023-01-13
- 1.0.1 — 2023-01-13

## README

# 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](https://www.npmjs.com/):

    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](https://github.com/azu/find-node-modules-import/releases).

## 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](https://github.com/azu/find-node-modules-import/issues).

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Author

- azu: [GitHub](https://github.com/azu), [Twitter](https://twitter.com/azu_re)

## License

MIT © azu

---
_Source: https://npm.io/package/find-node-modules-import · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
