Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
@spare/lange
Advanced tools
Get string length s.t. correcting astral codes and skipping ansi codes
A function returning string length, s.t. skipping ansi (escape) codes, correcting length of astral symbols.
$ npm install @spare/lange
import { lange } from '@spare/lange'
const list = [
'tolstoy',
'\u001b[3;4;31mhatsu\u001b[0m',
'\u{1F3C3}2\u{1F525}7',
]
for (let tx of list) {
console.log(`[${tx}] [length] (${tx.length}) [lange] (${lange(tx)})`)
}
Copyright (c) 2019-present, Haoyang (Vincent) Wang
FAQs
Get string length s.t. correcting astral codes and skipping ansi codes
The npm package @spare/lange receives a total of 71 weekly downloads. As such, @spare/lange popularity was classified as not popular.
We found that @spare/lange demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.