Releases: WaniKani/WanaKana
Releases · WaniKani/WanaKana
3.1.0
Changed
- bind() now sets necessary attributes automatically (autocomplete, spellcheck etc)
- toKana() no longer converts zenkaku latin toKana now: ('imi imi' => 'imi いみ')
- toRomaji() extends vowels for katakana chōonpu, IE: ゲーム => geemu, toHiragana() converts to hyphen => ge-mu
- toKana() without IME mode converts lone 'n' => 'ん', 'nn' => 'んん' if no other chars present
- isJapanese() now returns false for latin numbers (201) (still true for zenkaku 201) - to retain prior behaviour use
isJapanese(str, /[0-9]/)
- tokenize() splits into finer categories, view API documentation and tests for full details
- rewrite of conversion methods to allow custom mapping adapters
Added
- isJapanese and isRomaji now accept a second param, a regexp that will also pass the check
- global option romanization for toRomaji() (currently only 'hepburn' however)
- global option customKanaMapping for toKana()
- global option customRomajiMapping for toRomaji()
Fixed
- inserting text between already existing characters in a bind() IME input field now properly sets cursor to correct position after conversion
- toRomaji() little ヶヵ used in words like 一ヶ月 are no longer converted since they are used as symbols (like the kanji) and do not actually denote kana. Previous behaviour: 一ヶ月 => 一 ke 月
- toRomaji() no longer incorrectly duplicates non-glottal stops following っ. Previous behaviour: あっ、 -> a,,
2.3.4
2.3.3
Adds easy reference to minified browser build via https://unpkg.com/wanakana/
2.3.1
2.3.0
2.2.4
2.2.3
2.2.2
2.2.0
- Options object setting
IMEMode
can now accept'toHiragana'
or'toKatakana'
to enforce specific conversion on input - Set
autocapitalize="none"
on bound input fields - Handle multiple event listeners with separate options
- Increased test coverage
Fixed
- Hold onto merged options for dom utils via closure instead of global
- Keep track of event listeners for removal on unbind
Changed
bind
,unbind
are now named exports in 'wanakana/domUtils'