A portage of Linq enumerable in javascript and typescript