Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
disallowed-word-filter
Advanced tools
Модуль для замены запрещенных слов в строке (Так же содержит более 600 встроенных русских матов)
Readme
Модуль для замены запрещенных слов в строке (Так же содержит более 600 встроенных русских матов)
const replaceDisallowedWords = require('disallowed-word-filter')
const myFilter = new replaceDisallowedWords({
additionalWords: 'Привет, Пока', // Дополнительные запрещенные слова
})
Для использования доступно 2 функции check и replace
check - ищет в строке запрещенные слова и возвращает true или false (Принимает 2 параметра: Строку для проверки и флаг true/false (Сверять ли строку с 600 встроиными матными словами))
replace - Заменяет запрещенные слова (Принимает 3 параметра: строку для проаерки, строку для замены, флаг true/false (Сверять ли строку с 600 встроиными матными словами))
Библиотека содержит 600 матных слов
Пример использования:
const replaceDisallowedWords = require('disallowed-word-filter')
const myFilter = new replaceDisallowedWords({
additionalWords: 'Привет, Пока', // Дополнительные запрещенные слова
})
myFilter.check('привет') // В результате получим true так как это слово мы указали запрещенным
myFilter.check('(Здесь каке либо матное слово)', true) // Получим true так как мы указали флаг для сравнения строки с встроееным списком запрещенных матных слов
myFilter.replace('Привет, как дела?', 'Ку') // Получим строку "Ку, как дела?"
myFilter.replace('Ты (Здесь каке либо матное слово)', '***', true) // Получим строку "Ты ***" Так как мы сверяем строку с встроенным списком запрещенных матных слов
FAQs
Модуль для замены запрещенных слов в строке (Так же содержит более 600 встроенных русских матов)
The npm package disallowed-word-filter receives a total of 9 weekly downloads. As such, disallowed-word-filter popularity was classified as not popular.
We found that disallowed-word-filter 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.