UNPKG

putout

Version:

the pluggable code transformer

22 lines (14 loc) 323 B
'use strict'; const {platform} = process; module.exports = (a) => { a = wild(a); if (platform !== 'win32') return a; return a.replace(/\//g, `\\\\`); }; function wild(str) { const wildcard = str .replace(/\./g, `\\.`) .replace(/\*/g, `.*`); return wildcard; }