UNPKG

@raona/sp

Version:

Raona utilities to work with Sharepoint using pnp/sp

11 lines (10 loc) 306 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // import {TypedHash} from '../entities'; function groupBy(xs, key) { return xs.reduce(function (rv, x) { (rv[x[key]] = rv[x[key]] || []).push(x); return rv; }, {}); } exports.groupBy = groupBy;