News for hackers. Stuff that matters.
Re:PaJes, Simple JavaScript Templating Library for generatin... by saroskar on Thursday December 31, 2009 @06:31PM (#1025188)
Yes, if you use PaJes-CommonJS.js you can use use namespace by using standard require() construct.

For example,

    var pjs = require('PaJes-CommonJS');
    pjs.DIV(pjs.forEach(...));
This requires CommonJS module system to be in place (that is, function require() being implemented to be specific).

Alternatively, it would be trivial to make non-CommonJS use namespace too by modifying PaJes.js. Do you need namespace in non-CommonJs setting?

Thanks for trying it out!

There are no comments on this comment yet.