const groupBy = key => array =>
array.reduce((objectsByKeyValue, obj) => {
const value = obj[key];
objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
return objectsByKeyValue;
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
CREATE TABLE IF NOT EXISTS `country` ( | |
`iso2` char(2) NOT NULL, | |
`name` varchar(45) NOT NULL, | |
`iso3` char(3) NOT NULL, | |
`numeric` smallint(3) UNSIGNED NOT NULL, | |
PRIMARY KEY (`iso2`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
INSERT INTO `country` (`iso2`, `name`, `iso3`, `numeric`) VALUES | |
('AF', 'Afghanistan', 'AFG', 4), |
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
// Add a 401 response interceptor | |
window.axios.interceptors.response.use(function (response) { | |
return response; | |
}, function (error) { | |
if (401 === error.response.status) { | |
swal({ | |
title: "Session Expired", | |
text: "Your session has expired. Would you like to be redirected to the login page?", | |
type: "warning", | |
showCancelButton: true, |
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
<article class="list-thema js-fixie"> | |
<h2></h2> | |
<ul class="js-columnize"> | |
<li><a href=""><i class="icon-chevron-right"></i></a></li> | |
<li><a href=""></a></li> | |
<li><a href=""></a></li> | |
<li><a href=""></a></li> | |
<li><a href=""></a></li> | |
<li><a href=""></a></li> | |
<li><a href=""></a></li> |