1. fs-readdir-recursive
Recursively read a directory
fs-readdir-recursive
Package: fs-readdir-recursive
Created by: fs-utils
Last modified: Wed, 12 Jul 2023 19:12:58 GMT
Version: 1.1.0
License: MIT
Downloads: 13,123,951
Repository: https://github.com/fs-utils/fs-readdir-recursive

Install

npm install fs-readdir-recursive
yarn add fs-readdir-recursive

fs.readdirSyncRecursive

NPM version
Build status
Test coverage
Dependency Status
License
Downloads
Gittip

Read a directory recursively.

Install

 npm install fs-readdir-recursive

Example

 var read = require('fs-readdir-recursive')
read(__dirname) === [
  'test/test.js',
  'index.js',
  'LICENSE',
  'package.json',
  'README.md'
]

API

read(root [, filter])

root is the directory you wish to scan. filter is an optional filter for the files with three params(name, index, dir). By default, filter is:

 function (name) {
  return name[0] !== '.'
}

Which basically just ignores . files.

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin