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

typescript-string-operations

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-string-operations

Simple lightweight string operation library for Typescript, works with Angular

  • 1.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
141K
increased by11.52%
Maintainers
1
Weekly downloads
 
Created

What is typescript-string-operations?

The typescript-string-operations package provides a variety of string manipulation utilities for TypeScript. It includes functionalities for formatting, padding, trimming, and more, making it easier to handle common string operations.

What are typescript-string-operations's main functionalities?

String Formatting

This feature allows you to format strings by replacing placeholders with specified values. It is useful for creating dynamic strings based on variable content.

const { StringFormat } = require('typescript-string-operations');
const formattedString = StringFormat('Hello, {0}!', 'World');
console.log(formattedString); // Output: Hello, World!

Padding

Padding allows you to add characters to the left or right of a string until it reaches a specified length. This is useful for aligning text or ensuring consistent string lengths.

const { StringPadding } = require('typescript-string-operations');
const paddedString = StringPadding.padLeft('123', 5, '0');
console.log(paddedString); // Output: 00123

Trimming

Trimming removes whitespace from the beginning and end of a string. This is useful for cleaning up user input or formatting strings for display.

const { StringTrim } = require('typescript-string-operations');
const trimmedString = StringTrim.trim('  Hello World  ');
console.log(trimmedString); // Output: Hello World

Other packages similar to typescript-string-operations

Keywords

FAQs

Package last updated on 06 Mar 2024

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