String manipulation library in JavaScript