Socket
Socket
Sign inDemoInstall

glob-concat

Package Overview
Dependencies
12
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    glob-concat

Merge a mixed list of files and globs into a list of files.


Version published
Maintainers
1
Install size
2.02 MB
Created

Readme

Source

glob-concat

Node utility for merging a list of globs or files into a single unique list.

Rougly equivalent to the bash command: find . -name '<pattern>' -or -name '<pattern>' ....

Run synchronously or asynchronously.

globConcat.sync(['tests/item.*', 'tests/*.txt']);

// ['tests/item.txt', 'tests/item.bar', 'tests/foo.txt']

globConcat(['tests/item.*', 'tests/*.txt'], function(err, matches) {
    if (err) throw err;
    /* do stuff with matches */
});

Just a thin wrapper around glob, options are passed on.

var opts = {nonull: true};

globConcat(['tests/item.*', 'tests/*.txt'], opts, function(err, matches) {
    if (err) throw err;
    /* do stuff with matches */
});

Happily accepts a single string as input.

// this is the same as running glob.sync
globConcat.sync('tests/item.*');

Keywords

FAQs

Last updated on 19 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • 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