MCPcopy
hub / github.com/jquerytools/jquerytools / itself

Function itself

lib/jslint.js:351–359  ·  view source on GitHub ↗
(s,o)

Source from the content-addressed store, hash-verified

349switch(nexttoken.id){case'{':jsonObject();break;case'[':jsonArray();break;case'true':case'false':case'null':case'(number)':case'(string)':advance();break;case'-':advance('-');if(token.character!==nexttoken.from){warning("Unexpected space after '-'.",token);}
350adjacent(token,nexttoken);advance('(number)');break;default:error("Expected a JSON value.",nexttoken);}}
351var itself=function(s,o){var a,i;JSLINT.errors=[];predefined=Object.beget(standard);if(o){a=o.predef;if(a instanceof Array){for(i=0;i<a.length;i+=1){predefined[a[i]]=true;}}
352if(o.adsafe){o.browser=false;o.debug=false;o.eqeqeq=true;o.evil=false;o.forin=false;o.glovar=true;o.nomen=true;o.on=false;o.rhino=false;o.sidebar=false;o.undef=true;o.widget=false;predefined.Date=false;predefined['eval']=false;predefined.Function=false;predefined.Object=false;predefined.ADSAFE=true;}
353option=o;}else{option={};}
354option.indent=option.indent||4;adsafe_id='';adsafe_may=false;adsafe_went=false;approved={};if(option.approved){for(i=0;i<option.approved.length;i+=1){approved[option.approved[i]]=option.approved[i];}}
355approved.test='test';tab='';for(i=0;i<option.indent;i+=1){tab+=' ';}
356indent=0;global=Object.beget(predefined);scope=global;funct={'(global)':true,'(name)':'(global)','(scope)':scope,'(breakage)':0,'(loopage)':0};functions=[];ids={};urls=[];src=false;xmode=false;xtype='';stack=null;member={};membersOnly=null;implied={};inblock=false;lookahead=[];jsonmode=false;warnings=0;lex.init(s);prereg=true;prevtoken=token=nexttoken=syntax['(begin)'];assume();try{advance();if(nexttoken.value.charAt(0)==='<'){xml();if(option.adsafe&&!adsafe_went){warning("ADsafe violation: Missing ADSAFE.go.",this);}}else if(nexttoken.id==='{'||nexttoken.id==='['){option.laxbreak=true;jsonmode=true;jsonValue();}else{if(option.adsafe&&option.fragment){warning("ADsafe violation.",this);}
357statements('lib');}
358advance('(end)');}catch(e){if(e){JSLINT.errors.push({reason:e.message,line:e.line||nexttoken.line,character:e.character||nexttoken.from},null);}}
359return JSLINT.errors.length===0;};function to_array(o){var a=[],k;for(k in o)if(o.hasOwnProperty(k)){a.push(k);}
360return a;}
361itself.report=function(option,sep){var a=[],c,e,f,i,k,l,m='',n,o=[],s,v,cl,va,un,ou,gl,la;function detail(h,s,sep){if(s.length){o.push('<div><i>'+h+'</i> '+
362s.sort().join(sep||', ')+'</div>');}}

Callers

nothing calls this directly

Calls 6

assumeFunction · 0.85
advanceFunction · 0.85
xmlFunction · 0.85
warningFunction · 0.85
jsonValueFunction · 0.85
statementsFunction · 0.85

Tested by

no test coverage detected