{"_id":"@dsherret/to-absolute-glob","_rev":"650587","name":"@dsherret/to-absolute-glob","description":"Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.","dist-tags":{"latest":"2.0.2"},"maintainers":[{"name":"dsherret","email":"dsherret@gmail.com"}],"time":{"modified":"2021-08-26T04:42:15.000Z","created":"2018-03-07T21:11:45.930Z","2.0.2":"2018-03-07T21:11:45.930Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/to-absolute-glob.git"},"versions":{"2.0.2":{"name":"@dsherret/to-absolute-glob","description":"Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.","version":"2.0.2","homepage":"https://github.com/jonschlinkert/to-absolute-glob","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com","url":"https://twitter.com/BlaineBublitz"},{"name":"Brian Woodward","email":"brian.woodward@gmail.com","url":"https://github.com/doowb"},{"name":"Erik Kemperman","url":"https://github.com/erikkemperman"},{"name":"Jon Schlinkert","email":"jon.schlinkert@sellside.com","url":"http://twitter.com/jonschlinkert"}],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/to-absolute-glob.git"},"bugs":{"url":"https://github.com/jonschlinkert/to-absolute-glob/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"is-absolute":"^1.0.0","is-negated-glob":"^1.0.0"},"devDependencies":{"gulp-format-md":"^0.1.11","mocha":"^3.0.2"},"keywords":["absolute","file","filepath","glob","negate","negative","path","pattern","resolve","to"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true},"related":{"list":["has-glob","is-glob","is-valid-glob"]},"reflinks":["verb","verb-generate-readme"]},"gitHead":"7ca9987c8f2e96cc2f88dc32bade0df9b8806405","_id":"@dsherret/to-absolute-glob@2.0.2","_shasum":"1f6475dc8bd974cea07a2daf3864b317b1dd332c","_from":".","_npmVersion":"3.8.8","_nodeVersion":"8.5.0","_npmUser":{"name":"dsherret","email":"dsherret@gmail.com"},"dist":{"shasum":"1f6475dc8bd974cea07a2daf3864b317b1dd332c","size":3435,"noattachment":false,"key":"/@dsherret/to-absolute-glob/-/@dsherret/to-absolute-glob-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@dsherret/to-absolute-glob/download/@dsherret/to-absolute-glob-2.0.2.tgz"},"maintainers":[{"name":"dsherret","email":"dsherret@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/to-absolute-glob_2.0.2_1520457105697_0.5435642047362506"},"_hasShrinkwrap":false,"publish_time":1520457105930,"_cnpm_publish_time":1520457105930}},"readme":"# to-absolute-glob [![NPM version](https://img.shields.io/npm/v/to-absolute-glob.svg?style=flat)](https://www.npmjs.com/package/to-absolute-glob) [![NPM downloads](https://img.shields.io/npm/dm/to-absolute-glob.svg?style=flat)](https://npmjs.org/package/to-absolute-glob) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/to-absolute-glob.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/to-absolute-glob) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/to-absolute-glob.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/to-absolute-glob)\n\n> Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save to-absolute-glob\n```\n\n## Usage\n\n```js\nvar toAbsGlob = require('to-absolute-glob');\ntoAbsGlob('a/*.js');\n//=> '/dev/foo/a/*.js'\n```\n\n## Examples\n\nGiven the current project folder (cwd) is `/dev/foo/`:\n\n**makes a path absolute**\n\n```js\ntoAbsGlob('a');\n//=> '/dev/foo/a'\n```\n\n**makes a glob absolute**\n\n```js\ntoAbsGlob('a/*.js');\n//=> '/dev/foo/a/*.js'\n```\n\n**retains trailing slashes**\n\n```js\ntoAbsGlob('a/*/');\n//=> '/dev/foo/a/*/'\n```\n\n**retains trailing slashes with cwd**\n\n```js\ntoAbsGlob('./fixtures/whatsgoingon/*/', {cwd: __dirname});\n//=> '/dev/foo/'\n```\n\n**makes a negative glob absolute**\n\n```js\ntoAbsGlob('!a/*.js');\n//=> '!/dev/foo/a/*.js'\n```\n\n**from a cwd**\n\n```js\ntoAbsGlob('a/*.js', {cwd: 'foo'});\n//=> '/dev/foo/foo/a/*.js'\n```\n\n**makes a negative glob absolute from a cwd**\n\n```js\ntoAbsGlob('!a/*.js', {cwd: 'foo'});\n//=> '!/dev/foo/foo/a/*.js'\n```\n\n**from a root path**\n\n```js\ntoAbsGlob('/a/*.js', {root: 'baz'});\n//=> '/dev/foo/baz/a/*.js'\n```\n\n**from a root slash**\n\n```js\ntoAbsGlob('/a/*.js', {root: '/'});\n//=> '/dev/foo/a/*.js'\n```\n\n**from a negative root path**\n\n```js\ntoAbsGlob('!/a/*.js', {root: 'baz'});\n//=> '!/dev/foo/baz/a/*.js'\n```\n\n**from a negative root slash**\n\n```js\ntoAbsGlob('!/a/*.js', {root: '/'});\n//=> '!/dev/foo/a/*.js'\n```\n\n## About\n\n### Related projects\n\n* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob \"Returns `true` if an array has a glob pattern.\")\n* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob \"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\")\n* [is-valid-glob](https://www.npmjs.com/package/is-valid-glob): Return true if a value is a valid glob pattern or patterns. | [homepage](https://github.com/jonschlinkert/is-valid-glob \"Return true if a value is a valid glob pattern or patterns.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Contributors\n\n| **Commits** | **Contributor**<br/> | \n| --- | --- |\n| 16 | [doowb](https://github.com/doowb) |\n| 15 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 1 | [phated](https://github.com/phated) |\n| 1 | [erikkemperman](https://github.com/erikkemperman) |\n\n### Building docs\n\n_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_\n\nTo generate the readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install -g verb verb-generate-readme && verb\n```\n\n### Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\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\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/to-absolute-glob/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 17, 2016._","_attachments":{},"homepage":"https://github.com/jonschlinkert/to-absolute-glob","bugs":{"url":"https://github.com/jonschlinkert/to-absolute-glob/issues"},"license":"MIT"}