Similar to 'string.prototype.trim' but also cuts successive spaces inside the phrase
npm install barber-trim
All of us
except\tEmran, Raju and Noman were there.
`
becomes
`All of us except Emran, Raju and Noman were there`
$3
`js
import trim from "barber-trim"
const str =
;
console.log(trim(str))
`
$3
Please note that Tab ↹ spaces and ← Backspaces` are considered like regular spaces.