static categorize(aInput, {cat, sort = null}) {
		let oOutput = {};
		aInput.forEach(e => {
			let sCat = cat(e);
			if (!(sCat in oOutput)) {
				oOutput[sCat] = [];
			}
			oOutput[sCat].push(e);
		});
		if (typeof sort === 'function') {
			for (let sCat in oOutput) {
				oOutput[sCat] = oOutput[sCat].sort(sort)
			}
		}
		return oOutput;
	}
/**
	 * process an input array. Dispatch all items into category-arrays, each category-array is then sorted according to another function
     * @param aInput {array}
     * @param cat {function} will be call for each aInput item, this function is expected to return a category identifier
     * @param sort {function} will be used to sort all categories
     */
process an input array. Dispatch all items into category-arrays, each category-array is then sorted according to another function
@param aInput {array}
@param cat {function} will be call for each aInput item, this function is expected to return a category identifier
@param sort {function} will be used to sort all categories
process an input array . Dispatch all items into category - arrays each category - array is then sorted according to another function @param aInput { array } @param cat { function } will be call for each aInput item this function is expected to return a category identifier @param sort { function } will be used to sort all categories
static categorize(aInput, {cat, sort = null}) {
		let oOutput = {};
		aInput.forEach(e => {
			let sCat = cat(e);
			if (!(sCat in oOutput)) {
				oOutput[sCat] = [];
			}
			oOutput[sCat].push(e);
		});
		if (typeof sort === 'function') {
			for (let sCat in oOutput) {
				oOutput[sCat] = oOutput[sCat].sort(sort)
			}
		}
		return oOutput;
	}
static categorize ( aInput , { cat , sort = null } ) { let oOutput = { } ; aInput . forEach ( e => { let sCat = cat ( e ) ; if ( ! ( sCat in oOutput ) ) { oOutput [ sCat ] = [ ] ; } oOutput [ sCat ] . push ( e ) ; } ) ; if ( typeof sort === 'function' ) { for ( let sCat in oOutput ) { oOutput [ sCat ] = oOutput [ sCat ] . sort ( sort ) } } return oOutput ; }
process an input array.
process an input array .