@tknf/budoux-edge
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@tknf/budoux-edge

BudouX uses jsdom for DOM manipulation and will not work in Edge environments such as Cloudflare Workers.
This package provides budoux/edge tuned to work in Edge environments by omitting methods that manipulate DOM.

Install

$ npm install budoux @tknf/budoux

Usage on Edge

Japanese:

import { loadDefaultJapaneseParser } from "@tknf/budoux-edge";
const parser = loadDefaultJapaneseParser();
console.log(parser.parse("今日は天気です。"));
// ['今日は', '天気です。']

Simplified Chinese:

import { loadDefaultSimplifiedChineseParser } from "@tknf/budoux-edge";
const parser = loadDefaultSimplifiedChineseParser();
console.log(parser.parse("是今天的天气。"));
// ['是', '今天', '的', '天气。']

Traditional Chinese:

import { loadDefaultTraditionalChineseParser } from "@tknf/budoux-edge";
const parser = loadDefaultTraditionalChineseParser();
console.log(parser.parse("是今天的天氣。"));
// ['是', '今天', '的', '天氣。']

Copyright

Copyright (c) 2023 TKNF LLC. See LICENSE.md ofr further details.

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @tknf/budoux-edge

    Weekly Downloads

    0

    Version

    0.1.0

    License

    none

    Unpacked Size

    13.5 kB

    Total Files

    12

    Last publish

    Collaborators

    • mast1ff