Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@broofa/stringlang
Advanced tools
Utility functions for analyzing strings by Unicode block
npm i @broofa/stringlang
import {unicodeBlock, unicodeBlockCount, BLOCKS} from 'stringlang';
Get block of a given character or code point.
Note: Runs at 10M+ chars/second on a modern Mac laptop (test data)
// Get block (codePoint)
unicodeBlock(30028); // => 'CJK Unified Ideographs'
// Get block (string)
unicodeBlock('界'); // => 'CJK Unified Ideographs'
// Get block (string, character index)
unicodeBlock('Aα界', 2); // => 'CJK Unified Ideographs'
Count characters by block
unicodeBlockCount('Hello World or Καλημέρα κόσμε or こんにちは 世界'); // =>
// {
// 'Basic Latin': 21,
// 'CJK Unified Ideographs': 2,
// 'Greek and Coptic': 13,
// Hiragana: 5
// }
Array of [block name, min code point, max code point] entries, ordered by code point.
BLOCKS; // =>
// [
// [ 'Basic Latin', 0, 127 ],
// [ 'Latin-1 Supplement', 128, 255 ],
// ... 308 more entries
// ]
FAQs
Utility functions for analyzing strings by Unicode block
The npm package @broofa/stringlang receives a total of 3 weekly downloads. As such, @broofa/stringlang popularity was classified as not popular.
We found that @broofa/stringlang 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.