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']

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i that-depends-js

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    2.85 kB

    Total Files

    10

    Last publish

    Collaborators

    • reergymerej