Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@autheur/generator
Advanced tools
Random french sentence generator
npm i @autheur/generator
The core function is generate
: it permits to generate a sentence given a pattern
import { generate, determinant, noun, adverb, adjective } from '@autheur/generator';
const sentence = generate([determinant(), noun(), adverb(), adjective()]);
console.log(sentence);
// leurs taille-crayons à demi alourdis
A generator permits to define a portion of the sentence
determinant
Generate a determinant (un, une, le, les, cette, ...)
import { generate, determinant } from '@autheur/generator';
generate([determinant()]); // mon
You can specify which types of determinant you want between undefined, defined, possessive, demonstrative
import { generate, determinant } from '@autheur/generator';
generate([determinant({ types: ['possessive'] })]); // notre
noun
Generate a noun.
import { generate, noun } from '@autheur/generator';
generate([noun()]); // allumette
You can force the plurality with a parameter
import { generate, determinant } from '@autheur/generator';
generate([noun({ isPlural: true })]); // animaux
generate([noun({ isPlural: false })]); // ampoule
comma
Generate a comma.
import { generate, comma } from '@autheur/generator';
generate([comma()]); // ,
adverb
Generate an adverb.
import { generate, adverb } from '@autheur/generator';
generate([adverb()]); // suffisamment
word
Generate an word that you specify.
import { generate, word } from '@autheur/generator';
generate([word('foobar')]); // foobar
You can specify if your word is preceded or followed by a space if their is another word
import { generate, word } from '@autheur/generator';
generate([word("l'", { noSpaceAfter: true }), word('arbre')]); // l'arbre
generate([word("l'"), word('arbre', { noSpaceBefore: true })]); // l'arbre
This is a from a monorepo with the following packages:
Package | Description |
---|---|
@autheur/dataset | Dataset of sorted french words broke down by categories |
@autheur/generator | The generator itself with they logic |
@autheur/operators | Utilities to manipulate words (ex: pluralize, feminize, ...) |
Coded with ❤️ by Corentin Thomasset.
This project is under the MIT license.
FAQs
Random french sentence generator
The npm package @autheur/generator receives a total of 1 weekly downloads. As such, @autheur/generator popularity was classified as not popular.
We found that @autheur/generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.