This library gives you access to French words data by scraping them from the dictionary Le Robert, one of the most famous French dictionaries, using Puppeteer.
npm install le-robertyarn add le-robertpnpm add le-robertEach function can be imported from the library as below 👇
// Require syntax
const { getDefinitionGroups, getPronunciation, ... } = require('le-robert');
// Import syntax
import { getDefinitionGroups, getPronunciation, ... } from 'le-robert';await getDefinitionGroups('programmation'); // => https://sourceb.in/4rSVNnS0rQawait getPronunciation('programmation'); // => https://sourceb.in/5rHNNIWFZDawait getUsageExamples('programmation'); // => https://sourceb.in/IekuY8L8Jpawait getConjugationGroups('programmer'); // => https://sourceb.in/HZccVYUGzJSince some of the returned objects from the previous functions may be huge, here is the types to help you understand better how to use the data.
Also, you can use the intellisense of your editor to explore the data.
interface DefinitionGroup {
category: string;
definitions: Definition[];
}interface Definition {
value: string;
examples: string[];
context?: string;
}interface Pronunciation {
audioURL: string;
}interface UsageExample {
value: string;
source: UsageExampleSource;
}interface UsageExampleSource {
value: string;
url: string;
}interface ConjugationGroup {
name: string;
subgroups: ConjugationSubgroup[];
}interface ConjugationSubgroup {
name: string;
tenses: ConjugationTense[];
}interface ConjugationTense {
name: string;
conjugations: string[];
}