Releases: YusukeHirao/jaco-js
Releases · YusukeHirao/jaco-js
v4.0.0
Full Changelog: v3.0.0...v4.0.0
v3.0.0
Full Changelog: v2.0.0...v3.0.0
v2.0.0 Released
Use modular functions
You can import only needed functions.
import toKatakana from 'jaco/fn/toKatakana';
import toHiragana from 'jaco/fn/toHiragana';
toKatakana('あいうえお'); // => 'アイウエオ'
toHiragana('アイウエオ'); // => 'あいうえお'
Use Jaco Class and chainable methods
You can import constructor as usual.
import Jaco from 'jaco';
new Jaco(' あいうえお ').trim().toKatakana().toString(); // => 'アイウエオ'
Use in browser
dist/jaco.min.js
<script src="/path/to/jaco.min.js"></script>
<script>
// Use functions
jaco.toKatakana('あいうえお'); // => 'アイウエオ'
// Use chainable methos
jaco(' あいうえお ').trim().toKatakana().toString(); // => 'アイウエオ'
</script>
Supported types from TypeScript
import Jaco from `jaco`; // auto including `jaco.d.ts`
const jstr: Jaco = new Jaco('あいうえお');