</>PackageGraphPackageGraph

glob-parent

npmv6.0.2

Extract 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.

1
Direct dependencies

Runtime packages this one declares itself.

2
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

21 KB
Install size

Unpacked size of this package plus its entire runtime tree.

2
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

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'
Example truncated — see the full README.

glob-parent vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
glob-parentthis page02ISC5 years ago
find-up-simple02MIT1 day ago
find-up04MIT1 day ago
make-dir02MIT1 day ago
pkg-dirdeprecated01MIT1 day ago
escalade136.6M3MIT1 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)

eslint ^7.0.0eslint-config-gulp ^5.0.0expect ^26.0.1mocha ^7.1.2nyc ^15.0.1

Used by

Popular packages that depend on glob-parent.

Relationship graph

Dependencies (left) and dependents (right) of glob-parent.

is-globeslintfast-globglob-parent
glob-parent dependencies dependents

Frequently installed together

jitinpm

Runtime typescript and ESM support for Node.js

0/wk15 dependentsMITTS
eslintnpm

An AST-based pattern checker for JavaScript.

138.4M/wk279 dependentsMITTS
@types/nodenpm

TypeScript definitions for node

0/wk327 dependentsMITTS
globnpm

the most correct and second fastest glob implementation in JavaScript

0/wk35 dependentsBlueOak-1.0.0TS
eslint-visitor-keysnpm

Constants and utilities about visitor keys to traverse AST.

340.8M/wk4 dependentsApache-2.0TS
escape-string-regexpnpm

Escape RegExp special characters

316.5M/wk8 dependentsMIT
@types/estreenpm

TypeScript definitions for estree

152.1M/wk12 dependentsMITTS
is-globnpm

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

137.4M/wk3 dependentsMIT
file-entry-cachenpm

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

134.5M/wk1 dependentsMITTS
prettiernpm

Prettier is an opinionated code formatter

114.2M/wk159 dependentsMITTS
@eslint/config-helpersnpm

Helper utilities for creating ESLint configuration

96M/wk1 dependentsApache-2.0TS
esprimanpm

ECMAScript parsing infrastructure for multipurpose analysis

77.6M/wk5 dependentsBSD-2-Clause

Release history

No releases in the last two years, typically about 72 days apart.

Recent versions of glob-parent
VersionPublishedSizeLicense
6.0.2latest5 years ago7.5 KBISC
6.0.15 years ago13 KBISC
6.0.05 years ago12 KBISC
5.1.25 years ago12 KBISC
5.1.16 years ago7.4 KBISC
5.1.07 years ago7.5 KBISC
5.0.07 years ago7.1 KBISC
4.0.07 years ago7.2 KBISC
3.1.09 years agoISC
3.0.110 years agoISC
3.0.010 years agoISC
2.0.011 years agoISC
1.3.011 years agoISC
1.2.011 years agoISC
1.1.011 years agoISC

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

Keywords

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.