Skip to content

3.1.0

Compare
Choose a tag to compare
@DJTB DJTB released this 02 Mar 02:40
· 334 commits to master since this release

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,,