Socket
Socket
Sign inDemoInstall

@autheur/operators

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @autheur/operators

Word and sentence operators for french sentence creation


Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@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'); // arbres
pluralize('gateau'); // gateaux
pluralize('vitrail'); // vitraux

feminize

Feminize regular adjectives

import { feminize } from '@autheur/operators';

feminize('inventif'); // inventive
feminize('intelligent'); // intelligente
feminize('jeune'); // jeune

isFirstCharAVowel

Return true if the input string start with a vowel

import { isFirstCharAVowel } from '@autheur/operators';

isFirstCharAVowel('arbre'); // true
isFirstCharAVowel('jeune'); // false
isFirstCharAVowel('hotel'); // false

isFirstCharAVowelOrAnH

Return true if the input string start with a vowel or a h

import { isFirstCharAVowelOrAnH } from '@autheur/operators';

isFirstCharAVowelOrAnH('arbre'); // true
isFirstCharAVowelOrAnH('jeune'); // false
isFirstCharAVowelOrAnH('hotel'); // true

capitalize

Return the input string with the first letter uppercased

import { capitalize } from '@autheur/operators';

capitalize('arbre'); // Arbre
capitalize('jeune'); // Jeune
capitalize('école'); // École

getRandomItemInArray

Return a random item from an array

import { getRandomItemInArray } from '@autheur/operators';

getRandomItemInArray(['foo', 'bar', 'baz']); // baz
getRandomItemInArray(['foo', 'bar', 'baz']); // foo

Other packages

This is a from a monorepo with the following packages:

PackageDescription
@autheur/datasetDataset of sorted french words broke down by categories
@autheur/generatorThe generator itself with they logic
@autheur/operatorsUtilities to manipulate words (ex: pluralize, feminize, ...)

Credits

Coded with ❤️ by Corentin Thomasset.

License

This project is under the MIT license.

Keywords

FAQs

Last updated on 05 May 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc