Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async init() {
log.debug('kuroshiro: initializing...')
if (!Prefs.get('kuroshiro')) {
log.debug('kuroshiro: disabled')
return
}
try {
this.kuroshiro = new Kuroshiro()
await this.kuroshiro.init(new KuromojiAnalyzer('resource://zotero-better-bibtex/kuromoji'))
} catch (err) {
log.error('kuroshiro: initializing failed')
throw err
}
log.debug('kuroshiro: ready')
this.enabled = true
}