code: function CODE(strOrFunc, arg) {
          var str = (typeof strOrFunc === 'function' ? funcToString(strOrFunc) : strOrFunc);
          if (arguments.length === 1) {
              return str;
          }
          if (typeof arg !== 'object') {
              arg = Array.prototype.slice.call(arguments, 1);
          }
          return str.replace(/(^|[^\\])\$(\$|_)\((\w+)\)/g, function (m, p, f, index) {
              var x = arg[index];
              if (f === '$' && typeof x === 'string') {
                  x = JSON.stringify(x); //Escape \n\r, quotes etc with JSON.stringify
              }
              return (p || '') + (x !== undefined ? x : '');
          });
      }
docs: String formatting helpful for code generation.
  @param {String} strOrFunc String with placeholders. If this param is a function it's body is converted to string and then placeholders are replaced.
  @param {Object|...} arg If object then you can use {propertyName} as placeholder.
  Else you can supply n number of args and use {argument index} as placholder
  
  There are two types of placeholder:
  1. $$(value) - This will be quoted if value is a string.
  2. $_(value) - value will be treated as an expression/code, so it will be added as-is.
  @method format
  @example
  
  CODE('<div class=$$(0)>', 'box');
  CODE('<div class=$$(cls)>', {cls: 'box'});
  //output of both: <div class="box">