Similar to
String#trim()
but removes only whitespace on the right
$ npm install --save trim-right
var trimRight = require('trim-right');
trimRight(' unicorn ');
//=> ' unicorn'
trim-left
- Similar toString#trim()
but removes only whitespace on the lefttrim-off-newlines
- Similar toString#trim()
but removes only newlines
MIT © Sindre Sorhus