Declension of Ukrainian military ranks and appointments

An extension to the shevchenko.js library.

npm install shevchenko shevchenko-ext-military
beta GitHub (opens in a new tab)

Live demo

Enter the military appointment, rank, family name, given name and patronymic in the nominative case.

Grammatical gender
Gender is detected from the given name or patronymic.

Declension results

  • Nominativeпомічник гранатометника солдат Шевченко Тарас Григорович
  • Genitiveпомічника гранатометника солдата Шевченка Тараса Григоровича
  • Dativeпомічнику гранатометника солдату Шевченку Тарасу Григоровичу
  • Accusativeпомічника гранатометника солдата Шевченка Тараса Григоровича
  • Ablativeпомічником гранатометника солдатом Шевченком Тарасом Григоровичем
  • Locativeпомічникові гранатометника солдатові Шевченкові Тарасові Григоровичу
  • Vocativeпомічнику гранатометника солдате Шевченку Тарасе Григоровичу

Documentation

Get started in three steps.

  1. Installation

    Install the library and the extension from npm.

    npm install shevchenko shevchenko-ext-military
  2. Import

    Import the library and register the extension.

    const shevchenko = require('shevchenko');
    const { militaryExtension } = require('shevchenko-ext-military');
    
    shevchenko.registerExtension(militaryExtension);

    Import the library and register the extension.

    import * as shevchenko from 'shevchenko';
    import { militaryExtension } from 'shevchenko-ext-military';
    
    shevchenko.registerExtension(militaryExtension);
  3. Usage example

    Declines the appointment, rank and full name in the genitive case.

    const shevchenko = require('shevchenko');
    const { militaryExtension } = require('shevchenko-ext-military');
    
    shevchenko.registerExtension(militaryExtension);
    
    async function main() {
      const input = {
        gender: 'masculine',
        militaryAppointment: 'помічник гранатометника',
        militaryRank: 'солдат',
        familyName: 'Шевченко',
        givenName: 'Тарас',
        patronymicName: 'Григорович',
      };
    
      const output = await shevchenko.inGenitive(input);
    
      console.log(output); // { militaryAppointment: "помічника гранатометника", militaryRank: "солдата", familyName: "Шевченка", givenName: "Тараса", patronymicName: "Григоровича" }
    }
    
    main().catch((error) => console.error(error));