Gathering detailed insights and metrics for printable-characters-plus-directional
Gathering detailed insights and metrics for printable-characters-plus-directional
npm install printable-characters-plus-directional
Typescript
Module System
Node Version
NPM Version
69
Supply Chain
92.1
Quality
75
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
2,014
Last Day
1
Last Week
5
Last Month
51
Last Year
494
20 Stars
104 Commits
6 Forks
5 Watching
1 Branches
3 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.36
Package Id
printable-characters-plus-directional@1.0.36
Size
8.23 kB
NPM Version
5.3.0
Node Version
8.6.0
Cumulative downloads
Total Downloads
Last day
-75%
1
Compared to previous day
Last week
-61.5%
5
Compared to previous week
Last month
200%
51
Compared to previous month
Last year
61.4%
494
Compared to previous year
Forked from https://github.com/xpl/printable-characters
A little helper for handling strings containing zero width characters, ANSI styling, whitespaces, newlines, etc.
1const { strlen } = require ('printable-characters') 2 3strlen ('foo bar') // === 7 4strlen ('\u001b[106mfoo bar\u001b[49m') // === 7
1const { isBlank } = require ('printable-characters') 2 3isBlank ('foobar') // === false 4isBlank ('\u001b[106m \t \t \n \u001b[49m') // === true
1const { blank } = require ('printable-characters') 2 3blank ('foo') // === ' ' 4blank ('\tfoo \nfoo') // === '\t \n ' 5blank ('\u001b[22m\u001b[1mfoo \t\u001b[39m\u001b[22m')) // === ' \t'
1const { ansiEscapeCodes, zeroWidthCharacters } = require ('printable-characters') 2 3const s = '\u001b[106m' + 'foo' + '\n' + 'bar' + '\u001b[49m' 4 5s.replace (ansiEscapeCodes, '') // === 'foo\nbar' 6 .replace (zeroWidthCharacters, '') // === 'foobar'
Use for safely truncating strings to maximum width without breaking ANSI codes:
1const { first } = require ('printable-characters') 2 3const s = '\u001b[22mfoobar\u001b[22m' 4 5first (s, 0) // === '\u001b[22m\u001b[22m' 6first (s, 1) // === '\u001b[22mf\u001b[22m' 7first (s, 3) // === '\u001b[22mfoo\u001b[22m' 8first (s, 6) // === '\u001b[22mfoobar\u001b[22m'
1const { partition } = require ('printable-characters') 2 3partition ('') // [ ]) 4partition ('foo') // [['', 'foo'] ]) 5partition ('\u001b[1mfoo') // [['\u001b[1m', 'foo'] ]) 6partition ('\u001b[1mfoo\u0000bar') // [['\u001b[1m', 'foo'], ['\u0000', 'bar'] ]) 7partition ('\u001b[1mfoo\u0000bar\n') // [['\u001b[1m', 'foo'], ['\u0000', 'bar'], ['\n', '']])
console.log
for the log-driven debugging junkies!No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
66 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More