Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kockarevicivan/vocative

NPM package repository for name-case switching JS algorithm.
https://github.com/kockarevicivan/vocative

js npm vocative vocative-case vokativ

Last synced: about 1 month ago
JSON representation

NPM package repository for name-case switching JS algorithm.

Awesome Lists containing this project

README

        

# vocative
NPM package repository for name-case switching JS algorithm.

## Usage

First, import necessary case switching methods:
```
import { getGenitive, getVocative } from 'vocative'
```

Then, when needed, call the necessary method and pass the name in nominative:

```
let vocativeOfTheName = getVocative("Ivan"); // Will return "Ivane"
```

There are six available methods, all with the same interface:
```
getGenitive("Ivan"); // Will return "Ivana"
getDative("Ivan"); // Will return "Ivanu"
getAccusative("Ivan"); // Will return "Ivana"
getVocative("Ivan"); // Will return "Ivane"
getInstrumental("Ivan"); // Will return "Ivanom"
getLocative("Ivan"); // Will return "Ivanu"
```