All files / src/components/Icon icons.js

0% Statements 0/8
0% Branches 0/4
0% Functions 0/2
0% Lines 0/4
1 2 3 4 5 6 7 8 9 10 11 12                       
import path from 'path';
import { Map } from 'immutable';
 
const requiredIcons = require.context('.', false, /\.svg$/);
export default requiredIcons.keys().reduce(
  (map, key) => map.set(
    key.match(new RegExp(`.\\${path.sep}(.+)\\.svg$`))[1],
    requiredIcons(key)
  ),
  new Map()
);