Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 15, 2024 via pnpm

glob-parent 5.1.2

Extract the non-magic parent path from a glob string.
Package summary
Share
0
issues
2
licenses
2
MIT
1
ISC
Package created
12 Jan 2015
Version published
6 Mar 2021
Maintainers
4
Total deps
3
Direct deps
1
License
ISC

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
is-extglob@2.1.1
is-glob@4.0.3

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
glob-parent@5.1.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of glob-parent 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
is-glob4.0.34.16 kBMIT
prod

Visualizations

Frequently Asked Questions

What does glob-parent do?

Glob-parent is a popular npm package used to extract the non-magic parent path from a glob pattern. Its main function lies in taking a string and returning the part of the path before any glob configuration starts. This can be beneficial for developers who need to handle file paths in their JavaScript applications.

How do you use glob-parent?

To use glob-parent in your JavaScript project, you first need to install it via npm, using the command npm install glob-parent. After it's installed, you can require it in your JavaScript file and use the provided functions. For instance:

var globParent = require('glob-parent');

// Typical usage
globParent('path/to/*.js'); // Returns 'path/to'

// When provided a non-glob path, it returns the nearest dir
globParent('path/foo/bar.js'); // Returns 'path/foo'

Keep in mind that glob-parent also supports options, such as disabling the automatic conversion of slashes for Windows:

{
  flipBackslashes: true;
}

Additionally, it also has rules for escaping special characters in glob patterns, for example:

// The [bar] needs to be escaped to be treated as a regular path character
globParent('foo/\\[bar]/'); // Returns 'foo/[bar]'

Where are the glob-parent docs?

The documentation for glob-parent is located directly in the README.md file on the repository's main page located at https://github.com/gulpjs/glob-parent. In there, you can find information on how to use the package, its API, the rules for escaping special characters in glob patterns, and its limitations. The repository on GitHub also contains information on the package's license, its version history, and a link to the npm page where it is hosted.