glob-concat

1.0.3 • Public • Published

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.*');

/glob-concat/

    Package Sidebar

    Install

    npm i glob-concat

    Weekly Downloads

    136

    Version

    1.0.3

    License

    GPLv3

    Unpacked Size

    40.3 kB

    Total Files

    10

    Last publish

    Collaborators

    • fitnr