Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gkovacs/list_requires_multi
List the libraries required by some Javascript code by parsing it
https://github.com/gkovacs/list_requires_multi
commonjs javascript parsing
Last synced: 7 days ago
JSON representation
List the libraries required by some Javascript code by parsing it
- Host: GitHub
- URL: https://github.com/gkovacs/list_requires_multi
- Owner: gkovacs
- Created: 2017-01-24T18:01:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-25T19:14:48.000Z (over 7 years ago)
- Last Synced: 2024-04-25T20:20:36.999Z (9 months ago)
- Topics: commonjs, javascript, parsing
- Language: LiveScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# list_requires_multi
List the libraries required by some Javascript code by parsing it
## Install
```
npm install list_requires_multi
```## Usage
```javascript
var list_requires_multi = require('list_requires_multi');var code = "a=require('foo'); b=require('bar')";
console.log(list_requires_multi(code), ['require']);
// will output {'require': ['foo', 'bar']}
```## License
MIT
## Credits
By [Geza Kovacs](https://github.com/gkovacs)