Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
transform (code, id) {
if ( !filter( id ) ) return;
if ( !firstpass.test( code ) ) return;
let transformed = convert(code, options.converter);
if (options.rewire) {
transformed = transformed.replace(importStatement, (match, begin, moduleId, end) => {
return `${begin}${options.rewire(moduleId, id) || moduleId}${end}`;
});
}
return transformed;
}
};