You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 3.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # is-relative [![NPM version](https://img.shields.io/npm/v/is-relative.svg?style=flat)](https://www.npmjs.com/package/is-relative) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-relative.svg?style=flat)](https://npmjs.org/package/is-relative) [![NPM total downloads](https://img.shields.io/npm/dt/is-relative.svg?style=flat)](https://npmjs.org/package/is-relative) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-relative.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-relative)
  2. > Returns `true` if the path appears to be relative.
  3. ## Install
  4. Install with [npm](https://www.npmjs.com/):
  5. ```sh
  6. $ npm install --save is-relative
  7. ```
  8. ## Usage
  9. ```js
  10. var isRelative = require('is-relative');
  11. console.log(isRelative('README.md'));
  12. //=> true
  13. console.log(isRelative('/User/dev/foo/README.md'));
  14. //=> false
  15. ```
  16. ## About
  17. ### Related projects
  18. * [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.")
  19. * [is-dotfile](https://www.npmjs.com/package/is-dotfile): Return true if a file path is (or has) a dotfile. Returns false if the… [more](https://github.com/jonschlinkert/is-dotfile) | [homepage](https://github.com/jonschlinkert/is-dotfile "Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.")
  20. * [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")
  21. * [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.")
  22. * [is-unc-path](https://www.npmjs.com/package/is-unc-path): Returns true if a filepath is a windows UNC file path. | [homepage](https://github.com/jonschlinkert/is-unc-path "Returns true if a filepath is a windows UNC file path.")
  23. ### Contributing
  24. Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
  25. ### Contributors
  26. | **Commits** | **Contributor** |
  27. | --- | --- |
  28. | 13 | [jonschlinkert](https://github.com/jonschlinkert) |
  29. | 3 | [shinnn](https://github.com/shinnn) |
  30. ### Building docs
  31. _(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
  32. To generate the readme, run the following command:
  33. ```sh
  34. $ npm install -g verbose/verb#dev verb-generate-readme && verb
  35. ```
  36. ### Running tests
  37. Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
  38. ```sh
  39. $ npm install && npm test
  40. ```
  41. ### Author
  42. **Jon Schlinkert**
  43. * [github/jonschlinkert](https://github.com/jonschlinkert)
  44. * [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
  45. ### License
  46. Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
  47. Released under the [MIT License](LICENSE).
  48. ***
  49. _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 13, 2017._