mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 17:57:36 +08:00
Major update breaking changes: - ESLint 7.0.0 (https://eslint.org/docs/user-guide/migrating-to-7.0.0) now includes .eslint.rc.js in its list, which is fine for us. Other changes are not applicable for us. - eslint-plugin-mocha (https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/CHANGELOG.md#700-may-13-2020) drops support for ESLint <7, but this CL updates to 7+. Other changes are not applicable for us. DISABLE_THIRD_PARTY_CHECK=Updating ESLint R=petermarshall@chromium.org Change-Id: I7760e084ef87f73a92f9ea4e075fb4c065047f5a Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2534873 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
37 lines
944 B
JavaScript
37 lines
944 B
JavaScript
import _curry2 from "./internal/_curry2.js";
|
|
/**
|
|
* Similar to `pick` except that this one includes a `key: undefined` pair for
|
|
* properties that don't exist.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.1.0
|
|
* @category Object
|
|
* @sig [k] -> {k: v} -> {k: v}
|
|
* @param {Array} names an array of String property names to copy onto a new object
|
|
* @param {Object} obj The object to copy from
|
|
* @return {Object} A new object with only properties from `names` on it.
|
|
* @see R.pick
|
|
* @example
|
|
*
|
|
* R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}
|
|
* R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined}
|
|
*/
|
|
|
|
var pickAll =
|
|
/*#__PURE__*/
|
|
_curry2(function pickAll(names, obj) {
|
|
var result = {};
|
|
var idx = 0;
|
|
var len = names.length;
|
|
|
|
while (idx < len) {
|
|
var name = names[idx];
|
|
result[name] = obj[name];
|
|
idx += 1;
|
|
}
|
|
|
|
return result;
|
|
});
|
|
|
|
export default pickAll; |