{"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"keywords":["glob","parent","strip","path","dirname","directory","base","wildcard"],"dist-tags":{"latest":"3.1.0"},"author":{"name":"Elan Shanker","url":"https://github.com/es128"},"description":"Strips glob magic from a string to provide the parent directory path","readme":"glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master)\n======\nJavascript module to extract the non-magic parent path from a glob string.\n\n[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/)\n[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/)\n\nUsage\n-----\n```sh\nnpm install glob-parent --save\n```\n\n**Examples**\n\n```js\nvar globParent = require('glob-parent');\n\nglobParent('path/to/*.js'); // 'path/to'\nglobParent('/root/path/to/*.js'); // '/root/path/to'\nglobParent('/*.js'); // '/'\nglobParent('*.js'); // '.'\nglobParent('**/*.js'); // '.'\nglobParent('path/{to,from}'); // 'path'\nglobParent('path/!(to|from)'); // 'path'\nglobParent('path/?(to|from)'); // 'path'\nglobParent('path/+(to|from)'); // 'path'\nglobParent('path/*(to|from)'); // 'path'\nglobParent('path/@(to|from)'); // 'path'\nglobParent('path/**/*'); // 'path'\n\n// if provided a non-glob path, returns the nearest dir\nglobParent('path/foo/bar.js'); // 'path/foo'\nglobParent('path/foo/'); // 'path/foo'\nglobParent('path/foo'); // 'path' (see issue #3 for details)\n```\n\n## Escaping\n\nThe following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters:\n\n- `?` (question mark)\n- `*` (star)\n- `|` (pipe)\n- `(` (opening parenthesis)\n- `)` (closing parenthesis)\n- `{` (opening curly brace)\n- `}` (closing curly brace)\n- `[` (opening bracket)\n- `]` (closing bracket)\n\n**Example**\n\n```js\nglobParent('foo/[bar]/') // 'foo'\nglobParent('foo/\\\\[bar]/') // 'foo/[bar]'\n```\n\n## Limitations\n\n#### Braces & Brackets\nThis library attempts a quick and imperfect method of determining which path\nparts have glob magic without fully parsing/lexing the pattern. There are some\nadvanced use cases that can trip it up, such as nested braces where the outer\npair is escaped and the inner one contains a path separator. If you find\nyourself in the unlikely circumstance of being affected by this or need to\nensure higher-fidelity glob handling in your library, it is recommended that you\npre-process your input with [expand-braces] and/or [expand-brackets].\n\n#### Windows\nBackslashes are not valid path separators for globs. If a path with backslashes\nis provided anyway, for simple cases, glob-parent will replace the path\nseparator for you and return the non-glob parent path (now with\nforward-slashes, which are still valid as Windows path separators).\n\nThis cannot be used in conjunction with escape characters.\n\n```js\n// BAD\nglobParent('C:\\\\Program Files \\\\(x86\\\\)\\\\*.ext') // 'C:/Program Files /(x86/)'\n\n// GOOD\nglobParent('C:/Program Files\\\\(x86\\\\)/*.ext') // 'C:/Program Files (x86)'\n```\n\nIf you are using escape characters for a pattern without path parts (i.e.\nrelative to `cwd`), prefix with `./` to avoid confusing glob-parent.\n\n```js\n// BAD\nglobParent('foo \\\\[bar]') // 'foo '\nglobParent('foo \\\\[bar]*') // 'foo '\n\n// GOOD\nglobParent('./foo \\\\[bar]') // 'foo [bar]'\nglobParent('./foo \\\\[bar]*') // '.'\n```\n\n\nChange Log\n----------\n[See release notes page on GitHub](https://github.com/es128/glob-parent/releases)\n\nLicense\n-------\n[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE)\n\n[expand-braces]: https://github.com/jonschlinkert/expand-braces\n[expand-brackets]: https://github.com/jonschlinkert/expand-brackets\n","repository":{"type":"git","url":"git+https://github.com/es128/glob-parent.git"},"users":{"youstrive":true},"bugs":{"url":"https://github.com/es128/glob-parent/issues"},"license":"ISC","versions":{"1.0.0":{"name":"glob-parent","version":"1.0.0","description":"Strips glob magic from a string to provide the parent path","main":"index.js","scripts":{"test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"https://github.com/es128/glob-parent"},"keywords":["glob","parent","strip","path","directory"],"author":{"name":"Elan Shanker"},"license":"ISC","bugs":{"url":"https://github.com/es128/glob-parent/issues"},"homepage":"https://github.com/es128/glob-parent","dependencies":{"is-glob":"^0.3.0"},"devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.5","mocha":"^2.1.0"},"gitHead":"b08cbec38731960b35446da9d819824ba35e0c49","_id":"glob-parent@1.0.0","_shasum":"3344e0e0534fbdd478a7c1f1480f2d8851650a21","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"dist":{"shasum":"3344e0e0534fbdd478a7c1f1480f2d8851650a21","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/glob-parent/-/glob-parent-1.0.0.tgz"},"directories":{}},"1.1.0":{"name":"glob-parent","version":"1.1.0","description":"Strips glob magic from a string to provide the parent path","main":"index.js","scripts":{"test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"https://github.com/es128/glob-parent"},"keywords":["glob","parent","strip","path","directory","base"],"author":{"name":"Elan Shanker"},"license":"ISC","bugs":{"url":"https://github.com/es128/glob-parent/issues"},"homepage":"https://github.com/es128/glob-parent","dependencies":{"is-glob":"^1.1.1"},"devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.5","mocha":"^2.1.0"},"gitHead":"5e33355528b4a2855861e8269b8071f897baea82","_id":"glob-parent@1.1.0","_shasum":"63e5780b13f84c7e7e1e8f4d5a3d96c7cce1f9fc","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"dist":{"shasum":"63e5780b13f84c7e7e1e8f4d5a3d96c7cce1f9fc","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/glob-parent/-/glob-parent-1.1.0.tgz"},"directories":{}},"1.2.0":{"name":"glob-parent","version":"1.2.0","description":"Strips glob magic from a string to provide the parent path","main":"index.js","scripts":{"test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"https://github.com/es128/glob-parent"},"keywords":["glob","parent","strip","path","directory","base"],"author":{"name":"Elan Shanker"},"license":"ISC","bugs":{"url":"https://github.com/es128/glob-parent/issues"},"homepage":"https://github.com/es128/glob-parent","dependencies":{"is-glob":"^1.1.1"},"devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.5","mocha":"^2.1.0"},"gitHead":"9c31e43731d67f16ec0d858cb266319a843c546e","_id":"glob-parent@1.2.0","_shasum":"8deffabf6317db5b0f775f553fac731ecf41ded5","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"dist":{"shasum":"8deffabf6317db5b0f775f553fac731ecf41ded5","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/glob-parent/-/glob-parent-1.2.0.tgz"},"directories":{}},"1.3.0":{"name":"glob-parent","version":"1.3.0","description":"Strips glob magic from a string to provide the parent path","main":"index.js","scripts":{"test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/es128/glob-parent.git"},"keywords":["glob","parent","strip","path","directory","base"],"author":{"name":"Elan Shanker"},"license":"ISC","bugs":{"url":"https://github.com/es128/glob-parent/issues"},"homepage":"https://github.com/es128/glob-parent","dependencies":{"is-glob":"^2.0.0"},"devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.5","mocha":"^2.1.0"},"gitHead":"4fc6444ff8f64c18d19467fc89c0fa342bc01c42","_id":"glob-parent@1.3.0","_shasum":"971edd816ed5db58705b58079647a64d0aef7968","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.0.0","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"dist":{"shasum":"971edd816ed5db58705b58079647a64d0aef7968","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/glob-parent/-/glob-parent-1.3.0.tgz"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"directories":{}},"2.0.0":{"name":"glob-parent","version":"2.0.0","description":"Strips glob magic from a string to provide the parent path","main":"index.js","scripts":{"test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/es128/glob-parent.git"},"keywords":["glob","parent","strip","path","directory","base"],"author":{"name":"Elan Shanker"},"license":"ISC","bugs":{"url":"https://github.com/es128/glob-parent/issues"},"homepage":"https://github.com/es128/glob-parent","dependencies":{"is-glob":"^2.0.0"},"devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.5","mocha":"^2.1.0"},"gitHead":"a956910c7ccb5eafd1b3fe900ceb6335cc5b6d3d","_id":"glob-parent@2.0.0","_shasum":"81383d72db054fcccf5336daa902f182f6edbb28","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.0.0","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"dist":{"shasum":"81383d72db054fcccf5336daa902f182f6edbb28","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/glob-parent/-/glob-parent-2.0.0.tgz"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"directories":{}},"3.0.0":{"name":"glob-parent","version":"3.0.0","description":"Strips glob magic from a string to provide the parent path","main":"index.js","scripts":{"test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/es128/glob-parent.git"},"keywords":["glob","parent","strip","path","directory","base"],"author":{"name":"Elan Shanker"},"license":"ISC","bugs":{"url":"https://github.com/es128/glob-parent/issues"},"homepage":"https://github.com/es128/glob-parent","dependencies":{"is-glob":"^3.0.0"},"devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.5","mocha":"^2.1.0"},"gitHead":"fd9c64f7696717cb3d440ca9eef5060f64d61c57","_id":"glob-parent@3.0.0","_shasum":"c7bdeb5260732196c740de9274c08814056014bb","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"dist":{"shasum":"c7bdeb5260732196c740de9274c08814056014bb","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/glob-parent/-/glob-parent-3.0.0.tgz"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/glob-parent-3.0.0.tgz_1473189232576_0.26026900205761194"},"directories":{}},"3.0.1":{"name":"glob-parent","version":"3.0.1","description":"Strips glob magic from a string to provide the parent directory path","main":"index.js","scripts":{"test":"istanbul test node_modules/mocha/bin/_mocha","ci-test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/es128/glob-parent.git"},"keywords":["glob","parent","strip","path","dirname","directory","base","wildcard"],"author":{"name":"Elan Shanker","url":"https://github.com/es128"},"license":"ISC","bugs":{"url":"https://github.com/es128/glob-parent/issues"},"homepage":"https://github.com/es128/glob-parent","dependencies":{"is-glob":"^3.1.0","path-dirname":"^1.0.0"},"devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.5","mocha":"^2.1.0"},"gitHead":"a0eeab41a4e5f56d1bff7f2966260eb541816187","_id":"glob-parent@3.0.1","_shasum":"60021327cc963ddc3b5f085764f500479ecd82ff","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.12.0","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"dist":{"shasum":"60021327cc963ddc3b5f085764f500479ecd82ff","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/glob-parent/-/glob-parent-3.0.1.tgz"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/glob-parent-3.0.1.tgz_1476818425901_0.16260230354964733"},"directories":{}},"3.1.0":{"name":"glob-parent","version":"3.1.0","description":"Strips glob magic from a string to provide the parent directory path","main":"index.js","scripts":{"test":"istanbul test node_modules/mocha/bin/_mocha","ci-test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/es128/glob-parent.git"},"keywords":["glob","parent","strip","path","dirname","directory","base","wildcard"],"files":["index.js"],"author":{"name":"Elan Shanker","url":"https://github.com/es128"},"license":"ISC","bugs":{"url":"https://github.com/es128/glob-parent/issues"},"homepage":"https://github.com/es128/glob-parent","dependencies":{"is-glob":"^3.1.0","path-dirname":"^1.0.0"},"devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.5","mocha":"^2.1.0"},"gitHead":"880243f7758be2967318280ad3e599c95e832a76","_id":"glob-parent@3.1.0","_shasum":"9e6af6299d8d3bd2bd40430832bd113df906c5ae","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.7.0","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"dist":{"shasum":"9e6af6299d8d3bd2bd40430832bd113df906c5ae","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/glob-parent/-/glob-parent-3.1.0.tgz"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/glob-parent-3.1.0.tgz_1481730526821_0.4327609031461179"},"directories":{}}},"name":"glob-parent","time":{"modified":"2016-12-14T15:48:47.422Z","created":"2015-01-12T20:32:54.422Z","1.0.0":"2015-01-12T20:32:54.422Z","1.1.0":"2015-03-04T15:11:54.539Z","1.2.0":"2015-03-04T16:13:57.996Z","1.3.0":"2015-09-18T14:49:40.290Z","2.0.0":"2015-09-18T14:59:10.292Z","3.0.0":"2016-09-06T19:13:54.031Z","3.0.1":"2016-10-18T19:20:27.458Z","3.1.0":"2016-12-14T15:48:47.422Z"},"readmeFilename":"README.md","homepage":"https://github.com/es128/glob-parent"}