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 4.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # is-windows [![NPM version](https://img.shields.io/npm/v/is-windows.svg?style=flat)](https://www.npmjs.com/package/is-windows) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-windows.svg?style=flat)](https://npmjs.org/package/is-windows) [![NPM total downloads](https://img.shields.io/npm/dt/is-windows.svg?style=flat)](https://npmjs.org/package/is-windows) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-windows.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-windows)
  2. > Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.
  3. Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
  4. ## Install
  5. Install with [npm](https://www.npmjs.com/):
  6. ```sh
  7. $ npm install --save is-windows
  8. ```
  9. ## Heads up!
  10. As of `v0.2.0` this module always returns a function.
  11. ## Node.js usage
  12. ```js
  13. var isWindows = require('is-windows');
  14. console.log(isWindows());
  15. //=> returns true if the platform is windows
  16. ```
  17. ## About
  18. <details>
  19. <summary><strong>Contributing</strong></summary>
  20. Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
  21. </details>
  22. <details>
  23. <summary><strong>Running Tests</strong></summary>
  24. 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:
  25. ```sh
  26. $ npm install && npm test
  27. ```
  28. </details>
  29. <details>
  30. <summary><strong>Building docs</strong></summary>
  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. </details>
  37. ### Related projects
  38. You might also be interested in these projects:
  39. * [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.")
  40. * [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")
  41. * [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.")
  42. * [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
  43. * [window-size](https://www.npmjs.com/package/window-size): Reliable way to get the height and width of terminal/console, since it's not calculated or… [more](https://github.com/jonschlinkert/window-size) | [homepage](https://github.com/jonschlinkert/window-size "Reliable way to get the height and width of terminal/console, since it's not calculated or updated the same way on all platforms, environments and node.js versions.")
  44. ### Contributors
  45. | **Commits** | **Contributor** |
  46. | --- | --- |
  47. | 11 | [jonschlinkert](https://github.com/jonschlinkert) |
  48. | 4 | [doowb](https://github.com/doowb) |
  49. | 1 | [SimenB](https://github.com/SimenB) |
  50. | 1 | [gucong3000](https://github.com/gucong3000) |
  51. ### Author
  52. **Jon Schlinkert**
  53. * [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert)
  54. * [github/jonschlinkert](https://github.com/jonschlinkert)
  55. * [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
  56. ### License
  57. Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
  58. Released under the [MIT License](LICENSE).
  59. ***
  60. _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 14, 2018._