Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 19, 2024 via pnpm

wide-align 1.1.5

A wide-character aware text alignment function for use on the console or with fixed width fonts.
Package summary
Share
0
issues
2
licenses
5
MIT
1
ISC
Package created
16 Dec 2015
Version published
15 Oct 2021
Maintainers
1
Total deps
6
Direct deps
1
License
ISC

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
5 Packages, Including:
ansi-regex@5.0.1
emoji-regex@8.0.0
is-fullwidth-code-point@3.0.0
string-width@4.2.3
strip-ansi@6.0.1

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
wide-align@1.1.5
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
ⓘ This is a list of wide-align 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
string-width4.2.32.33 kBMIT
prod

Visualizations

Frequently Asked Questions

What does wide-align do?

The "wide-align" is an npm package that provides a wide-character aware text alignment functionality. This is particularly useful for aligning text in terminals or on the console.

How do you use wide-align?

To use "wide-align", you first need to install it via npm. Once installed, you can use it in your JavaScript code by requiring the module and then using the align object's methods (center, left, and right) as demonstrated below:

var align = require('wide-align')

console.log(align.center('abc', 10))     // Outputs: '   abc    '
console.log(align.center('古古古', 10))  // Outputs: '  古古古  '
console.log(align.left('abc', 10))       // Outputs: 'abc       '
console.log(align.left('古古古', 10))    // Outputs: '古古古    '
console.log(align.right('abc', 10))      // Outputs: '       abc'
console.log(align.right('古古古', 10))   // Outputs: '    古古古'

In these examples, the text strings are aligned based on a defined length. The center method aligns the text to the center, adding spaces to both sides. The left method aligns the text to the left and adds spaces to the right to reach the defined length, while the right method aligns the text to the right, adding spaces to the left.

Where are the wide-align docs?

As for documentation, the package's README file serves as its primary documentation. It describes what "wide-align" does and gives usage examples. No separate documentation link is mentioned in the README hence, it's safe to assume that the README contains all the necessary details about the package. The project repository can be visited on GitHub at git+https://github.com/iarna/wide-align.git for more details or any additional updates.