![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
disallowed-word-filter
Advanced tools
Модуль для замены запрещенных слов в строке (Так же содержит более 600 встроенных русских матов)
Модуль для замены запрещенных слов в строке (Так же содержит более 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 встроенных русских матов)
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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.