🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

glob-extra

Package Overview
Dependencies
Maintainers
8
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob-extra

Utility which provides expanding of masks, dirs and files to absolute file paths.

latest
Source
npmnpm
Version
5.0.2
Version published
Weekly downloads
3.4K
1.79%
Maintainers
8
Weekly downloads
 
Created
Source

glob-extra

Wrapper for utility fast-glob with promises support which provides expanding of masks, dirs and files to absolute file paths.

NPM version Build Status Coverage Status Dependency Status

Installation

$ npm install glob-extra

Usage

const globExtra = require('glob-extra');
const paths = ['some/path', 'other/path/*.js', 'other/deep/path/**/*.js']

// options are optional
globExtra.expandPaths(paths, options)
    .then((files) => {
        // ['/absolute/some/path/file1.js',
        // '/absolute/other/path/file2.js',
        // '/absolute/other/deep/path/dir/file3.js']
    })
    .done();

Options

  • formats {String[]} – files formats to expand; it will expand all files by default. For example:
globExtra.expandPaths(paths, {formats: ['.txt', '.js']})
    .then((files) => {
        // will expand only js and txt files
    })
    .done();

Keywords

expand

FAQs

Package last updated on 07 Sep 2022

Did you know?

Socket

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