trim-right

Similar to `String#trim()` but removes only whitespace on the right

MIT 3 个版本
安装
npm install trim-right
yarn add trim-right
pnpm add trim-right
bun add trim-right
README

trim-right

Similar to String#trim() but removes only whitespace on the right

Install

$ npm install trim-right

Usage

import trimRight from 'trim-right';

trimRight('  unicorn  ');
//=> '  unicorn'
  • trim-left - Similar to String#trim() but removes only whitespace on the left
  • trim-off-newlines - Similar to String#trim() but removes only newlines

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
版本列表
2.0.0 2021-04-21
1.0.1 2015-07-15
1.0.0 2015-02-17