提交学习笔记专用
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.

17 lines
479 B

  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;