github markup

This commit is contained in:
Apostolakis Myron
2017-12-22 10:29:48 +02:00
parent 69ec3c3fe7
commit dde5981f11

View File

@ -2,21 +2,22 @@
Filter an array of objects based on condition and return array with reduced objects.
// ----------------------------------- Input -----------------------------------//
// 1. Data: the data to be filtered (array of objects) -------------------------//
// 2. Condition: will be used for filtering (string) ---------------------------//
// 3. outputProps: an array of properties that will be used to contruct --------//
// new array of objects --------------------------------------------------------//
#### Input
// ----------------------------------- Output ----------------------------------//
// Filtered array with new objects. Properties of new objects are a subset of --//
// properties of original objects ----------------------------------------------//
i. Data: the data to be filtered (array of objects)
ii. Condition: will be used for filtering (string)
iii. outputProps: an array of properties that will be used to contruct new array of objects
// ----------------------------------- Info ------------------------------------//
// Used ES6 reduce -------------------------------------------------------------//
// Dummy data for testing ------------------------------------------------------//
// Generated with http://www.mockaroo.com/ -------------------------------------//
#### Output
Filtered array with new objects. Properties of new objects are a subset of
properties of original objects
#### Info
Used ES6 reduce
Dummy data for testing
Generated with http://www.mockaroo.com/
```js
const reducedFilter = (data, condition, outputProps) =>