{"id":31786787,"url":"https://github.com/micromatch/glob-base","last_synced_at":"2025-10-10T13:25:56.601Z","repository":{"id":28176640,"uuid":"31678068","full_name":"micromatch/glob-base","owner":"micromatch","description":"Returns an object with the base path and the actual pattern from a glob.","archived":false,"fork":false,"pushed_at":"2017-04-12T09:01:00.000Z","size":153,"stargazers_count":17,"open_issues_count":4,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-04T15:29:17.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micromatch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-04T20:22:56.000Z","updated_at":"2023-11-07T04:10:00.000Z","dependencies_parsed_at":"2022-09-04T11:42:26.771Z","dependency_job_id":null,"html_url":"https://github.com/micromatch/glob-base","commit_stats":null,"previous_names":["jonschlinkert/glob-base"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/micromatch/glob-base","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micromatch%2Fglob-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micromatch%2Fglob-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micromatch%2Fglob-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micromatch%2Fglob-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micromatch","download_url":"https://codeload.github.com/micromatch/glob-base/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micromatch%2Fglob-base/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001979,"owners_count":26083243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T13:25:55.355Z","updated_at":"2025-10-10T13:25:56.595Z","avatar_url":"https://github.com/micromatch.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glob-base [![NPM version](https://badge.fury.io/js/glob-base.svg)](http://badge.fury.io/js/glob-base)  [![Build Status](https://travis-ci.org/jonschlinkert/glob-base.svg)](https://travis-ci.org/jonschlinkert/glob-base) \n\n\u003e Returns an object with the (non-glob) base path and the actual pattern.\n\nUse [glob-parent](https://github.com/es128/glob-parent) if you just want the base path.\n\n## Install with [npm](npmjs.org)\n\n```bash\nnpm i glob-base --save\n```\n\n## Related projects\n* [glob-parent](https://github.com/es128/glob-parent): Strips glob magic from a string to provide the parent path\n* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks.\n* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens.\n* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern.\n* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.\n* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.\n* [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.\n\n## Usage\n\n```js\nvar globBase = require('glob-base');\n\nglobBase('a/b/.git/');\n//=\u003e { base: 'a/b/.git/', isGlob: false, glob: '' })\n\nglobBase('a/b/**/e');\n//=\u003e { base: 'a/b', isGlob: true, glob: '**/e' }\n\nglobBase('a/b/*.{foo,bar}');\n//=\u003e { base: 'a/b', isGlob: true, glob: '*.{foo,bar}' }\n\nglobBase('a/b/.git/**');\n//=\u003e { base: 'a/b/.git', isGlob: true, glob: '**' }\n\nglobBase('a/b/c/*.md');\n//=\u003e { base: 'a/b/c', isGlob: true, glob: '*.md' }\n\nglobBase('a/b/c/.*.md');\n//=\u003e { base: 'a/b/c', isGlob: true, glob: '.*.md' }\n\nglobBase('a/b/{c,d}');\n//=\u003e { base: 'a/b', isGlob: true, glob: '{c,d}' }\n\nglobBase('!*.min.js');\n//=\u003e { base: '.', isGlob: true, glob: '!*.min.js' }\n\nglobBase('!foo');\n//=\u003e { base: '.', isGlob: true, glob: '!foo' }\n\nglobBase('!foo/(a|b).min.js');\n//=\u003e { base: '.', isGlob: true, glob: '!foo/(a|b).min.js' }\n\nglobBase('');\n//=\u003e { base: '.', isGlob: false, glob: '' }\n\nglobBase('**/*.md');\n//=\u003e { base: '.', isGlob: true, glob: '**/*.md' }\n\nglobBase('**/*.min.js');\n//=\u003e { base: '.', isGlob: true, glob: '**/*.min.js' }\n\nglobBase('**/.*');\n//=\u003e { base: '.', isGlob: true, glob: '**/.*' }\n\nglobBase('**/d');\n//=\u003e { base: '.', isGlob: true, glob: '**/d' }\n\nglobBase('*.*');\n//=\u003e { base: '.', isGlob: true, glob: '*.*' }\n\nglobBase('*.min.js');\n//=\u003e { base: '.', isGlob: true, glob: '*.min.js' }\n\nglobBase('*/*');\n//=\u003e { base: '.', isGlob: true, glob: '*/*' }\n\nglobBase('*b');\n//=\u003e { base: '.', isGlob: true, glob: '*b' }\n\nglobBase('.');\n//=\u003e { base: '.', isGlob: false, glob: '.' }\n\nglobBase('.*');\n//=\u003e { base: '.', isGlob: true, glob: '.*' }\n\nglobBase('./*');\n//=\u003e { base: '.', isGlob: true, glob: '*' }\n\nglobBase('/a');\n//=\u003e { base: '/', isGlob: false, glob: 'a' }\n\nglobBase('@(a|b)/e.f.g/');\n//=\u003e { base: '.', isGlob: true, glob: '@(a|b)/e.f.g/' }\n\nglobBase('[a-c]b*');\n//=\u003e { base: '.', isGlob: true, glob: '[a-c]b*' }\n\nglobBase('a');\n//=\u003e { base: '.', isGlob: false, glob: 'a' }\n\nglobBase('a.min.js');\n//=\u003e { base: '.', isGlob: false, glob: 'a.min.js' }\n\nglobBase('a/');\n//=\u003e { base: 'a/', isGlob: false, glob: '' }\n\nglobBase('a/**/j/**/z/*.md');\n//=\u003e { base: 'a', isGlob: true, glob: '**/j/**/z/*.md' }\n\nglobBase('a/*/c/*.md');\n//=\u003e { base: 'a', isGlob: true, glob: '*/c/*.md' }\n\nglobBase('a/?/c.md');\n//=\u003e { base: 'a', isGlob: true, glob: '?/c.md' }\n\nglobBase('a/??/c.js');\n//=\u003e { base: 'a', isGlob: true, glob: '??/c.js' }\n\nglobBase('a?b');\n//=\u003e { base: '.', isGlob: true, glob: 'a?b' }\n\nglobBase('bb');\n//=\u003e { base: '.', isGlob: false, glob: 'bb' }\n\nglobBase('c.md');\n//=\u003e { base: '.', isGlob: false, glob: 'c.md' }\n```\n\n## Running tests\nInstall dev dependencies.\n\n```bash\nnpm i -d \u0026\u0026 npm test\n```\n\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/glob-base/issues)\n\n\n## Author\n\n**Jon Schlinkert**\n \n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) \n\n## License\nCopyright (c) 2015 Jon Schlinkert  \nReleased under the MIT license\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 08, 2015._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicromatch%2Fglob-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicromatch%2Fglob-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicromatch%2Fglob-base/lists"}