Skip to content

Scan a string of JavaScript for its imported modules

License

Notifications You must be signed in to change notification settings

aleclarson/import-scan

Repository files navigation

import-scan

npm Build status codecov Bundle size Install size Code style: Prettier Donate

Tiny import scanner

Features

  • string literals only
  • supports import statements, require() calls, and import() calls
  • avoids several edge cases (see the tests)

Usage

import {importScan} from 'import-scan'

let imported = importScan(code)

About

Scan a string of JavaScript for its imported modules

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published