Closed Extarys closed 5 years ago
Let me start by saying this project looks awesome.
I need to replace a string inside a javascript file before sending it from a server.
var file = 'var test = ${var}' // or fs.createReadStream('my.js', 'utf8') reply .header('Content-Type', 'application/javascript; charset=UTF-8') // replace placeholder in js file .send(file)
Would this be possible with this package? :smile:
Thanks!
Hi, for this String.replace would be most appropriate, but this package exports a tag called replaceStringTransformer that could solve your problem.
String.replace
replaceStringTransformer
Let me start by saying this project looks awesome.
I need to replace a string inside a javascript file before sending it from a server.
Would this be possible with this package? :smile:
Thanks!