Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
This is a basic library used for NLP that can perform conversions between numbers in numerical format and alphabetical / character format.
pip install numericnormalizer
from numericnormalizer import normalizer
normalizer.number_to_word(5, lang='en')
>> "five"
normalizer.number_to_word(5, lang='zh')
>> "五"
normalizer.word_to_number('five', lang='en')
>> 5
normalizer.number_to_word('五', lang='zh')
>> 5
normalizer.format_sentence(
sentence='What are the 6 principles of intercultural adaption?',
lang='zh'
)
>> "What are the six (6) principles of intercultural adaption?"
normalizer.format_sentence(
sentence='I have 4 apples and five oranges.',
lang='zh',
formatting='{number} [{word}]', # custom formatting
)
>> "I have 4 [four] apples and 5 [five] oranges."
normalizer.format_sentence(
sentence='I have 4 apples and five oranges.',
lang='zh',
max_number=4 # restrict the max_number
)
>> "I have four (4) apples and five oranges."
The supported languages are from the Azure Language Detect List:
However for the format_sentence
feature, as this is an early release not all languages have been tested thoroughly. It is currently designed to only check languages that deal with spaces as it relies on regex word match notation
Currently only support numbers 0 - 10. No negatives.
FAQs
Converting number formats
We found that numericnormalizer 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 found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.