Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

opencc-fmmseg-wasm

Latest version: v0.5.6

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
npm package Publisher: laisuk
0 Stars
0 Forks
11 Versions
836 Downloads
Rust Repo language

Scan summary

opencc-fmmseg-wasm was last scanned on 30 Nov 2026 at version 0.5.6. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 11 versions; the latest was published on 30 Nov 2026.
  • Findings: 1 rule fired in version 0.5.6 (1 low). The score describes this version only.
  • Downloads: 836 downloads.

Versions

11 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.5.6 LATEST 30 Nov 2026 1 rule fired
0.5.5 21 Nov 2026 1 rule fired
0.5.4 17 Nov 2026 1 rule fired
0.5.3 8 Nov 2026 Not shown
0.5.2 30 Oct 2026 Not shown

Rules fired in 0.5.6: 1

Findings

1 Low

Findings for v0.5.6. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

WebAssembly module included

The package includes a WebAssembly (.wasm) module. It cannot be reviewed as source, but it runs sandboxed inside the JavaScript runtime and can access only what the host code gives it. WebAssembly is common in parsers, codecs and cryptography libraries. Shown for awareness.

LOW
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

The score describes 0.5.6; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

opencc-fmmseg-wasm

npm version npm downloads License: MIT WebAssembly

OpenCC FMM segmentation WebAssembly bindings for browsers and JavaScript runtimes.

This package provides high-quality Simplified Chinese ↔ Traditional Chinese conversion powered by the Rust opencc-fmmseg engine.

Features:

  • OpenCC-compatible conversion configs
  • Pure WebAssembly (no native binaries)
  • Browser-friendly
  • TypeScript-friendly APIs
  • Fast Rust backend
  • FMM-based phrase segmentation
  • Traditional Chinese regional variants
  • Japanese Shinjitai conversion support
  • Chinese script detection (zho_check)
  • Optional CJK Compatibility Ideograph normalization
  • In-memory Office / EPUB document conversion
  • Zero-dependency Node.js CLI

Package profile:

  • 0 runtime dependencies
  • 1 WASM file
  • 24 conversion configs
  • 100% offline
🌐 Live Demo

Try opencc-fmmseg-wasm directly in your browser:

Open the live WASM demo: CJK Conversion Tool

The interactive demo includes:

  • Chinese Conversion — 24 conversion configurations covering Simplified, Traditional, regional variants, and Small Seal Script.
  • Custom Dictionaries — Add multiple dictionary slots with Append/Override modes, apply changes instantly, and reset to defaults.
  • Document Conversion — Convert DOCX, XLSX, PPTX, ODT, ODS, ODP, EPUB, TXT, and Markdown files directly in your browser while preserving supported document structures and formatting.
  • Document Text Extraction — Open EPUB, DOCX, ODT, and PDF files directly into the input editor for interactive Chinese conversion.
  • PDF Processing — PDFium-powered text extraction with optional page headers, CJK paragraph reflow, compact paragraph spacing, custom heading regex, and untrusted PDF text filtering.
  • PDF-to-TXT Conversion — Convert PDF files through the Drop Zone and download the converted text as UTF-8 TXT, with optional filename conversion.
  • PDF Progress and Cancellation — Page-by-page extraction progress with cooperative cancellation for both Open File and Drop Zone operations.
  • Automatic Encoding Detection — Detect UTF-8, UTF-16, GB18030/GBK, Big5, and Shift-JIS for text files, with manual override.
  • Additional Tools — Unicode compatibility normalization, DeTofu, punctuation conversion, and GB mojibake repair.
  • Modern Interface — Responsive layout, CodeMirror editors with line numbers and character counts, and System/Light/Dark theme support.
  • On-Demand Loading — Document extraction helpers and the PDFium runtime are loaded only when needed, keeping ordinary Chinese conversion lightweight.

Document text extraction and PDF processing are powered by reusable Rust WASM helpers from pdfium-helper.

All processing runs locally in your browser using WebAssembly. Your files are never uploaded to a server.

Note: PDF extraction requires an existing text layer. OCR and password-protected PDF extraction are not currently supported.

No installation or server backend required.


Installation

npm install @laisuk/opencc-fmmseg-wasm

Or installation from the mirror package:

npm install opencc-fmmseg-wasm

Quick Start

import init, {
    OpenccWasm
} from "@laisuk/opencc-fmmseg-wasm";

await init();

const cc = new OpenccWasm("s2t");

