Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

directory-search

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Issues
File Explorer

Advanced tools

directory-search

Recursively search a directory and return a list of files with matching extension.

    0.0.32latest
    npm

Version published
Maintainers
1
Weekly downloads
628
decreased by-14.79%

Weekly downloads

Readme

Source

You probably want to use node-glob: https://github.com/isaacs/node-glob

If not, here's a smaller, more limited directory search plugin for you.

Recursively search a directory and return a list of matching files. Currently searches only by matching file extension.

Usage

var dirSearch = require('directory-search'); // Search 'public' directory for '.css' files. dirSearch('public', '.css', function(err, results) { if (err) throw err; console.log(results); });

Will result in an array that looks something like this:

[ 'public/styles/app.css', 'public/styles/tables.css', 'public/styles/home/login.css' ]

Keywords

FAQs

Last updated on 02 Feb 2014

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc