🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

detective-typescript-70

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detective-typescript-70

Get the dependencies of a TypeScript module

latest
Source
npmnpm
Version
7.0.0
Version published
Maintainers
1
Created
Source

detective-typescript Build Status npm npm

Get the dependencies of TypeScript module

npm install detective-typescript

Usage

var detective = require('detective-typescript');
var mySourceCode = fs.readFileSync('myfile.ts', 'utf8');

// Pass in a file's content or an AST
var dependencies = detective(mySourceCode);

Options

  • skipTypeImports (default: false) Skips imports that only imports types
  • mixedImports: (default: false) Include CJS imports in dependency list
  • skipAsyncImports: (default: false) Whether or not to omit async imports (import('foo'))
  • jsx: (default: false) Enable parsing of JSX

License

MIT

Keywords

detective

FAQs

Package last updated on 05 Mar 2021

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