Skip to content

Releases: WaniKani/WanaKana

3.1.0

02 Mar 02:40
Compare
Choose a tag to compare

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

16 Dec 07:06
Compare
Choose a tag to compare

Uppercase input with toHiragana() including a double consonant was incorrectly producing a katakana ッ instead of っ

2.3.3

12 Dec 00:57
Compare
Choose a tag to compare

Adds easy reference to minified browser build via https://unpkg.com/wanakana/

2.3.1

12 Oct 04:18
Compare
Choose a tag to compare

Changed

  • Set cursor in IME mode to the current position after conversion (rather than the end of all input)

2.3.0

12 Oct 04:21
Compare
Choose a tag to compare

Changed

  • Increase character coverage for isJapanese to include numbers and hankaku katakana

2.2.4

12 Oct 04:23
Compare
Choose a tag to compare

Fixed

  • Pass through long vowel conversion using toHiragana with odd/mixed input

2.2.3

12 Oct 04:23
Compare
Choose a tag to compare

Fixed

  • Mobile input not converting automatically during autosuggest (regression due to 2.2.1)

2.2.2

12 Oct 04:23
Compare
Choose a tag to compare

Fixed

  • Keep track of event listeners by generated ids

2.2.0

12 Oct 04:21
Compare
Choose a tag to compare
  • 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'

2.0.3

12 Oct 04:20
Compare
Choose a tag to compare

Fixed

  • Missing description field in package.json