source: trip-planner-front/node_modules/karma/lib/utils/pattern-utils.js@ ceaed42

Last change on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 376 bytes
RevLine 
[6a3a178]1'use strict'
2
3const path = require('path')
4
5const PatternUtils = {
6 getBaseDir (pattern) {
7 return pattern
8 .replace(/[/\\][^/\\]*\*.*$/, '') // remove parts with *
9 .replace(/[/\\][^/\\]*[!+]\(.*$/, '') // remove parts with !(...) and +(...)
10 .replace(/[/\\][^/\\]*\)\?.*$/, '') || path.sep // remove parts with (...)?
11 }
12}
13
14module.exports = PatternUtils
Note: See TracBrowser for help on using the repository browser.