Skip to content

find es module dependencies [experimental]

License

Notifications You must be signed in to change notification settings

browserify/detective-esm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

detective-esm

find ES module dependencies

npm travis standard

Example

input.js:

import xyz from 'xyz'
import 'a'

require('b')

export default function d () {}
export { d as c }

log.js:

var detective = require('detective-esm')
var fs = require('fs')

console.log(detective(
  fs.readFileSync('./input.js')
))
$ node log.js
{ strings: [ 'xyz', 'a' ],
  expressions: [],
  imports: [ { from: 'xyz', import: 'default', as: 'xyz' } ],
  exports: [ { export: 'd', as: 'default' }, { export: 'd', as: 'c' } ] }

Install

npm install detective-esm

Usage

var detectiveEsm = require('detective-esm')

License

MIT

About

find es module dependencies [experimental]

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published