Socket
Socket
Sign inDemoInstall

dependencies-trace

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dependencies-trace

[![Greenkeeper badge](https://badges.greenkeeper.io/hisco/dependencies-trace.svg)](https://greenkeeper.io/) [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Test Coverage][coveralls-image]][coveralls-url]


Version published
Weekly downloads
2
decreased by-50%
Maintainers
1
Install size
29.4 kB
Created
Weekly downloads
 

Readme

Source

Parse dependencies

Greenkeeper badge NPM Version Build Status Test Coverage

Find your code dependencies, supports typescript, javascript and coffe script

Dependencies trace

A simple and naive approach to trace your code dependecies. It's very fast and uses only a single regex execution per file.

Motivation

While the correct way to trace dependecies is by using some sort of AST analyzer this will require more computions then using a single regex execution per file.

dependencies-trace was built for performance over accuracy and it's doing best effort to find all dependencies of your file. If you find scenarios that dependencies-trace couldn't find your dependencies - open an issue in the github repo and I will do my best effort to fix it.

Simple to use

  const {tsImports,coffeImports} = require('dependencies-trace');
  
  const tsExample = `
  import { ZipCodeValidator as ZCV } from "./ZipCodeValidator";
  `
  const coffeExample = `
    const {a} = require "jquery";
  `

  console.log(tsImports(tsExample));
  //-> ./ZipCodeValidator
   console.log(coffeImports(coffeExample));
  //-> jquery

License

MIT

Keywords

FAQs

Last updated on 12 Jul 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc