Socket
Socket
Sign inDemoInstall

is-windows

Package Overview
Dependencies
0
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

45

index.js

@@ -1,24 +0,27 @@

/*! is-windows v1.0.0 | MIT LICENSE (c) 2015-2016 | https://github.com/jonschlinkert/is-windows */
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(factory);
} else if (typeof exports === 'object') {
// Node.js
module.exports = factory;
/*!
* is-windows <https://github.com/jonschlinkert/is-windows>
*
* Copyright © 2015-2018, Jon Schlinkert.
* Released under the MIT License.
*/
(function(factory) {
if (exports && typeof exports === 'object' && typeof module !== 'undefined') {
module.exports = factory();
} else if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof window !== 'undefined') {
window.isWindows = factory();
} else if (typeof global !== 'undefined') {
global.isWindows = factory();
} else if (typeof self !== 'undefined') {
self.isWindows = factory();
} else {
// Browser
root.isWindows = factory;
this.isWindows = factory();
}
}(this, function() {
})(function() {
'use strict';
return (function isWindows() {
if (typeof process === 'undefined' || !process) {
return false;
}
return process.platform === 'win32' ||
process.env.OSTYPE === 'cygwin' ||
process.env.OSTYPE === 'msys';
}());
}));
return function isWindows() {
return process && (process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE));
};
});
{
"name": "is-windows",
"description": "Returns true if the platform is windows.",
"version": "1.0.1",
"description": "Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.",
"version": "1.0.2",
"homepage": "https://github.com/jonschlinkert/is-windows",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)",
"Simen Bekkhus <sbekkhus91@gmail.com> (https://github.com/SimenB)",
"刘祺 <gucong@gmail.com> (gucong.co.cc)"
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
"Simen Bekkhus (https://github.com/SimenB)",
"刘祺 (gucong.co.cc)"
],

@@ -28,4 +28,4 @@ "repository": "jonschlinkert/is-windows",

"devDependencies": {
"gulp-format-md": "^0.1.11",
"mocha": "^3.2.0"
"gulp-format-md": "^1.0.0",
"mocha": "^3.5.3"
},

@@ -32,0 +32,0 @@ "keywords": [

@@ -1,5 +0,7 @@

# 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)
# 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)
> Returns true if the platform is windows.
> Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install

@@ -17,3 +19,3 @@

## Usage
## Node.js usage

@@ -23,3 +25,3 @@ ```js

isWindows();
console.log(isWindows());
//=> returns true if the platform is windows

@@ -30,24 +32,23 @@ ```

### Related projects
<details>
<summary><strong>Contributing</strong></summary>
* [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.")
* [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")
* [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.")
* [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.")
* [window-size](https://www.npmjs.com/package/window-size): Reliable way to to get the height and width of the terminal/console in a node.js… [more](https://github.com/jonschlinkert/window-size) | [homepage](https://github.com/jonschlinkert/window-size "Reliable way to to get the height and width of the terminal/console in a node.js environment.")
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Contributing
</details>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
<details>
<summary><strong>Running Tests</strong></summary>
### Contributors
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:
| **Commits** | **Contributor** |
| --- | --- |
| 11 | [jonschlinkert](https://github.com/jonschlinkert) |
| 1 | [SimenB](https://github.com/SimenB) |
| 1 | [gucong3000](https://github.com/gucong3000) |
```sh
$ npm install && npm test
```
### Building docs
</details>
<details>
<summary><strong>Building docs</strong></summary>
_(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.)_

@@ -61,10 +62,23 @@

### Running tests
</details>
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:
### Related projects
```sh
$ npm install && npm test
```
You might also be interested in these projects:
* [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`.")
* [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")
* [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.")
* [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.")
* [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.")
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 11 | [jonschlinkert](https://github.com/jonschlinkert) |
| 4 | [doowb](https://github.com/doowb) |
| 1 | [SimenB](https://github.com/SimenB) |
| 1 | [gucong3000](https://github.com/gucong3000) |
### Author

@@ -74,2 +88,3 @@

* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert)
* [github/jonschlinkert](https://github.com/jonschlinkert)

@@ -80,3 +95,3 @@ * [twitter/jonschlinkert](https://twitter.com/jonschlinkert)

Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).

@@ -86,2 +101,2 @@

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on April 28, 2017._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 14, 2018._

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc