persona-community-5/.pnpm-store/v3/files/9a/808d9c3baca72f18c416e988c9e602c1782909d019ef73b4dac63a67a511b7528452027f2e8fc9059a5d9646d7c6a2511a566717e86b2a45801574348f3f5c
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

24 lines
510 B
Plaintext

import globParent from 'glob-parent'
// Based on `glob-base`
// https://github.com/micromatch/glob-base/blob/master/index.js
export function parseGlob(pattern) {
let glob = pattern
let base = globParent(pattern)
if (base !== '.') {
glob = pattern.substr(base.length)
if (glob.charAt(0) === '/') {
glob = glob.substr(1)
}
}
if (glob.substr(0, 2) === './') {
glob = glob.substr(2)
} else if (glob.charAt(0) === '/') {
glob = glob.substr(1)
}
return { base, glob }
}