New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

alltheutils

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alltheutils

A utility library with functions I'd rather not recreate if I can help it.

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

Alltheutils

A utility library with functions I'd rather not recreate if I can help it.

🍕 This is mostly just a util library I'm maintaining for personal projects. If you find it useful, great! If you have a specific utility you want added, just let me know and I'll try to get around to it, or you can submit a PR.

Table of Contents

  • Strings/Text

Strings/Text

Click to go back to main table of contents

Utilities that analyze or modify strings.

Methods

isWhitespace

Click to go back to strings/text table of contents

Checks if the given value is a whitespace character. Whitespace characters are any character outlined on https://en.wikipedia.org/wiki/Whitespace_character.

Arguments:

NameTypeDescription
valueunknownThe value to evaluate

Example:

isWhitespace(" ") // true
isWhitespace("a") // false

truncateWhitespace

Click to go back to strings/text table of contents

Truncates all multiple-sequenced whitespace characters into a single space (U+0020) character. Whitespace characters are any character outlined on https://en.wikipedia.org/wiki/Whitespace_character.

Arguments:

NameTypeDescription
strstringThe string to truncate whitespace within

Example:

truncateWhitespace("       ") // " "
truncateWhitespace("   a   ") // " a "
truncateWhitespace("a a a") // "a a a"
truncateWhitespace("aaa") // "aaa"

© Jacob Lockett 2025

Keywords

utility

FAQs

Package last updated on 02 Jan 2026

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