MCPcopy Index your code
hub / github.com/gajus/react-css-modules / linkArray

Function linkArray

src/linkClass.js:10–23  ·  view source on GitHub ↗
(array: Array, styles: Object, configuration: Object)

Source from the content-addressed store, hash-verified

8import generateAppendClassName from './generateAppendClassName';
9
10const linkArray = (array: Array, styles: Object, configuration: Object) => {
11 _.forEach(array, (value, index) => {
12 if (React.isValidElement(value)) {
13 // eslint-disable-next-line no-use-before-define
14 array[index] = linkElement(React.Children.only(value), styles, configuration);
15 } else if (_.isArray(value)) {
16 const unfreezedValue = Object.isFrozen(value) ? objectUnfreeze(value) : value;
17
18 array[index] = linkArray(unfreezedValue, styles, configuration);
19 }
20 });
21
22 return array;
23};
24
25const linkElement = (element: ReactElement, styles: Object, configuration: Object): ReactElement => {
26 let appendClassName;

Callers 1

linkElementFunction · 0.85

Calls 1

linkElementFunction · 0.85

Tested by

no test coverage detected