8000 GitHub - bacloud22/Barber-trim: *Barber-trim* cuts successive whitespaces inside strings as well
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bacloud22/Barber-trim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Barber-trim

The trim() is a built-in string function in JavaScript, which is used to trim a string.

Barber-trim cuts successive whitespaces inside strings as well. This can be very useful for natural language processing.

Example

All of us
except\tEmran, Raju and      Noman were there.

becomes

All of us except Emran, Raju and Noman were there

Usage

import trim from "barber-trim"

const str = `
All of us
except\tEmran, Raju and      Noman were there.
`;

console.log(trim(str))

Note

Please note that Tab ↹ spaces and ← Backspaces are considered like regular spaces.

License

MIT

Author

yanna92yar@gmail.com

About

*Barber-trim* cuts successive whitespaces inside strings as well

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0