aboutsummaryrefslogblamecommitdiff
path: root/src/shared/utils/re.js
blob: 7db9091541886cdcb94ddcd1dde93960b5d0fc0a (plain) (tree)
1
2
3
4
5
6




                                                          
const fromWildcard = (pattern) => {
  let regexStr = '^' + pattern.replace(/\*/g, '.*') + '$';
  return new RegExp(regexStr);
};

export { fromWildcard };