AJS 4.1

Some days ago I released a AJS 4.1 and it has some nice improvements.

Minify improved

Now one can minimize AJS even if functions aren't prefixed with AJS.. For example, for iRemind I got AJS down to 11 KB (from 35 KB).

For most of my projects I export AJS to the global scope, since it's really tedious to type AJS. all the time. One can use the JavaScript module pattern to still keep the namespaces clean:

(function() {
    var span = SPAN({c: 'highlight', s: 'color: red'}, 'This is a test');
    RCN(getBody(), span);

Small shortcuts

I create a lot of DOM in JavaScript and I was really tired of typing 'class': and 'style':, so in the new version one can do this:

var span = SPAN({c: 'highlight', s: 'color: red'}, 'This is a test');

Intead of:

var span = SPAN({'class': 'highlight', style: 'color: red'}, 'This is a test');

Notice that you have to use 'class', since class is a keyword. It's a small improvement, but saves some keystrokes.

31. Aug 2007 Announcements · Code · JavaScript · Tips
© Amir Salihefendic