5.0.1 • Published 5 months ago
detective-es6 v5.0.1
detective-es6
Get the dependencies of an ES6 module
npm install detective-es6
Usage
const fs = require('fs');
const detective = require('detective-es6');
const mySourceCode = fs.readFileSync('myfile.js', 'utf8');
// Pass in a file's content or an AST
const dependencies = detective(mySourceCode);
- Supports JSX, Flow, and any other features that node-source-walk supports.
You may also (optionally) configure the detective via a second object argument detective(src, options) that supports the following options:
skipTypeImports
: (Boolean) whether or not to omit type imports (import type {foo} from "mylib";
) in the list of extracted dependencies.skipAsyncImports
: (Boolean) whether or not to omit async imports (import('foo')
) in the list of extracted dependencies.
License
5.0.1
5 months ago
5.0.0
1 year ago
4.0.1
2 years ago
4.0.0
2 years ago
3.0.1
2 years ago
3.0.0
3 years ago
2.2.2
3 years ago
2.2.1
4 years ago
2.2.0
5 years ago
2.1.0
6 years ago
2.0.0
7 years ago
1.2.0
8 years ago
1.1.6
9 years ago
1.1.5
9 years ago
1.1.4
9 years ago
1.1.3
10 years ago
1.1.2
10 years ago
1.1.1
10 years ago
1.1.0
11 years ago
1.0.2
11 years ago
1.0.1
11 years ago
1.0.0
11 years ago
0.0.0
11 years ago