How to use the wanakana.toKana function in wanakana

To help you get started, we’ve selected a few wanakana examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kaniwani / kw-frontend / app / containers / QuizAnswerContainer / index.js View on Github external
handleInput = (event) => {
    const { updateAnswer } = this.props;
    // FIXME: this probably won't handle composition updates since we haven't used an eventListener
    // should probaly use wk.bind/unbind in cdm/cwm
    const value = toKana(event.target.value.toLowerCase(), { IMEMode: true });
    updateAnswer({ value });
  }
github Kaniwani / kw-frontend / app / features / quiz / QuizSession / QuizAnswer / DebouncedInput.js View on Github external
this.handleChange = (event) => {
      event.persist();
      // FIXME: this probably won't handle composition updates since we haven't used an eventListener
      // need to double-check with Microsoft IME
      // should potentially use wk.bind/unbind in cdm/cwm
      const newValue = toKana(event.target.value.toLowerCase(), { IMEMode: true });
      this.setState({ value: newValue });
      this.debouncedOnChange(newValue);
    };
  }
github Kaniwani / kw-frontend / app / containers / AddSynonym / index.js View on Github external
const convertInput = (value) => toKana(value, { IMEMode: true });