This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Immutable = require('immutable'); | |
const immutableProfile = Immutable.fromJS({ | |
data: [ | |
{ | |
name: 'Adebayo Akinlaja', | |
gender: 'Male', | |
properties: { | |
eyeColor: 'Blue', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* deeply flattens the content of an array recursively | |
* @param {Array} arr - the array to flatten | |
* @param {Array} acc - the accumulator array object | |
*/ | |
function DeepFlatten(arr, acc) { | |
if (!(arr instanceof Array)) return acc.push(arr); | |
arr.forEach((value) => DeepFlatten(value, acc)); | |
return acc; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"extends": [ | |
"airbnb", | |
"eslint:recommended", | |
"plugin:import/errors", | |
"plugin:import/warnings" | |
], | |
"plugins": [ | |
"react" | |
], |