type-plus
Version:
Provides additional types for TypeScript.
12 lines • 441 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.reduceKey = exports.reduceByKey = void 0;
function reduceByKey(subject, callbackfn, initialValue) {
return Object.keys(subject).reduce((p, k, i, a) => callbackfn(p, k, i, a, subject), initialValue);
}
exports.reduceByKey = reduceByKey;
/**
* @deprecated renamed to reduceByKey
*/
exports.reduceKey = reduceByKey;
//# sourceMappingURL=reduceKey.js.map