code: function mainFunction (arg) {
    if (typeof arg == 'string') {
      return JS2.Parser.parse(arg).toString();
    } else if (arg instanceof Array) {
      return new JS2.Array(arg);
    } else {
      return new JS2.Array();
    }
  }
docs: temporarily set root to JS2 global var for this scope