
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
string-trim-spaces-only
Advanced tools
Like String.trim() but you can choose granularly what to trim
Like String.trim() but you can choose granularly what to trim
This package is pure ESM. If you're not ready yet, install an older version of this program, 3.1.0 (npm i string-trim-spaces-only@3.1.0
).
npm i string-trim-spaces-only
import { strict as assert } from "assert";
import { trimSpaces } from "string-trim-spaces-only";
assert.deepEqual(trimSpaces(" aaa "), {
res: "aaa",
ranges: [
[0, 2],
[5, 8],
],
});
assert.deepEqual(trimSpaces(" \t zz \n "), {
res: "\t zz \n",
ranges: [
[0, 3],
[12, 16],
],
});
Please visit codsen.com for a full description of the API.
To report bugs or request features or assistance, raise an issue on GitHub.
MIT License.
Copyright © 2010-2025 Roy Revelt and other contributors.
FAQs
Like String.trim() but you can choose granularly what to trim
The npm package string-trim-spaces-only receives a total of 94,041 weekly downloads. As such, string-trim-spaces-only popularity was classified as popular.
We found that string-trim-spaces-only 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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.