umd-deps
Get cmd or amd dependences
Installation
npm install umd-deps
Api
- parseDependencies(code:String, replace:Function = null, flag:Boolean = false):String
- parseDependencies(code:String, flag:Boolean = false):Array
- flag means if use "require.async" like, the result should have a property "flag" of "async"
Example
js:
;//require('b');/require/;'require("d")';iftrue//;do //; whilefalse;require;require;
parser output:
"flag": null "path": "a" "flag": 'async' "path": "g" "flag": 'async' "path": "h"
License
Notice
umd-deps
has renamed to cmd-deps