
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Типограф в действии с мобильной версией
http://example.com
на http://example.com;bower install typograf
<script src="dist/typograf.min.js"></script>
<script>
var tp = new Typograf({lang: 'ru'});
alert(tp.execute(' Мир - мой мир! '));
</script>
npm install typograf
var Typograf = require('typograf'),
tp = new Typograf({lang: 'ru'});
console.log(tp.execute(' Мир - мой мир!! '));
npm install typograf -g
typograf
- вывод справки
typograf my_file.txt
- оттипографировать текст по русским правилам
typograf -l en my_file.txt
- оттипографировать файл по английским правилам
typograf -d ru/quot -e ru/optaling/* my_file.txt > new_my_file
- оттипографировать файл с отключенным правилом ru/quot
и включенными правилами ru/optaling/*
По умолчанию висячая пунктуация отключена.
Для включения необходимо подключить правила:
var Typograf = require('typograf'),
tp = new Typograf({lang: 'ru'});
tp.enable('ru/optalign/*');
console.log(tp.execute('"Мир"'));
А также в HTML-код страницы добавить:
<link rel="stylesheet" href="dist/typograf.css" type="text/css" />
var tp = new Typograf({lang: 'ru'});
tp.disable('ru/space/afterNum'); // Отключить правило
//...
tp.enable('ru/space/afterNum'); // Включить правило
Typograf.rule({
// Заголовок
title: 'Пример правила',
// common - язык, группа - "other", имя правила - "parampampam"
name: 'common/other/parampampam',
// Очередность выполнения правил, чем меньше индекс, тем раньше выполнится правило
sortIndex: 2000,
// Функция обработки правила
func: function(text) {
return text.replace(/parampampam/g, 'tryam');
}
});
// Режим по умолчанию, HTML-сущности, как utf-8 символы
var tp = new Typograf({lang: 'ru'});
tp.execute('...'); // …
// HTML-сущности, как имена
var tpName = new Typograf({lang: 'ru', mode: 'name'});
tpName.execute('...'); // …
// HTML-сущности, как цифры
var tpDigit = new Typograf({lang: 'ru', mode: 'digit'});
tpDigit.execute('...'); //…
MIT License
FAQs
The client and server typography
The npm package typograf receives a total of 5,122 weekly downloads. As such, typograf popularity was classified as popular.
We found that typograf demonstrated a healthy version release cadence and project activity because the last version was released less than 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 researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.