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.

index.js 359B

123456789101112131415
  1. 'use strict';
  2. module.exports = function(pattern) {
  3. if (typeof pattern !== 'string') {
  4. throw new TypeError('expected a string');
  5. }
  6. var glob = { negated: false, pattern: pattern, original: pattern };
  7. if (pattern.charAt(0) === '!' && pattern.charAt(1) !== '(') {
  8. glob.negated = true;
  9. glob.pattern = pattern.slice(1);
  10. }
  11. return glob;
  12. };