/
vshmidt
/
cloudbeaver
Обзор
Документация
Войти
/
vshmidt
/
cloudbeaver
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
devel
webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/BooleanValue/preprocessBooleanValue.ts
20 строк
628 B
Alexey Potsetsuev
dbeaver/pro#7080 refactor: grid API (#3799)
13 окт 2025, 14:30
Не верифицирован
13 окт 2025, 14:30
682a387
Код
Авторство
О чём код?
/* * CloudBeaver - Cloud Database Manager * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ import { isStringifiedBoolean } from './isBooleanValuePresentationAvailable.js'; export function preprocessBooleanValue(cellValue: unknown): boolean | null | undefined { if (typeof cellValue === 'string' && isStringifiedBoolean(cellValue)) { return cellValue.toLowerCase() === 'true'; } if (typeof cellValue === 'boolean' || cellValue === null) { return cellValue; } return undefined; }