# trim-right

> Similar to [`String#trim()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) but removes only whitespace on the right

## Install

```
$ npm install trim-right
```

## Usage

```js
import trimRight from 'trim-right';

trimRight('  unicorn  ');
//=> '  unicorn'
```

## Related

- [`trim-left`](https://github.com/sindresorhus/trim-left) - Similar to `String#trim()` but removes only whitespace on the left
- [`trim-off-newlines`](https://github.com/stevemao/trim-off-newlines) - Similar to `String#trim()` but removes only newlines

---

<div align="center">
	<b>
		<a href="https://tidelift.com/subscription/pkg/npm-trim-right?utm_source=npm-trim-right&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
	</b>
	<br>
	<sub>
		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
	</sub>
</div>
