@types/hepburn
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

Installation

npm install --save @types/hepburn

Summary

This package contains type definitions for hepburn (https://github.com/lovell/hepburn#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hepburn.

index.d.ts

/**
 * Converts a string containing Kana, either Hiragana or Katakana, to Romaji.
 */
export function fromKana(str: string): string;

/**
 * Converts a string containing Romaji to Hiragana.
 */
export function toHiragana(str: string): string;

/**
 * Converts a string containing Romaji to Katakana.
 */
export function toKatakana(str: string): string;

/**
 * Cleans up a romaji string, changing old romaji forms into the more-modern Hepburn form (for further processing).
 * Generally matches the style used by Wapro romaji.
 * A larger guide to modern romaji conventions was used in building this method.
 */
export function cleanRomaji(str: string): string;

/**
 * Splits a `str` containing Katakana or Hiragana into a syllables array.
 */
export function splitKana(str: string): string[];

/**
 * Splits a `str` containing Romaji into a syllables array.
 */
export function splitRomaji(str: string): string[];

/**
 * Returns true if `str` contains Hiragana.
 */
export function containsHiragana(str: string): boolean;

/**
 * Returns true if `str` contains Katakana.
 */
export function containsKatakana(str: string): boolean;

/**
 * Returns true if `str` contains any Kana.
 */
export function containsKana(str: string): boolean;

/**
 * Returns true if `str` contains any Kanji.
 */
export function containsKanji(str: string): boolean;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Piotr Błażejewicz.

Versions

Current Tags

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.2
    52
  • 1.2.1
    0
  • 1.2.0
    120

Package Sidebar

Install

npm i @types/hepburn

Weekly Downloads

172

Version

1.2.2

License

MIT

Unpacked Size

5.25 kB

Total Files

5

Last publish

Collaborators

  • types