dataschema-array-min.js revision cfd2e48cfb9596c0698d16bec86559fe7cdcdab5
YUI.add("dataschema-array",function(c){var a=c.Lang,b={apply:function(f,g){var d=g,e={results:[],meta:{}};if(a.isArray(d)){if(f&&a.isArray(f.resultFields)){e=b._parseResults.call(this,f.resultFields,d,e);}else{e.results=d;}}else{e.error=new Error("Array schema parse failure");}return e;},_parseResults:function(h,m,d){var g=[],q,p,k,l,o,n,f,e;for(f=m.length-1;f>-1;f--){q={};p=m[f];k=(a.isObject(p)&&!a.isFunction(p))?2:(a.isArray(p))?1:(a.isString(p))?0:-1;if(k>0){for(e=h.length-1;e>-1;e--){l=h[e];o=(!a.isUndefined(l.key))?l.key:l;n=(!a.isUndefined(p[o]))?p[o]:p[e];q[o]=c.DataSchema.Base.parse.call(this,n,l);}}else{if(k===0){q=p;}else{q=null;}}g[f]=q;}d.results=g;return d;}};c.DataSchema.Array=c.mix(b,c.DataSchema.Base);},"@VERSION@",{requires:["dataschema-base"]});