document example
link: toRegex
const picomatch = require('picomatch');
// picomatch.toRegex(source[, options]);
const { output } = picomatch.parse('*.js');
console.log(picomatch.toRegex(output));
//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
actual result
missing symbol ^ & $ and with other differences
- /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+ /(?!\.)(?=.)[^/]*?\.js/
version
both v3 and v4