glob-parent
npmv6.0.2Extract the non-magic parent path from a glob string.
Not recommended for new projects
No — glob-parent should not be adopted for new projects. Last published 1806 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- FMaintenance: grade F, Failing.
Last published 1806 days ago.
- AWeight: grade A, Excellent.
Pulls in 2 transitive packages, about 21 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 5 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
ISC — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding glob-parent to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing glob-parent, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=10.13.0
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the glob-parent README.
var globParent = require('glob-parent');
globParent('path/to/*.js'); // 'path/to'
globParent('/root/path/to/*.js'); // '/root/path/to'
globParent('/*.js'); // '/'
globParent('*.js'); // '.'
globParent('**/*.js'); // '.'
globParent('path/{to,from}'); // 'path'
globParent('path/!(to|from)'); // 'path'
globParent('path/?(to|from)'); // 'path'
globParent('path/+(to|from)'); // 'path'
globParent('path/*(to|from)'); // 'path'
globParent('path/@(to|from)'); // 'path'
globParent('path/**/*'); // 'path'glob-parent vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| glob-parentthis page | 0 | 2 | ISC | 5 years ago |
| find-up-simple | 0 | 2 | MIT | 1 day ago |
| find-up | 0 | 4 | MIT | 1 day ago |
| make-dir | 0 | 2 | MIT | 1 day ago |
| pkg-dirdeprecated | 0 | 1 | MIT | 1 day ago |
| escalade | 136.6M | 3 | MIT | 1 day ago |
Dependencies
Declared by glob-parent v6.0.2. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (1)
Dev (5)
Used by
Popular packages that depend on glob-parent.
Relationship graph
Dependencies (left) and dependents (right) of glob-parent.
Frequently installed together
Runtime typescript and ESM support for Node.js
An AST-based pattern checker for JavaScript.
TypeScript definitions for node
the most correct and second fastest glob implementation in JavaScript
Constants and utilities about visitor keys to traverse AST.
Escape RegExp special characters
TypeScript definitions for estree
Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet
A lightweight cache for file metadata, ideal for processes that work on a specific set of files and only need to reprocess files that have changed since the last run
Prettier is an opinionated code formatter
Helper utilities for creating ESLint configuration
ECMAScript parsing infrastructure for multipurpose analysis
Release history
No releases in the last two years, typically about 72 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 6.0.2latest | 5 years ago | 7.5 KB | ISC |
| 6.0.1 | 5 years ago | 13 KB | ISC |
| 6.0.0 | 5 years ago | 12 KB | ISC |
| 5.1.2 | 5 years ago | 12 KB | ISC |
| 5.1.1 | 6 years ago | 7.4 KB | ISC |
| 5.1.0 | 7 years ago | 7.5 KB | ISC |
| 5.0.0 | 7 years ago | 7.1 KB | ISC |
| 4.0.0 | 7 years ago | 7.2 KB | ISC |
| 3.1.0 | 9 years ago | — | ISC |
| 3.0.1 | 10 years ago | — | ISC |
| 3.0.0 | 10 years ago | — | ISC |
| 2.0.0 | 11 years ago | — | ISC |
| 1.3.0 | 11 years ago | — | ISC |
| 1.2.0 | 11 years ago | — | ISC |
| 1.1.0 | 11 years ago | — | ISC |
Overview
glob-parent is an npm package that extract the non-magic parent path from a glob string. It has 2 known dependents in the graph. The latest version is 6.0.2, released under the ISC license.
Who should use it
Teams working in the npm ecosystem who need extract the non-magic parent path from a glob string and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (ISC).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use glob-parent?
No — glob-parent should not be adopted for new projects. Last published 1806 days ago.
How do I install glob-parent?
Run `npm install glob-parent` to add glob-parent to your npm project.
How many dependencies does glob-parent have?
glob-parent declares 6 direct dependencies and pulls in 2 packages in total once its runtime tree is resolved totalling about 21 KB on disk.
What license is glob-parent released under?
glob-parent is distributed under the ISC license.
How popular is glob-parent?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on glob-parent.
Is glob-parent still maintained?
The most recent release of glob-parent (v6.0.2) was published 5 years ago.
Does glob-parent run install scripts?
No. glob-parent does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.