mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-05 11:31:31 +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>
26 lines
920 B
JavaScript
26 lines
920 B
JavaScript
import _map from './internal/_map.js';
|
|
import identity from './identity.js';
|
|
import pickAll from './pickAll.js';
|
|
import useWith from './useWith.js';
|
|
|
|
/**
|
|
* Reasonable analog to SQL `select` statement.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.1.0
|
|
* @category Object
|
|
* @category Relation
|
|
* @sig [k] -> [{k: v}] -> [{k: v}]
|
|
* @param {Array} props The property names to project
|
|
* @param {Array} objs The objects to query
|
|
* @return {Array} An array of objects with just the `props` properties.
|
|
* @example
|
|
*
|
|
* const abby = {name: 'Abby', age: 7, hair: 'blond', grade: 2};
|
|
* const fred = {name: 'Fred', age: 12, hair: 'brown', grade: 7};
|
|
* const kids = [abby, fred];
|
|
* R.project(['name', 'grade'], kids); //=> [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}]
|
|
*/
|
|
var project = /*#__PURE__*/useWith(_map, [pickAll, identity]); // passing `identity` gives correct arity
|
|
export default project; |