console.log(cc.convert("汉字转换测试", false));
// 漢字轉換測試

API

Constructor
const cc = new OpenccWasm("s2t");

Parameters:

  • config (optional): OpenCC config string
  • default: "s2t"

Example:

const cc = new OpenccWasm("t2s");

Taiwan phrase config example:

const cc = new OpenccWasm("s2twp");

cc.convert("预订‘奔驰’品牌出租车", true);
// 預訂『賓士』品牌計程車

Hong Kong phrase config example:

const cc = new OpenccWasm("hk2sp");

cc.convert("作業系統加密保護個人私隱權", false);
// 操作系统加密保护个人隐私权

convert
cc.convert(text, punctuation)

Parameters:

  • text: input string
  • punctuation: whether to convert punctuation variants

Returns:

  • converted string

Example:

cc.convert("汉字", false);

setConfig
cc.setConfig("t2s");

Returns:

  • true if valid
  • false if invalid

getConfig
cc.getConfig();

Returns current config string.


isValidConfig
OpenccWasm.isValidConfig("s2t");

getSupportedConfigs
OpenccWasm.getSupportedConfigs();

Returns all supported config strings.

Includes s2hkp, hk2sp, t2hkp, and hk2tp.


getAvailableSlots
const slots = OpenccWasm.getAvailableSlots();

Returns all canonical dictionary slot names accepted by newWithCustomDicts as a string array. The list is sourced from the core DictSlot definitions, so callers can use it to populate selectors or validate custom dictionary input without maintaining their own slot list.

if (!OpenccWasm.getAvailableSlots().includes(slot)) {
    throw new Error(`Unsupported dictionary slot: ${slot}`);
}

zhoCheck

Detect Chinese script type.

cc.zhoCheck(text);

Returns:

Value Meaning
0 Unknown / mixed
1 Traditional Chinese
2 Simplified Chinese

normalizeCompat

Normalize Unicode CJK Compatibility Ideographs before conversion.

cc.normalizeCompat(text)

Parameters:

  • text: input string

Returns:

  • normalized string

Example:

const cc = new OpenccWasm("t2s");

const input = "天龍八部書裡的喬峰是契丹人";
const normalized = cc.normalizeCompat(input);

console.log(normalized);
// 天龍八部書裡的喬峰是契丹人

console.log(cc.convert(normalized, false));
// 天龙八部书里的乔峰是契丹人

This is an optional pre-conversion pass for text that contains CJK Compatibility Ideographs. Unmapped characters are preserved unchanged. Normal OpenCC conversion does not automatically run this pass, so call it explicitly when compatibility normalization is desired.

normalizeUnicodeCompat

Normalize additional Unicode compatibility forms, CJK radicals, allographs, legacy glyphs, and selected compatibility-like punctuation before conversion.

cc.normalizeUnicodeCompat(text)

Parameters:

  • text: input string

Returns:

  • normalized string

Example:

const cc = new OpenccWasm("t2s");

const input = "聼聼竒羙⽟䂖甁噐⾳";
const normalized = cc.normalizeUnicodeCompat(input);

console.log(normalized);
// 聽聽奇美玉石瓶器音

console.log(cc.convert(normalized, false));
// 听听奇美玉石瓶器音

This pass uses the extended Unicode compatibility table and is separate from normalizeCompat(). It is useful for text containing radical forms, historical or allographic Han forms, and other compatibility-like characters that are not covered by the CJK Compatibility Ideograph ranges.

Unmapped characters are preserved unchanged.

normalizeCompatExtended

Apply complete compatibility normalization before conversion.

cc.normalizeCompatExtended(text)

Parameters:

  • text: input string

Returns:

  • normalized string

Example:

const cc = new OpenccWasm("t2s");

const input = "天龍八部書裡的聼眾";
const normalized = cc.normalizeCompatExtended(input);

console.log(normalized);
// 天龍八部書裡的聽眾

console.log(cc.convert(normalized, false));
// 天龙八部书里的听众

normalizeCompatExtended() combines the extended Unicode compatibility table with CJK Compatibility Ideograph normalization. Use this when input may contain characters handled by either normalization set.

The normalization order is:

  1. extended Unicode compatibility normalization;
  2. CJK Compatibility Ideograph normalization.

Normal OpenCC conversion does not automatically perform compatibility normalization. Call this method explicitly before convert() when complete compatibility normalization is desired.


detofu

Replace tofu-risk rare CJK extension characters with display-compatible fallbacks.

