Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

align-text

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

align-text

Align the text in a string.

  • 1.0.2
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.2M
decreased by-26.57%
Maintainers
3
Weekly downloads
 
Created

What is align-text?

The align-text npm package is used to align text in various ways, such as left, right, or center alignment. It provides a simple API to manipulate text alignment in strings, which can be useful for formatting console output, generating text-based reports, or creating command-line interfaces.

What are align-text's main functionalities?

Center Alignment

This feature allows you to center-align a given string. The code sample demonstrates how to center-align the text 'Hello, World!'.

const align = require('align-text');
const result = align('Hello, World!', { align: 'center' });
console.log(result);

Left Alignment

This feature allows you to left-align a given string. The code sample demonstrates how to left-align the text 'Hello, World!'.

const align = require('align-text');
const result = align('Hello, World!', { align: 'left' });
console.log(result);

Right Alignment

This feature allows you to right-align a given string. The code sample demonstrates how to right-align the text 'Hello, World!'.

const align = require('align-text');
const result = align('Hello, World!', { align: 'right' });
console.log(result);

Other packages similar to align-text

Keywords

FAQs

Package last updated on 13 Sep 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc