June 2009
A comprehensive JavaScript pad function
I wanted a JavaScript function for padding strings, but I couldn't find one that met my criteria. So, I wrote my own.
- Minified (850 bytes)
- Uncompressed
It behaves identically to PHP's str_pad() function, and has been unit tested in Firefox 3, Safari 3, Chrome, IE6, and IE7.
(more...)
JavaScript Standard Library 1.8+
I just came across Andrea Giammarchi's JavaScript Standard Library, a ≈2.7KB library which transparently adds JavaScript 1.6 methods (mostly the new Array stuff) to browsers which don't support them natively.
Surprisingly, this is the first library I've seen whose sole purpose is JavaScript version compatibility. Andrea says it provides "a quite totally standard environment", and offers some unit tests.
(more...)
Welcome!
Welcome to my new site. Things are still a little rough, but I'll be settling in over the next few days.
On this blog, I'll be writing about all aspects of the web, both technical and cultural. The technical stuff will have an emphasis on open-source technologies and the LAMP stack. The cultural stuff will be more free-form.
This is my first WordPress theme; please let me know if you spot anything out of order. I think it turned out fairly well.
Please feel free to comment and subscribe to my RSS feed—I'd love to hear your reactions!