1 | var _curry2 =
|
2 | /*#__PURE__*/
|
3 | require("./internal/_curry2");
|
4 | /**
|
5 | * Creates an object containing a single key:value pair.
|
6 | *
|
7 | * @func
|
8 | * @memberOf R
|
9 | * @since v0.18.0
|
10 | * @category Object
|
11 | * @sig String -> a -> {String:a}
|
12 | * @param {String} key
|
13 | * @param {*} val
|
14 | * @return {Object}
|
15 | * @see R.pair
|
16 | * @example
|
17 | *
|
18 | * const matchPhrases = R.compose(
|
19 | * R.objOf('must'),
|
20 | * R.map(R.objOf('match_phrase'))
|
21 | * );
|
22 | * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]}
|
23 | */
|
24 |
|
25 |
|
26 | var objOf =
|
27 | /*#__PURE__*/
|
28 | _curry2(function objOf(key, val) {
|
29 | var obj = {};
|
30 | obj[key] = val;
|
31 | return obj;
|
32 | });
|
33 |
|
34 | module.exports = objOf; |
\ | No newline at end of file |