project

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
1 KB
Reasonable analog to SQL `select` statement.
1 contributor
Install project as a package?
Copied
npm i @bit/justin-capalbo.ramda.project
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
project (
props:Array,
objs:Array
) : Array

Reasonable analog to SQL select statement.

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}]
Arguments
props: Array

The property names to project

objs: Array

The objects to query

Returns
Array

An array of objects with just the `props` properties.

Help and resources