@autheur/operators
Utility function to manipulate french words
Installation
npm i @autheur/operators
API
pluralize
Pluralize regular words
import { pluralize } from '@autheur/operators';
pluralize('arbre');
pluralize('gateau');
pluralize('vitrail');
feminize
Feminize regular adjectives
import { feminize } from '@autheur/operators';
feminize('inventif');
feminize('intelligent');
feminize('jeune');
isFirstCharAVowel
Return true if the input string start with a vowel
import { isFirstCharAVowel } from '@autheur/operators';
isFirstCharAVowel('arbre');
isFirstCharAVowel('jeune');
isFirstCharAVowel('hotel');
isFirstCharAVowelOrAnH
Return true if the input string start with a vowel or a h
import { isFirstCharAVowelOrAnH } from '@autheur/operators';
isFirstCharAVowelOrAnH('arbre');
isFirstCharAVowelOrAnH('jeune');
isFirstCharAVowelOrAnH('hotel');
capitalize
Return the input string with the first letter uppercased
import { capitalize } from '@autheur/operators';
capitalize('arbre');
capitalize('jeune');
capitalize('école');
getRandomItemInArray
Return a random item from an array
import { getRandomItemInArray } from '@autheur/operators';
getRandomItemInArray(['foo', 'bar', 'baz']);
getRandomItemInArray(['foo', 'bar', 'baz']);
Other packages
This is a from a monorepo with the following packages:
Credits
Coded with ❤️ by Corentin Thomasset.
License
This project is under the MIT license.