Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Set of helper string manipulation functions for handling Serbian language orthography rules correctly
pravopis
is a Node.js module which implements a few string manipulation functions which are useful
when working with text in Serbian language as they handle Serbian language orthography rules correctly.
Goal of this project is to implement functions covering all Serbian language orthography rules. For now just the most basic ones are implemented.
You can get latest version of pravopis
by cloning this repository or by installing the module via Yarn:
yarn add pravopis
Or, if you are still stuck with NPM, via:
npm install --save pravopis
const pravopis = require('pravopis');
console.log(pravopis.toCyrillic('Pozdrav!')); // => Поздрав!
Use a module bundler like Webpack or Browserify which can bundle Node modules easily.
pravopis.toCyrillic(s)
Transliterates string s
from Serbian Latin to Serbian Cyrillic alphabet honoring orthography rules for transliterating nj
/lj
/dž
to њ
/љ
/џ
.
Examples:
pravopis.toCyrillic('pravopis'); // правопис
pravopis.toCyrillic('injekcija, njiva'); // инјекција, њива
pravopis.toCyrillic('patlidžan, nadživeti'); // патлиџан, надживети
pravopis.toLatin(s)
Transliterates string s
from Serbian Cyrillic to Serbian Latin alphabet.
Examples:
pravopis.toCyrillic('pravopis'); // правопис
pravopis.toCyrillic('injekcija, njiva'); // инјекција, њива
pravopis.toCyrillic('patlidžan, nadživeti'); // патлиџан, надживети
pravopis.toVocative(name)
Returns vocative form of string name
(which is nominative form of a person's given name). Preserves casing and alphabet of a given string.
Examples:
pravopis.toVocative('Ђура'); // Ђуро
pravopis.toVocative('ПЕТАР'); // ПЕТРЕ
pravopis.toVocative('milojica'); // milojice
pravopis.toVocative('Stanoje'); // Stanoje
pravopis.equals(a, b)
Compares strings a
and b
and returns true
if they are equal, ignoring difference in used alphabet.
Examples:
pravopis.equals('latinica', 'латиница'); // true
pravopis.equals('ćirilica', 'ћирилица'); // true
pravopis.equals('ćirilica', 'Ћирилица'); // false
pravopis.equalsIgnoreCase(a, b)
Compares strings a
and b
and returns true
if they are equal, ignoring difference in case and used alphabet.
Examples:
pravopis.equalsIgnoreCase('latinica', 'латиница'); // true
pravopis.equalsIgnoreCase('ćirilica', 'ћирилица'); // true
pravopis.equalsIgnoreCase('ćirilica', 'Ћирилица'); // true
pravopis.hasCyrillic(s)
Returns true
if string s
has at least one Serbian Cyrillic letter.
Examples:
pravopis.hasCyrillic('ћирилица'); // true
pravopis.hasCyrillic('ćirilica'); // false
pravopis.hasLatin(s)
Returns true
if string s
has at least one Serbian Latin letter.
Examples:
pravopis.hasLatin('ћирилица'); // false
pravopis.hasLatin('ćirilica'); // true
Yes.
MIT
FAQs
Set of helper string manipulation functions for handling Serbian language orthography rules correctly
The npm package pravopis receives a total of 1 weekly downloads. As such, pravopis popularity was classified as not popular.
We found that pravopis 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.