0.4.0 • Published 3 years ago

find-imports-ts v0.4.0

Weekly downloads
2
License
ISC
Repository
github
Last release
3 years ago

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