Interface: GukhanmunFactory
Factory interface satisfied by both @gukhanmun/wasm and
@gukhanmun/napi.
Example
Methods
load()
load(
options?):Promise<Gukhanmun>
Loads and initialises a Gukhanmun converter with the given options.
In the WASM implementation this involves asynchronous .wasm binary
initialisation; in the Node-API implementation the native addon is
synchronously ready but still returns a Promise for API uniformity.
Dictionary sources with URL or string data are fetched / read during
this call.
Parameters
options?
Conversion options. All fields are optional; unset
fields inherit defaults from the selected preset (or "ko-kr" when
no preset is given).
Returns
Promise<Gukhanmun>
A ready-to-use Gukhanmun instance.
Throws
GukhanmunError when an option value is unrecognised
(code: "invalid-input") or a dictionary fails to load
(code: "dictionary-load").