UNPKG

putout

Version:

🐊 Pluggable and configurable code transformer with built-in ESLint, Babel and support of js, jsx, typescript, flow, markdown, yaml and json

19 lines (13 loc) 321 B
import process from 'node:process'; export default (a) => { a = wild(a); if (process.platform !== 'win32') return a; return a.replace(/\//g, `\\\\`); }; function wild(str) { const wildcard = str .replace(/\./g, `\\.`) .replace(/\*/g, `.*`); return wildcard; }