find-by-ext
v1.0.4
Published
Find all files in folder's by extname.
Downloads
6
Maintainers
Readme
🐀 find-by-ext
Find files inside folders by extname.
🚀 Installation
npm install find-by-ext
🍋 Usage
import { findByExt, findByExtOne, findByExtLimit } from "../index";
const __dirname = path.resolve();
var scripts = findByExt(__dirname, [".cmd", ".sh", ".ps1", ".bat"]);
var image = findByExtOne(__dirname, [".png", ".jpg", ".gif", ".webp"]);
var _4doc = findByExtLimit(__dirname, [".txt", ".md", ".markdown"], 4);
🔖 Reference
- findByExt(dirname, whitelist)
- findByExtOne(dirname, whitelist)
- findByExtLimit(dirname, whitelist, limit)
📜 License
- find-by-ext - MIT