https://github.com/beeblebrox3/super-trim
Trim whitespaces (or other characters) from the beginning and end of strings.
https://github.com/beeblebrox3/super-trim
javascript npm-package trim trim-string-whitespaces
Last synced: 3 months ago
JSON representation
Trim whitespaces (or other characters) from the beginning and end of strings.
- Host: GitHub
- URL: https://github.com/beeblebrox3/super-trim
- Owner: beeblebrox3
- License: mit
- Created: 2016-11-19T15:39:34.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-02-14T22:51:30.000Z (almost 3 years ago)
- Last Synced: 2025-10-11T07:17:17.193Z (3 months ago)
- Topics: javascript, npm-package, trim, trim-string-whitespaces
- Language: JavaScript
- Homepage: https://super-trim.js.org/
- Size: 275 KB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Super trim
Trim string whitespaces (or other characters) from the beginning and end of strings.
[](https://scrutinizer-ci.com/g/beeblebrox3/super-trim/?branch=master)
[](https://scrutinizer-ci.com/g/beeblebrox3/super-trim/?branch=master)
[](https://scrutinizer-ci.com/g/beeblebrox3/super-trim/build-status/master)
## Usage
```js
const trim = require("super-trim");
trim(" trim "); // output: "trim"
trim("//trim//", "/"); // output: "trim"
trim.left(" trim "); // output: "trim "
trim.left("//trim//", "/"); // output: "trim//"
trim.right(" trim "); // output: " trim"
trim.right("//trim//", "/"); // output: "//trim"
```