Closed rakeshpai closed 14 years ago
I actually have plans on doing that. Since string are immutable anyway the current method isn't even elegant. It will require a rewrite of all the bits file and change all the code that uses it (About half of postgres.js). Luckily they're small files. I've got some pressing deadlines for the next couple of days, so If you're adventurous you can submit a patch. Otherwise I'll probably get to it soon enough.
This issue is now fixed. Bits.js now uses Encoder and Decoder objects that are much easier to use and don't mess with String or Object's prototypes.
+1. Awesome. Sorry for not being able to submit a patch for this.
No problem, I'm pleased with the new api. It feels more natural.
It'd be ideal if you can create helper functions instead of using modifying the String.prototype in bits.js. This is so that you can play well with other libraries that might be used in the same context as this.