Support adding puncutations to text for node-addon-api (#876)

This commit is contained in:
Fangjun Kuang
2024-05-14 19:28:56 +08:00
committed by GitHub
parent d19f50b799
commit 75630b986b
12 changed files with 218 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
const addon = require('./addon.js');
class Punctuation {
constructor(config) {
this.handle = addon.createOfflinePunctuation(config);
this.config = config;
}
addPunct(text) {
return addon.offlinePunctuationAddPunct(this.handle, text);
}
}
module.exports = {
Punctuation,
}