const wtf=require('wtf_wikipedia')
wtf.extend((models, templates) => {
templates.unknown1 = 'handled';
})
let str = ` {{Infobox officeholder
| name = Dr. Rajesh Sonkar
| office1 = {{unknown1}}
| office2 = {{unknown2}}
| office3 = {{unknown3}}
}}`
let doc = wtf(str, {
templateFallbackFn: (tmpl, list, parse) => {
let obj = parse(tmpl)
list.push(obj)
return '[unsupported template]'
}
})
doc.infobox().json()