czech-inflection
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Czech inflection JavaScript library

Build Status

czech-inflection is JavaScript library for inflecting Czech words. It is a port of PHP inflection library.

Instalation

npm i czech-inflection

Live demo

Usage

import inflect from 'czech-inflection'
 
console.log(inflect({ word: 'Tomáš', grammarCase: 3, animate: true }))
// Tomášovi
 
console.log(inflect({ word: 'Tomáš', grammarCase: 3, animate: true, plural: true }))
// Tomášům
 
console.log(inflect({ word: 'Honza', grammarCase: 3, animate: true, gender: 'm' }))
// It's necessary to specify gender for some names/nicknames to inflect them correctly
// Honzovi
 
console.log(inflect({ word: 'hrad', grammarCase: 6 }))
// hradě
 
console.log(inflect({ word: 'hrad', grammarCase: 6, plural: true }))
// hradech

Package Sidebar

Install

npm i czech-inflection

Weekly Downloads

459

Version

1.1.1

License

LGPL v2.1

Unpacked Size

2.15 MB

Total Files

26

Last publish

Collaborators

  • erik-cupal