index.js 640 B

123456789101112131415161718192021222324
  1. /*! is-windows v1.0.0 | MIT LICENSE (c) 2015-2016 | https://github.com/jonschlinkert/is-windows */
  2. (function(root, factory) {
  3. if (typeof define === 'function' && define.amd) {
  4. // AMD
  5. define(factory);
  6. } else if (typeof exports === 'object') {
  7. // Node.js
  8. module.exports = factory;
  9. } else {
  10. // Browser
  11. root.isWindows = factory;
  12. }
  13. }(this, function() {
  14. 'use strict';
  15. return (function isWindows() {
  16. if (typeof process === 'undefined' || !process) {
  17. return false;
  18. }
  19. return process.platform === 'win32' ||
  20. process.env.OSTYPE === 'cygwin' ||
  21. process.env.OSTYPE === 'msys';
  22. }());
  23. }));