Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
en-inflectors
Advanced tools
For noun (plural to singular and singular to plural) and verb (gerund, present & past) transformations.
For noun (plural to singular and singular to plural) and verb (gerund, present & past) transformations.
npm install en-inflectors --save
const inflectors = require("en-inflectors");
inflectors.isSingular("nuclei");
// > false
inflectors.isPlural("plateaux");
// > true
inflectors.isCountable("steam");
// > false
How it works:
Note: All uncountable words like sheep, deer, tuna and steam will return
true
for both plural and singular detection.
const inflectors = require("en-inflectors");
inflectors.pluralize("mouse");
// > mice
inflectors.pluralize("goose");
// > geese
inflectors.pluralize("river");
// > rivers
const inflectors = require("en-inflectors");
inflectors.pluralize("location");
// > locations
inflectors.pluralize("hoax");
// > hoaxes
inflectors.pluralize("wharf");
// > wharves
How it works:
const inflectors = require("en-inflectors");
inflectors.conjugate("playing","VBP");
// > play
inflectors.conjugate("playing","VBZ");
// plays
inflectors.conjugate("transcribes","VBP");
// transcribed
inflectors.conjugate("goes","VBN");
// gone
inflectors.conjugate("went","VBG");
// going
where:
Or you can use the aliases:
const inflectors = require("en-inflectors");
inflectors.present("playing");
// > play
inflectors.presentS("playing");
// plays
inflectors.past("transcribes");
// transcribed
inflectors.pastParticiple("goes");
// gone
inflectors.gerund("went");
// going
Note: for better, more accurate results, pass the verb in it's infinitive form (
go
instead ofgoes
). although this library has been written to be agnostic about the form of the inputs, but the test results has proven that it's quite hard to achieve that with full accuracy.
const inflectors = require("en-inflectors");
inflectors.uncountableWords;
// list all the uncountable words as an array
inflectors.verbsTable;
// verb table with all the tenses can be used for writing your own functionalities
inflectors.infinitives;
// an array of the most common English verbs
License: The MIT License (MIT) - Copyright (c) 2017 Alex Corvi
FAQs
English Inflectors Library For noun (plural to singular and singular to plural), verb (gerund, present & past) and adjective (comparative, superlative) transformations
The npm package en-inflectors receives a total of 2,344 weekly downloads. As such, en-inflectors popularity was classified as popular.
We found that en-inflectors 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.