Tabnine Logo For Javascript
isWindows
Code IndexAdd Tabnine to your IDE (free)

How to use
isWindows
function
in
is-windows

Best JavaScript code snippets using is-windows.isWindows(Showing top 9 results out of 315)

origin: micromatch/nanomatch

it('should match escaped characters', function() {
   assert(!mm.isMatch('', '\\'));
   assert(!mm.isMatch('XXX/\\', '[A-Z]+/\\'));
   assert(mm.isMatch('\\', '\\'));
   if (isWindows()) {
    assert(!mm.isMatch('XXX/\\', '[A-Z]+/\\\\'));
   } else {
    assert(mm.isMatch('XXX/\\', '[A-Z]+/\\\\'));
   }
   assert(mm.isMatch('[ab]', '\\[ab]'));
   assert(mm.isMatch('[ab]', '[\\[:]ab]'));
  });
origin: micromatch/extglob

function matcher() {
 if (isWindows()) return;
 return bash.apply(null, arguments);
}
origin: micromatch/nanomatch

describe('slashes', function() {
  it('should match forward slashes', function() {
   assert(nm.isMatch('/', '/'));
  });

  it('should match backslashes', function() {
   assert(nm.isMatch('\\', '[\\\\/]'));
   assert(nm.isMatch('\\', '[\\\\/]+'));
   assert(nm.isMatch('\\\\', '[\\\\/]+'));
   assert(nm.isMatch('\\\\\\', '[\\\\/]+'));

   if (isWindows()) {
    nm(['\\'], '[\\\\/]', ['/']);
    nm(['\\', '\\\\', '\\\\\\'], '[\\\\/]+', ['/']);
   } else {
    nm(['\\'], '[\\\\/]', ['\\']);
    nm(['\\', '\\\\', '\\\\\\'], '[\\\\/]+', ['\\', '\\\\', '\\\\\\']);
   }

   var sep = path.sep;
   path.sep = '\\';
   assert(nm.isMatch('\\', '[\\\\/]'));
   assert(nm.isMatch('\\', '[\\\\/]+'));
   assert(nm.isMatch('\\\\', '[\\\\/]+'));
   assert(nm.isMatch('\\\\\\', '[\\\\/]+'));
   nm(['\\'], '[\\\\/]', ['/']);
   nm(['\\', '\\\\', '\\\\\\'], '[\\\\/]+', ['/']);
   path.sep = sep;
  });
 });
origin: micromatch/nanomatch

mm(['man/man1/bash.1'], '*/man*/bash.*', ['man/man1/bash.1']);
if (isWindows()) {
origin: micromatch/nanomatch

describe('.makeRe', function() {
 if (isWindows() || isTravis) {
  console.log('these tests use bash to test for bash parity. since bash does not work on most versions of windows, these tests are skipped on windows');
  return;
     } else if (!isWindows() && !isTravis)  {
      actual = nmRes === nm.bash.isMatch(fixture, pattern);
     } else {
     } else if (/^\?/.test(pattern) || /^\.\//.test(fixture)) {
      actual = true;
     } else if (!isWindows() && !isTravis)  {
      actual = nmRes === nm.bash.isMatch(fixture, pattern, {dot: true});
     } else {
     } else if (/^\?/.test(pattern) || /^\!/.test(fixture)) {
      actual = true;
     } else if (!isWindows() && !isTravis)  {
      actual = nmRes === nm.bash.isMatch(fixture, pattern, {nonegate: true});
     } else {
origin: micromatch/nanomatch

describe('minimatch parity:', function() {
 describe('backslashes', function() {
  it('should match literal backslashes', function() {
   if (isWindows()) {
    mm.match(['\\'], '\\', ['/']);
   } else {
origin: micromatch/nanomatch

nm(['d', 'e', '!ab', '!abc', 'a!b', '\\!a'], '!!!!a*', ['a!b']);
nm(['d', 'e', '!ab', '!abc', 'a!b', '\\!a'], '!!!!!!a*', ['a!b']);
if (!isWindows()) {
 nm(['d', 'e', '!ab', '!abc', 'a!b', '\\!a'], '!!!!!a*', ['d', 'e', '!ab', '!abc', '\\!a']);
 nm(['d', 'e', '!ab', '!abc', 'a!b', '\\!a'], '!a*', ['d', 'e', '!ab', '!abc', '\\!a']);
origin: micromatch/nanomatch

describe('.isMatch', function() {
 if (isWindows() || isTravis) {
  console.log('these tests use bash to test for bash parity. since bash does not work on most versions of windows, these tests are skipped on windows');
  return;
     } else if (/^\?/.test(pattern)) {
      actual = true;
     } else if (!isWindows() && !isTravis)  {
      actual = nmRes === nm.bash.isMatch(fixture, pattern);
     } else {
     } else if (/^\?/.test(pattern) || /^\.\//.test(fixture)) {
      actual = true;
     } else if (!isWindows() && !isTravis)  {
      actual = nmRes === nm.bash.isMatch(fixture, pattern, {dot: true});
     } else {
     } else if (/^\?/.test(pattern) || /^\!/.test(fixture)) {
      actual = true;
     } else if (!isWindows() && !isTravis) {
      actual = nmRes === nm.bash.isMatch(fixture, pattern);
     } else {
origin: micromatch/nanomatch

it('should use escaped characters as literals:', function() {
   if (isWindows()) {
    mm(fixtures, '\\*', {nonull: true}, ['*', '/*']);
    mm(fixtures, '\\*', {nonull: true, unescape: true}, ['*']);
is-windows(npm)isWindows

Most used is-windows functions

    Popular in JavaScript

    • async
      Higher-order functions and common patterns for asynchronous code
    • postcss
    • q
      A library for promises (CommonJS/Promises/A,B,D)
    • superagent
      elegant & feature rich browser / node HTTP with a fluent API
    • body-parser
      Node.js body parsing middleware
    • through2
      A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise
    • fs
    • commander
      the complete solution for node.js command-line programs
    • redis
      Redis client library
    • CodeWhisperer alternatives
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
    Get Tabnine for your IDE now