yasashii

A package for Japanese conjugations!

Usage no npm install needed!

<script type="module">
  import yasashii from 'https://cdn.skypack.dev/yasashii';
</script>

README

Yasashii

A package for Japanese conjugations!

This package uses unofficial-jisho-api under the hood to determine what type of conjugation to perform.

Installation

In a Node.js project:

npm install yasashii

Usage

const { conjugate } = require('yasashii');

const getConjugation = async (verb) => {
    const response = await conjugate(verb);
    console.log(response);
};

getConjugation('見る');

This outputs the following:

{
  found: true,
  conjugations: {
    polite: { affirmative: [Object], negative: [Object] },
    casual: { affirmative: [Object], negative: [Object] },
    te: { affirmative: '見て', negative: '見なくて' },
    potential: { affirmative: '見られる', negative: '見られない' },
    passive: { affirmative: '見られる', negative: '見られない' },
    causative: { affirmative: '見させる', negative: '見させない' },
    causativePassive: { affirmative: '見させられる', negative: '見させられない' },
    imperative: { affirmative: '見ろ', negative: '見るな' }
  }
}

Adjective conjugation coming soon !

Mady by Zyleaf with 💖