cc.detofu(text, level)

Parameters:

  • text: input string
  • level: DetofuLevelWasm threshold for the CJK extension ranges to replace

Returns:

  • detofu-safe string

Supported levels:

Enum CLI value
DetofuLevelWasm.ExtB ext-b
DetofuLevelWasm.ExtC ext-c
DetofuLevelWasm.ExtD ext-d
DetofuLevelWasm.ExtE ext-e
DetofuLevelWasm.ExtF ext-f
DetofuLevelWasm.ExtG ext-g
DetofuLevelWasm.ExtH ext-h
DetofuLevelWasm.ExtI ext-i

Example:

import init, {
    OpenccWasm,
    DetofuLevelWasm
} from "@laisuk/opencc-fmmseg-wasm";

await init();

const cc = new OpenccWasm("t2s");
const converted = cc.convert("儼驂騑於上路", false);

console.log(converted);
// 俨骖𬴂于上路

console.log(cc.detofu(converted, DetofuLevelWasm.ExtB));
// 俨骖騑于上路

convertDetofu

Convert text and apply detofu in one call.

cc.convertDetofu(text, punctuation, level)

Parameters:

  • text: input string
  • punctuation: whether to convert punctuation variants
  • level: DetofuLevelWasm threshold for the CJK extension ranges to replace

Returns:

  • converted detofu-safe string

Example:

cc.convertDetofu("儼驂騑於上路", false, DetofuLevelWasm.ExtB);
// 俨骖騑于上路

newWithCustomDicts

Construct a converter with in-memory custom dictionary pairs.

const cc = OpenccWasm.newWithCustomDicts(config, specs);

Parameters:

  • config: OpenCC config string, such as "s2t"
  • specs: array of custom dictionary specs

TypeScript-style spec shape:

type WasmCustomDictSpec = {
    slot: string;
    mode?: "Append" | "Override";
    pairs: Array<[string, string]>;
};

mode defaults to "Append" when omitted.

Each pairs entry is a [source, target] string tuple for the selected slot.

TypeScript example:

import init, {OpenccWasm} from "@laisuk/opencc-fmmseg-wasm";

await init();

const specs: WasmCustomDictSpec[] = [
    {
        slot: "STPhrases",
        pairs: [
            ["云端", "雲端"]
        ]
    }
];

const cc = OpenccWasm.newWithCustomDicts("s2t", specs);

Practical example:

import init, {OpenccWasm} from "@laisuk/opencc-fmmseg-wasm";

await init();

const cc = OpenccWasm.newWithCustomDicts("s2t", [
    {
        slot: "STPhrases",
        mode: "Append",
        pairs: [
            ["帕兰蒂尔", "柏蘭蒂爾"],
            ["软件", "軟體"]
        ]
    }
]);

console.log(cc.convert("帕兰蒂尔软件", false));
// 柏蘭蒂爾軟體

Override example:

const cc = OpenccWasm.newWithCustomDicts("s2t", [
    {
        slot: "STPhrases",
        mode: "Override",
        pairs: [
            ["软件", "軟體"]
        ]
    }
]);

Override replaces the selected slot before inserting the provided pairs. It is powerful and should be used only when the caller intentionally wants to discard built-in entries for that slot.

Custom dictionary specs identify the target dictionary slot by DictSlot name. Slot names are trimmed and matched case-insensitively, so "stphrases", " STPhrases ", and "STPhrases" all select STPhrases. Canonical names are recommended in TypeScript code and docs; use OpenccWasm.getAvailableSlots() to retrieve the current list.

Suffixes such as .txt are not accepted, even though case and surrounding whitespace are normalized. Use "STPhrases" or "stphrases", not "STPhrases.txt".

Merge contract:

  • Custom dictionaries are loaded from in-memory pairs only; no file I/O is involved.
  • The embedded compressed CBOR dictionary is loaded first.
  • Custom specs are applied to DictionaryMaxlength before OpenCC::from_dictionary(...).
  • Conversion hot paths remain immutable after construction.
  • Append mode merges into the selected slot.
  • Duplicate or conflicting keys use last-wins semantics.
  • Override mode clears the selected slot first, then inserts the provided custom pairs.
  • Multiple specs are applied in array order.

This API is useful for browser apps, user-defined terminology, database-loaded terms, generated dictionaries, localStorage or IndexedDB terms, testing, and embedded WASM environments. Customization happens at construction time, not during conversion.


Supported Configs

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm opencc-fmmseg-wasm

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229