Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

list-directory-contents

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

list-directory-contents - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

14

package.json
{
"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
.editorconfig

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc