0.0.2 • Published 5 years ago

normalize-glob v0.0.2

Weekly downloads
1,030
License
MIT
Repository
github
Last release
5 years ago

normalize-glob

Normalize a glob pattern by expanding braces, making it absolute and resolving parent directories '..'.

Usage

import {normalizeGlob} from 'normalize-glob';

// using iteration protocol
for (const pattern of normalizeGlob('../foo/*', process.cwd())) {
    // use 'pattern'
}

// converting the result to an array
Array.from(normalizeGlob('../foo/*', process.cwd()));

Note that glob patterns are supposed to use forward slashes as directory separator. The cwd parameter may use backslashes as directory separator on windows.