{"size": 1260, "ext": "js", "max_stars_repo_path": "node_modules/@fusioncharts/datatable/src/aggregators/aggregators.js", "max_stars_repo_name": "SergioGF/TransportPrototypeVue", "max_stars_repo_stars_event_min_datetime": "2019-09-20T04:36:40.000Z", "max_stars_repo_stars_event_max_datetime": "2020-08-27T09:53:21.000Z", "max_issues_repo_path": "node_modules/@fusioncharts/datatable/src/aggregators/aggregators.js", "max_issues_repo_name": "ankitkanojia/react-fusion-mapchart", "max_issues_repo_issues_event_min_datetime": "2020-07-18T00:13:46.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-10T19:04:10.000Z", "max_forks_repo_path": "node_modules/@fusioncharts/datatable/src/aggregators/aggregators.js", "max_forks_repo_name": "SergioGF/TransportPrototypeVue", "max_forks_repo_forks_event_min_datetime": "2019-09-20T04:36:41.000Z", "max_forks_repo_forks_event_max_datetime": "2019-09-24T09:52:39.000Z"}
{"max_stars_count": 6, "max_issues_count": 3, "max_forks_count": 6, "avg_line_length": 1260.0, "max_line_length": 1260, "alphanum_fraction": 0.7952380952}
import aggregatorStore from"./";var sum,avg,count,min,max,first,last,variance,stddev,aggregators;sum=function sum(prevSum,value){return prevSum+value};avg=function avg(prevAvg,value,n){return((n-1)*prevAvg+value)/n};count=function count(prevCount){return++prevCount};min=function min(prevMin,value){return prevMin!==null?prevMin>value?value:prevMin:value};max=function max(prevMax,value){return prevMax!==null?prevMax<value?value:prevMax:value};first=function first(prevFirst,value){return prevFirst===null?value:prevFirst};last=function last(prevLast,value){return value};variance=function variance(prevVal,value,n){var mean=value,vr=0,prevMean;if(prevVal){mean=prevVal.avg;vr=prevVal.variance}prevMean=mean;if(n>1){mean=avg(mean,value,n);vr=(vr*(n-2)+(value-mean)*(value-prevMean))/(n-1)}return{avg:mean,variance:vr}};stddev=function stddev(prevVal,value,n){var newPrevVal,vr;if(prevVal){newPrevVal={avg:prevVal.avg,variance:prevVal.stddev*prevVal.stddev}}vr=variance(newPrevVal,value,n);return{avg:vr.avg,stddev:Math.sqrt(vr.variance)}};aggregators={sum:sum,avg:avg,count:count,min:min,max:max,first:first,last:last,variance:variance,stddev:stddev};Object.entries(aggregators).forEach(function(key){aggregatorStore.register(key[0],key[1])});export{sum,avg};