Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
spell-checker-js
Advanced tools
Simple expandable tool for spell checking
Readme: English
Русский
Install:
npm i spell-checker-js
Code
const spell = require('spell-checker-js')
// Load dictionary
spell.load('en')
// Checking text
const check = spell.check('Some text to check, blahblahblah, olololo')
console.log(check)
// -> ['blahblahblah', 'olololo']
spell.load(dictionary)
or spell.load(options)
— load dictionary fileExamples:
// ways for load default dictionary:
spell.load('ru')
spell.load({ input: 'ru' })
// load custom dictionary with utf-8:
spell.load('./my_custom_dictionary.txt')
// laod custom dictionary with charset:
spell.load({ input: './my_custom_dictionary.txt', charset: 'windows-1251' })
// Asynchronous load default dictionary:
spell.load({ input: 'en', async: true }).then(len => {
console.log(len);
// len — amount of added words to base
spell.check('something')
})
List of default dictionaries:
en
— list of English wordsru
— list of Russian wordsru_surnames
— list of Russian surnamesYou can help by adding other languages or expand existing dictionaries
spell.check(string)
— spell checking of textReturns: array of wrong words
Example:
spell.load('en')
const check = spell.check('Some text to check, blahblahblah, olololo')
console.log(check)
// -> ['blahblahblah', 'olololo']
spell.clear()
— clear all loaded dictionariesExample:
spell.load('en')
spell.clear()
spell.check('something')
// -> ERROR! Dictionaries are not loaded
spell.size
— number of words in the dictionary areExample
spell.load('en')
spell.load('ru')
console.log(spell.size)
// -> 1956898
MIT © 2016 Danakt Frost
FAQs
Simple expandable tool for spell checking
We found that spell-checker-js 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.