File size: 458 Bytes
da96562
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */

export function isBooleanLikeSet(value: number|string|boolean): boolean {
  return !!value && value !== '0';
}

export function resolveExportSupportsFlat(
  reportSupportsFlatten: boolean,
  flatParam: number|string|boolean,
): boolean {
  return reportSupportsFlatten || isBooleanLikeSet(flatParam);
}