Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gkovacs/list_requires
List the libraries required by some Javascript code by parsing it
https://github.com/gkovacs/list_requires
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
- Owner: gkovacs
- Created: 2016-07-28T18:33:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-16T23:05:25.000Z (almost 8 years ago)
- Last Synced: 2024-04-15T02:58:03.913Z (9 months ago)
- Topics: commonjs, javascript, parsing
- Language: LiveScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# list_requires
List the libraries required by some Javascript code by parsing it
## Install
```
npm install list_requires
```## Usage
```javascript
var list_requires = require('list_requires');var code = "a=require('foo'); b=require('bar')";
console.log(list_requires(code));
// will output ['foo', 'bar']
```If you want to list calls to some function other than `require`, please use [list_requires_multi](https://github.com/gkovacs/list_requires_multi) instead.
## License
MIT
## Credits
By [Geza Kovacs](https://github.com/gkovacs)