index.js 479 B

1234567891011121314151617
  1. 'use strict';
  2. const pico = require('./lib/picomatch');
  3. const utils = require('./lib/utils');
  4. function picomatch(glob, options, returnState = false) {
  5. // default to os.platform()
  6. if (options && (options.windows === null || options.windows === undefined)) {
  7. // don't mutate the original options object
  8. options = { ...options, windows: utils.isWindows() };
  9. }
  10. return pico(glob, options, returnState);
  11. }
  12. Object.assign(picomatch, pico);
  13. module.exports = picomatch;