npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

french-verbs

v5.3.0

Published

French verbs conjugation

Downloads

937

Readme

french-verbs

Features

Agreement of French verbs, based on a list of verbs.

Use french-verbs-lefff as a compatible list of verbs.

Contractions are managed: elle s'est marrée, il se gausse, elle s'hydrate, ils se haïssent.

Contains a short static list of verbs that always take "être" auxiliary at past tenses (Passé Composé and Plus Que Parfait).

Installation

npm install french-verbs

Usage

const FrenchVerbs = require('french-verbs');
const Lefff = require('french-verbs-lefff/dist/conjugations.json');

// elle est allée
console.log(
  'elle ' + FrenchVerbs.getConjugation(Lefff, 'aller', 'PASSE_COMPOSE', 2, { aux: 'ETRE', agreeGender: 'F' }),
);

// je finis
console.log('je ' + FrenchVerbs.getConjugation(Lefff, 'finir', 'PRESENT', 0));

For conjugations, one single function getConjugation, with multiple parameters:

  • verbsList: list of verbs; use french-verbs-lefff for instance (or anything with the same format)
  • verb: string, mandatory. Infinitive form of the verb.
  • tense: string, mandatory. Choose beetwen PRESENT, FUTUR, IMPARFAIT, PASSE_SIMPLE, PASSE_COMPOSE, PLUS_QUE_PARFAIT, PASSE_ANTERIEUR, FUTUR_ANTERIEUR, CONDITIONNEL_PRESENT, CONDITIONNEL_PASSE_1, CONDITIONNEL_PASSE_2, IMPERATIF_PRESENT, IMPERATIF_PASSE, SUBJONCTIF_PRESENT, SUBJONCTIF_IMPARFAIT, SUBJONCTIF_PASSE, SUBJONCTIF_PLUS_QUE_PARFAIT, INFINITIF, INFINITIF_PASSE, PARTICIPE_PRESENT, PARTICIPE_PASSE, PARTICIPE_PASSE_COMPOSE.
  • person: number, mandatory. Indicates the person: 0=je, 1=tu, 2=il/elle, 3=nous, 4=vous, 5=ils/elles.
  • when tense is composed or passive voice, a structure with the following properties:
    • aux: auxiliary, AVOIR or ETRE. If the auxiliary is not set, these rules will apply:
      • pronominal verbs always use ETRE
      • there is a short list of verbs that always take ETRE
      • transitive verbs rather take AVOIR
    • agreeGender: M or F if you want to agree the past participle
    • agreeNumber: S or P if you want to agree the past participle
  • pronominal: boolean. Put true to trigger pronominal form. You can alternatively indicate the pronominal form in the verb directly: s'écrier, se rendre, etc.
  • negativeAdverb: you can add a negative adverb (pas, plus, jamais, etc.); this is useful for PASSE_COMPOSE and PLUS_QUE_PARFAIT, as the negative adverb will be put between the auxiliary and the past participle (e.g. a pas donné).
  • modifierAdverb: you can add a modifier adverb (vraiment, probablement, beaucoup, etc.); this is useful for inserting an adverb before the direct nounPhrase object. The modifier adverb will be put between the auxiliary and the past participle (e.g. a beaucoup donné). In case of a negative adverb, it will be put just after the negative adverb. (e.g. a pas vraiment donné).

alwaysAuxEtre returns true if the verb (passed as an infitive) always conjugates with "être" auxiliary.

isTransitive returns true if the verb (passed as an infitive) is transitive.

getAux tries to guess which auxiliary should be used and returns AVOIR or ETRE. It uses some rules and lists (e.g. some verbs always take ETRE, transitive verbs always use AVOIR).

The agreement is not done automatically even when aux is ETRE, as the subject gender is not known.