Module: @gukhanmun/napi

Node.js native addon (napi-rs) implementation of the Gukhanmun hanja-to-hangul converter.

Provides the same {@link load} / {@link Gukhanmun} contract as @gukhanmun/wasm but uses a precompiled native addon for maximum throughput. Node.js 20+ is required. The native addon binary (gukhanmun_napi.node) must be present in the package directory; build it locally with mise run napi-build.

The load() factory is asynchronous for API uniformity with the WASM backend, but the native addon is synchronously ready — dictionary data is the only async part.

Example

import { load } from "@gukhanmun/napi";
import { stdictFst } from "@gukhanmun/stdict-fst";

const g = await load({ dictionaries: [await stdictFst()] });
console.log(g.convert("漢字를 한글로"));  // "한자를 한글로"

Classes

Interfaces

Type Aliases

Functions