Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
buildCHI = () => {
let cData = this.props.data
Cite.CSL.register.addTemplate("chicago", chicago)
if (!Array.isArray(cData)) {
cData = [cData]
}
let citationCHI = cData.map(data => {
let json = this.parseCitation(data)
let cite = new Cite(json)
return cite.format("bibliography", {
format: "html",
template: "chicago"
})
})
return citationCHI.join("")
buildMLA = () => {
let cData = this.props.data
Cite.CSL.register.addTemplate("mla", mla)
if (!Array.isArray(cData)) {
cData = [cData]
}
let citationMLA = cData.map(data => {
let json = this.parseCitation(data)
let cite = new Cite(json)
return cite.format("bibliography", {
format: "html",
template: "mla"
})
})
return citationMLA.join("")