mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 01:38:07 +08:00
DISABLE_THIRD_PARTY_CHECK=new npm module causes package-lock change We can get rid of a custom script and use ESLint for these rules. Additionally this means editors will highlight the issue in the editor. Change-Id: I552b52e7f07b4e7430b3f685dbc3b5fad36ffff2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2052167 Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
28 lines
681 B
JavaScript
28 lines
681 B
JavaScript
import _curry2 from './internal/_curry2.js';
|
|
|
|
/**
|
|
* Creates an object containing a single key:value pair.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.18.0
|
|
* @category Object
|
|
* @sig String -> a -> {String:a}
|
|
* @param {String} key
|
|
* @param {*} val
|
|
* @return {Object}
|
|
* @see R.pair
|
|
* @example
|
|
*
|
|
* const matchPhrases = R.compose(
|
|
* R.objOf('must'),
|
|
* R.map(R.objOf('match_phrase'))
|
|
* );
|
|
* matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]}
|
|
*/
|
|
var objOf = /*#__PURE__*/_curry2(function objOf(key, val) {
|
|
var obj = {};
|
|
obj[key] = val;
|
|
return obj;
|
|
});
|
|
export default objOf; |