
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
shevchenko
Advanced tools
JavaScript library for declension of Ukrainian anthroponyms.
To install the library using npm package manager, use the following command:
npm install --save shevchenko
The library comes in three formats: CommonJS module, ECMAScript module, and a minified UMD bundle. You can select the format that best suits your needs.
To import the library as a CommonJS module, use the following code:
const shevchenko = require('shevchenko');
To import the library as an ECMAScript module, use the following code:
import * as shevchenko from 'shevchenko';
To import the library as a UMD bundle, include the following script tag in your HTML code:
<script type="text/javascript" src="https://unpkg.com/shevchenko"></script>
This example shows how to use the library to decline Ukrainian anthroponyms.
const shevchenko = require('shevchenko');
async function main() {
const input = {
gender: 'masculine',
givenName: 'Тарас',
patronymicName: 'Григорович',
familyName: 'Шевченко'
};
const output = await shevchenko.inVocative(input);
console.log(output); // { givenName: "Тарасе", patronymicName: "Григоровичу", familyName: "Шевченку" }
}
main().catch((error) => console.error(error));
This example shows how to use the library to automatically detect the grammatical gender of a Ukrainian anthroponym.
const shevchenko = require('shevchenko');
async function main() {
const anthroponym = {
givenName: 'Лариса',
patronymicName: 'Петрівна',
familyName: 'Косач-Квітка'
};
const gender = await shevchenko.detectGender(anthroponym); // "feminine"
if (gender == null) {
throw new Error('Failed to detect grammatical gender.');
}
const input = { ...anthroponym, gender };
const output = await shevchenko.inVocative(input);
console.log(output); // { givenName: "Ларисо", patronymicName: "Петрівно", familyName: "Косач-Квітко" }
}
main().catch((error) => console.error(error));
The library can be integrated into your project via HTTP API. Please refer to shevchenko Docker image for the additional instructions.
FAQs
JavaScript library for declension of Ukrainian anthroponyms
We found that shevchenko demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.