UNPKG

putout

Version:

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

21 lines (14 loc) 338 B
'use strict'; const {platform} = require('node: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; }