Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

french-contractions

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

french-contractions

French contractions: le hérisson, l'homme, ce yaourt, cet arbre

  • 4.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
140
decreased by-32.04%
Maintainers
1
Weekly downloads
 
Created
Source

french-contractions

Checks if a French word should be contracted:

  • le hérisson vs l'homme
  • le yaourt vs l'ylang-ylang
  • l'iode vs le iota

Same rules can also be used to manage cet/cet:

  • ce hérisson vs cet homme
  • cet arbre vs ce yaourt

And for adjectives:

  • vieux hérisson vs vieil homme
  • vieil arbre vs vieux yaourt

Also uses and provides a list of words with "h aspiré", which you can use with or without the helpers.

Installation

npm install french-contractions

Usage

One function contracts that take 2 arguments:

  • the word (noun or adjective)
  • a map of custom exceptions (optional): the word is the key, the value must be an object having a contracts property with a boolean value
const lib = require('french-contractions');

// hérisson contracts? false
// homme contracts? true
// yaourt contracts? false
// iode contracts? true
['hérisson', 'homme', 'yaourt', 'iode'].forEach((word) => {
  console.log(`${word} contracts? ${lib.contracts(word)}`);
});

dependencies and licences

List of h words based on https://en.wikipedia.org/wiki/Aspirated_h. The derived list in hmuet.ts remains under CC BY-SA 3.0.

Keywords

FAQs

Package last updated on 12 Feb 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc