find-imports-ts
v0.4.0
Published
Collect all import statements
Downloads
6,581
Readme
find-imports-ts
A tool to get all imports in your code. Inspired by find-imports, powered by TypeScript.
Usage
CLI
$ npx find-imports-ts src/*.ts
./collectImports
typescript
fs
sinon
chai
sinon-chai
API
const { findImports, findImportsSync } = require('find-imports-ts');
findImports('index.ts'); // Promise<Set<string>>
findImportsSync('index.ts'); // Set<string>, uses fs.*Sync API