Skip to content

Commit

Permalink
Merge pull request #202 from nzzdev/release-7.2.9
Browse files Browse the repository at this point in the history
Release 7.2.9
  • Loading branch information
dnlbln authored Jul 13, 2023
2 parents e29caa2 + 0474509 commit 429d0b8
Show file tree
Hide file tree
Showing 8 changed files with 1,174 additions and 1,052 deletions.
2 changes: 1 addition & 1 deletion dist/Q-Table.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/routes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Ajv from 'ajv';
import Boom from '@hapi/boom';
import { formatLocale as formatLocale$1 } from 'd3-format';
import CountryFlagEmojis from '@nzz/et-utils-country-flag-emoji';
import CountryFlags from '@nzz/et-utils-country-flags';
import * as simpleStatistics from 'simple-statistics';
import { readFileSync } from 'fs';
import path, { dirname } from 'path';
Expand Down Expand Up @@ -148,7 +148,7 @@ function formatTableData(dataWithHeader, footnotes, options) {
function formatCell(rawValue, type, useGroupingSeparator = false) {
let label = '';
if (type === 'country_flags') {
return formatCountryFlagEmojiDatapoint(rawValue);
return formatCountryFlagDatapoint(rawValue);
}
const parsedRawValue = parseFloat(rawValue || '');
if (isNaN(parsedRawValue)) {
Expand Down Expand Up @@ -211,12 +211,12 @@ function formatCell(rawValue, type, useGroupingSeparator = false) {
classes: ['s-font-note--tabularnums'],
};
}
function formatCountryFlagEmojiDatapoint(rawValue) {
function formatCountryFlagDatapoint(rawValue) {
let label = '';
if (typeof rawValue === 'string') {
const valueRetyped = rawValue.toUpperCase();
if (CountryFlagEmojis[valueRetyped]) {
label = CountryFlagEmojis[valueRetyped];
if (CountryFlags[valueRetyped]) {
label = CountryFlags[valueRetyped];
}
}
return {
Expand Down
Loading

0 comments on commit 429d0b8

Please sign in to comment.