mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-09 21:28:43 +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>
35 lines
936 B
JavaScript
35 lines
936 B
JavaScript
import _curry2 from './internal/_curry2.js';
|
|
|
|
/**
|
|
* Acts as multiple `prop`: array of keys in, array of values out. Preserves
|
|
* order.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.1.0
|
|
* @category Object
|
|
* @sig [k] -> {k: v} -> [v]
|
|
* @param {Array} ps The property names to fetch
|
|
* @param {Object} obj The object to query
|
|
* @return {Array} The corresponding values or partially applied function.
|
|
* @example
|
|
*
|
|
* R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2]
|
|
* R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2]
|
|
*
|
|
* const fullName = R.compose(R.join(' '), R.props(['first', 'last']));
|
|
* fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth'
|
|
*/
|
|
var props = /*#__PURE__*/_curry2(function props(ps, obj) {
|
|
var len = ps.length;
|
|
var out = [];
|
|
var idx = 0;
|
|
|
|
while (idx < len) {
|
|
out[idx] = obj[ps[idx]];
|
|
idx += 1;
|
|
}
|
|
|
|
return out;
|
|
});
|
|
export default props; |