Gathering detailed insights and metrics for wide-align-2
Gathering detailed insights and metrics for wide-align-2
Gathering detailed insights and metrics for wide-align-2
Gathering detailed insights and metrics for wide-align-2
npm install wide-align-2
Typescript
Module System
Node Version
NPM Version
66.1
Supply Chain
78.6
Quality
74.8
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
ISC License
20 Stars
25 Commits
14 Forks
2 Watchers
50 Branches
1 Contributors
Updated on Jan 02, 2024
Latest Version
1.1.2
Package Id
wide-align-2@1.1.2
Size
2.03 kB
NPM Version
3.5.2
Node Version
4.2.6
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
1
A wide-character aware text alignment function for use in terminals / on the console.
var align = require('wide-align')
// Note that if you view this on a unicode console, all of the slashes are
// aligned. This is because on a console, all narrow characters are
// an en wide and all wide characters are an em. In browsers, this isn't
// held to and wide characters like "古" can be less than two narrow
// characters even with a fixed width font.
console.log(align.center('abc', 10)) // ' abc '
console.log(align.center('古古古', 10)) // ' 古古古 '
console.log(align.left('abc', 10)) // 'abc '
console.log(align.left('古古古', 10)) // '古古古 '
console.log(align.right('abc', 10)) // ' abc'
console.log(align.right('古古古', 10)) // ' 古古古'
align.center(str, length)
→ str
Returns str with spaces added to both sides such that that it is length chars long and centered in the spaces.
align.left(str, length)
→ str
Returns str with spaces to the right such that it is length chars long.
align.right(str, length)
→ str
Returns str with spaces to the left such that it is length chars long.
These functions were originally taken from cliui. Changes include switching to the MUCH faster pad generation function from lodash, making center alignment pad both sides and adding left alignment.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/25 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
Score
Last Scanned on 2025-07-07
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