{"_id":"@snyk/glob-parent","_rev":"218467","name":"@snyk/glob-parent","description":"Extract the non-magic parent path from a glob string.","dist-tags":{"latest":"5.1.2-patch.1"},"maintainers":[{"name":"snyk-user","email":"admin+npm-snyk-user@snyk.io"}],"time":{"modified":"2021-06-03T15:38:16.000Z","created":"2021-02-25T13:13:45.223Z","5.1.2-patch.1":"2021-02-25T13:20:00.220Z","5.1.2-patch":"2021-02-25T13:13:45.223Z"},"users":{},"author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"repository":{"type":"git","url":"git+https://github.com/gulpjs/glob-parent.git"},"versions":{"5.1.2-patch.1":{"name":"@snyk/glob-parent","version":"5.1.2-patch.1","description":"Extract the non-magic parent path from a glob string.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"contributors":[{"name":"Elan Shanker","url":"https://github.com/es128"},{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/glob-parent.git"},"license":"ISC","engines":{"node":">= 6"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only","azure-pipelines":"nyc mocha --async-only --reporter xunit -O output=test.xunit","coveralls":"nyc report --reporter=text-lcov | coveralls"},"dependencies":{"is-glob":"^4.0.1"},"devDependencies":{"coveralls":"^3.0.11","eslint":"^2.13.1","eslint-config-gulp":"^3.0.1","expect":"^1.20.2","mocha":"^6.0.2","nyc":"^13.3.0"},"keywords":["glob","parent","strip","path","dirname","directory","base","wildcard"],"gitHead":"584a55e8e819ba2a7b6cde242f84c1a245544afa","bugs":{"url":"https://github.com/gulpjs/glob-parent/issues"},"homepage":"https://github.com/gulpjs/glob-parent#readme","_id":"@snyk/glob-parent@5.1.2-patch.1","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"shasum":"87733b4ab282043fa7915200bc94cb391df6d44f","size":4799,"noattachment":false,"key":"/@snyk/glob-parent/-/@snyk/glob-parent-5.1.2-patch.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@snyk/glob-parent/download/@snyk/glob-parent-5.1.2-patch.1.tgz"},"_npmUser":{"name":"snyk-user","email":"npmjs+snyk-user@snyk.io"},"directories":{},"maintainers":[{"name":"snyk-user","email":"admin+npm-snyk-user@snyk.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/glob-parent_5.1.2-patch.1_1614259200102_0.5031596631635669"},"_hasShrinkwrap":false,"publish_time":1614259200220,"_cnpm_publish_time":1614259200220},"5.1.2-patch":{"name":"@snyk/glob-parent","version":"5.1.2-patch","description":"Extract the non-magic parent path from a glob string.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"contributors":[{"name":"Elan Shanker","url":"https://github.com/es128"},{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/glob-parent.git"},"license":"ISC","engines":{"node":">= 6"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only","azure-pipelines":"nyc mocha --async-only --reporter xunit -O output=test.xunit","coveralls":"nyc report --reporter=text-lcov | coveralls"},"dependencies":{"is-glob":"^4.0.1"},"devDependencies":{"coveralls":"^3.0.11","eslint":"^2.13.1","eslint-config-gulp":"^3.0.1","expect":"^1.20.2","mocha":"^6.0.2","nyc":"^13.3.0"},"keywords":["glob","parent","strip","path","dirname","directory","base","wildcard"],"gitHead":"6dd4b27ac3a7c8643cdd59d936e04d9dd4241922","bugs":{"url":"https://github.com/gulpjs/glob-parent/issues"},"homepage":"https://github.com/gulpjs/glob-parent#readme","_id":"@snyk/glob-parent@5.1.2-patch","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"shasum":"f7ff031ae0ee59834b9555278cadb12620f47c32","size":4797,"noattachment":false,"key":"/@snyk/glob-parent/-/@snyk/glob-parent-5.1.2-patch.tgz","tarball":"http://registry.cnpm.dingdandao.com/@snyk/glob-parent/download/@snyk/glob-parent-5.1.2-patch.tgz"},"_npmUser":{"name":"snyk-user","email":"npmjs+snyk-user@snyk.io"},"directories":{},"maintainers":[{"name":"snyk-user","email":"admin+npm-snyk-user@snyk.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/glob-parent_5.1.2-patch_1614258825084_0.08630120072115521"},"_hasShrinkwrap":false,"publish_time":1614258825223,"_cnpm_publish_time":1614258825223}},"readme":"<p align=\"center\">\n  <a href=\"https://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# glob-parent\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]\n\nExtract the non-magic parent path from a glob string.\n\n## Usage\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## API\n\n### `globParent(maybeGlobString, [options])`\n\nTakes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below.\n\n#### options\n\n```js\n{\n  // Disables the automatic conversion of slashes for Windows\n  flipBackslashes: true\n}\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) unless used as a path segment alone\n- `*` (asterisk)\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## License\n\nISC\n\n[expand-braces]: https://github.com/jonschlinkert/expand-braces\n[expand-brackets]: https://github.com/jonschlinkert/expand-brackets\n\n[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg\n[npm-url]: https://www.npmjs.com/package/glob-parent\n[npm-image]: https://img.shields.io/npm/v/glob-parent.svg\n\n[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master\n[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master\n\n[travis-url]: https://travis-ci.org/gulpjs/glob-parent\n[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci\n\n[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent\n[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg\n\n[gitter-url]: https://gitter.im/gulpjs/gulp\n[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg\n","_attachments":{},"homepage":"https://github.com/gulpjs/glob-parent#readme","bugs":{"url":"https://github.com/gulpjs/glob-parent/issues"},"license":"ISC"}