Skip to content

stevemao/trim-off-newlines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trim-off-newlines Build Status

Similar to String#trim() but removes only newlines

Install

$ npm install --save trim-off-newlines

Usage

var trimOffNewlines = require('trim-off-newlines');

trimOffNewlines('\n\nunicorns\n\n');
//=> 'unicorns'

Related

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

License

MIT © Steve Mao

About

Similar to String#trim() but removes only newlines

Resources

License

Stars

Watchers

Forks

Packages

No packages published