0.1.0 • Published 7 years ago
file-combiner-regex-includer v0.1.0
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"}
0.1.0
7 years ago