Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Conjugate verbs correctly based on a pronoun
npm install --save conjugate
Pass a pronoun and verb to conjugate
, and it will return the verb conjugated for that pronoun.
var conjugate = require('conjugate');
console.log(conjugate('he', 'run')); // 'runs'
This is, for now, a one way conjugator. You must pass in the infinitive form of a verb (with or without "to") to get a correct conjugation. E.g.
conjugate('I', 'run');
or
conjugate('I', 'to run');
but not
conjugate('I', 'runs');
The latter would return "runs." This is probably not what you want. It would be nice for this library to, eventually, parse a verb in any form and conjugate it to the perspective desired (or even back to the infinitive). The problem is that this is much harder to do (if a verb ends in "s," is it an already conjugated verb like "runs" or simply a verb that ends in "s" like "pass"), and frankly, the module I wrote this for does not require this functionality.
I tried to find all the unusual verb forms I could, so many irregular verbs should still conjugate correctly, e.g.:
conjugate('he', 'do') // he does
conjugate('she', 'spy') // he spies
conjugate('it', 'buzz') // he buzzes
// and even
conjugate('I', 'be') // I am
but there are three caveats. First, it's not impossible that I missed cases, so please open pull requests if you find verbs that don't conjugate correctly. Second, some words don't conjugate (see defective verbs), but this module does not attempt to detect these or do anything special with them. For instance, conjugate('he', 'beware')
will return 'bewares,' which is not an actual verb. The problem is, what do you return if the word does not exist? Nothing? There's no good answer. Third, this module does not verify words against a dictionary or anything like that, so if you pass nonsense, it will be conjugated according the same parsing rules. E.g. conjugate('she', 'blergifo')
will return 'blergifoes.' I guess this could be considered a feature if you are wanting to make up your own words. ¯\(ツ)/¯
You can also make conjugate
return the pronoun and conjugated verb together by passing true
(for "append") as the third parameter.
conjugate('he', 'be', true) // he is
Serve either dist/conjugate.js or dist/conjugate.min.js however you serve javascript in your application, and then use window.conjugate
(or just conjugate
) to access the library on the client-side.
Please see the contribution guidelines.
FAQs
Conjugate verbs correctly based on a pronoun
The npm package conjugate receives a total of 4 weekly downloads. As such, conjugate popularity was classified as not popular.
We found that conjugate 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.