Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

regexp-cjk-plugin-extra

bluelovers378ISC1.0.45TypeScript support: included

a regexp-cjk plugin demo for regexp-cjk ( 自動配對 五十音的清/濁音 , 半形/全形 , deburr )

char, character, characters, chinese, cjk, cn, cn2tw, codepage, conv, conversion, convert, deburr, fullwidth, halfwidth, han, han zi, hanja, japanese, jp2zhs, jp2zht, kanji, node-novel, number, plugin, regex, regexp, regexp-cjk, regexp-cjk-plugin, regular, regular expression, simplified, str, str-util, string, traditional, transform, trim, tw, tw2cn, unicode, util, words, zh, zh2jp, zhs, zht

readme

README

a regexp-cjk plugin demo for regexp-cjk ( 自動配對 五十音的清/濁音  ,  半形/全形 ,  deburr )

各參數效果請看這裡 demo.test.ts

install

npm install regexp-cjk-plugin-extra cjk-conv
yarn add regexp-cjk-plugin-extra cjk-conv
yarn-tool add regexp-cjk-plugin-extra cjk-conv

usage

index.d.ts

export interface IZhRegExpPluginOptionsCore {
    /**
     * 平假名片假名的 清濁音
     */
    autoVoice?: boolean;
    /**
     * 自動配對 半形 全形
     */
    autoFullHaif?: boolean;
    /**
     * 配對本地化字元
     */
    autoLocale?: boolean;
    /**
     * deburr('déjà vu') // => 'deja vu'
     *
     * Deburrs string by converting Latin-1 Supplement and Latin Extended-A letters to basic Latin letters and removing combining diacritical marks.
     */
    autoDeburr?: boolean;
    /**
     * if return null | undefined then will skip current node
     */
    callback?(raw: string): string | string[];
}
export declare type IZhRegExpPluginOptions = IZhRegExpPluginOptionsCore & {
    /**
     * 緩存
     */
    cacheMap?: boolean | ICacheMap;
};
import zhRegExp, { IOptions } from 'regexp-cjk';
import createZhRegExpPlugin, { IZhRegExpPluginOptions } from 'regexp-cjk-plugin-extra';

let options: IZhRegExpPluginOptions = {
    autoDeburr: true,
}

let re = new zhRegExp(/déjà vu/ui, {
    on: [
        createZhRegExpPlugin(options)
    ],
});

let word = `deja vu`;

console.log(re, word, re.test(word))

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

1.0.45 (2024-09-03)

📌 Dependencies

1.0.44 (2024-08-24)

🛠 Build System

1.0.43 (2024-01-29)

📌 Dependencies

🔖 Miscellaneous

1.0.42 (2022-10-16)

📦 Code Refactoring

📚 Documentation

🚨 Tests

📌 Dependencies

1.0.41 (2022-02-04)

🔖 Miscellaneous

1.0.40 (2022-02-04)

🛠 Build System

♻️ Chores

🔖 Miscellaneous

1.0.39 (2022-02-04)

🛠 Build System

♻️ Chores

1.0.38 (2021-12-08)

♻️ Chores

🔖 Miscellaneous

1.0.37 (2021-12-08)

♻️ Chores

1.0.36 (2021-08-13)

♻️ Chores

1.0.35 (2021-07-26)

🐛 Bug Fixes

  • 修改錯字 { autoFullHaif => autoFullHalf } 並且保留錯字相容性 (44197e0)

📦 Code Refactoring

♻️ Chores

1.0.34 (2021-07-09)

🔖 Miscellaneous

1.0.33 (2021-07-09)

🛠 Build System

🔖 Miscellaneous

1.0.32 (2021-07-09)

🛠 Build System

1.0.31 (2021-06-21)

💎 Styles

♻️ Chores

🔖 Miscellaneous

1.0.30 (2021-06-21)

💎 Styles

♻️ Chores

🔖 Miscellaneous

1.0.29 (2021-06-21)

💎 Styles

♻️ Chores

1.0.28 (2020-08-17)

♻️ Chores

1.0.27 (2020-07-27)

♻️ Chores

1.0.26 (2020-07-19)

🔖 Miscellaneous

1.0.25 (2020-07-19)

🔖 Miscellaneous

1.0.24 (2020-07-19)

♻️ Chores

1.0.23 (2020-07-02)

♻️ Chores

1.0.22 (2020-06-26)

♻️ Chores

1.0.21 (2020-06-20)

♻️ Chores

1.0.20 (2020-06-17)

♻️ Chores

1.0.19 (2020-06-11)

Note: Version bump only for package regexp-cjk-plugin-extra

1.0.18 (2020-06-09)

Note: Version bump only for package regexp-cjk-plugin-extra

1.0.17 (2020-06-08)

Note: Version bump only for package regexp-cjk-plugin-extra

1.0.16 (2020-06-07)

Note: Version bump only for package regexp-cjk-plugin-extra

1.0.15 (2020-06-06)

Note: Version bump only for package regexp-cjk-plugin-extra

1.0.14 (2020-06-06)

Features

  • use @lazy-cjk/zh-convert (5a0effc)

1.0.13 (2020-06-06)

Features

  • use @lazy-cjk/jp-table-voice (175a5fc)

1.0.12 (2020-06-05)

Note: Version bump only for package regexp-cjk-plugin-extra

1.0.11 (2020-06-01)

Note: Version bump only for package regexp-cjk-plugin-extra

1.0.10 (2020-06-01)

Note: Version bump only for package regexp-cjk-plugin-extra

1.0.9 (2020-05-22)

Bug Fixes

  • try avoid lerna auto publish new version (152fab9)

1.0.8 (2020-05-22)

Note: Version bump only for package regexp-cjk-plugin-extra

1.0.7 (2020-05-22)

Note: Version bump only for package regexp-cjk-plugin-extra

1.0.6 (2020-05-22)

Note: Version bump only for package regexp-cjk-plugin-extra