New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@full-pack/string-pack

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@full-pack/string-pack

A lightweight and versatile String Utility Package for Node.js & Browser.

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

@full-pack/string-pack

npm

jest Code Style: Prettier

A lightweight and versatile String Utility Package for Node.js & Browser.

Contents

install

npm install @full-pack/string-pack

require

const { ... } = require('@full-pack/string-pack');

import

import { ... } from '@full-pack/string-pack';

API

padding

Adds padding to given string.

padStart

Pads the start of a string with a specified fill string a certain number of times.

// Basic Usage
padStart('hello', 'abc', 3) // abcabcabchello

// Limiting total length
padStart('hello', 'abc', 3, 8) // abchello
padEnd

Pads the end of a string with a specified fill string a certain number of times.

// Basic Usage
padEnd('hello', 'abc', 3); // helloabcabcabc

// Limiting total length
padEnd('hello', 'abc', 3, 8); // helloabc
padBidirectional

Pads a string with a specified fill string a certain number of times on both ends.

// Basic usage
padBidirectional('hello', '*', 2); // '**hello**'

// Limiting total length
padBidirectional('world', '-', 3, 10); // '--world---'
 
// Controlling padding distribution
padBidirectional('example', '*', 2, 10, 0); // '**example*'

Build

npm run build

License

The MIT License. Full License is here

Keywords

FAQs

Package last updated on 08 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