Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 529 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 529 Bytes

list-imports-exports

npm version

Just lists some simple stats about es6 module imports and exports. Powered by babylon and babel-traverse.

Also specifically lists "passthroughs", such as export a from './a'.

Usage example

> require('list-imports-exports').parse('export a, {b as c} from "./a";');
{
  imports: ['./a'],
  exports: ['a', 'c'],
  passthroughs: [['a', './a', 'default'], ['c', './b', 'b']]
}