JavaScript helper libraries? No DOM or AJAX stuff
<p>As I'm writing JavaScript I'm always missing some fairly basic language features that JavaScript just  don't have.  So is there any library that would bring such features as trim, sprintf, str.endwith and etc. functions to JavaScript ?</p>

<p>I just have written those functions too many times and I'm also tired of copy/pasting them from my old code. It would be nice to have some library which has those implemented and tested in one place.</p>

<p><strong>Note</strong> that I'm not talking about Ajax/DOM-libraries like jQuery or Dojo and such. I know that those libraries bring some of the features that I'm talking here, but not all. And I would like to have also an environment independent library so that same library could be used with server side JavaScript .</p>

<p>Best library so far that I've found is <a href="http://phpjs.org/" rel="nofollow">php.js</a>, but I don't like how it is polluting the global namespace. I'm  also not too fond of how PHP-functions are named.</p>

<p><strong>EDIT</strong></p>

<p>I'm settling with Underscore.js as found out that it is very easy to extend. So I extended it with my own set of string functions. Check it out here: </p>

<p><a href="https://github.com/epeli/underscore.string" rel="nofollow">https://github.com/epeli/underscore.string</a></p>
