{"size": 1950, "ext": "js", "max_stars_repo_path": "iterators.js", "max_stars_repo_name": "stolksdorf/pico-utils", "max_stars_repo_stars_event_min_datetime": "2020-04-23T03:43:06.000Z", "max_stars_repo_stars_event_max_datetime": "2020-04-23T03:43:06.000Z", "max_issues_repo_path": "iterators.js", "max_issues_repo_name": "stolksdorf/pico-utils", "max_issues_repo_issues_event_min_datetime": "2020-04-11T14:31:07.000Z", "max_issues_repo_issues_event_max_datetime": "2020-09-09T23:47:21.000Z", "max_forks_repo_path": "iterators.js", "max_forks_repo_name": "stolksdorf/pico-utils", "max_forks_repo_forks_event_min_datetime": "2020-04-23T14:29:42.000Z", "max_forks_repo_forks_event_max_datetime": "2021-02-18T19:00:43.000Z"}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": 2, "avg_line_length": 47.5609756098, "max_line_length": 142, "alphanum_fraction": 0.6}
const map = (obj,fn)=>Object.keys(obj).map((key)=>fn(obj[key],key));
const map = (obj,fn)=>Object.entries(obj).map(([k,v])=>fn(v,k));

const reduce = (obj,fn,init)=>Object.keys(obj).reduce((a,key)=>fn(a,obj[key],key),init);
const reduce = (obj,fn,init)=>Object.entries(obj).reduce((a,[k,v])=>fn(a,v,k),init);

const flatMap = (obj,fn)=>Object.keys(obj).flatMap((key)=>fn(obj[key],key));
const mapValues = (obj,fn)=>Object.keys(obj).reduce((a,k)=>{a[k]=fn(obj[key],key);return a;},{});

const sum = (obj,fn)=>Object.entries(obj).reduce((a,[k,v])=>a+fn(v,k),0);
const transform = (obj, fn)=>Object.keys(obj).reduce((acc,k)=>{acc[k]=fn(obj[k],k);return acc;}, Array.isArray(obj)?[]:{});
const construct = (obj,fn)=>Object.keys(obj).reduce((a,key)=>{const [k,v]=fn(obj[key],key);a[k]=v;return a;},{});
const times = (n,fn)=>Array.from(new Array(n*1),(v,i)=>fn(i));

const findKey = (obj,fn)=>Object.keys(obj).find((key)=>fn(obj[key],key));
const filter = (obj,fn)=>Object.keys(obj).reduce((a,key)=>!!fn(obj[key],key)?a.concat(obj[key]):a,[]);
const cluster = (obj, fn)=>Object.keys(obj).reduce((a,k)=>{const r=fn(obj[k],k);if(!a[r]){a[r]=[]};a[r].push(obj[k]);return a;},{});

const pluck = (arr)=>arr[Math.floor(Math.random()*arr.length)];
const sample = (arr, count=1, r=new Set())=>{
	r.add(arr[Math.floor(arr.length*Math.random())]);
	return (r.size == count) ? Array.from(r) : sample(arr, count, r);
};
const weaveFunc = (arr, func)=>arr.reduce((acc, val, idx)=>(idx < arr.length-1) ? acc.concat(val, func(acc.length + 1)) : acc.concat(val),[]);
const weave = (a1, a2)=>a2.reduce((r,_,i)=>r.concat(a1[i],a2[i]),[]).concat(a1[a1.length-1]);

const zip = (...arrs)=>arrs[0].map((_,i)=>arrs.map((arr)=>arr[i]))


/***********************/

const max = (obj, fn)=>{
	return Object.keys(obj).reduce((acc, key)=>{
		const val = obj[key];
		const res = fn(val, key);
		return (res > acc[1]) ? [val,res] : acc;
	}, [null, Number.MIN_SAFE_INTEGER])[0];
};


