Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

trim

v0.26.1arrow_drop_down
v0.26.1
STATUS
Passing
DOWNLOADS
38
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
A year ago
SIZE
828 B
Removes (strips) whitespace from both ends of the string.
1 contributor
Install trim as a package?
Copied
npm i @bit/ramda.ramda.trim
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
modifieddraft
chevron_left
chevron_right
trim (
str:String
) : String

Removes (strips) whitespace from both ends of the string.

Example
R.trim('   xyz  '); //=> 'xyz'
     R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']
Argument
str: String

The string to trim.

Returns
String

Trimmed version of `str`.