Debian Codegraph @

intl/icu_capi/bindings/js/ICU4XWordBreakIteratorLatin1.mjs

raw
1 import wasm from "./diplomat-wasm.mjs"
2 import * as diplomatRuntime from "./diplomat-runtime.mjs"
3 import { ICU4XSegmenterWordType_js_to_rust, ICU4XSegmenterWordType_rust_to_js } from "./ICU4XSegmenterWordType.mjs"
4
5 const ICU4XWordBreakIteratorLatin1_box_destroy_registry = new FinalizationRegistry(underlying => {
6 wasm.ICU4XWordBreakIteratorLatin1_destroy(underlying);
7 });
8
9 export class ICU4XWordBreakIteratorLatin1 {
10 #lifetimeEdges = [];
11 constructor(underlying, owned, edges) {
12 this.underlying = underlying;
13 this.#lifetimeEdges.push(...edges);
14 if (owned) {
15 ICU4XWordBreakIteratorLatin1_box_destroy_registry.register(this, underlying);
16 }
17 }
18
19 next() {
20 return wasm.ICU4XWordBreakIteratorLatin1_next(this.underlying);
21 }
22
23 word_type() {
24 return ICU4XSegmenterWordType_rust_to_js[wasm.ICU4XWordBreakIteratorLatin1_word_type(this.underlying)];
25 }
26
27 is_word_like() {
28 return wasm.ICU4XWordBreakIteratorLatin1_is_word_like(this.underlying);
29 }
30 }