list-directory-contents
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "list-directory-contents", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Get the contents of a directory recursively (like ls -R)", | ||
"keywords": [], | ||
"keywords": [ | ||
"ls", | ||
"ls -r", | ||
"recursive ls", | ||
"fs", | ||
"dir", | ||
"lstat", | ||
"recursive stat", | ||
"lstat", | ||
"list files" | ||
], | ||
"dependencies": { | ||
@@ -7,0 +17,0 @@ "walker": "~1.0.6" |
# list-directory-contents | ||
Implements `ls -R` for Node.js. | ||
## Installation | ||
```sh | ||
$ npm install list-directory-contents | ||
``` | ||
## Usage | ||
```javascript | ||
var ls = require('list-directory-contents'); | ||
ls('./', function (err, tree) { | ||
// NOTE: | ||
// everything ending in `/` in the output below is a path to a directory | ||
// all other paths are to files | ||
// `tree` => | ||
[ | ||
'index.js', | ||
'README', | ||
'package.json', | ||
'CONTRIBUTING.md', | ||
'node_modules/', | ||
'node_modules/lodash/', | ||
'node_modules/async/', | ||
'node_modules/fs-extra/', | ||
'node_modules/fs-extra/index.js', | ||
'node_modules/fs-extra/lib/', | ||
'node_modules/fs-extra/node_modules/' | ||
]; | ||
}); | ||
``` | ||
## Why? | ||
This module is merely a convenience-- @daaku did the hard work :) | ||
It's just a thin wrapper for [walker](https://github.com/daaku/nodejs-walker) that presents a minimalist API. For EventEmitter usage (with built-in file vs. dir parsing), please use [walker](https://github.com/daaku/nodejs-walker) directly. See https://github.com/jprichardson/node-fs-extra/issues/63#issuecomment-49733873 for more info on motivations/goals. | ||
## License | ||
MIT © Mike McNeil 2014 |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
53
0
2717
4
30