that-depends-js

1.0.1 • Public • Published

that-depends-js

Build Status

Reads in JS, returns the imported/required file paths.

Usage

// foo.js
import x from 'z'
import a from 'a'
import otherA from './a'
import thatDependsJS from 'that-depends-js'

const fooSource = fs.readFileSync('foo.js', 'utf8')
const dependenciesOfFoo = thatDependsJS(fooSource)

// returns ['./a', 'a', 'z']

Readme

Keywords

none

Package Sidebar

Install

npm i that-depends-js

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

2.85 kB

Total Files

10

Last publish

Collaborators

  • reergymerej