Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@full-pack/string-pack
Advanced tools
A lightweight and versatile String Utility Package for Node.js & Browser.
A lightweight and versatile String Utility Package for Node.js & Browser.
(Coming Soon)
npm install @full-pack/string-pack
const { ... } = require('@full-pack/string-pack');
import { ... } from '@full-pack/string-pack';
Adds padding to given string.
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
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
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*'
Merges an array of strings into a single string using a specified separator.
merge('-', 'apple', 'orange', 'banana'); // 'apple-orange-banana'
merge(true, 'apple', 'orange'); // 'apple orange'
merge(false, 'apple', 'orange', 'banana'); // 'appleorangebanana'
Performs a strict comparison between two strings.
compare("hello", "hello"); // true
compare("abc", "ABC"); // false
Performs a case-insensitive loose comparison between two strings.
looseCompare("hello", "HELLO"); // true
looseCompare("abc", "123"); // false
Capitalizes the first letter of a word in a string.
capitalizeInitial('hello'); // 'Hello'
capitalizeInitial(':> hello'); // ':> Hello'
Capitalizes the first letter of each word in a given string.
capitalizeWords('hello world'); // 'Hello World'
capitalizeWords('Sphinx of black quartz:-judge my vow'); // 'Sphinx Of Black Quartz:-Judge My Vow'
npm run build
The MIT License. Full License is here
FAQs
A lightweight and versatile String Utility Package for Node.js & Browser.
The npm package @full-pack/string-pack receives a total of 4 weekly downloads. As such, @full-pack/string-pack popularity was classified as not popular.
We found that @full-pack/string-pack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.