UNPKG
@uxland/functional
Version:
alpha (1.0.0-alpha.1)
latest (1.0.0-alpha.3)
1.0.0-alpha.3
1.0.0-alpha.2
1.0.0-alpha.1
1.0.0-alpha.0
Functional
github.com/uxland/uxland/tree/master/packages/functional
uxland/uxland
@uxland/functional
/
lib
/
ramda
/
to-dictionary-by.js
5 lines
(4 loc)
•
201 B
JavaScript
View Raw
1
2
3
4
5
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
const
ramda_1 =
require
(
"ramda"
);
exports
.
toDictionaryBy
=
key
=>
ramda_1.
reduce
(
(
acc, elem
) =>
acc[elem[key]] = elem, {});