file-combiner-regex-includer
v0.1.0
Published
A regex includer for file-combiner
Downloads
2
Readme
file-combiner-regex-includer
A regex includer for file-combiner
API
regexIncluder(regex[,group])
regex(string): a string representing a regez group(integer):the capture group that contains the filename. Defaults to 0.
const regexIncluder=require("file-combiner-regex-includer")
const Combiner=require("file-combiner")
let combiner=new Combiner(regexIncluder("!(.*)!"))
combiner.add("file1.txt","hi, !./file2.txt!")
combiner.add("file12.txt","2")
let result=combiner.combinedFiles()
console.log(result)//{"file1.txt":"hi, 2"}